xArch/xADL 2.0 Data Binding Library

edu.uci.isr.xarch.types
Class ComponentImpl

java.lang.Object
  extended byedu.uci.isr.xarch.types.ComponentImpl
All Implemented Interfaces:
DOMBased, IComponent, IXArchElement
Direct Known Subclasses:
OptionalComponentImpl

public class ComponentImpl
extends Object
implements IComponent, DOMBased

DOM-Based implementation of the IComponent 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_ELT_NAME
          Tag name for interfaces in this object.
static String TYPE_ELT_NAME
          Tag name for types 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.IComponent
TYPE_METADATA
 
Fields inherited from interface edu.uci.isr.xarch.IXArchElement
DEPTH_INFINITY, DEPTH_ONE, DEPTH_ZERO
 
Constructor Summary
ComponentImpl(Element elt)
           
 
Method Summary
 void addInterface(IInterface newInterface)
          Add a interface to this Component.
 void addInterfaces(Collection interfaces)
          Add a collection of interfaces to this Component.
 void clearDescription()
          Clear the description from this Component.
 void clearId()
          Removes the id attribute from this object.
 void clearInterfaces()
          Remove all interfaces from this Component.
 void clearType()
          Clear the type from this Component.
 IXArchElement cloneElement(int depth)
           
 boolean equals(Object o)
           
 Collection getAllInterfaces()
          Get all the interfaces from this Component.
 IDescription getDescription()
          Get the description from this Component.
 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.
 IInterface getInterface(String id)
          Gets the interface from this Component with the given id.
 Collection getInterfaces(Collection ids)
          Gets the interfaces from this Component with the given ids.
protected static SequenceOrder getSequenceOrder()
           
 IXMLLink getType()
          Get the type from this Component.
 XArchTypeMetadata getTypeMetadata()
          Gets metadata describing the xsi:type of this element.
 IXArch getXArch()
           
 boolean hasAllInterfaces(Collection interfacesToCheck)
          Determine if this Component contains each element in the given set of interfaces.
 boolean hasDescription(IDescription value)
          Determine if this Component has the given description
 int hashCode()
           
 boolean hasId(String id)
          Determines if this object's id attribute has the given value.
 boolean hasInterface(IInterface interfaceToCheck)
          Determine if this Component contains a given interface.
 Collection hasInterfaces(Collection interfacesToCheck)
          Determine if this Component contains the given set of interfaces.
 boolean hasType(IXMLLink value)
          Determine if this Component has the given type
 boolean isEqual(IComponent ComponentToCheck)
          Determine if another Component has the same id as this one.
 boolean isEquivalent(IComponent c)
          Determine if another Component is equivalent to this one, ignoring ID's.
 void removeInterface(IInterface interfaceToRemove)
          Remove the given interface from this Component.
 void removeInterfaces(Collection interfaces)
          Remove all the given interfaces from this Component.
 void setDescription(IDescription value)
          Set the description for this Component.
 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 setType(IXMLLink value)
          Set the type for this Component.
 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_ELT_NAME

public static final String INTERFACE_ELT_NAME
Tag name for interfaces in this object.

See Also:
Constant Field Values

TYPE_ELT_NAME

public static final String TYPE_ELT_NAME
Tag name for types in this object.

See Also:
Constant Field Values

elt

protected Element elt
Constructor Detail

ComponentImpl

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

clearId

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

Specified by:
clearId in interface IComponent

getId

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

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

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

clearDescription

public void clearDescription()
Description copied from interface: IComponent
Clear the description from this Component.

Specified by:
clearDescription in interface IComponent

getDescription

public IDescription getDescription()
Description copied from interface: IComponent
Get the description from this Component.

Specified by:
getDescription in interface IComponent
Returns:
description

hasDescription

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

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

addInterface

public void addInterface(IInterface newInterface)
Description copied from interface: IComponent
Add a interface to this Component.

Specified by:
addInterface in interface IComponent
Parameters:
newInterface - interface to add.

addInterfaces

public void addInterfaces(Collection interfaces)
Description copied from interface: IComponent
Add a collection of interfaces to this Component.

Specified by:
addInterfaces in interface IComponent
Parameters:
interfaces - interfaces to add.

clearInterfaces

public void clearInterfaces()
Description copied from interface: IComponent
Remove all interfaces from this Component.

Specified by:
clearInterfaces in interface IComponent

removeInterface

public void removeInterface(IInterface interfaceToRemove)
Description copied from interface: IComponent
Remove the given interface from this Component. Matching is done by the isEquivalent(...) function.

Specified by:
removeInterface in interface IComponent
Parameters:
interfaceToRemove - interface to remove.

removeInterfaces

public void removeInterfaces(Collection interfaces)
Description copied from interface: IComponent
Remove all the given interfaces from this Component. Matching is done by the isEquivalent(...) function.

Specified by:
removeInterfaces in interface IComponent
Parameters:
interfaces - interface to remove.

getAllInterfaces

public Collection getAllInterfaces()
Description copied from interface: IComponent
Get all the interfaces from this Component.

Specified by:
getAllInterfaces in interface IComponent
Returns:
all interfaces in this Component.

hasInterface

public boolean hasInterface(IInterface interfaceToCheck)
Description copied from interface: IComponent
Determine if this Component contains a given interface.

Specified by:
hasInterface in interface IComponent
Returns:
true if this Component contains the given interfaceToCheck, false otherwise.

hasInterfaces

public Collection hasInterfaces(Collection interfacesToCheck)
Description copied from interface: IComponent
Determine if this Component contains the given set of interfaces.

Specified by:
hasInterfaces in interface IComponent
Parameters:
interfacesToCheck - interfaces to check for.
Returns:
Collection of java.lang.Boolean. If the ith element in interfaces 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.

hasAllInterfaces

public boolean hasAllInterfaces(Collection interfacesToCheck)
Description copied from interface: IComponent
Determine if this Component contains each element in the given set of interfaces.

Specified by:
hasAllInterfaces in interface IComponent
Parameters:
interfacesToCheck - interfaces to check for.
Returns:
true if every element in interfaces is found in this Component, false otherwise.

getInterface

public IInterface getInterface(String id)
Description copied from interface: IComponent
Gets the interface from this Component with the given id.

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

getInterfaces

public Collection getInterfaces(Collection ids)
Description copied from interface: IComponent
Gets the interfaces from this Component with the given ids.

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

setType

public void setType(IXMLLink value)
Description copied from interface: IComponent
Set the type for this Component.

Specified by:
setType in interface IComponent
Parameters:
value - new type

clearType

public void clearType()
Description copied from interface: IComponent
Clear the type from this Component.

Specified by:
clearType in interface IComponent

getType

public IXMLLink getType()
Description copied from interface: IComponent
Get the type from this Component.

Specified by:
getType in interface IComponent
Returns:
type

hasType

public boolean hasType(IXMLLink value)
Description copied from interface: IComponent
Determine if this Component has the given type

Specified by:
hasType in interface IComponent
Parameters:
value - type to compare
Returns:
true if the types are equivalent, false otherwise

isEqual

public boolean isEqual(IComponent ComponentToCheck)
Description copied from interface: IComponent
Determine if another Component has the same id as this one.

Specified by:
isEqual in interface IComponent
Parameters:
ComponentToCheck - Component to compare with this one.

isEquivalent

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

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

xArch/xADL 2.0 Data Binding Library