|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.ws.policy.sourcemodel.ModelNode
public final class ModelNode
The general representation of a single node within a PolicySourceModel instance.
The model node is created via factory methods of the PolicySourceModel instance.
It may also hold AssertionData instance in case its type is ModelNode.Type.ASSERTION.
| Nested Class Summary | |
|---|---|
static class |
ModelNode.Type
Policy source model node type enumeration |
| Method Summary | |
|---|---|
int |
childrenSize()
Returns the number of child policy source model nodes. |
protected ModelNode |
clone()
|
ModelNode |
createChildAllNode()
Factory method that creates new policy source model node as specified by a factory method name and input parameters. |
ModelNode |
createChildAssertionNode()
Factory method that creates new policy source model node as specified by a factory method name and input parameters. |
ModelNode |
createChildAssertionNode(AssertionData nodeData)
Factory method that creates new policy source model node as specified by a factory method name and input parameters. |
ModelNode |
createChildAssertionParameterNode()
Factory method that creates new policy source model node as specified by a factory method name and input parameters. |
ModelNode |
createChildExactlyOneNode()
Factory method that creates new policy source model node as specified by a factory method name and input parameters. |
ModelNode |
createChildPolicyNode()
Factory method that creates new policy source model node as specified by a factory method name and input parameters. |
boolean |
equals(Object obj)
An Object.equals(Object obj) method override. |
AssertionData |
getNodeData()
Returns the data for this policy source model node (if any). |
PolicySourceModel |
getParentModel()
Returns the parent policy source model that contains this model node. |
ModelNode |
getParentNode()
Returns the parent referenced by this policy source model node. |
ModelNode.Type |
getType()
Returns the type of this policy source model node. |
boolean |
hasChildren()
Returns true if the node has at least one child node. |
int |
hashCode()
An Object.hashCode() method override. |
Iterator<ModelNode> |
iterator()
Iterates through all child nodes. |
AssertionData |
setOrReplaceNodeData(AssertionData newData)
The method may be used to set or replace assertion data set for this node. |
String |
toString()
Returns a string representation of the object. |
StringBuffer |
toString(int indentLevel,
StringBuffer buffer)
A helper method that appends indented string representation of this instance to the input string buffer. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public ModelNode createChildPolicyNode()
public ModelNode createChildAllNode()
public ModelNode createChildExactlyOneNode()
public ModelNode createChildAssertionNode()
public ModelNode createChildAssertionNode(AssertionData nodeData)
nodeData - The policy assertion data.
public ModelNode createChildAssertionParameterNode()
public PolicySourceModel getParentModel()
public ModelNode.Type getType()
public ModelNode getParentNode()
null if the node does not have a parent currently.public AssertionData getNodeData()
null only in
case the type of this node is ASSERTION or ASSERTION_PARAMETER_NODE.
null if the node does not have any data associated to it
attached.public AssertionData setOrReplaceNodeData(AssertionData newData)
ASSERTION or ASSERTION_PARAMETER_NODE.
If used from other node types, an exception is thrown.
newData - new assertion data to be set.
null otherwise.
UnsupportedOperationException - in case this method is called on nodes of type other than ASSERTION
or ASSERTION_PARAMETER_NODEpublic int childrenSize()
Integer.MAX_VALUE children, returns Integer.MAX_VALUE.
public boolean hasChildren()
public Iterator<ModelNode> iterator()
iterator in interface Iterable<ModelNode>public boolean equals(Object obj)
Object.equals(Object obj) method override. Method ignores the parent source model. It means that two
model nodes may be the same even if they belong to different models.
If parent model comparison is desired, it must be accomplished separately. To perform that, the reference equality
test is sufficient (nodeA.getParentModel() == nodeB.getParentModel()), since all model nodes are created
for specific model instances.
equals in class Objectpublic int hashCode()
Object.hashCode() method override.
hashCode in class Objectpublic String toString()
toString method
returns a string that "textually represents" this object.
toString in class Object
public StringBuffer toString(int indentLevel,
StringBuffer buffer)
indentLevel - indentation level to be used.buffer - buffer to be used for appending string representation of this instance
protected ModelNode clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||