xArch/xADL 2.0 Data Binding Library

edu.uci.isr.xarch.diff
Class DiffImpl

java.lang.Object
  extended byedu.uci.isr.xarch.diff.DiffImpl
All Implemented Interfaces:
DOMBased, IDiff, IXArchElement

public class DiffImpl
extends Object
implements IDiff, DOMBased

DOM-Based implementation of the IDiff interface.

Author:
Automatically generated by xArch apigen.

Field Summary
static String DIFF_PART_ELT_NAME
          Tag name for diffParts in this object.
protected  Element elt
           
protected  IXArch xArch
           
static String XSD_TYPE_NAME
           
static String XSD_TYPE_NSURI
           
 
Fields inherited from interface edu.uci.isr.xarch.diff.IDiff
TYPE_METADATA
 
Fields inherited from interface edu.uci.isr.xarch.IXArchElement
DEPTH_INFINITY, DEPTH_ONE, DEPTH_ZERO
 
Constructor Summary
DiffImpl(Element elt)
           
 
Method Summary
 void addDiffPart(IDiffPart newDiffPart)
          Add a diffPart to this Diff.
 void addDiffParts(Collection diffParts)
          Add a collection of diffParts to this Diff.
 void clearDiffParts()
          Remove all diffParts from this Diff.
 IXArchElement cloneElement(int depth)
           
 boolean equals(Object o)
           
 Collection getAllDiffParts()
          Get all the diffParts from this Diff.
 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.
 IXArch getXArch()
           
 boolean hasAllDiffParts(Collection diffPartsToCheck)
          Determine if this Diff contains each element in the given set of diffParts.
 boolean hasDiffPart(IDiffPart diffPartToCheck)
          Determine if this Diff contains a given diffPart.
 Collection hasDiffParts(Collection diffPartsToCheck)
          Determine if this Diff contains the given set of diffParts.
 int hashCode()
           
 boolean isEquivalent(IDiff c)
          Determine if another Diff is equivalent to this one, ignoring ID's.
 void removeDiffPart(IDiffPart diffPartToRemove)
          Remove the given diffPart from this Diff.
 void removeDiffParts(Collection diffParts)
          Remove all the given diffParts from this Diff.
 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

xArch

protected IXArch xArch

DIFF_PART_ELT_NAME

public static final String DIFF_PART_ELT_NAME
Tag name for diffParts in this object.

See Also:
Constant Field Values

elt

protected Element elt
Constructor Detail

DiffImpl

public DiffImpl(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.

addDiffPart

public void addDiffPart(IDiffPart newDiffPart)
Description copied from interface: IDiff
Add a diffPart to this Diff.

Specified by:
addDiffPart in interface IDiff
Parameters:
newDiffPart - diffPart to add.

addDiffParts

public void addDiffParts(Collection diffParts)
Description copied from interface: IDiff
Add a collection of diffParts to this Diff.

Specified by:
addDiffParts in interface IDiff
Parameters:
diffParts - diffParts to add.

clearDiffParts

public void clearDiffParts()
Description copied from interface: IDiff
Remove all diffParts from this Diff.

Specified by:
clearDiffParts in interface IDiff

removeDiffPart

public void removeDiffPart(IDiffPart diffPartToRemove)
Description copied from interface: IDiff
Remove the given diffPart from this Diff. Matching is done by the isEquivalent(...) function.

Specified by:
removeDiffPart in interface IDiff
Parameters:
diffPartToRemove - diffPart to remove.

removeDiffParts

public void removeDiffParts(Collection diffParts)
Description copied from interface: IDiff
Remove all the given diffParts from this Diff. Matching is done by the isEquivalent(...) function.

Specified by:
removeDiffParts in interface IDiff
Parameters:
diffParts - diffPart to remove.

getAllDiffParts

public Collection getAllDiffParts()
Description copied from interface: IDiff
Get all the diffParts from this Diff.

Specified by:
getAllDiffParts in interface IDiff
Returns:
all diffParts in this Diff.

hasDiffPart

public boolean hasDiffPart(IDiffPart diffPartToCheck)
Description copied from interface: IDiff
Determine if this Diff contains a given diffPart.

Specified by:
hasDiffPart in interface IDiff
Returns:
true if this Diff contains the given diffPartToCheck, false otherwise.

hasDiffParts

public Collection hasDiffParts(Collection diffPartsToCheck)
Description copied from interface: IDiff
Determine if this Diff contains the given set of diffParts.

Specified by:
hasDiffParts in interface IDiff
Parameters:
diffPartsToCheck - diffParts to check for.
Returns:
Collection of java.lang.Boolean. If the ith element in diffParts 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.

hasAllDiffParts

public boolean hasAllDiffParts(Collection diffPartsToCheck)
Description copied from interface: IDiff
Determine if this Diff contains each element in the given set of diffParts.

Specified by:
hasAllDiffParts in interface IDiff
Parameters:
diffPartsToCheck - diffParts to check for.
Returns:
true if every element in diffParts is found in this Diff, false otherwise.

isEquivalent

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

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

xArch/xADL 2.0 Data Binding Library