The DOM API requires that it be a real object rather than static methods. However, there's nothing that says it can't be a singleton, so that's how I've implemented it.
This particular class, along with CoreDocumentImpl, supports the DOM Core and Load/Save (Experimental). Optional modules are supported by the more complete DOMImplementation class along with DocumentImpl.
Modifier and Type | Class and Description |
---|---|
pack-priv static class | CoreDOMImplementationImpl.
A holder for RevalidationHandlers. |
pack-priv static class | CoreDOMImplementationImpl.
A holder for XMLDTDLoaders. |
Modifier and Type | Field and Description |
---|---|
private int | |
private int | |
private int | |
private int | |
private int | |
private int | |
private SoftReference | |
private int | |
pack-priv static final CoreDOMImplementationImpl | singleton
Dom implementation singleton. |
private static final int | |
private int | |
private SoftReference | |
private SoftReference | |
private int | |
private int | |
private SoftReference | |
private SoftReference | |
private int |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
protected synchronized int | |
protected synchronized int | |
pack-priv final void | |
public Document | Returns: Document A new Document object.The namespace URI of the document
element to create, or null. namespaceURI, String The qualified name of the document
element to create. qualifiedName, DocumentType The type of document to be created or null. doctype)When doctype is not null, its Node.ownerDocument attribute is set to the document being created. Implements org. Introduced in DOM Level 2. |
protected CoreDocumentImpl | |
public DocumentType | createDocumentType(String
The qualified name of the document type to be created. qualifiedName, String The document type public identifier. publicID, String The document type system identifier. systemID)Implements org. Introduced in DOM Level 2. |
public LSInput | Returns: The newly created input object.Implements org. DOM Level 3 LS CR - Experimental. |
public LSOutput | createLSOutput()
Implements org. Create a new empty output destination object where
|
public LSParser | Returns: The newly createdLSParser object. This
LSParser is either synchronous or asynchronous
depending on the value of the mode argument.Note By default, the newly created The mode, String mode argument is either
MODE_SYNCHRONOUS or MODE_ASYNCHRONOUS , if
mode is MODE_SYNCHRONOUS then the
LSParser that is created will operate in synchronous
mode, if it's MODE_ASYNCHRONOUS then the
LSParser that is created will operate in asynchronous
mode.An absolute URI representing the type of the schema
language used during the load of a schemaType)Document using the
newly created LSParser . Note that no lexical checking
is done on the absolute URI. In order to create a
LSParser for any kind of schema types (i.e. the
LSParser will be free to use any schema found), use the value
null .Note For W3C XML Schema [XML Schema Part 1]
, applications must use the value
Implements org. DOM Level 3 LS CR - Experimental. |
public LSSerializer | Returns: The newly createdLSSerializer object.Note By default, the newly created
Implements org. DOM Level 3 LS CR - Experimental. |
public static DOMImplementation | |
pack-priv final synchronized XMLDTDLoader | |
public Object | getFeature(String
The name of the feature requested. Note that any plus
sign "+" prepended to the name of the feature will be ignored since
it is not significant in the context of this method. feature, String This is the version number of the feature to test. version)Implements org. DOM Level 3 WD - Experimental. |
pack-priv synchronized RevalidationHandler | |
public boolean | Returns: true if this implementation is compatible with the specified feature and version.The package name of the feature to test.
In Level 1, supported values are "HTML" and "XML" (case-insensitive).
At this writing, com.sun.org.apache.xerces.internal.dom supports only XML. feature, String The version number of the feature being tested.
This is interpreted as "Version of the DOM API supported for the
specified Feature", and in Level 1 should be "1.0" version)Implements org. Test if the DOM implementation supports a specific "feature" -- currently meaning language and level thereof. |
pack-priv final synchronized void | |
pack-priv synchronized void | releaseValidator(String schemaType, String xmlVersion, RevalidationHandler validator)
NON-DOM: release validator |
docAndDoctypeCounter | back to summary |
---|---|
private int docAndDoctypeCounter |
freeSchemaValidatorIndex | back to summary |
---|---|
private int freeSchemaValidatorIndex |
freeXML10DTDLoaderIndex | back to summary |
---|---|
private int freeXML10DTDLoaderIndex |
freeXML10DTDValidatorIndex | back to summary |
---|---|
private int freeXML10DTDValidatorIndex |
freeXML11DTDLoaderIndex | back to summary |
---|---|
private int freeXML11DTDLoaderIndex |
freeXML11DTDValidatorIndex | back to summary |
---|---|
private int freeXML11DTDValidatorIndex |
schemaValidators | back to summary |
---|---|
private SoftReference<T>[] schemaValidators |
schemaValidatorsCurrentSize | back to summary |
---|---|
private int schemaValidatorsCurrentSize |
singleton | back to summary |
---|---|
pack-priv static final CoreDOMImplementationImpl singleton Dom implementation singleton. |
SIZE | back to summary |
---|---|
private static final int SIZE |
xml10DTDLoaderCurrentSize | back to summary |
---|---|
private int xml10DTDLoaderCurrentSize |
xml10DTDLoaders | back to summary |
---|---|
private SoftReference<T>[] xml10DTDLoaders |
xml10DTDValidators | back to summary |
---|---|
private SoftReference<T>[] xml10DTDValidators |
xml10DTDValidatorsCurrentSize | back to summary |
---|---|
private int xml10DTDValidatorsCurrentSize |
xml11DTDLoaderCurrentSize | back to summary |
---|---|
private int xml11DTDLoaderCurrentSize |
xml11DTDLoaders | back to summary |
---|---|
private SoftReference<T>[] xml11DTDLoaders |
xml11DTDValidators | back to summary |
---|---|
private SoftReference<T>[] xml11DTDValidators |
xml11DTDValidatorsCurrentSize | back to summary |
---|---|
private int xml11DTDValidatorsCurrentSize |
CoreDOMImplementationImpl | back to summary |
---|---|
public CoreDOMImplementationImpl() |
assignDocTypeNumber | back to summary |
---|---|
protected synchronized int assignDocTypeNumber() NON-DOM: increment document/doctype counter |
assignDocumentNumber | back to summary |
---|---|
protected synchronized int assignDocumentNumber() NON-DOM: increment document/doctype counter |
checkQName | back to summary |
---|---|
pack-priv final void checkQName(String qname) |
createDocument | back to summary |
---|---|
public Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype) throws DOMException Implements org. Introduced in DOM Level 2. Creates an XML Document object of the specified type with its document element.
|
createDocument | back to summary |
---|---|
protected CoreDocumentImpl createDocument(DocumentType doctype) |
createDocumentType | back to summary |
---|---|
public DocumentType createDocumentType(String qualifiedName, String publicID, String systemID) Implements org. Introduced in DOM Level 2. Creates an empty DocumentType node.
|
createLSInput | back to summary |
---|---|
public LSInput createLSInput() Implements org. DOM Level 3 LS CR - Experimental. Create a new empty input source.
|
createLSOutput | back to summary |
---|---|
public LSOutput createLSOutput() Implements org. Doc from org. Create a new empty output destination object where
|
createLSParser | back to summary |
---|---|
public LSParser createLSParser(short mode, String schemaType) throws DOMException Implements org. DOM Level 3 LS CR - Experimental.
Create a new
|
createLSSerializer | back to summary |
---|---|
public LSSerializer createLSSerializer() Implements org. DOM Level 3 LS CR - Experimental.
Create a new
|
getDOMImplementation | back to summary |
---|---|
public static DOMImplementation getDOMImplementation() NON-DOM: Obtain and return the single shared object |
getDTDLoader | back to summary |
---|---|
pack-priv final synchronized XMLDTDLoader getDTDLoader(String xmlVersion) NON-DOM: retrieve DTD loader |
getFeature | back to summary |
---|---|
public Object getFeature(String feature, String version) Implements org. DOM Level 3 WD - Experimental.
|
getValidator | back to summary |
---|---|
pack-priv synchronized RevalidationHandler getValidator(String schemaType, String xmlVersion) NON-DOM: retrieve validator. |
hasFeature | back to summary |
---|---|
public boolean hasFeature(String feature, String version) Implements org. Test if the DOM implementation supports a specific "feature" -- currently meaning language and level thereof.
|
releaseDTDLoader | back to summary |
---|---|
pack-priv final synchronized void releaseDTDLoader(String xmlVersion, XMLDTDLoader loader) NON-DOM: release DTD loader |
releaseValidator | back to summary |
---|---|
pack-priv synchronized void releaseValidator(String schemaType, String xmlVersion, RevalidationHandler validator) NON-DOM: release validator |
Modifier and Type | Field and Description |
---|---|
pack-priv RevalidationHandler |
Access | Constructor and Description |
---|---|
pack-priv |
handler | back to summary |
---|---|
pack-priv RevalidationHandler handler |
RevalidationHandlerHolder | back to summary |
---|---|
pack-priv RevalidationHandlerHolder(RevalidationHandler handler) |
Modifier and Type | Field and Description |
---|---|
pack-priv XMLDTDLoader |
Access | Constructor and Description |
---|---|
pack-priv |
loader | back to summary |
---|---|
pack-priv XMLDTDLoader loader |
XMLDTDLoaderHolder | back to summary |
---|---|
pack-priv XMLDTDLoaderHolder(XMLDTDLoader loader) |