|
org.netbeans.modules.xml.xdm/1 1.19.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.modules.xml.xdm.nodes.NodeImpl
public abstract class NodeImpl
This class provides base implementation of Node Interface.
| Field Summary | |
|---|---|
static String |
XMLNS
|
| Method Summary | |
|---|---|
void |
addedToTree(XDMModel model)
Marks the node and all its children added to a tree. |
Node |
appendChild(Node node)
Adds the node newChild to the end of the list of children of this node. |
void |
assignNodeId(int id)
|
void |
assignNodeIdRecursively()
Recursively assigns node id's. |
Node |
clone(boolean cloneContent,
boolean cloneAttributes,
boolean cloneChildren)
This api clones the node object and returns the clone. |
protected void |
cloneNamespacePrefixes(Map<Integer,String> allNS,
Map<String,String> prefixes)
|
Node |
cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. |
Node |
cloneNode(boolean deep,
boolean cloneNamespacePrefix)
|
Node |
cloneNode(boolean deep,
Map<Integer,String> allNS,
Map<String,String> clonePrefixes)
|
Node |
cloneShallowWithModelContext()
|
short |
compareDocumentPosition(Node a)
|
Node |
copy()
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. |
void |
copyTokens(Node newNode)
|
NamedNodeMap |
getAttributes()
A NamedNodeMap that contains all attributes of this node. |
protected List<Attribute> |
getAttributesForRead()
Returns a readonly List of all attributes of this node. |
protected List<Attribute> |
getAttributesForWrite()
Returns a modifiable List of all attributes of this node for updates. |
String |
getBaseURI()
|
NodeList |
getChildNodes()
A NodeList that contains all children of this node. |
Object |
getFeature(String a,
String b)
|
Node |
getFirstChild()
The first child of this node. |
int |
getId()
Returns the id of this node |
int |
getIndexOfChild(Node n)
Lookup child index of given child based on node ID. |
Node |
getLastChild()
The last child of this node. |
String |
getLocalName()
|
protected XDMModel |
getModel()
|
String |
getNamespaceURI()
|
String |
getNamespaceURI(Document document)
Returns namespace of this node in the given Document tree. |
Node |
getNextSibling()
|
abstract String |
getNodeName()
|
abstract short |
getNodeType()
|
String |
getNodeValue()
|
Document |
getOwnerDocument()
The Document object associated with this node. |
Node |
getParentNode()
|
String |
getPrefix()
|
Node |
getPreviousSibling()
|
String |
getTextContent()
|
List<Token> |
getTokens()
Returns the readonly lexical tokens associated with this node. |
Object |
getUserData(String a)
|
boolean |
hasAttributes()
Returns whether this node has any attributes. |
boolean |
hasChildNodes()
Returns whether this node has any children. |
int |
hashCode()
|
Node |
insertBefore(Node newChild,
Node refChild)
Inserts the node newChild before the existing child node refChild. |
boolean |
isDefaultNamespace(String a)
|
boolean |
isEqualNode(Node a)
|
boolean |
isEquivalentNode(Node node)
|
boolean |
isInTree()
Determines if the node is any tree |
boolean |
isSameNode(Node a)
|
boolean |
isSupported(String feature,
String version)
|
static String |
lookupNamespace(Node current,
List<Node> ancestors)
|
static String |
lookupNamespace(String prefix,
List<Node> path)
|
String |
lookupNamespaceURI(String prefix)
|
String |
lookupPrefix(String uri)
|
static String |
lookupPrefix(String uri,
List<Node> path)
|
void |
normalize()
|
Node |
removeChild(Node node)
Removes the node from children list. |
Node |
reorderChild(Node child,
int index)
Moves child node to new position. |
void |
reorderChildren(int[] permutation)
Rearranges children list to the given permutaion. |
Node |
replaceChild(Node newNode,
Node oldNode)
Repalces the node oldNode with newNode. |
void |
setNodeValue(String str)
|
void |
setPrefix(String str)
|
void |
setTextContent(String a)
|
Object |
setUserData(String a,
Object b,
UserDataHandler c)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.netbeans.modules.xml.xdm.nodes.Node |
|---|
accept |
| Field Detail |
|---|
public static final String XMLNS
| Method Detail |
|---|
public final int getId()
public int hashCode()
hashCode in class Objectpublic final boolean isInTree()
#addedToTree()public void addedToTree(XDMModel model)
public void assignNodeIdRecursively()
public void assignNodeId(int id)
protected XDMModel getModel()
public boolean isEquivalentNode(Node node)
node - Node to compare
public boolean isSupported(String feature,
String version)
isSupported in interface Node
public Node clone(boolean cloneContent,
boolean cloneAttributes,
boolean cloneChildren)
cloneContent - If true the content of clone can be modified.cloneAttributes - If true the attributes of the clone can be modified.cloneChildren - If true the children of the clone can be modified.
public Node cloneNode(boolean deep)
cloneNode in interface Nodedeep - - If true, recursively clone the subtree under the specified node;
if false, clone only the node itself
public Node cloneNode(boolean deep,
boolean cloneNamespacePrefix)
public Node cloneNode(boolean deep,
Map<Integer,String> allNS,
Map<String,String> clonePrefixes)
protected void cloneNamespacePrefixes(Map<Integer,String> allNS,
Map<String,String> prefixes)
public Node cloneShallowWithModelContext()
public boolean hasChildNodes()
hasChildNodes in interface Nodepublic NodeList getChildNodes()
getChildNodes in interface Nodepublic Node getFirstChild()
getFirstChild in interface Nodepublic Node getLastChild()
getLastChild in interface Nodepublic int getIndexOfChild(Node n)
Node
public Node appendChild(Node node)
appendChild in interface NodenewChild - - The node to add.
public Node replaceChild(Node newNode,
Node oldNode)
replaceChild in interface NodenewChild - - The new node to put in the child list.oldChild - - The node being replaced in the list.
public Node reorderChild(Node child,
int index)
child - - The node being reordered in the list.
public void reorderChildren(int[] permutation)
permutation - integer array with index represents current index and
value is final index after reordered.public Node removeChild(Node node)
removeChild in interface Nodenode - - The node being removed from the list.
public Node insertBefore(Node newChild,
Node refChild)
throws DOMException
insertBefore in interface NodenewChild - - The node to insert.refChild - - The reference node, i.e., the node before which the new node must be inserted.
DOMExceptionpublic boolean hasAttributes()
hasAttributes in interface Nodepublic NamedNodeMap getAttributes()
getAttributes in interface Nodepublic Document getOwnerDocument()
getOwnerDocument in interface Nodepublic Node getParentNode()
getParentNode in interface Nodepublic Node getNextSibling()
getNextSibling in interface Nodepublic Node getPreviousSibling()
getPreviousSibling in interface Nodepublic abstract short getNodeType()
getNodeType in interface Nodepublic abstract String getNodeName()
getNodeName in interface Node
public String getNodeValue()
throws DOMException
getNodeValue in interface NodeDOMException
public void setNodeValue(String str)
throws DOMException
setNodeValue in interface NodeDOMExceptionpublic String getLocalName()
getLocalName in interface Nodepublic String getNamespaceURI(Document document)
Node
public String getNamespaceURI()
getNamespaceURI in interface Nodepublic String lookupNamespaceURI(String prefix)
lookupNamespaceURI in interface Node
public static String lookupNamespace(Node current,
List<Node> ancestors)
public static String lookupNamespace(String prefix,
List<Node> path)
public String lookupPrefix(String uri)
lookupPrefix in interface Node
public static String lookupPrefix(String uri,
List<Node> path)
public String getPrefix()
getPrefix in interface Node
public void setPrefix(String str)
throws DOMException
setPrefix in interface NodeDOMExceptionpublic void normalize()
normalize in interface Nodepublic short compareDocumentPosition(Node a)
compareDocumentPosition in interface Nodepublic String getBaseURI()
getBaseURI in interface Node
public Object getFeature(String a,
String b)
getFeature in interface Nodepublic String getTextContent()
getTextContent in interface Nodepublic Object getUserData(String a)
getUserData in interface Nodepublic boolean isDefaultNamespace(String a)
isDefaultNamespace in interface Nodepublic boolean isEqualNode(Node a)
isEqualNode in interface Nodepublic boolean isSameNode(Node a)
isSameNode in interface Nodepublic void setTextContent(String a)
setTextContent in interface Node
public Object setUserData(String a,
Object b,
UserDataHandler c)
setUserData in interface Nodepublic void copyTokens(Node newNode)
protected List<Attribute> getAttributesForRead()
protected List<Attribute> getAttributesForWrite()
public List<Token> getTokens()
public Node copy()
public String toString()
toString in class Object
|
org.netbeans.modules.xml.xdm/1 1.19.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||