|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.starlink.votable.dom.DelegatingNode
uk.ac.starlink.votable.dom.DelegatingDocument
public class DelegatingDocument
DOM Document implementation which delegates its operations to a base Document instance. This is the basic class which must be used and extended when using the delegate DOM package.
In order to specialise the nodes which appear in a DOM, you have to override the protected createDelegating* methods to return your own custom DelegatingNode subclasses.
| Field Summary |
|---|
| Fields inherited from interface org.w3c.dom.Node |
|---|
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
| Constructor Summary | |
|---|---|
DelegatingDocument(org.w3c.dom.Document base,
java.lang.String documentURI)
Constructs a new document which delegates its behaviour to a Document from another DOM. |
|
DelegatingDocument(java.lang.String documentURI)
Constructs a new empty document based on a new empty document got from the default DOM implementation. |
|
| Method Summary | |
|---|---|
org.w3c.dom.Node |
adoptNode(org.w3c.dom.Node source)
|
org.w3c.dom.Attr |
createAttribute(java.lang.String name)
|
org.w3c.dom.Attr |
createAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
|
org.w3c.dom.CDATASection |
createCDATASection(java.lang.String data)
|
org.w3c.dom.Comment |
createComment(java.lang.String data)
|
protected DelegatingAttr |
createDelegatingAttr(org.w3c.dom.Attr baseNode)
Creates a new node in this document that delegates to an object of class Attr
in the base model. |
protected DelegatingAttr |
createDelegatingAttr(org.w3c.dom.Attr baseNode,
boolean isId)
Creates a new node in this document that delegates to an object of class Attr and knows whether it is an
ID-type attribute or not. |
protected DelegatingCDATASection |
createDelegatingCDATASection(org.w3c.dom.CDATASection baseNode)
Creates a new node in this document that delegates to an object of class CDATASection
in the base model. |
protected DelegatingCharacterData |
createDelegatingCharacterData(org.w3c.dom.CharacterData baseNode)
Creates a new node in this document that delegates to an object of class CharacterData (not one of its subclasses)
in the base model. |
protected DelegatingComment |
createDelegatingComment(org.w3c.dom.Comment baseNode)
Creates a new node in this document that delegates to an object of class Comment
in the base model. |
protected DelegatingDocumentFragment |
createDelegatingDocumentFragment(org.w3c.dom.DocumentFragment baseNode)
Creates a new node in this document that delegates to an object of class DocumentFragment
in the base model. |
protected DelegatingDocumentType |
createDelegatingDocumentType(org.w3c.dom.DocumentType baseNode)
Creates a new node in this document that delegates to an object of class DocumentType
in the base model. |
protected DelegatingElement |
createDelegatingElement(org.w3c.dom.Element baseNode)
Creates a new node in this document that delegates to an object of class Element
in the base model. |
protected DelegatingEntity |
createDelegatingEntity(org.w3c.dom.Entity baseNode)
Creates a new node in this document that delegates to an object of class Entity
in the base model. |
protected DelegatingEntityReference |
createDelegatingEntityReference(org.w3c.dom.EntityReference baseNode)
Creates a new node in this document that delegates to an object of class EntityReference
in the base model. |
protected org.w3c.dom.NamedNodeMap |
createDelegatingNamedNodeMap(org.w3c.dom.NamedNodeMap baseMap)
Returns a NamedNodeMap which will dispense nodes in this document. |
protected org.w3c.dom.NodeList |
createDelegatingNodeList(org.w3c.dom.NodeList baseList)
Returns a NodeList which will dispense nodes in this document. |
protected DelegatingNotation |
createDelegatingNotation(org.w3c.dom.Notation baseNode)
Creates a new node in this document that delegates to an object of class Notation
in the base model. |
protected DelegatingProcessingInstruction |
createDelegatingProcessingInstruction(org.w3c.dom.ProcessingInstruction baseNode)
Creates a new node in this document that delegates to an object of class ProcessingInstruction
in the base model. |
protected DelegatingNode |
createDelegatingSimpleNode(org.w3c.dom.Node baseNode)
Creates a new node in this document that delegates to an object of class Node (not one of its subclasses)
in the base model. |
protected DelegatingText |
createDelegatingText(org.w3c.dom.Text baseNode)
Creates a new node in this document that delegates to an object of class Text (not one of its subclasses)
in the base model. |
org.w3c.dom.DocumentFragment |
createDocumentFragment()
|
org.w3c.dom.Element |
createElement(java.lang.String tagName)
|
org.w3c.dom.Element |
createElementNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
|
org.w3c.dom.EntityReference |
createEntityReference(java.lang.String name)
|
org.w3c.dom.ProcessingInstruction |
createProcessingInstruction(java.lang.String target,
java.lang.String data)
|
org.w3c.dom.Text |
createTextNode(java.lang.String data)
|
protected org.w3c.dom.Document |
getBaseDocument()
Returns the base document (the one to which this delegates). |
protected DelegatingNode |
getDelegator(org.w3c.dom.Node baseNode)
Returns the node in this document which delegates to (is based on) a given node in the base document. |
org.w3c.dom.DocumentType |
getDoctype()
|
org.w3c.dom.Element |
getDocumentElement()
|
java.lang.String |
getDocumentURI()
|
org.w3c.dom.DOMConfiguration |
getDomConfig()
|
org.w3c.dom.Element |
getElementById(java.lang.String elementId)
|
org.w3c.dom.NodeList |
getElementsByTagName(java.lang.String tagname)
|
org.w3c.dom.NodeList |
getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
|
org.w3c.dom.DOMImplementation |
getImplementation()
Returns the implementation of the base document. |
java.lang.String |
getInputEncoding()
|
boolean |
getStrictErrorChecking()
|
java.lang.String |
getXmlEncoding()
|
boolean |
getXmlStandalone()
|
java.lang.String |
getXmlVersion()
|
org.w3c.dom.Node |
importNode(org.w3c.dom.Node importedNode,
boolean deep)
|
void |
normalizeDocument()
|
org.w3c.dom.Node |
renameNode(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String qualifiedName)
|
void |
setDocumentURI(java.lang.String documentURI)
|
void |
setStrictErrorChecking(boolean strictErrorChecking)
|
void |
setXmlStandalone(boolean xmlStandalone)
|
void |
setXmlVersion(java.lang.String xmlVersion)
|
| Methods inherited from class uk.ac.starlink.votable.dom.DelegatingNode |
|---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.Node |
|---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
| Constructor Detail |
|---|
public DelegatingDocument(org.w3c.dom.Document base,
java.lang.String documentURI)
base - delegate document nodedocumentURI - location of the document, or nullpublic DelegatingDocument(java.lang.String documentURI)
documentURI - location of the document, or null| Method Detail |
|---|
protected DelegatingNode getDelegator(org.w3c.dom.Node baseNode)
baseNode - node in the base document
protected org.w3c.dom.Document getBaseDocument()
protected DelegatingNode createDelegatingSimpleNode(org.w3c.dom.Node baseNode)
Node (not one of its subclasses)
in the base model. This may be overridden to create specialised
node types.
baseNode - delegate node
protected DelegatingAttr createDelegatingAttr(org.w3c.dom.Attr baseNode)
Attr
in the base model. This may be overridden to create specialised
node types.
baseNode - delegate node
protected DelegatingAttr createDelegatingAttr(org.w3c.dom.Attr baseNode,
boolean isId)
Attr and knows whether it is an
ID-type attribute or not. This is not called by any method of
this class, but can be used by subclass implementations of
createDelegatingAttr(org.w3c.dom.Attr).
baseNode - delegate nodeisId - true if this node knows it is an ID, false if it knows
it isn't
protected DelegatingCDATASection createDelegatingCDATASection(org.w3c.dom.CDATASection baseNode)
CDATASection
in the base model. This may be overridden to create specialised
node types.
baseNode - delegate node
protected DelegatingCharacterData createDelegatingCharacterData(org.w3c.dom.CharacterData baseNode)
CharacterData (not one of its subclasses)
in the base model. This may be overridden to create specialised
node types.
baseNode - delegate node
protected DelegatingComment createDelegatingComment(org.w3c.dom.Comment baseNode)
Comment
in the base model. This may be overridden to create specialised
node types.
baseNode - delegate node
protected DelegatingDocumentFragment createDelegatingDocumentFragment(org.w3c.dom.DocumentFragment baseNode)
DocumentFragment
in the base model. This may be overridden to create specialised
node types.
baseNode - delegate node
protected DelegatingDocumentType createDelegatingDocumentType(org.w3c.dom.DocumentType baseNode)
DocumentType
in the base model. This may be overridden to create specialised
node types.
baseNode - delegate node
protected DelegatingElement createDelegatingElement(org.w3c.dom.Element baseNode)
Element
in the base model. This may be overridden to create specialised
node types.
baseNode - delegate node
protected DelegatingEntity createDelegatingEntity(org.w3c.dom.Entity baseNode)
Entity
in the base model. This may be overridden to create specialised
node types.
baseNode - delegate node
protected DelegatingEntityReference createDelegatingEntityReference(org.w3c.dom.EntityReference baseNode)
EntityReference
in the base model. This may be overridden to create specialised
node types.
baseNode - delegate node
protected DelegatingNotation createDelegatingNotation(org.w3c.dom.Notation baseNode)
Notation
in the base model. This may be overridden to create specialised
node types.
baseNode - delegate node
protected DelegatingProcessingInstruction createDelegatingProcessingInstruction(org.w3c.dom.ProcessingInstruction baseNode)
ProcessingInstruction
in the base model. This may be overridden to create specialised
node types.
baseNode - delegate node
protected DelegatingText createDelegatingText(org.w3c.dom.Text baseNode)
Text (not one of its subclasses)
in the base model. This may be overridden to create specialised
node types.
baseNode - delegate node
protected org.w3c.dom.NodeList createDelegatingNodeList(org.w3c.dom.NodeList baseList)
baseList - node list which dispenses nodes in the base document
protected org.w3c.dom.NamedNodeMap createDelegatingNamedNodeMap(org.w3c.dom.NamedNodeMap baseMap)
baseMap - node map which dispenses nodes in the base document
public org.w3c.dom.DOMImplementation getImplementation()
getImplementation in interface org.w3c.dom.Documentpublic org.w3c.dom.DocumentType getDoctype()
getDoctype in interface org.w3c.dom.Documentpublic org.w3c.dom.Element getDocumentElement()
getDocumentElement in interface org.w3c.dom.Documentpublic org.w3c.dom.Element createElement(java.lang.String tagName)
createElement in interface org.w3c.dom.Documentpublic org.w3c.dom.DocumentFragment createDocumentFragment()
createDocumentFragment in interface org.w3c.dom.Documentpublic org.w3c.dom.Text createTextNode(java.lang.String data)
createTextNode in interface org.w3c.dom.Documentpublic org.w3c.dom.Comment createComment(java.lang.String data)
createComment in interface org.w3c.dom.Documentpublic org.w3c.dom.CDATASection createCDATASection(java.lang.String data)
createCDATASection in interface org.w3c.dom.Document
public org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String target,
java.lang.String data)
createProcessingInstruction in interface org.w3c.dom.Documentpublic org.w3c.dom.Attr createAttribute(java.lang.String name)
createAttribute in interface org.w3c.dom.Documentpublic org.w3c.dom.EntityReference createEntityReference(java.lang.String name)
createEntityReference in interface org.w3c.dom.Documentpublic org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagname)
getElementsByTagName in interface org.w3c.dom.Document
public org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode,
boolean deep)
importNode in interface org.w3c.dom.Document
public org.w3c.dom.Element createElementNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
createElementNS in interface org.w3c.dom.Document
public org.w3c.dom.Attr createAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
createAttributeNS in interface org.w3c.dom.Document
public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
getElementsByTagNameNS in interface org.w3c.dom.Documentpublic org.w3c.dom.Element getElementById(java.lang.String elementId)
getElementById in interface org.w3c.dom.Documentpublic java.lang.String getInputEncoding()
getInputEncoding in interface org.w3c.dom.Documentpublic java.lang.String getXmlEncoding()
getXmlEncoding in interface org.w3c.dom.Documentpublic boolean getXmlStandalone()
getXmlStandalone in interface org.w3c.dom.Documentpublic void setXmlStandalone(boolean xmlStandalone)
setXmlStandalone in interface org.w3c.dom.Documentpublic java.lang.String getXmlVersion()
getXmlVersion in interface org.w3c.dom.Documentpublic void setXmlVersion(java.lang.String xmlVersion)
setXmlVersion in interface org.w3c.dom.Documentpublic boolean getStrictErrorChecking()
getStrictErrorChecking in interface org.w3c.dom.Documentpublic void setStrictErrorChecking(boolean strictErrorChecking)
setStrictErrorChecking in interface org.w3c.dom.Documentpublic java.lang.String getDocumentURI()
getDocumentURI in interface org.w3c.dom.Documentpublic void setDocumentURI(java.lang.String documentURI)
setDocumentURI in interface org.w3c.dom.Documentpublic org.w3c.dom.Node adoptNode(org.w3c.dom.Node source)
adoptNode in interface org.w3c.dom.Documentpublic org.w3c.dom.DOMConfiguration getDomConfig()
getDomConfig in interface org.w3c.dom.Documentpublic void normalizeDocument()
normalizeDocument in interface org.w3c.dom.Document
public org.w3c.dom.Node renameNode(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String qualifiedName)
renameNode in interface org.w3c.dom.Document
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||