org.apache.xmlbeans.impl.schema
Class SchemaTypeLoaderBase

java.lang.Object
  extended by org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase
All Implemented Interfaces:
SchemaTypeLoader
Direct Known Subclasses:
BuiltinSchemaTypeSystem, SchemaTypeLoaderImpl, SchemaTypeSystemImpl, SoapEncSchemaTypeSystem, XQuerySchemaTypeSystem

public abstract class SchemaTypeLoaderBase
extends java.lang.Object
implements SchemaTypeLoader


Constructor Summary
SchemaTypeLoaderBase()
           
 
Method Summary
 java.lang.String compilePath(java.lang.String pathExpr)
           
 java.lang.String compilePath(java.lang.String pathExpr, XmlOptions options)
          Compiles an XPath
 java.lang.String compileQuery(java.lang.String queryExpr)
           
 java.lang.String compileQuery(java.lang.String queryExpr, XmlOptions options)
          Compiles an XQuery
 SchemaGlobalAttribute findAttribute(javax.xml.namespace.QName name)
          Returns the global attribute defintion with the given name, or null if none.
 SchemaAttributeGroup findAttributeGroup(javax.xml.namespace.QName name)
          Returns the attribute group defintion with the given name, or null if none.
 SchemaType findAttributeType(javax.xml.namespace.QName name)
          Returns the attribute type containing the given attribute name, or null if none.
 SchemaType findDocumentType(javax.xml.namespace.QName name)
          Returns the document type rooted at the given element name, or null if none.
 SchemaGlobalElement findElement(javax.xml.namespace.QName name)
          Returns the global element defintion with the given name, or null if none.
 SchemaModelGroup findModelGroup(javax.xml.namespace.QName name)
          Returns the model group defintion with the given name, or null if none.
 SchemaType findType(javax.xml.namespace.QName name)
          Returns the type with the given name, or null if none.
 DOMImplementation newDomImplementation(XmlOptions options)
          Returns a DOMImplementation.
 XmlObject newInstance(SchemaType type, XmlOptions options)
          Creates an instance of the given type.
 XMLInputStream newValidatingXMLInputStream(XMLInputStream xis, SchemaType type, XmlOptions options)
          Deprecated. XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API.
 XmlSaxHandler newXmlSaxHandler(SchemaType type, XmlOptions options)
          Returns an XmlSaxHandler that can parse an instance of the given type.
 XmlObject parse(java.io.File file, SchemaType type, XmlOptions options)
          Parses an instance of the given type.
 XmlObject parse(java.io.InputStream jiois, SchemaType type, XmlOptions options)
          Parses an instance of the given type.
 XmlObject parse(Node node, SchemaType type, XmlOptions options)
          Parses an instance of the given type.
 XmlObject parse(java.io.Reader jior, SchemaType type, XmlOptions options)
          Parses an instance of the given type.
 XmlObject parse(java.lang.String xmlText, SchemaType type, XmlOptions options)
          Parses an instance of the given type.
 XmlObject parse(java.net.URL url, SchemaType type, XmlOptions options)
          Parses an instance of the given type.
 XmlObject parse(XMLInputStream xis, SchemaType type, XmlOptions options)
          Deprecated. XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API.
 XmlObject parse(javax.xml.stream.XMLStreamReader xsr, SchemaType type, XmlOptions options)
          Parses an instance of the given type.
 SchemaType typeForSignature(java.lang.String signature)
          Utility function to load a type from a signature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.xmlbeans.SchemaTypeLoader
findAttributeGroupRef, findAttributeRef, findAttributeTypeRef, findDocumentTypeRef, findElementRef, findIdentityConstraintRef, findModelGroupRef, findTypeRef, getSourceAsStream, isNamespaceDefined, typeForClassname
 

Constructor Detail

SchemaTypeLoaderBase

public SchemaTypeLoaderBase()
Method Detail

findType

public SchemaType findType(javax.xml.namespace.QName name)
Description copied from interface: SchemaTypeLoader
Returns the type with the given name, or null if none.

Specified by:
findType in interface SchemaTypeLoader

findDocumentType

public SchemaType findDocumentType(javax.xml.namespace.QName name)
Description copied from interface: SchemaTypeLoader
Returns the document type rooted at the given element name, or null if none.

Specified by:
findDocumentType in interface SchemaTypeLoader

findAttributeType

public SchemaType findAttributeType(javax.xml.namespace.QName name)
Description copied from interface: SchemaTypeLoader
Returns the attribute type containing the given attribute name, or null if none.

Specified by:
findAttributeType in interface SchemaTypeLoader

findModelGroup

public SchemaModelGroup findModelGroup(javax.xml.namespace.QName name)
Description copied from interface: SchemaTypeLoader
Returns the model group defintion with the given name, or null if none.

Specified by:
findModelGroup in interface SchemaTypeLoader

findAttributeGroup

public SchemaAttributeGroup findAttributeGroup(javax.xml.namespace.QName name)
Description copied from interface: SchemaTypeLoader
Returns the attribute group defintion with the given name, or null if none.

Specified by:
findAttributeGroup in interface SchemaTypeLoader

findElement

public SchemaGlobalElement findElement(javax.xml.namespace.QName name)
Description copied from interface: SchemaTypeLoader
Returns the global element defintion with the given name, or null if none.

Specified by:
findElement in interface SchemaTypeLoader

findAttribute

public SchemaGlobalAttribute findAttribute(javax.xml.namespace.QName name)
Description copied from interface: SchemaTypeLoader
Returns the global attribute defintion with the given name, or null if none.

Specified by:
findAttribute in interface SchemaTypeLoader

newInstance

public XmlObject newInstance(SchemaType type,
                             XmlOptions options)
Description copied from interface: SchemaTypeLoader
Creates an instance of the given type.

Specified by:
newInstance in interface SchemaTypeLoader

parse

public XmlObject parse(java.lang.String xmlText,
                       SchemaType type,
                       XmlOptions options)
                throws XmlException
Description copied from interface: SchemaTypeLoader
Parses an instance of the given type.

Specified by:
parse in interface SchemaTypeLoader
Throws:
XmlException

parse

public XmlObject parse(XMLInputStream xis,
                       SchemaType type,
                       XmlOptions options)
                throws XmlException,
                       XMLStreamException
Deprecated. XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API.

Description copied from interface: SchemaTypeLoader
Parses an instance of the given type.

Specified by:
parse in interface SchemaTypeLoader
Throws:
XmlException
XMLStreamException

parse

public XmlObject parse(javax.xml.stream.XMLStreamReader xsr,
                       SchemaType type,
                       XmlOptions options)
                throws XmlException
Description copied from interface: SchemaTypeLoader
Parses an instance of the given type.

Specified by:
parse in interface SchemaTypeLoader
Throws:
XmlException

parse

public XmlObject parse(java.io.File file,
                       SchemaType type,
                       XmlOptions options)
                throws XmlException,
                       java.io.IOException
Description copied from interface: SchemaTypeLoader
Parses an instance of the given type.

Specified by:
parse in interface SchemaTypeLoader
Throws:
XmlException
java.io.IOException

parse

public XmlObject parse(java.net.URL url,
                       SchemaType type,
                       XmlOptions options)
                throws XmlException,
                       java.io.IOException
Description copied from interface: SchemaTypeLoader
Parses an instance of the given type.

Specified by:
parse in interface SchemaTypeLoader
Throws:
XmlException
java.io.IOException

parse

public XmlObject parse(java.io.InputStream jiois,
                       SchemaType type,
                       XmlOptions options)
                throws XmlException,
                       java.io.IOException
Description copied from interface: SchemaTypeLoader
Parses an instance of the given type.

Specified by:
parse in interface SchemaTypeLoader
Throws:
XmlException
java.io.IOException

parse

public XmlObject parse(java.io.Reader jior,
                       SchemaType type,
                       XmlOptions options)
                throws XmlException,
                       java.io.IOException
Description copied from interface: SchemaTypeLoader
Parses an instance of the given type.

Specified by:
parse in interface SchemaTypeLoader
Throws:
XmlException
java.io.IOException

parse

public XmlObject parse(Node node,
                       SchemaType type,
                       XmlOptions options)
                throws XmlException
Description copied from interface: SchemaTypeLoader
Parses an instance of the given type.

Specified by:
parse in interface SchemaTypeLoader
Throws:
XmlException

newXmlSaxHandler

public XmlSaxHandler newXmlSaxHandler(SchemaType type,
                                      XmlOptions options)
Description copied from interface: SchemaTypeLoader
Returns an XmlSaxHandler that can parse an instance of the given type.

Specified by:
newXmlSaxHandler in interface SchemaTypeLoader

newDomImplementation

public DOMImplementation newDomImplementation(XmlOptions options)
Description copied from interface: SchemaTypeLoader
Returns a DOMImplementation.

Specified by:
newDomImplementation in interface SchemaTypeLoader

newValidatingXMLInputStream

public XMLInputStream newValidatingXMLInputStream(XMLInputStream xis,
                                                  SchemaType type,
                                                  XmlOptions options)
                                           throws XmlException,
                                                  XMLStreamException
Deprecated. XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API.

Description copied from interface: SchemaTypeLoader
Returns a validating XMLInputStream that will throw an exception if the XML is not valid

Specified by:
newValidatingXMLInputStream in interface SchemaTypeLoader
Throws:
XmlException
XMLStreamException

compilePath

public java.lang.String compilePath(java.lang.String pathExpr)

compilePath

public java.lang.String compilePath(java.lang.String pathExpr,
                                    XmlOptions options)
Description copied from interface: SchemaTypeLoader
Compiles an XPath

Specified by:
compilePath in interface SchemaTypeLoader

compileQuery

public java.lang.String compileQuery(java.lang.String queryExpr)

compileQuery

public java.lang.String compileQuery(java.lang.String queryExpr,
                                     XmlOptions options)
Description copied from interface: SchemaTypeLoader
Compiles an XQuery

Specified by:
compileQuery in interface SchemaTypeLoader

typeForSignature

public SchemaType typeForSignature(java.lang.String signature)
Utility function to load a type from a signature. A signature is the string you get from type.toString().

Specified by:
typeForSignature in interface SchemaTypeLoader