xArch/xADL 2.0 Data Binding Library

edu.uci.isr.xarch.instance
Class ComponentInstanceImpl

java.lang.Object
  extended byedu.uci.isr.xarch.instance.ComponentInstanceImpl
All Implemented Interfaces:
DOMBased, IComponentInstance, IXArchElement
Direct Known Subclasses:
PrescribedComponentInstanceImpl

public class ComponentInstanceImpl
extends Object
implements IComponentInstance, DOMBased

DOM-Based implementation of the IComponentInstance 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 INTERFACE_INSTANCE_ELT_NAME
          Tag name for interfaceInstances in this object.
static String SUB_ARCHITECTURE_ELT_NAME
          Tag name for subArchitectures 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.IComponentInstance
TYPE_METADATA
 
Fields inherited from interface edu.uci.isr.xarch.IXArchElement
DEPTH_INFINITY, DEPTH_ONE, DEPTH_ZERO
 
Constructor Summary
ComponentInstanceImpl(Element elt)
           
 
Method Summary
 void addInterfaceInstance(IInterfaceInstance newInterfaceInstance)
          Add a interfaceInstance to this ComponentInstance.
 void addInterfaceInstances(Collection interfaceInstances)
          Add a collection of interfaceInstances to this ComponentInstance.
 void clearDescription()
          Clear the description from this ComponentInstance.
 void clearId()
          Removes the id attribute from this object.
 void clearInterfaceInstances()
          Remove all interfaceInstances from this ComponentInstance.
 void clearSubArchitecture()
          Clear the subArchitecture from this ComponentInstance.
 IXArchElement cloneElement(int depth)
           
 boolean equals(Object o)
           
 Collection getAllInterfaceInstances()
          Get all the interfaceInstances from this ComponentInstance.
 IDescription getDescription()
          Get the description from this ComponentInstance.
 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.
 IInterfaceInstance getInterfaceInstance(String id)
          Gets the interfaceInstance from this ComponentInstance with the given id.
 Collection getInterfaceInstances(Collection ids)
          Gets the interfaceInstances from this ComponentInstance with the given ids.
protected static SequenceOrder getSequenceOrder()
           
 ISubArchitecture getSubArchitecture()
          Get the subArchitecture from this ComponentInstance.
 XArchTypeMetadata getTypeMetadata()
          Gets metadata describing the xsi:type of this element.
 IXArch getXArch()
           
 boolean hasAllInterfaceInstances(Collection interfaceInstancesToCheck)
          Determine if this ComponentInstance contains each element in the given set of interfaceInstances.
 boolean hasDescription(IDescription value)
          Determine if this ComponentInstance has the given description
 int hashCode()
           
 boolean hasId(String id)
          Determines if this object's id attribute has the given value.
 boolean hasInterfaceInstance(IInterfaceInstance interfaceInstanceToCheck)
          Determine if this ComponentInstance contains a given interfaceInstance.
 Collection hasInterfaceInstances(Collection interfaceInstancesToCheck)
          Determine if this ComponentInstance contains the given set of interfaceInstances.
 boolean hasSubArchitecture(ISubArchitecture value)
          Determine if this ComponentInstance has the given subArchitecture
 boolean isEqual(IComponentInstance ComponentInstanceToCheck)
          Determine if another ComponentInstance has the same id as this one.
 boolean isEquivalent(IComponentInstance c)
          Determine if another ComponentInstance is equivalent to this one, ignoring ID's.
 void removeInterfaceInstance(IInterfaceInstance interfaceInstanceToRemove)
          Remove the given interfaceInstance from this ComponentInstance.
 void removeInterfaceInstances(Collection interfaceInstances)
          Remove all the given interfaceInstances from this ComponentInstance.
 void setDescription(IDescription value)
          Set the description for this ComponentInstance.
 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 setSubArchitecture(ISubArchitecture value)
          Set the subArchitecture for this ComponentInstance.
 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

INTERFACE_INSTANCE_ELT_NAME

public static final String INTERFACE_INSTANCE_ELT_NAME
Tag name for interfaceInstances in this object.

See Also:
Constant Field Values

SUB_ARCHITECTURE_ELT_NAME

public static final String SUB_ARCHITECTURE_ELT_NAME
Tag name for subArchitectures in this object.

See Also:
Constant Field Values

elt

protected Element elt
Constructor Detail

ComponentInstanceImpl

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

clearId

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

Specified by:
clearId in interface IComponentInstance

getId

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

Specified by:
getId in interface IComponentInstance
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 IComponentInstance
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: IComponentInstance
Set the description for this ComponentInstance.

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

clearDescription

public void clearDescription()
Description copied from interface: IComponentInstance
Clear the description from this ComponentInstance.

Specified by:
clearDescription in interface IComponentInstance

getDescription

public IDescription getDescription()
Description copied from interface: IComponentInstance
Get the description from this ComponentInstance.

Specified by:
getDescription in interface IComponentInstance
Returns:
description

hasDescription

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

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

addInterfaceInstance

public void addInterfaceInstance(IInterfaceInstance newInterfaceInstance)
Description copied from interface: IComponentInstance
Add a interfaceInstance to this ComponentInstance.

Specified by:
addInterfaceInstance in interface IComponentInstance
Parameters:
newInterfaceInstance - interfaceInstance to add.

addInterfaceInstances

public void addInterfaceInstances(Collection interfaceInstances)
Description copied from interface: IComponentInstance
Add a collection of interfaceInstances to this ComponentInstance.

Specified by:
addInterfaceInstances in interface IComponentInstance
Parameters:
interfaceInstances - interfaceInstances to add.

clearInterfaceInstances

public void clearInterfaceInstances()
Description copied from interface: IComponentInstance
Remove all interfaceInstances from this ComponentInstance.

Specified by:
clearInterfaceInstances in interface IComponentInstance

removeInterfaceInstance

public void removeInterfaceInstance(IInterfaceInstance interfaceInstanceToRemove)
Description copied from interface: IComponentInstance
Remove the given interfaceInstance from this ComponentInstance. Matching is done by the isEquivalent(...) function.

Specified by:
removeInterfaceInstance in interface IComponentInstance
Parameters:
interfaceInstanceToRemove - interfaceInstance to remove.

removeInterfaceInstances

public void removeInterfaceInstances(Collection interfaceInstances)
Description copied from interface: IComponentInstance
Remove all the given interfaceInstances from this ComponentInstance. Matching is done by the isEquivalent(...) function.

Specified by:
removeInterfaceInstances in interface IComponentInstance
Parameters:
interfaceInstances - interfaceInstance to remove.

getAllInterfaceInstances

public Collection getAllInterfaceInstances()
Description copied from interface: IComponentInstance
Get all the interfaceInstances from this ComponentInstance.

Specified by:
getAllInterfaceInstances in interface IComponentInstance
Returns:
all interfaceInstances in this ComponentInstance.

hasInterfaceInstance

public boolean hasInterfaceInstance(IInterfaceInstance interfaceInstanceToCheck)
Description copied from interface: IComponentInstance
Determine if this ComponentInstance contains a given interfaceInstance.

Specified by:
hasInterfaceInstance in interface IComponentInstance
Returns:
true if this ComponentInstance contains the given interfaceInstanceToCheck, false otherwise.

hasInterfaceInstances

public Collection hasInterfaceInstances(Collection interfaceInstancesToCheck)
Description copied from interface: IComponentInstance
Determine if this ComponentInstance contains the given set of interfaceInstances.

Specified by:
hasInterfaceInstances in interface IComponentInstance
Parameters:
interfaceInstancesToCheck - interfaceInstances to check for.
Returns:
Collection of java.lang.Boolean. If the ith element in interfaceInstances 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.

hasAllInterfaceInstances

public boolean hasAllInterfaceInstances(Collection interfaceInstancesToCheck)
Description copied from interface: IComponentInstance
Determine if this ComponentInstance contains each element in the given set of interfaceInstances.

Specified by:
hasAllInterfaceInstances in interface IComponentInstance
Parameters:
interfaceInstancesToCheck - interfaceInstances to check for.
Returns:
true if every element in interfaceInstances is found in this ComponentInstance, false otherwise.

getInterfaceInstance

public IInterfaceInstance getInterfaceInstance(String id)
Description copied from interface: IComponentInstance
Gets the interfaceInstance from this ComponentInstance with the given id.

Specified by:
getInterfaceInstance in interface IComponentInstance
Parameters:
id - ID to look for.
Returns:
interfaceInstance with the given ID, or null if not found.

getInterfaceInstances

public Collection getInterfaceInstances(Collection ids)
Description copied from interface: IComponentInstance
Gets the interfaceInstances from this ComponentInstance with the given ids.

Specified by:
getInterfaceInstances in interface IComponentInstance
Parameters:
ids - ID to look for.
Returns:
interfaceInstances with the given IDs. If an element with a given ID was not found, that ID is ignored.

setSubArchitecture

public void setSubArchitecture(ISubArchitecture value)
Description copied from interface: IComponentInstance
Set the subArchitecture for this ComponentInstance.

Specified by:
setSubArchitecture in interface IComponentInstance
Parameters:
value - new subArchitecture

clearSubArchitecture

public void clearSubArchitecture()
Description copied from interface: IComponentInstance
Clear the subArchitecture from this ComponentInstance.

Specified by:
clearSubArchitecture in interface IComponentInstance

getSubArchitecture

public ISubArchitecture getSubArchitecture()
Description copied from interface: IComponentInstance
Get the subArchitecture from this ComponentInstance.

Specified by:
getSubArchitecture in interface IComponentInstance
Returns:
subArchitecture

hasSubArchitecture

public boolean hasSubArchitecture(ISubArchitecture value)
Description copied from interface: IComponentInstance
Determine if this ComponentInstance has the given subArchitecture

Specified by:
hasSubArchitecture in interface IComponentInstance
Parameters:
value - subArchitecture to compare
Returns:
true if the subArchitectures are equivalent, false otherwise

isEqual

public boolean isEqual(IComponentInstance ComponentInstanceToCheck)
Description copied from interface: IComponentInstance
Determine if another ComponentInstance has the same id as this one.

Specified by:
isEqual in interface IComponentInstance
Parameters:
ComponentInstanceToCheck - ComponentInstance to compare with this one.

isEquivalent

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

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

xArch/xADL 2.0 Data Binding Library