|
||||||||||
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
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_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Constructor Summary | |
DelegatingDocument(Document base,
String documentURI)
Constructs a new document which delegates its behaviour to a Document from another DOM. |
|
DelegatingDocument(String documentURI)
Constructs a new empty document based on a new empty document got from the default DOM implementation. |
Method Summary | |
Attr |
createAttribute(String name)
|
Attr |
createAttributeNS(String namespaceURI,
String qualifiedName)
|
CDATASection |
createCDATASection(String data)
|
Comment |
createComment(String data)
|
protected DelegatingAttr |
createDelegatingAttr(Attr baseNode)
Creates a new node in this document that delegates to an object of class Attr
in the base model. |
protected DelegatingAttr |
createDelegatingAttr(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(CDATASection baseNode)
Creates a new node in this document that delegates to an object of class CDATASection
in the base model. |
protected DelegatingCharacterData |
createDelegatingCharacterData(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(Comment baseNode)
Creates a new node in this document that delegates to an object of class Comment
in the base model. |
protected DelegatingDocumentFragment |
createDelegatingDocumentFragment(DocumentFragment baseNode)
Creates a new node in this document that delegates to an object of class DocumentFragment
in the base model. |
protected DelegatingDocumentType |
createDelegatingDocumentType(DocumentType baseNode)
Creates a new node in this document that delegates to an object of class DocumentType
in the base model. |
protected DelegatingElement |
createDelegatingElement(Element baseNode)
Creates a new node in this document that delegates to an object of class Element
in the base model. |
protected DelegatingEntity |
createDelegatingEntity(Entity baseNode)
Creates a new node in this document that delegates to an object of class Entity
in the base model. |
protected DelegatingEntityReference |
createDelegatingEntityReference(EntityReference baseNode)
Creates a new node in this document that delegates to an object of class EntityReference
in the base model. |
protected NamedNodeMap |
createDelegatingNamedNodeMap(NamedNodeMap baseMap)
Returns a NamedNodeMap which will dispense nodes in this document. |
protected NodeList |
createDelegatingNodeList(NodeList baseList)
Returns a NodeList which will dispense nodes in this document. |
protected DelegatingNotation |
createDelegatingNotation(Notation baseNode)
Creates a new node in this document that delegates to an object of class Notation
in the base model. |
protected DelegatingProcessingInstruction |
createDelegatingProcessingInstruction(ProcessingInstruction baseNode)
Creates a new node in this document that delegates to an object of class ProcessingInstruction
in the base model. |
protected DelegatingNode |
createDelegatingSimpleNode(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(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. |
DocumentFragment |
createDocumentFragment()
|
Element |
createElement(String tagName)
|
Element |
createElementNS(String namespaceURI,
String qualifiedName)
|
EntityReference |
createEntityReference(String name)
|
ProcessingInstruction |
createProcessingInstruction(String target,
String data)
|
Text |
createTextNode(String data)
|
protected Document |
getBaseDocument()
Returns the base document (the one to which this delegates). |
protected DelegatingNode |
getDelegator(Node baseNode)
Returns the node in this document which delegates to (is based on) a given node in the base document. |
DocumentType |
getDoctype()
|
Element |
getDocumentElement()
|
Element |
getElementById(String elementId)
|
NodeList |
getElementsByTagName(String tagname)
|
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName)
|
DOMImplementation |
getImplementation()
Returns the implementation of the base document. |
Node |
importNode(Node importedNode,
boolean deep)
|
Methods inherited from class uk.ac.starlink.votable.dom.DelegatingNode |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
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, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Constructor Detail |
public DelegatingDocument(Document base, String documentURI)
base
- delegate document nodedocumentURI
- location of the document, or nullpublic DelegatingDocument(String documentURI)
documentURI
- location of the document, or nullMethod Detail |
protected DelegatingNode getDelegator(Node baseNode)
baseNode
- node in the base document
protected Document getBaseDocument()
protected DelegatingNode createDelegatingSimpleNode(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(Attr baseNode)
Attr
in the base model. This may be overridden to create specialised
node types.
baseNode
- delegate node
protected DelegatingAttr createDelegatingAttr(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(CDATASection baseNode)
CDATASection
in the base model. This may be overridden to create specialised
node types.
baseNode
- delegate node
protected DelegatingCharacterData createDelegatingCharacterData(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(Comment baseNode)
Comment
in the base model. This may be overridden to create specialised
node types.
baseNode
- delegate node
protected DelegatingDocumentFragment createDelegatingDocumentFragment(DocumentFragment baseNode)
DocumentFragment
in the base model. This may be overridden to create specialised
node types.
baseNode
- delegate node
protected DelegatingDocumentType createDelegatingDocumentType(DocumentType baseNode)
DocumentType
in the base model. This may be overridden to create specialised
node types.
baseNode
- delegate node
protected DelegatingElement createDelegatingElement(Element baseNode)
Element
in the base model. This may be overridden to create specialised
node types.
baseNode
- delegate node
protected DelegatingEntity createDelegatingEntity(Entity baseNode)
Entity
in the base model. This may be overridden to create specialised
node types.
baseNode
- delegate node
protected DelegatingEntityReference createDelegatingEntityReference(EntityReference baseNode)
EntityReference
in the base model. This may be overridden to create specialised
node types.
baseNode
- delegate node
protected DelegatingNotation createDelegatingNotation(Notation baseNode)
Notation
in the base model. This may be overridden to create specialised
node types.
baseNode
- delegate node
protected DelegatingProcessingInstruction createDelegatingProcessingInstruction(ProcessingInstruction baseNode)
ProcessingInstruction
in the base model. This may be overridden to create specialised
node types.
baseNode
- delegate node
protected DelegatingText createDelegatingText(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 NodeList createDelegatingNodeList(NodeList baseList)
baseList
- node list which dispenses nodes in the base document
protected NamedNodeMap createDelegatingNamedNodeMap(NamedNodeMap baseMap)
baseMap
- node map which dispenses nodes in the base document
public DOMImplementation getImplementation()
getImplementation
in interface Document
public DocumentType getDoctype()
getDoctype
in interface Document
public Element getDocumentElement()
getDocumentElement
in interface Document
public Element createElement(String tagName)
createElement
in interface Document
public DocumentFragment createDocumentFragment()
createDocumentFragment
in interface Document
public Text createTextNode(String data)
createTextNode
in interface Document
public Comment createComment(String data)
createComment
in interface Document
public CDATASection createCDATASection(String data)
createCDATASection
in interface Document
public ProcessingInstruction createProcessingInstruction(String target, String data)
createProcessingInstruction
in interface Document
public Attr createAttribute(String name)
createAttribute
in interface Document
public EntityReference createEntityReference(String name)
createEntityReference
in interface Document
public NodeList getElementsByTagName(String tagname)
getElementsByTagName
in interface Document
public Node importNode(Node importedNode, boolean deep)
importNode
in interface Document
public Element createElementNS(String namespaceURI, String qualifiedName)
createElementNS
in interface Document
public Attr createAttributeNS(String namespaceURI, String qualifiedName)
createAttributeNS
in interface Document
public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS
in interface Document
public Element getElementById(String elementId)
getElementById
in interface Document
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |