Skip navigation links

Oracle® Database XML Java API Reference
12c Release 1 (12.1)

E15981-09


oracle.xml.binxml
Interface BinXMLMetadataProvider

All Known Subinterfaces:
DBBinXMLMetadataProvider

public interface BinXMLMetadataProvider

This interface defines APIs for users to plug in a metadata repository used for encoding and decoding. A database implementation of this API is provided , see DBBinXMLMetadataProvider interface.


Method Summary
 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.
 BinXMLStream getTokenSet(java.lang.String namespaceURL, boolean isAttr)
          Fetches the Token Set as a binary stream in the metadata repository based on the namespace URL.
 boolean isSchemaAnnotationAvailable()
          Specifies whether the repository performs schema annotations or not.
 BinXMLVocabId saveCompiledSchema(java.lang.String schemaURL)
          Saves the annotated 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 schemaURL)
          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.

 

Method Detail

isSchemaAnnotationAvailable

boolean isSchemaAnnotationAvailable()
                                    throws BinXMLException
Specifies whether the repository performs schema annotations or not. For example for the database (DBBinXMLMetadataProvider) will return true here. The Binary XML Processor calls this API to determine whether to call saveSchema for registering a schema in the repository where the annotations are performed by the repository or call saveCompiledSchema for saving a already annotated schema to the repository. Non-database repositories might typically return false here.
Returns:
true if the repository does schema annotations while saving schemas otherwise the repository returns false
Throws:
BinXMLException

getCompiledSchema

java.io.Reader getCompiledSchema(BinXMLVocabId schemaId)
                                 throws BinXMLException
Fetches the schema as a binary stream from the metadata repository based on the vocabulary id.
Parameters:
schemaId - - vocabulary id of the schema to be fetched
Returns:
binary stream version of the annotated schema doc
Throws:
BinXMLException

getCompiledSchema

java.io.Reader getCompiledSchema(java.lang.String schemaURL)
                                 throws BinXMLException
Fetches the schema as a binary stream from the metadata repository based on the schema URL.
Parameters:
schemaURL - - URL of the schema to be fetched
Returns:
binary stream version of the annotated schema doc
Throws:
BinXMLException

saveSchema

BinXMLVocabId saveSchema(java.lang.String schemaURL)
                         throws BinXMLException
The repository accepts a non-annotated schema, annotates it and saves it as a binary stream in the metadata repository.
Parameters:
schemaURL - - URL of the schema to be saved
Returns:
the vocabulary id of the saved schema
Throws:
BinXMLException

saveCompiledSchema

BinXMLVocabId saveCompiledSchema(java.lang.String schemaURL)
                                 throws BinXMLException
Saves the annotated schema as a binary stream in the metadata repository. s@param chemaURL - URL of the schema to be saved
Returns:
the vocabulary id saved schema
Throws:
BinXMLException

getDTD

BinXMLStream getDTD(BinXMLVocabId dtdId)
                    throws BinXMLException
Fetches the DTD as a binary stream from the metadata repository based on the vocabulary id.
Parameters:
dtdId - - vocabulary id of the DTD to be fetched
Returns:
binary stream version of the DTD
Throws:
BinXMLException

getDTD

BinXMLStream getDTD(java.lang.String dtdURL)
                    throws BinXMLException
Fetches the DTD as a binary stream from the metadata repository based on the DTD URL.
Parameters:
dtdURL - - URL of the DTD to be fetched
Returns:
binary stream version of the DTD
Throws:
BinXMLException

saveDTD

BinXMLVocabId saveDTD(java.lang.String dtdURL)
                      throws BinXMLException
Saves the DTD as a binary stream in the metadata repository.
Parameters:
dtdURL - - URL of the DTD to be saved
Returns:
the vocabulary id of the DTD to be saved
Throws:
BinXMLException

getTokenSet

BinXMLStream getTokenSet(java.lang.String namespaceURL,
                         boolean isAttr)
                         throws BinXMLException
Fetches the Token Set as a binary stream in the metadata repository based on the namespace URL.
Parameters:
namespaceURL - - namespace URL of the Token Set to be fetched
isAttr - - is the token set to be returned of type element or attr
Returns:
binary stream version of the Token Set
Throws:
BinXMLException

getTokenSet

BinXMLStream getTokenSet(long tokenId,
                         boolean isNS)
                         throws BinXMLException
Fetches the Token Set as a binary stream in the metadata repository based on the namespace of the input token Id.
Parameters:
tokenId - - token Id contained in the Token Set to be fetched
isNS - - if this token is a namespace decl, then true, otherwise false
Returns:
binary stream version of the Token Set
Throws:
BinXMLException

getTokenSet

BinXMLStream getTokenSet(long tokenId)
                         throws BinXMLException
Fetches the Token Set as a binary stream in the metadata repository based on the input token id.
Parameters:
tokenId - - token Id contained in the Token Set to be fetched
Returns:
binary stream version of the Token Set
Throws:
BinXMLException

saveTokenSet

BinXMLVocabId saveTokenSet(java.lang.String namespaceURL)
                           throws BinXMLException
Saves the Token Set as a binary stream in the metadata repository.
Parameters:
namespaceURL - - namespace URL of the Token Set to be saved
Returns:
vocabulary id of the Token Set saved in the metadata repository
Throws:
BinXMLException

Skip navigation links

Oracle® Database XML Java API Reference
12c Release 1 (12.1)

E15981-09


Copyright © 2003, 2014, Oracle and/or its affiliates. All rights reserved.