xArch/xADL 2.0 Data Binding Library

edu.uci.isr.xarch
Interface IXArch

All Superinterfaces:
IXArchElement
All Known Implementing Classes:
XArchImpl

public interface IXArch
extends IXArchElement

Interface for accessing objects of the xArch xsi:type in the instance namespace.

Author:
André van der Hoek (andre@ics.uci.edu), Eric M. Dashofy (edashofy@ics.uci.edu)

Field Summary
static XArchTypeMetadata TYPE_METADATA
           
 
Fields inherited from interface edu.uci.isr.xarch.IXArchElement
DEPTH_INFINITY, DEPTH_ONE, DEPTH_ZERO
 
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.
 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.
 IXArchElement getWrapper(Node domNode)
           
 boolean hasAllObjects(Collection objects)
          Determine if this xArch object contains a given set of objects.
 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 xArch)
          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.
 
Methods inherited from interface edu.uci.isr.xarch.IXArchElement
cloneElement, getInstanceMetadata, getTypeMetadata, getXArch, setXArch
 

Field Detail

TYPE_METADATA

public static final XArchTypeMetadata TYPE_METADATA
Method Detail

addObject

public void addObject(Object object)
Add an object to this xArch object.

Parameters:
object - Object to add.

addObjects

public void addObjects(Collection objects)
Add a set of objects to this xArch object.

Parameters:
objects - Objects to add.

clearObjects

public void clearObjects()
Remove all objects from this xArch object.


removeObject

public void removeObject(Object object)
Remove a given object from this xArch object.

Parameters:
object - Object to remove.

removeObjects

public void removeObjects(Collection objects)
Remove a set of objects from this xArch object.

Parameters:
objects - Objects to remove.

getAllObjects

public Collection getAllObjects()
Get all the objects from this xArch object.

Returns:
All objects in this xArch object.

hasObject

public boolean hasObject(Object object)
Determine if this xArch object contains a given object.

Parameters:
object - Object to check for.
Returns:
true if the object was found, false otherwise.

hasObjects

public Collection hasObjects(Collection objects)
Determine if this xArch object contains a given set of objects.

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)
Determine if this xArch object contains a given set of objects.

Parameters:
objects - Objects to check for.
Returns:
true if all the objects were found, false otherwise.

isEquivalent

public boolean isEquivalent(IXArch xArch)
Determine if this xArch object is equivalent to another one.

Parameters:
xArch - Other xArch object to compare to this one.
Returns:
true if both contain the same objects, false otherwise.

addXArchListener

public void addXArchListener(XArchListener l)
Adds an object that will listen to XArchEvents to this xArch object.

Parameters:
l - Listener to add.

removeXArchListener

public void removeXArchListener(XArchListener l)
Removes an object that will listen to XArchEvents from this xArch object.

Parameters:
l - Listener to add.

fireXArchEvent

public void fireXArchEvent(XArchEvent evt)
Broadcasts a given event to all the XArchListeners on this xArch object.

Parameters:
evt - Event to broadcast

addSchemaLocation

public void addSchemaLocation(String uri,
                              String location)
Add a schemaLocation mapping to the xArch element.

Parameters:
uri - Schema URI to add.
location - Location of the schema. May be local or a URL.

removeSchemaLocation

public void removeSchemaLocation(String uri)
Removes a schemaLocation mapping from the xArch element.

Parameters:
uri - Schema URI to remove.

cacheWrapper

public void cacheWrapper(Node domNode,
                         IXArchElement wrapper)

getWrapper

public IXArchElement getWrapper(Node domNode)

xArch/xADL 2.0 Data Binding Library