public class DBBinXMLMetadataProviderImpl extends java.lang.Object implements DBBinXMLMetadataProvider
Modifier and Type | Method and Description |
---|---|
void |
associateDataConnection(java.sql.Connection dataconn)
Associates a data connection with DBBinXMLMetadataProvider.
|
java.io.Reader |
getCompiledSchema(BinXMLVocabId schemaId)
Fetches the schema as a binary stream from the metadata repository based on the vocabulary id.
|
java.io.Reader |
getCompiledSchema(java.lang.String schemaURL)
Fetches the schema as a binary stream from the metadata repository based on the schema URL.
|
BinXMLStream |
getDTD(BinXMLVocabId dtdId)
Fetches the DTD as a binary stream from the metadata repository based on the vocabulary id.
|
BinXMLStream |
getDTD(java.lang.String dtdURL)
Fetches the DTD as a binary stream from the metadata repository based on the DTD URL.
|
BinXMLStream |
getTokenSet(long tokenId)
Fetches the Token Set as a binary stream in the metadata repository based on the input token id.
|
BinXMLStream |
getTokenSet(long tokenId, boolean isNS)
Fetches the Token Set as a binary stream in the metadata repository based on the namespace of the input token Id.
|
boolean |
isSchemaAnnotationAvailable()
Specifies whether the repository performs schema annotations or not.
|
BinXMLVocabId |
saveCompiledSchema(java.lang.String schemaURL)
Saves the compiled schema as a binary stream in the metadata repository.
|
BinXMLVocabId |
saveDTD(java.lang.String dtdURL)
Saves the DTD as a binary stream in the metadata repository.
|
BinXMLVocabId |
saveSchema(java.lang.String sschema)
The repository accepts a non-annotated schema, annotates it and saves it as a binary stream in the metadata repository.
|
BinXMLVocabId |
saveTokenSet(java.lang.String namespaceURL)
Saves the Token Set as a binary stream in the metadata repository.
|
void |
setConnection(java.sql.Connection metadataconn)
Sets connection to be used by DBBinXMLMetaDataProvider
|
void |
setConnectionPool(oracle.jdbc.pool.OracleDataSource connpool)
For OCI connection TODO: mv to Oracle DB subclass
|
void |
setConnStr(java.lang.String connstr, java.lang.String usr, java.lang.String passwd)
For Thin connection
|
void |
setDriver(java.sql.Driver driver)
Specify database driver to be used by DBBinXMLMetadataProvider
|
void |
setGUID(byte[] guid) |
void |
setURL(java.net.URL http, java.lang.String usrname, java.lang.String passwd)
For HTTP communication only or OCI driver?
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTokenSet
public void setConnection(java.sql.Connection metadataconn) throws BinXMLException, java.sql.SQLException
DBBinXMLMetadataProvider
setConnection
in interface DBBinXMLMetadataProvider
metadataconn
- This connection is used to store and retrieve metadata by a DBBinXMLMetadataProvider. If the associateDataConnection method is not called, this connection will also be used to store and retrieve binary data from the database.BinXMLException
- Raised for any non-SQL related errorsjava.sql.SQLException
- Raised for any SQL related errorspublic void setConnectionPool(oracle.jdbc.pool.OracleDataSource connpool) throws BinXMLException, java.sql.SQLException
setConnectionPool
in interface DBBinXMLMetadataProvider
connpool
- OracleDataSource for metadata retrievalBinXMLException
- Raised for any non-SQL related errorsjava.sql.SQLException
- Raised for any SQL related errorspublic void setDriver(java.sql.Driver driver)
DBBinXMLMetadataProvider
setDriver
in interface DBBinXMLMetadataProvider
driver
- user specified driverpublic void setURL(java.net.URL http, java.lang.String usrname, java.lang.String passwd) throws BinXMLException, java.sql.SQLException
setURL
in interface DBBinXMLMetadataProvider
http
- URL for connectionusrname
- user namepasswd
- password for userBinXMLException
- Raised for any non-SQL related errorsjava.sql.SQLException
- Raised for any SQL related errorspublic void setConnStr(java.lang.String connstr, java.lang.String usr, java.lang.String passwd) throws BinXMLException, java.sql.SQLException
setConnStr
in interface DBBinXMLMetadataProvider
connstr
- connection stringusr
- user namepasswd
- password for userBinXMLException
- Raised for any non-SQL related errorsjava.sql.SQLException
- Raised for any SQL related errorspublic void associateDataConnection(java.sql.Connection dataconn) throws BinXMLException
DBBinXMLMetadataProvider
associateDataConnection
in interface DBBinXMLMetadataProvider
dataconn
- JDBC connection used for storage and retrieval of Binary XML data.BinXMLException
- Raised for any errors encounteredpublic boolean isSchemaAnnotationAvailable() throws BinXMLException
isSchemaAnnotationAvailable
in interface BinXMLMetadataProvider
BinXMLException
public java.io.Reader getCompiledSchema(BinXMLVocabId schemaId) throws BinXMLException
getCompiledSchema
in interface BinXMLMetadataProvider
schemaId
- - vocabulary id of the schema to be fetchedBinXMLException
public java.io.Reader getCompiledSchema(java.lang.String schemaURL) throws BinXMLException
getCompiledSchema
in interface BinXMLMetadataProvider
schemaURL
- - URL of the schema to be fetchedBinXMLException
public BinXMLVocabId saveSchema(java.lang.String sschema) throws BinXMLException
saveSchema
in interface BinXMLMetadataProvider
sschema
- - String of the schema to be savedBinXMLException
public BinXMLVocabId saveCompiledSchema(java.lang.String schemaURL) throws BinXMLException
saveCompiledSchema
in interface BinXMLMetadataProvider
schemaURL
- - URL of the schema to be savedBinXMLException
public BinXMLStream getDTD(BinXMLVocabId dtdId) throws BinXMLException
getDTD
in interface BinXMLMetadataProvider
dtdId
- - vocabulary id of the DTD to be fetchedBinXMLException
public BinXMLStream getDTD(java.lang.String dtdURL) throws BinXMLException
getDTD
in interface BinXMLMetadataProvider
dtdURL
- - URL of the DTD to be fetchedBinXMLException
public BinXMLVocabId saveDTD(java.lang.String dtdURL) throws BinXMLException
saveDTD
in interface BinXMLMetadataProvider
dtdURL
- - URL of the DTD to be savedBinXMLException
public BinXMLStream getTokenSet(long tokenId) throws BinXMLException
BinXMLMetadataProvider
getTokenSet
in interface BinXMLMetadataProvider
tokenId
- - token Id contained in the Token Set to be fetchedBinXMLException
public BinXMLStream getTokenSet(long tokenId, boolean isNS) throws BinXMLException
getTokenSet
in interface BinXMLMetadataProvider
tokenId
- - token Id contained in the Token Set to be fetchedisNS
- - if this token is a namespace decl, then true, otherwise falseBinXMLException
public BinXMLVocabId saveTokenSet(java.lang.String namespaceURL) throws BinXMLException
saveTokenSet
in interface BinXMLMetadataProvider
namespaceURL
- - namespace URL of the Token Set to be savedBinXMLException
public void setGUID(byte[] guid)