|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gcube.contentmanagement.contentmanager.stubs.model.trees.Node
public abstract class Node
Base class for document nodes.
Nested Class Summary | |
---|---|
static class |
Node.State
Enumerates the state of the node with respect to remote storage. |
Constructor Summary | |
---|---|
Node()
Creates an instance. |
Method Summary | |
---|---|
java.util.List<InnerNode> |
ancestors()
Returns the ancestors of the node. |
java.util.List<Node> |
ancestorsAndSelf()
Returns the ancestors of the node along with the node itself. |
java.lang.String |
attribute(javax.xml.namespace.QName name)
Returns the value of an attribute with a given name. |
java.lang.String |
attribute(java.lang.String name)
Returns the value of an attribute with a given name. |
java.lang.String |
attribute(java.lang.String ns,
java.lang.String name)
Returns the value of an attribute with a given name. |
java.util.Map<javax.xml.namespace.QName,java.lang.String> |
attributes()
Returns (a copy of) the node attributes. |
boolean |
equals(java.lang.Object obj)
|
boolean |
hasAttribute(javax.xml.namespace.QName name)
Indicates whether the node has an attribute with a given name. |
boolean |
hasAttribute(java.lang.String name)
Indicates whether the node has an attribute with a given name. |
boolean |
hasAttribute(java.lang.String ns,
java.lang.String name)
Indicates whether the node has an attribute with a given name. |
int |
hashCode()
|
java.lang.String |
id()
Returns the node identifier. |
InnerNode |
parent()
Returns the parent of the node. |
java.lang.String |
removeAttribute(javax.xml.namespace.QName name)
Removes an attribute from the node, if it exists. |
java.lang.String |
removeAttribute(java.lang.String name)
Removes an attribute from the node, if it exists. |
java.lang.String |
removeAttribute(java.lang.String ns,
java.lang.String name)
Removes an attribute from the node, if it exists. |
java.lang.String |
setAttribute(javax.xml.namespace.QName name,
java.lang.String value)
Sets the value of a given node attribute, or adds the attribute if it does not exist already. |
java.lang.String |
setAttribute(java.lang.String name,
java.lang.String value)
Sets the value of a given node attribute, or adds the attribute if it does not exist already. |
java.lang.String |
setAttribute(java.lang.String ns,
java.lang.String name,
java.lang.String value)
Sets the value of a given node attribute, or adds the attribute if it does not exist already. |
Node.State |
state()
Returns the node state. |
java.net.URI |
uri()
Returns the content URI of the node. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Node()
Method Detail |
---|
public java.lang.String id()
public java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes()
public java.lang.String setAttribute(javax.xml.namespace.QName name, java.lang.String value)
name
- the name of the attribute.value
- the value of the attribute.
null
if the attribute does not exist already.public java.lang.String setAttribute(java.lang.String ns, java.lang.String name, java.lang.String value) throws java.lang.IllegalArgumentException
ns
- the namespace of the attribute.name
- the local name of the attribute.value
- the value of the attribute.
null
if the attribute does not exist already.
java.lang.IllegalArgumentException
- if the local name of the attribute is null
.public java.lang.String setAttribute(java.lang.String name, java.lang.String value) throws java.lang.IllegalArgumentException
name
- the local name of the attribute.value
- the value of the attribute.
null
if the attribute does not exist already.
java.lang.IllegalArgumentException
- if the local name of the attribute is null
.public java.lang.String removeAttribute(javax.xml.namespace.QName name) throws java.lang.IllegalStateException
name
- the name of the attribute.
null
if the attribute does not exist.
java.lang.IllegalStateException
- if the nodes does not have an attribute with the given name.public java.lang.String removeAttribute(java.lang.String name) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
name
- the local name of the attribute.
null
if the attribute does not exist.
java.lang.IllegalStateException
- if the nodes does not have an attribute with the given name.
java.lang.IllegalArgumentException
- if the local name of the attribute is null
.public java.lang.String removeAttribute(java.lang.String ns, java.lang.String name) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
ns
- the namespace of the attribute.name
- the local name of the attribute.
null
if the attribute does not exist.
java.lang.IllegalStateException
- if the nodes does not have an attribute with the given name.
java.lang.IllegalArgumentException
- if the local name of the attribute is null
.public java.lang.String attribute(javax.xml.namespace.QName name) throws java.lang.IllegalStateException
name
- the name.
java.lang.IllegalStateException
- if an attribute with the given name does not exist.public java.lang.String attribute(java.lang.String name) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
name
- the local name of the attribute.
java.lang.IllegalStateException
- if an attribute with the given name does not exist.
java.lang.IllegalArgumentException
- if the local name of the attribute is null
.public java.lang.String attribute(java.lang.String ns, java.lang.String name) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
the
- namespace of the attribute.name
- the local name of the attribute.
java.lang.IllegalStateException
- if an attribute with the given name does not exist.
java.lang.IllegalArgumentException
- if the local name of the attribute is null
.public boolean hasAttribute(javax.xml.namespace.QName name)
name
- the name.
true
if it does, false
otherwise.public boolean hasAttribute(java.lang.String name) throws java.lang.IllegalArgumentException
name
- the name.
true
if it does, false
otherwise.
java.lang.IllegalArgumentException
- if the local name of the attribute is null
.public boolean hasAttribute(java.lang.String ns, java.lang.String name) throws java.lang.IllegalArgumentException
ns
- the attribute namespace.name
- the name.
true
if it does, false
otherwise.
java.lang.IllegalArgumentException
- if the local name of the attribute is null
.public Node.State state()
public InnerNode parent()
public java.util.List<InnerNode> ancestors()
public java.util.List<Node> ancestorsAndSelf()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.net.URI uri() throws java.lang.IllegalStateException
cms://
id0/
id1/
.../
idN
where
/
id2...idN-1 are the identifiers of the nodes on the path that
connects the root of the document to the node.
java.lang.IllegalStateException
- if the node or one of its ancestors does not have an identifier, or
if the root of the document does not specify a collection identifier.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |