|
|||||||||
| 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 |
|---|
| 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 | |
|---|---|
Node |
adoptNode(Node source)
|
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()
|
String |
getDocumentURI()
|
DOMConfiguration |
getDomConfig()
|
Element |
getElementById(String elementId)
|
NodeList |
getElementsByTagName(String tagname)
|
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName)
|
DOMImplementation |
getImplementation()
Returns the implementation of the base document. |
String |
getInputEncoding()
|
boolean |
getStrictErrorChecking()
|
String |
getXmlEncoding()
|
boolean |
getXmlStandalone()
|
String |
getXmlVersion()
|
Node |
importNode(Node importedNode,
boolean deep)
|
void |
normalizeDocument()
|
Node |
renameNode(Node node,
String namespaceURI,
String qualifiedName)
|
void |
setDocumentURI(String documentURI)
|
void |
setStrictErrorChecking(boolean strictErrorChecking)
|
void |
setXmlStandalone(boolean xmlStandalone)
|
void |
setXmlVersion(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(Document base,
String documentURI)
base - delegate document nodedocumentURI - location of the document, or nullpublic DelegatingDocument(String documentURI)
documentURI - location of the document, or null| Method 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 Documentpublic DocumentType getDoctype()
getDoctype in interface Documentpublic Element getDocumentElement()
getDocumentElement in interface Documentpublic Element createElement(String tagName)
createElement in interface Documentpublic DocumentFragment createDocumentFragment()
createDocumentFragment in interface Documentpublic Text createTextNode(String data)
createTextNode in interface Documentpublic Comment createComment(String data)
createComment in interface Documentpublic CDATASection createCDATASection(String data)
createCDATASection in interface Document
public ProcessingInstruction createProcessingInstruction(String target,
String data)
createProcessingInstruction in interface Documentpublic Attr createAttribute(String name)
createAttribute in interface Documentpublic EntityReference createEntityReference(String name)
createEntityReference in interface Documentpublic 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 Documentpublic Element getElementById(String elementId)
getElementById in interface Documentpublic String getInputEncoding()
getInputEncoding in interface Documentpublic String getXmlEncoding()
getXmlEncoding in interface Documentpublic boolean getXmlStandalone()
getXmlStandalone in interface Documentpublic void setXmlStandalone(boolean xmlStandalone)
setXmlStandalone in interface Documentpublic String getXmlVersion()
getXmlVersion in interface Documentpublic void setXmlVersion(String xmlVersion)
setXmlVersion in interface Documentpublic boolean getStrictErrorChecking()
getStrictErrorChecking in interface Documentpublic void setStrictErrorChecking(boolean strictErrorChecking)
setStrictErrorChecking in interface Documentpublic String getDocumentURI()
getDocumentURI in interface Documentpublic void setDocumentURI(String documentURI)
setDocumentURI in interface Documentpublic Node adoptNode(Node source)
adoptNode in interface Documentpublic DOMConfiguration getDomConfig()
getDomConfig in interface Documentpublic void normalizeDocument()
normalizeDocument in interface Document
public Node renameNode(Node node,
String namespaceURI,
String qualifiedName)
renameNode 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 | ||||||||