xArch/xADL 2.0 Data Binding Library

edu.uci.isr.xarch
Class XArchImpl

java.lang.Object
  extended byedu.uci.isr.xarch.XArchImpl
All Implemented Interfaces:
DOMBased, IXArch, IXArchElement

public class XArchImpl
extends Object
implements IXArch, DOMBased, IXArchElement

DOM-Based implementation of the IXArch interface.

Author:
Automatically generated by xArch apigen.

Field Summary
protected  Element elt
           
protected  HashMap wrapperCache
           
protected  Vector xArchListeners
           
static String XSD_TYPE_NAME
           
static String XSD_TYPE_NSURI
           
 
Fields inherited from interface edu.uci.isr.xarch.IXArch
TYPE_METADATA
 
Fields inherited from interface edu.uci.isr.xarch.IXArchElement
DEPTH_INFINITY, DEPTH_ONE, DEPTH_ZERO
 
Constructor Summary
XArchImpl(Document doc)
           
 
Method Summary
 void addObject(Object object)
          Add an object to this xArch object.
 void addObjects(Collection objects)
          Add a set of objects to this xArch object.
 void addSchemaLocation(String uri, String location)
          Add a schemaLocation mapping to the xArch element.
 void addXArchListener(XArchListener l)
          Adds an object that will listen to XArchEvents to this xArch object.
 void cacheWrapper(Node domNode, IXArchElement wrapper)
           
 void clearObjects()
          Remove all objects from this xArch object.
 IXArchElement cloneElement(int depth)
           
 boolean equals(Object o)
           
 void fireXArchEvent(XArchEvent evt)
          Broadcasts a given event to all the XArchListeners on this xArch object.
 Collection getAllObjects()
          Get all the objects from this xArch object.
 Node getDOMNode()
          Gets the DOM node on which this implementation is based.
 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.
 IXArchElement getWrapper(Node domNode)
           
 IXArch getXArch()
           
 boolean hasAllObjects(Collection objects)
          Determine if this xArch object contains a given set of objects.
 int hashCode()
           
 boolean hasObject(Object object)
          Determine if this xArch object contains a given object.
 Collection hasObjects(Collection objects)
          Determine if this xArch object contains a given set of objects.
 boolean isEquivalent(IXArch objectCollection)
          Determine if this xArch object is equivalent to another one.
 void removeObject(Object object)
          Remove a given object from this xArch object.
 void removeObjects(Collection objects)
          Remove a set of objects from this xArch object.
 void removeSchemaLocation(String uri)
          Removes a schemaLocation mapping from the xArch element.
 void removeXArchListener(XArchListener l)
          Removes an object that will listen to XArchEvents from this xArch object.
 void setDOMNode(Node node)
          Sets the DOM node on which this implementation is based.
 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

elt

protected Element elt

xArchListeners

protected Vector xArchListeners

wrapperCache

protected HashMap wrapperCache
Constructor Detail

XArchImpl

public XArchImpl(Document doc)
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

setXArch

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

getXArch

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

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()

equals

public boolean equals(Object o)

hashCode

public int hashCode()

cloneElement

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

addObject

public void addObject(Object object)
Description copied from interface: IXArch
Add an object to this xArch object.

Specified by:
addObject in interface IXArch
Parameters:
object - Object to add.

addObjects

public void addObjects(Collection objects)
Description copied from interface: IXArch
Add a set of objects to this xArch object.

Specified by:
addObjects in interface IXArch
Parameters:
objects - Objects to add.

clearObjects

public void clearObjects()
Description copied from interface: IXArch
Remove all objects from this xArch object.

Specified by:
clearObjects in interface IXArch

removeObject

public void removeObject(Object object)
Description copied from interface: IXArch
Remove a given object from this xArch object.

Specified by:
removeObject in interface IXArch
Parameters:
object - Object to remove.

removeObjects

public void removeObjects(Collection objects)
Description copied from interface: IXArch
Remove a set of objects from this xArch object.

Specified by:
removeObjects in interface IXArch
Parameters:
objects - Objects to remove.

getAllObjects

public Collection getAllObjects()
Description copied from interface: IXArch
Get all the objects from this xArch object.

Specified by:
getAllObjects in interface IXArch
Returns:
All objects in this xArch object.

hasObject

public boolean hasObject(Object object)
Description copied from interface: IXArch
Determine if this xArch object contains a given object.

Specified by:
hasObject in interface IXArch
Parameters:
object - Object to check for.
Returns:
true if the object was found, false otherwise.

hasObjects

public Collection hasObjects(Collection objects)
Description copied from interface: IXArch
Determine if this xArch object contains a given set of objects.

Specified by:
hasObjects in interface IXArch
Parameters:
objects - Objects to check for.
Returns:
Collection of java.lang.Boolean that are true if the object was found, false otherwise.

hasAllObjects

public boolean hasAllObjects(Collection objects)
Description copied from interface: IXArch
Determine if this xArch object contains a given set of objects.

Specified by:
hasAllObjects in interface IXArch
Parameters:
objects - Objects to check for.
Returns:
true if all the objects were found, false otherwise.

isEquivalent

public boolean isEquivalent(IXArch objectCollection)
Description copied from interface: IXArch
Determine if this xArch object is equivalent to another one.

Specified by:
isEquivalent in interface IXArch
Parameters:
objectCollection - Other xArch object to compare to this one.
Returns:
true if both contain the same objects, false otherwise.

addXArchListener

public void addXArchListener(XArchListener l)
Description copied from interface: IXArch
Adds an object that will listen to XArchEvents to this xArch object.

Specified by:
addXArchListener in interface IXArch
Parameters:
l - Listener to add.

removeXArchListener

public void removeXArchListener(XArchListener l)
Description copied from interface: IXArch
Removes an object that will listen to XArchEvents from this xArch object.

Specified by:
removeXArchListener in interface IXArch
Parameters:
l - Listener to add.

fireXArchEvent

public void fireXArchEvent(XArchEvent evt)
Description copied from interface: IXArch
Broadcasts a given event to all the XArchListeners on this xArch object.

Specified by:
fireXArchEvent in interface IXArch
Parameters:
evt - Event to broadcast

addSchemaLocation

public void addSchemaLocation(String uri,
                              String location)
Description copied from interface: IXArch
Add a schemaLocation mapping to the xArch element.

Specified by:
addSchemaLocation in interface IXArch
Parameters:
uri - Schema URI to add.
location - Location of the schema. May be local or a URL.

removeSchemaLocation

public void removeSchemaLocation(String uri)
Description copied from interface: IXArch
Removes a schemaLocation mapping from the xArch element.

Specified by:
removeSchemaLocation in interface IXArch
Parameters:
uri - Schema URI to remove.

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.

cacheWrapper

public void cacheWrapper(Node domNode,
                         IXArchElement wrapper)
Specified by:
cacheWrapper in interface IXArch

getWrapper

public IXArchElement getWrapper(Node domNode)
Specified by:
getWrapper in interface IXArch

xArch/xADL 2.0 Data Binding Library