xArch/xADL 2.0 Data Binding Library

edu.uci.isr.xarch.versions
Class NodeImpl

java.lang.Object
  extended byedu.uci.isr.xarch.versions.NodeImpl
All Implemented Interfaces:
DOMBased, INode, IXArchElement

public class NodeImpl
extends Object
implements INode, DOMBased

DOM-Based implementation of the INode interface.

Author:
Automatically generated by xArch apigen.

Field Summary
protected  Element elt
           
static String ID_ATTR_NAME
          Tag name for ids in this object.
static String IMMUTABLE_ATTR_NAME
          Tag name for immutables in this object.
static String PARENT_ELT_NAME
          Tag name for parents in this object.
static String VERSION_I_D_ELT_NAME
          Tag name for versionIDs in this object.
protected  IXArch xArch
           
static String XSD_TYPE_NAME
           
static String XSD_TYPE_NSURI
           
 
Fields inherited from interface edu.uci.isr.xarch.versions.INode
TYPE_METADATA
 
Fields inherited from interface edu.uci.isr.xarch.IXArchElement
DEPTH_INFINITY, DEPTH_ONE, DEPTH_ZERO
 
Constructor Summary
NodeImpl(Element elt)
           
 
Method Summary
 void addParent(IXMLLink newParent)
          Add a parent to this Node.
 void addParents(Collection parents)
          Add a collection of parents to this Node.
 void clearId()
          Removes the id attribute from this object.
 void clearImmutable()
          Removes the immutable attribute from this object.
 void clearParents()
          Remove all parents from this Node.
 void clearVersionID()
          Clear the versionID from this Node.
 IXArchElement cloneElement(int depth)
           
 boolean equals(Object o)
           
 Collection getAllParents()
          Get all the parents from this Node.
 Node getDOMNode()
          Gets the DOM node on which this implementation is based.
 String getId()
          Gets the value of the id attribute on this object.
 String getImmutable()
          Gets the value of the immutable attribute on this object.
 XArchInstanceMetadata getInstanceMetadata()
          Gets metadata describing the instance of this element.
protected static SequenceOrder getSequenceOrder()
           
 XArchTypeMetadata getTypeMetadata()
          Gets metadata describing the xsi:type of this element.
 IVersionID getVersionID()
          Get the versionID from this Node.
 IXArch getXArch()
           
 boolean hasAllParents(Collection parentsToCheck)
          Determine if this Node contains each element in the given set of parents.
 int hashCode()
           
 boolean hasId(String id)
          Determines if this object's id attribute has the given value.
 boolean hasImmutable(String immutable)
          Determines if this object's immutable attribute has the given value.
 boolean hasParent(IXMLLink parentToCheck)
          Determine if this Node contains a given parent.
 Collection hasParents(Collection parentsToCheck)
          Determine if this Node contains the given set of parents.
 boolean hasVersionID(IVersionID value)
          Determine if this Node has the given versionID
 boolean isEqual(INode NodeToCheck)
          Determine if another Node has the same id as this one.
 boolean isEquivalent(INode c)
          Determine if another Node is equivalent to this one, ignoring ID's.
 void removeParent(IXMLLink parentToRemove)
          Remove the given parent from this Node.
 void removeParents(Collection parents)
          Remove all the given parents from this Node.
 void setDOMNode(Node node)
          Sets the DOM node on which this implementation is based.
 void setId(String id)
          Set the id attribute on this object.
 void setImmutable(String immutable)
          Set the immutable attribute on this object.
 void setVersionID(IVersionID value)
          Set the versionID for this Node.
 void setXArch(IXArch xArch)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XSD_TYPE_NSURI

public static final String XSD_TYPE_NSURI
See Also:
Constant Field Values

XSD_TYPE_NAME

public static final String XSD_TYPE_NAME
See Also:
Constant Field Values

xArch

protected IXArch xArch

ID_ATTR_NAME

public static final String ID_ATTR_NAME
Tag name for ids in this object.

See Also:
Constant Field Values

IMMUTABLE_ATTR_NAME

public static final String IMMUTABLE_ATTR_NAME
Tag name for immutables in this object.

See Also:
Constant Field Values

VERSION_I_D_ELT_NAME

public static final String VERSION_I_D_ELT_NAME
Tag name for versionIDs in this object.

See Also:
Constant Field Values

PARENT_ELT_NAME

public static final String PARENT_ELT_NAME
Tag name for parents in this object.

See Also:
Constant Field Values

elt

protected Element elt
Constructor Detail

NodeImpl

public NodeImpl(Element elt)
Method Detail

getDOMNode

public Node getDOMNode()
Description copied from interface: DOMBased
Gets the DOM node on which this implementation is based.

Specified by:
getDOMNode in interface DOMBased
Returns:
DOM node

setDOMNode

public void setDOMNode(Node node)
Description copied from interface: DOMBased
Sets the DOM node on which this implementation is based.

Specified by:
setDOMNode in interface DOMBased
Parameters:
node - DOM node

getSequenceOrder

protected static SequenceOrder getSequenceOrder()

setXArch

public void setXArch(IXArch xArch)
Specified by:
setXArch in interface IXArchElement

getXArch

public IXArch getXArch()
Specified by:
getXArch in interface IXArchElement

cloneElement

public IXArchElement cloneElement(int depth)
Specified by:
cloneElement in interface IXArchElement

equals

public boolean equals(Object o)

hashCode

public int hashCode()

getTypeMetadata

public XArchTypeMetadata getTypeMetadata()
Description copied from interface: IXArchElement
Gets metadata describing the xsi:type of this element.

Specified by:
getTypeMetadata in interface IXArchElement
Returns:
metadata describing the xsi:type of this element.

getInstanceMetadata

public XArchInstanceMetadata getInstanceMetadata()
Description copied from interface: IXArchElement
Gets metadata describing the instance of this element.

Specified by:
getInstanceMetadata in interface IXArchElement
Returns:
metadata describing the instance of this element.

setId

public void setId(String id)
Set the id attribute on this object.

Specified by:
setId in interface INode
Parameters:
id - attribute value.

clearId

public void clearId()
Removes the id attribute from this object.

Specified by:
clearId in interface INode

getId

public String getId()
Gets the value of the id attribute on this object.

Specified by:
getId in interface INode
Returns:
id attribute's value or null if that attribute is not set.

hasId

public boolean hasId(String id)
Determines if this object's id attribute has the given value.

Specified by:
hasId in interface INode
Parameters:
id - value to test.
Returns:
true if the values match, false otherwise. Matching is done by string-matching.

setImmutable

public void setImmutable(String immutable)
Set the immutable attribute on this object.

Specified by:
setImmutable in interface INode
Parameters:
immutable - attribute value.

clearImmutable

public void clearImmutable()
Removes the immutable attribute from this object.

Specified by:
clearImmutable in interface INode

getImmutable

public String getImmutable()
Gets the value of the immutable attribute on this object.

Specified by:
getImmutable in interface INode
Returns:
immutable attribute's value or null if that attribute is not set.

hasImmutable

public boolean hasImmutable(String immutable)
Determines if this object's immutable attribute has the given value.

Specified by:
hasImmutable in interface INode
Parameters:
immutable - value to test.
Returns:
true if the values match, false otherwise. Matching is done by string-matching.

setVersionID

public void setVersionID(IVersionID value)
Description copied from interface: INode
Set the versionID for this Node.

Specified by:
setVersionID in interface INode
Parameters:
value - new versionID

clearVersionID

public void clearVersionID()
Description copied from interface: INode
Clear the versionID from this Node.

Specified by:
clearVersionID in interface INode

getVersionID

public IVersionID getVersionID()
Description copied from interface: INode
Get the versionID from this Node.

Specified by:
getVersionID in interface INode
Returns:
versionID

hasVersionID

public boolean hasVersionID(IVersionID value)
Description copied from interface: INode
Determine if this Node has the given versionID

Specified by:
hasVersionID in interface INode
Parameters:
value - versionID to compare
Returns:
true if the versionIDs are equivalent, false otherwise

addParent

public void addParent(IXMLLink newParent)
Description copied from interface: INode
Add a parent to this Node.

Specified by:
addParent in interface INode
Parameters:
newParent - parent to add.

addParents

public void addParents(Collection parents)
Description copied from interface: INode
Add a collection of parents to this Node.

Specified by:
addParents in interface INode
Parameters:
parents - parents to add.

clearParents

public void clearParents()
Description copied from interface: INode
Remove all parents from this Node.

Specified by:
clearParents in interface INode

removeParent

public void removeParent(IXMLLink parentToRemove)
Description copied from interface: INode
Remove the given parent from this Node. Matching is done by the isEquivalent(...) function.

Specified by:
removeParent in interface INode
Parameters:
parentToRemove - parent to remove.

removeParents

public void removeParents(Collection parents)
Description copied from interface: INode
Remove all the given parents from this Node. Matching is done by the isEquivalent(...) function.

Specified by:
removeParents in interface INode
Parameters:
parents - parent to remove.

getAllParents

public Collection getAllParents()
Description copied from interface: INode
Get all the parents from this Node.

Specified by:
getAllParents in interface INode
Returns:
all parents in this Node.

hasParent

public boolean hasParent(IXMLLink parentToCheck)
Description copied from interface: INode
Determine if this Node contains a given parent.

Specified by:
hasParent in interface INode
Returns:
true if this Node contains the given parentToCheck, false otherwise.

hasParents

public Collection hasParents(Collection parentsToCheck)
Description copied from interface: INode
Determine if this Node contains the given set of parents.

Specified by:
hasParents in interface INode
Parameters:
parentsToCheck - parents to check for.
Returns:
Collection of java.lang.Boolean. If the ith element in parents was found, then the ith element of the collection will be set to true, otherwise it will be set to false. Matching is done with the isEquivalent(...) method.

hasAllParents

public boolean hasAllParents(Collection parentsToCheck)
Description copied from interface: INode
Determine if this Node contains each element in the given set of parents.

Specified by:
hasAllParents in interface INode
Parameters:
parentsToCheck - parents to check for.
Returns:
true if every element in parents is found in this Node, false otherwise.

isEqual

public boolean isEqual(INode NodeToCheck)
Description copied from interface: INode
Determine if another Node has the same id as this one.

Specified by:
isEqual in interface INode
Parameters:
NodeToCheck - Node to compare with this one.

isEquivalent

public boolean isEquivalent(INode c)
Description copied from interface: INode
Determine if another Node is equivalent to this one, ignoring ID's.

Specified by:
isEquivalent in interface INode
Parameters:
c - Node to compare to this one.
Returns:
true if all the child elements of this Node are equivalent, false otherwise.

xArch/xADL 2.0 Data Binding Library