xArch/xADL 2.0 Data Binding Library

edu.uci.isr.xarch.instance
Class LinkInstanceImpl

java.lang.Object
  extended byedu.uci.isr.xarch.instance.LinkInstanceImpl
All Implemented Interfaces:
DOMBased, ILinkInstance, IXArchElement
Direct Known Subclasses:
PrescribedLinkInstanceImpl

public class LinkInstanceImpl
extends Object
implements ILinkInstance, DOMBased

DOM-Based implementation of the ILinkInstance interface.

Author:
Automatically generated by xArch apigen.

Field Summary
static String DESCRIPTION_ELT_NAME
          Tag name for descriptions in this object.
protected  Element elt
           
static String ID_ATTR_NAME
          Tag name for ids in this object.
static String POINT_ELT_NAME
          Tag name for points in this object.
protected  IXArch xArch
           
static String XSD_TYPE_NAME
           
static String XSD_TYPE_NSURI
           
 
Fields inherited from interface edu.uci.isr.xarch.instance.ILinkInstance
TYPE_METADATA
 
Fields inherited from interface edu.uci.isr.xarch.IXArchElement
DEPTH_INFINITY, DEPTH_ONE, DEPTH_ZERO
 
Constructor Summary
LinkInstanceImpl(Element elt)
           
 
Method Summary
 void addPoint(IPoint newPoint)
          Add a point to this LinkInstance.
 void addPoints(Collection points)
          Add a collection of points to this LinkInstance.
 void clearDescription()
          Clear the description from this LinkInstance.
 void clearId()
          Removes the id attribute from this object.
 void clearPoints()
          Remove all points from this LinkInstance.
 IXArchElement cloneElement(int depth)
           
 boolean equals(Object o)
           
 Collection getAllPoints()
          Get all the points from this LinkInstance.
 IDescription getDescription()
          Get the description from this LinkInstance.
 Node getDOMNode()
          Gets the DOM node on which this implementation is based.
 String getId()
          Gets the value of the id 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.
 IXArch getXArch()
           
 boolean hasAllPoints(Collection pointsToCheck)
          Determine if this LinkInstance contains each element in the given set of points.
 boolean hasDescription(IDescription value)
          Determine if this LinkInstance has the given description
 int hashCode()
           
 boolean hasId(String id)
          Determines if this object's id attribute has the given value.
 boolean hasPoint(IPoint pointToCheck)
          Determine if this LinkInstance contains a given point.
 Collection hasPoints(Collection pointsToCheck)
          Determine if this LinkInstance contains the given set of points.
 boolean isEqual(ILinkInstance LinkInstanceToCheck)
          Determine if another LinkInstance has the same id as this one.
 boolean isEquivalent(ILinkInstance c)
          Determine if another LinkInstance is equivalent to this one, ignoring ID's.
 void removePoint(IPoint pointToRemove)
          Remove the given point from this LinkInstance.
 void removePoints(Collection points)
          Remove all the given points from this LinkInstance.
 void setDescription(IDescription value)
          Set the description for this LinkInstance.
 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 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

DESCRIPTION_ELT_NAME

public static final String DESCRIPTION_ELT_NAME
Tag name for descriptions in this object.

See Also:
Constant Field Values

POINT_ELT_NAME

public static final String POINT_ELT_NAME
Tag name for points in this object.

See Also:
Constant Field Values

elt

protected Element elt
Constructor Detail

LinkInstanceImpl

public LinkInstanceImpl(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 ILinkInstance
Parameters:
id - attribute value.

clearId

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

Specified by:
clearId in interface ILinkInstance

getId

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

Specified by:
getId in interface ILinkInstance
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 ILinkInstance
Parameters:
id - value to test.
Returns:
true if the values match, false otherwise. Matching is done by string-matching.

setDescription

public void setDescription(IDescription value)
Description copied from interface: ILinkInstance
Set the description for this LinkInstance.

Specified by:
setDescription in interface ILinkInstance
Parameters:
value - new description

clearDescription

public void clearDescription()
Description copied from interface: ILinkInstance
Clear the description from this LinkInstance.

Specified by:
clearDescription in interface ILinkInstance

getDescription

public IDescription getDescription()
Description copied from interface: ILinkInstance
Get the description from this LinkInstance.

Specified by:
getDescription in interface ILinkInstance
Returns:
description

hasDescription

public boolean hasDescription(IDescription value)
Description copied from interface: ILinkInstance
Determine if this LinkInstance has the given description

Specified by:
hasDescription in interface ILinkInstance
Parameters:
value - description to compare
Returns:
true if the descriptions are equivalent, false otherwise

addPoint

public void addPoint(IPoint newPoint)
Description copied from interface: ILinkInstance
Add a point to this LinkInstance.

Specified by:
addPoint in interface ILinkInstance
Parameters:
newPoint - point to add.

addPoints

public void addPoints(Collection points)
Description copied from interface: ILinkInstance
Add a collection of points to this LinkInstance.

Specified by:
addPoints in interface ILinkInstance
Parameters:
points - points to add.

clearPoints

public void clearPoints()
Description copied from interface: ILinkInstance
Remove all points from this LinkInstance.

Specified by:
clearPoints in interface ILinkInstance

removePoint

public void removePoint(IPoint pointToRemove)
Description copied from interface: ILinkInstance
Remove the given point from this LinkInstance. Matching is done by the isEquivalent(...) function.

Specified by:
removePoint in interface ILinkInstance
Parameters:
pointToRemove - point to remove.

removePoints

public void removePoints(Collection points)
Description copied from interface: ILinkInstance
Remove all the given points from this LinkInstance. Matching is done by the isEquivalent(...) function.

Specified by:
removePoints in interface ILinkInstance
Parameters:
points - point to remove.

getAllPoints

public Collection getAllPoints()
Description copied from interface: ILinkInstance
Get all the points from this LinkInstance.

Specified by:
getAllPoints in interface ILinkInstance
Returns:
all points in this LinkInstance.

hasPoint

public boolean hasPoint(IPoint pointToCheck)
Description copied from interface: ILinkInstance
Determine if this LinkInstance contains a given point.

Specified by:
hasPoint in interface ILinkInstance
Returns:
true if this LinkInstance contains the given pointToCheck, false otherwise.

hasPoints

public Collection hasPoints(Collection pointsToCheck)
Description copied from interface: ILinkInstance
Determine if this LinkInstance contains the given set of points.

Specified by:
hasPoints in interface ILinkInstance
Parameters:
pointsToCheck - points to check for.
Returns:
Collection of java.lang.Boolean. If the ith element in points 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.

hasAllPoints

public boolean hasAllPoints(Collection pointsToCheck)
Description copied from interface: ILinkInstance
Determine if this LinkInstance contains each element in the given set of points.

Specified by:
hasAllPoints in interface ILinkInstance
Parameters:
pointsToCheck - points to check for.
Returns:
true if every element in points is found in this LinkInstance, false otherwise.

isEqual

public boolean isEqual(ILinkInstance LinkInstanceToCheck)
Description copied from interface: ILinkInstance
Determine if another LinkInstance has the same id as this one.

Specified by:
isEqual in interface ILinkInstance
Parameters:
LinkInstanceToCheck - LinkInstance to compare with this one.

isEquivalent

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

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

xArch/xADL 2.0 Data Binding Library