xArch/xADL 2.0 Data Binding Library

edu.uci.isr.xarch.types
Class ArchStructureImpl

java.lang.Object
  extended byedu.uci.isr.xarch.types.ArchStructureImpl
All Implemented Interfaces:
DOMBased, IArchStructure, IXArchElement

public class ArchStructureImpl
extends Object
implements IArchStructure, DOMBased

DOM-Based implementation of the IArchStructure interface.

Author:
Automatically generated by xArch apigen.

Field Summary
static String COMPONENT_ELT_NAME
          Tag name for components in this object.
static String CONNECTOR_ELT_NAME
          Tag name for connectors in this object.
static String DESCRIPTION_ELT_NAME
          Tag name for descriptions in this object.
protected  Element elt
           
static String GROUP_ELT_NAME
          Tag name for groups in this object.
static String ID_ATTR_NAME
          Tag name for ids in this object.
static String LINK_ELT_NAME
          Tag name for links in this object.
protected  IXArch xArch
           
static String XSD_TYPE_NAME
           
static String XSD_TYPE_NSURI
           
 
Fields inherited from interface edu.uci.isr.xarch.types.IArchStructure
TYPE_METADATA
 
Fields inherited from interface edu.uci.isr.xarch.IXArchElement
DEPTH_INFINITY, DEPTH_ONE, DEPTH_ZERO
 
Constructor Summary
ArchStructureImpl(Element elt)
           
 
Method Summary
 void addComponent(IComponent newComponent)
          Add a component to this ArchStructure.
 void addComponents(Collection components)
          Add a collection of components to this ArchStructure.
 void addConnector(IConnector newConnector)
          Add a connector to this ArchStructure.
 void addConnectors(Collection connectors)
          Add a collection of connectors to this ArchStructure.
 void addGroup(IGroup newGroup)
          Add a group to this ArchStructure.
 void addGroups(Collection groups)
          Add a collection of groups to this ArchStructure.
 void addLink(ILink newLink)
          Add a link to this ArchStructure.
 void addLinks(Collection links)
          Add a collection of links to this ArchStructure.
 void clearComponents()
          Remove all components from this ArchStructure.
 void clearConnectors()
          Remove all connectors from this ArchStructure.
 void clearDescription()
          Clear the description from this ArchStructure.
 void clearGroups()
          Remove all groups from this ArchStructure.
 void clearId()
          Removes the id attribute from this object.
 void clearLinks()
          Remove all links from this ArchStructure.
 IXArchElement cloneElement(int depth)
           
 boolean equals(Object o)
           
 Collection getAllComponents()
          Get all the components from this ArchStructure.
 Collection getAllConnectors()
          Get all the connectors from this ArchStructure.
 Collection getAllGroups()
          Get all the groups from this ArchStructure.
 Collection getAllLinks()
          Get all the links from this ArchStructure.
 IComponent getComponent(String id)
          Gets the component from this ArchStructure with the given id.
 Collection getComponents(Collection ids)
          Gets the components from this ArchStructure with the given ids.
 IConnector getConnector(String id)
          Gets the connector from this ArchStructure with the given id.
 Collection getConnectors(Collection ids)
          Gets the connectors from this ArchStructure with the given ids.
 IDescription getDescription()
          Get the description from this ArchStructure.
 Node getDOMNode()
          Gets the DOM node on which this implementation is based.
 IGroup getGroup(String id)
          Gets the group from this ArchStructure with the given id.
 Collection getGroups(Collection ids)
          Gets the groups from this ArchStructure with the given ids.
 String getId()
          Gets the value of the id attribute on this object.
 XArchInstanceMetadata getInstanceMetadata()
          Gets metadata describing the instance of this element.
 ILink getLink(String id)
          Gets the link from this ArchStructure with the given id.
 Collection getLinks(Collection ids)
          Gets the links from this ArchStructure with the given ids.
protected static SequenceOrder getSequenceOrder()
           
 XArchTypeMetadata getTypeMetadata()
          Gets metadata describing the xsi:type of this element.
 IXArch getXArch()
           
 boolean hasAllComponents(Collection componentsToCheck)
          Determine if this ArchStructure contains each element in the given set of components.
 boolean hasAllConnectors(Collection connectorsToCheck)
          Determine if this ArchStructure contains each element in the given set of connectors.
 boolean hasAllGroups(Collection groupsToCheck)
          Determine if this ArchStructure contains each element in the given set of groups.
 boolean hasAllLinks(Collection linksToCheck)
          Determine if this ArchStructure contains each element in the given set of links.
 boolean hasComponent(IComponent componentToCheck)
          Determine if this ArchStructure contains a given component.
 Collection hasComponents(Collection componentsToCheck)
          Determine if this ArchStructure contains the given set of components.
 boolean hasConnector(IConnector connectorToCheck)
          Determine if this ArchStructure contains a given connector.
 Collection hasConnectors(Collection connectorsToCheck)
          Determine if this ArchStructure contains the given set of connectors.
 boolean hasDescription(IDescription value)
          Determine if this ArchStructure has the given description
 boolean hasGroup(IGroup groupToCheck)
          Determine if this ArchStructure contains a given group.
 Collection hasGroups(Collection groupsToCheck)
          Determine if this ArchStructure contains the given set of groups.
 int hashCode()
           
 boolean hasId(String id)
          Determines if this object's id attribute has the given value.
 boolean hasLink(ILink linkToCheck)
          Determine if this ArchStructure contains a given link.
 Collection hasLinks(Collection linksToCheck)
          Determine if this ArchStructure contains the given set of links.
 boolean isEqual(IArchStructure ArchStructureToCheck)
          Determine if another ArchStructure has the same id as this one.
 boolean isEquivalent(IArchStructure c)
          Determine if another ArchStructure is equivalent to this one, ignoring ID's.
 void removeComponent(IComponent componentToRemove)
          Remove the given component from this ArchStructure.
 void removeComponents(Collection components)
          Remove all the given components from this ArchStructure.
 void removeConnector(IConnector connectorToRemove)
          Remove the given connector from this ArchStructure.
 void removeConnectors(Collection connectors)
          Remove all the given connectors from this ArchStructure.
 void removeGroup(IGroup groupToRemove)
          Remove the given group from this ArchStructure.
 void removeGroups(Collection groups)
          Remove all the given groups from this ArchStructure.
 void removeLink(ILink linkToRemove)
          Remove the given link from this ArchStructure.
 void removeLinks(Collection links)
          Remove all the given links from this ArchStructure.
 void setDescription(IDescription value)
          Set the description for this ArchStructure.
 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

COMPONENT_ELT_NAME

public static final String COMPONENT_ELT_NAME
Tag name for components in this object.

See Also:
Constant Field Values

CONNECTOR_ELT_NAME

public static final String CONNECTOR_ELT_NAME
Tag name for connectors in this object.

See Also:
Constant Field Values

LINK_ELT_NAME

public static final String LINK_ELT_NAME
Tag name for links in this object.

See Also:
Constant Field Values

GROUP_ELT_NAME

public static final String GROUP_ELT_NAME
Tag name for groups in this object.

See Also:
Constant Field Values

elt

protected Element elt
Constructor Detail

ArchStructureImpl

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

clearId

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

Specified by:
clearId in interface IArchStructure

getId

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

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

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

clearDescription

public void clearDescription()
Description copied from interface: IArchStructure
Clear the description from this ArchStructure.

Specified by:
clearDescription in interface IArchStructure

getDescription

public IDescription getDescription()
Description copied from interface: IArchStructure
Get the description from this ArchStructure.

Specified by:
getDescription in interface IArchStructure
Returns:
description

hasDescription

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

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

addComponent

public void addComponent(IComponent newComponent)
Description copied from interface: IArchStructure
Add a component to this ArchStructure.

Specified by:
addComponent in interface IArchStructure
Parameters:
newComponent - component to add.

addComponents

public void addComponents(Collection components)
Description copied from interface: IArchStructure
Add a collection of components to this ArchStructure.

Specified by:
addComponents in interface IArchStructure
Parameters:
components - components to add.

clearComponents

public void clearComponents()
Description copied from interface: IArchStructure
Remove all components from this ArchStructure.

Specified by:
clearComponents in interface IArchStructure

removeComponent

public void removeComponent(IComponent componentToRemove)
Description copied from interface: IArchStructure
Remove the given component from this ArchStructure. Matching is done by the isEquivalent(...) function.

Specified by:
removeComponent in interface IArchStructure
Parameters:
componentToRemove - component to remove.

removeComponents

public void removeComponents(Collection components)
Description copied from interface: IArchStructure
Remove all the given components from this ArchStructure. Matching is done by the isEquivalent(...) function.

Specified by:
removeComponents in interface IArchStructure
Parameters:
components - component to remove.

getAllComponents

public Collection getAllComponents()
Description copied from interface: IArchStructure
Get all the components from this ArchStructure.

Specified by:
getAllComponents in interface IArchStructure
Returns:
all components in this ArchStructure.

hasComponent

public boolean hasComponent(IComponent componentToCheck)
Description copied from interface: IArchStructure
Determine if this ArchStructure contains a given component.

Specified by:
hasComponent in interface IArchStructure
Returns:
true if this ArchStructure contains the given componentToCheck, false otherwise.

hasComponents

public Collection hasComponents(Collection componentsToCheck)
Description copied from interface: IArchStructure
Determine if this ArchStructure contains the given set of components.

Specified by:
hasComponents in interface IArchStructure
Parameters:
componentsToCheck - components to check for.
Returns:
Collection of java.lang.Boolean. If the ith element in components 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.

hasAllComponents

public boolean hasAllComponents(Collection componentsToCheck)
Description copied from interface: IArchStructure
Determine if this ArchStructure contains each element in the given set of components.

Specified by:
hasAllComponents in interface IArchStructure
Parameters:
componentsToCheck - components to check for.
Returns:
true if every element in components is found in this ArchStructure, false otherwise.

getComponent

public IComponent getComponent(String id)
Description copied from interface: IArchStructure
Gets the component from this ArchStructure with the given id.

Specified by:
getComponent in interface IArchStructure
Parameters:
id - ID to look for.
Returns:
component with the given ID, or null if not found.

getComponents

public Collection getComponents(Collection ids)
Description copied from interface: IArchStructure
Gets the components from this ArchStructure with the given ids.

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

addConnector

public void addConnector(IConnector newConnector)
Description copied from interface: IArchStructure
Add a connector to this ArchStructure.

Specified by:
addConnector in interface IArchStructure
Parameters:
newConnector - connector to add.

addConnectors

public void addConnectors(Collection connectors)
Description copied from interface: IArchStructure
Add a collection of connectors to this ArchStructure.

Specified by:
addConnectors in interface IArchStructure
Parameters:
connectors - connectors to add.

clearConnectors

public void clearConnectors()
Description copied from interface: IArchStructure
Remove all connectors from this ArchStructure.

Specified by:
clearConnectors in interface IArchStructure

removeConnector

public void removeConnector(IConnector connectorToRemove)
Description copied from interface: IArchStructure
Remove the given connector from this ArchStructure. Matching is done by the isEquivalent(...) function.

Specified by:
removeConnector in interface IArchStructure
Parameters:
connectorToRemove - connector to remove.

removeConnectors

public void removeConnectors(Collection connectors)
Description copied from interface: IArchStructure
Remove all the given connectors from this ArchStructure. Matching is done by the isEquivalent(...) function.

Specified by:
removeConnectors in interface IArchStructure
Parameters:
connectors - connector to remove.

getAllConnectors

public Collection getAllConnectors()
Description copied from interface: IArchStructure
Get all the connectors from this ArchStructure.

Specified by:
getAllConnectors in interface IArchStructure
Returns:
all connectors in this ArchStructure.

hasConnector

public boolean hasConnector(IConnector connectorToCheck)
Description copied from interface: IArchStructure
Determine if this ArchStructure contains a given connector.

Specified by:
hasConnector in interface IArchStructure
Returns:
true if this ArchStructure contains the given connectorToCheck, false otherwise.

hasConnectors

public Collection hasConnectors(Collection connectorsToCheck)
Description copied from interface: IArchStructure
Determine if this ArchStructure contains the given set of connectors.

Specified by:
hasConnectors in interface IArchStructure
Parameters:
connectorsToCheck - connectors to check for.
Returns:
Collection of java.lang.Boolean. If the ith element in connectors 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.

hasAllConnectors

public boolean hasAllConnectors(Collection connectorsToCheck)
Description copied from interface: IArchStructure
Determine if this ArchStructure contains each element in the given set of connectors.

Specified by:
hasAllConnectors in interface IArchStructure
Parameters:
connectorsToCheck - connectors to check for.
Returns:
true if every element in connectors is found in this ArchStructure, false otherwise.

getConnector

public IConnector getConnector(String id)
Description copied from interface: IArchStructure
Gets the connector from this ArchStructure with the given id.

Specified by:
getConnector in interface IArchStructure
Parameters:
id - ID to look for.
Returns:
connector with the given ID, or null if not found.

getConnectors

public Collection getConnectors(Collection ids)
Description copied from interface: IArchStructure
Gets the connectors from this ArchStructure with the given ids.

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

addLink

public void addLink(ILink newLink)
Description copied from interface: IArchStructure
Add a link to this ArchStructure.

Specified by:
addLink in interface IArchStructure
Parameters:
newLink - link to add.

addLinks

public void addLinks(Collection links)
Description copied from interface: IArchStructure
Add a collection of links to this ArchStructure.

Specified by:
addLinks in interface IArchStructure
Parameters:
links - links to add.

clearLinks

public void clearLinks()
Description copied from interface: IArchStructure
Remove all links from this ArchStructure.

Specified by:
clearLinks in interface IArchStructure

removeLink

public void removeLink(ILink linkToRemove)
Description copied from interface: IArchStructure
Remove the given link from this ArchStructure. Matching is done by the isEquivalent(...) function.

Specified by:
removeLink in interface IArchStructure
Parameters:
linkToRemove - link to remove.

removeLinks

public void removeLinks(Collection links)
Description copied from interface: IArchStructure
Remove all the given links from this ArchStructure. Matching is done by the isEquivalent(...) function.

Specified by:
removeLinks in interface IArchStructure
Parameters:
links - link to remove.

getAllLinks

public Collection getAllLinks()
Description copied from interface: IArchStructure
Get all the links from this ArchStructure.

Specified by:
getAllLinks in interface IArchStructure
Returns:
all links in this ArchStructure.

hasLink

public boolean hasLink(ILink linkToCheck)
Description copied from interface: IArchStructure
Determine if this ArchStructure contains a given link.

Specified by:
hasLink in interface IArchStructure
Returns:
true if this ArchStructure contains the given linkToCheck, false otherwise.

hasLinks

public Collection hasLinks(Collection linksToCheck)
Description copied from interface: IArchStructure
Determine if this ArchStructure contains the given set of links.

Specified by:
hasLinks in interface IArchStructure
Parameters:
linksToCheck - links to check for.
Returns:
Collection of java.lang.Boolean. If the ith element in links 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.

hasAllLinks

public boolean hasAllLinks(Collection linksToCheck)
Description copied from interface: IArchStructure
Determine if this ArchStructure contains each element in the given set of links.

Specified by:
hasAllLinks in interface IArchStructure
Parameters:
linksToCheck - links to check for.
Returns:
true if every element in links is found in this ArchStructure, false otherwise.

getLink

public ILink getLink(String id)
Description copied from interface: IArchStructure
Gets the link from this ArchStructure with the given id.

Specified by:
getLink in interface IArchStructure
Parameters:
id - ID to look for.
Returns:
link with the given ID, or null if not found.

getLinks

public Collection getLinks(Collection ids)
Description copied from interface: IArchStructure
Gets the links from this ArchStructure with the given ids.

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

addGroup

public void addGroup(IGroup newGroup)
Description copied from interface: IArchStructure
Add a group to this ArchStructure.

Specified by:
addGroup in interface IArchStructure
Parameters:
newGroup - group to add.

addGroups

public void addGroups(Collection groups)
Description copied from interface: IArchStructure
Add a collection of groups to this ArchStructure.

Specified by:
addGroups in interface IArchStructure
Parameters:
groups - groups to add.

clearGroups

public void clearGroups()
Description copied from interface: IArchStructure
Remove all groups from this ArchStructure.

Specified by:
clearGroups in interface IArchStructure

removeGroup

public void removeGroup(IGroup groupToRemove)
Description copied from interface: IArchStructure
Remove the given group from this ArchStructure. Matching is done by the isEquivalent(...) function.

Specified by:
removeGroup in interface IArchStructure
Parameters:
groupToRemove - group to remove.

removeGroups

public void removeGroups(Collection groups)
Description copied from interface: IArchStructure
Remove all the given groups from this ArchStructure. Matching is done by the isEquivalent(...) function.

Specified by:
removeGroups in interface IArchStructure
Parameters:
groups - group to remove.

getAllGroups

public Collection getAllGroups()
Description copied from interface: IArchStructure
Get all the groups from this ArchStructure.

Specified by:
getAllGroups in interface IArchStructure
Returns:
all groups in this ArchStructure.

hasGroup

public boolean hasGroup(IGroup groupToCheck)
Description copied from interface: IArchStructure
Determine if this ArchStructure contains a given group.

Specified by:
hasGroup in interface IArchStructure
Returns:
true if this ArchStructure contains the given groupToCheck, false otherwise.

hasGroups

public Collection hasGroups(Collection groupsToCheck)
Description copied from interface: IArchStructure
Determine if this ArchStructure contains the given set of groups.

Specified by:
hasGroups in interface IArchStructure
Parameters:
groupsToCheck - groups to check for.
Returns:
Collection of java.lang.Boolean. If the ith element in groups 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.

hasAllGroups

public boolean hasAllGroups(Collection groupsToCheck)
Description copied from interface: IArchStructure
Determine if this ArchStructure contains each element in the given set of groups.

Specified by:
hasAllGroups in interface IArchStructure
Parameters:
groupsToCheck - groups to check for.
Returns:
true if every element in groups is found in this ArchStructure, false otherwise.

getGroup

public IGroup getGroup(String id)
Description copied from interface: IArchStructure
Gets the group from this ArchStructure with the given id.

Specified by:
getGroup in interface IArchStructure
Parameters:
id - ID to look for.
Returns:
group with the given ID, or null if not found.

getGroups

public Collection getGroups(Collection ids)
Description copied from interface: IArchStructure
Gets the groups from this ArchStructure with the given ids.

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

isEqual

public boolean isEqual(IArchStructure ArchStructureToCheck)
Description copied from interface: IArchStructure
Determine if another ArchStructure has the same id as this one.

Specified by:
isEqual in interface IArchStructure
Parameters:
ArchStructureToCheck - ArchStructure to compare with this one.

isEquivalent

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

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

xArch/xADL 2.0 Data Binding Library