Package org.dom4j.datatype
Class DatatypeDocumentFactory
- java.lang.Object
-
- org.dom4j.DocumentFactory
-
- org.dom4j.datatype.DatatypeDocumentFactory
-
- All Implemented Interfaces:
java.io.Serializable
public class DatatypeDocumentFactory extends DocumentFactory
DatatypeDocumentFactoryis a factory of XML objects which support the XML Schema Data Types specification.- Version:
- $Revision: 1.9 $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private booleanautoLoadSchemaIf schemas are automatically loaded when parsing instance documentsprivate static booleanDO_INTERN_QNAMEprivate SchemaParserschemaBuilderThe builder of XML Schemasprotected static DatatypeDocumentFactorysingletonThe Singleton instanceprivate SAXReaderxmlSchemaReaderreader of XML Schemasprivate static NamespaceXSI_NAMESPACEprivate static QNameXSI_NO_SCHEMA_LOCATIONprivate static QNameXSI_SCHEMA_LOCATION-
Fields inherited from class org.dom4j.DocumentFactory
cache
-
-
Constructor Summary
Constructors Constructor Description DatatypeDocumentFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributecreateAttribute(Element owner, QName qname, java.lang.String value)DatatypeElementFactorygetElementFactory(QName elementQName)Registers the givenDatatypeElementFactoryfor the given <element> schema elementstatic DocumentFactorygetInstance()Access to the singleton instance of this factory.voidloadSchema(Document schemaDocument)Loads the given XML Schema document into this factory so schema-aware Document, Elements and Attributes will be created by this factory.protected voidloadSchema(Document document, java.lang.String schemaInstanceURI)protected voidloadSchema(Document document, java.lang.String schemaInstanceURI, Namespace namespace)voidloadSchema(Document schemaDocument, Namespace targetNamespace)-
Methods inherited from class org.dom4j.DocumentFactory
createAttribute, createCDATA, createComment, createDocType, createDocument, createDocument, createDocument, createElement, createElement, createElement, createEntity, createNamespace, createPattern, createProcessingInstruction, createProcessingInstruction, createQName, createQName, createQName, createQName, createQNameCache, createSingleton, createText, createXPath, createXPath, createXPathFilter, createXPathFilter, getQNames, getXPathNamespaceURIs, init, intern, setXPathNamespaceURIs
-
-
-
-
Field Detail
-
DO_INTERN_QNAME
private static final boolean DO_INTERN_QNAME
- See Also:
- Constant Field Values
-
singleton
protected static transient DatatypeDocumentFactory singleton
The Singleton instance
-
XSI_NAMESPACE
private static final Namespace XSI_NAMESPACE
-
XSI_SCHEMA_LOCATION
private static final QName XSI_SCHEMA_LOCATION
-
XSI_NO_SCHEMA_LOCATION
private static final QName XSI_NO_SCHEMA_LOCATION
-
schemaBuilder
private SchemaParser schemaBuilder
The builder of XML Schemas
-
xmlSchemaReader
private SAXReader xmlSchemaReader
reader of XML Schemas
-
autoLoadSchema
private boolean autoLoadSchema
If schemas are automatically loaded when parsing instance documents
-
-
Method Detail
-
getInstance
public static DocumentFactory getInstance()
Access to the singleton instance of this factory.
- Returns:
- the default singleon instance
-
loadSchema
public void loadSchema(Document schemaDocument)
Loads the given XML Schema document into this factory so schema-aware Document, Elements and Attributes will be created by this factory.- Parameters:
schemaDocument- is an XML Schema Document instance.
-
getElementFactory
public DatatypeElementFactory getElementFactory(QName elementQName)
Registers the givenDatatypeElementFactoryfor the given <element> schema element- Parameters:
elementQName- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
createAttribute
public Attribute createAttribute(Element owner, QName qname, java.lang.String value)
- Overrides:
createAttributein classDocumentFactory
-
loadSchema
protected void loadSchema(Document document, java.lang.String schemaInstanceURI)
-
-