ist.palcom.resource.descriptor
Class PRDAssemblyList

java.lang.Object
  extended by ist.palcom.resource.descriptor.ASTNode
      extended by ist.palcom.resource.descriptor.AbstractXMLRepresentable
          extended by ist.palcom.resource.descriptor.PRDData
              extended by ist.palcom.resource.descriptor.PRDSecondOrderList
                  extended by ist.palcom.resource.descriptor.PRDAssemblyList
All Implemented Interfaces:
IHgraphNode, XMLRepresentable, Cloneable

public class PRDAssemblyList
extends PRDSecondOrderList
implements Cloneable


Field Summary
protected  boolean getAssemblyLabel_visited
           
static String VERSION_DELIM
           
 
Fields inherited from class ist.palcom.resource.descriptor.PRDData
_node
 
Fields inherited from class ist.palcom.resource.descriptor.AbstractXMLRepresentable
getBrowserLabel_visited
 
Fields inherited from class ist.palcom.resource.descriptor.ASTNode
CHANGE, children, encloseInBraces_visited, generatedWithCacheCycle, generatedWithCircularEnabled, generatedWithComponentCheck, getErrorList_visited, getIndent_visited, getParentPRDAssembly_visited, getPrettyClosingString_visited, getPrettyString_visited, IN_CIRCLE, LAST_CYCLE, numChildren, parent, prettyPrintChildren_visited, RESET_CYCLE
 
Fields inherited from interface ist.palcom.hgraph.IHgraphNode
CHILD_NAME_CLASH, CIRCULARITY_CLASH, COMMAND_OR_NODE_MISSING, ERROR, HANDLER_MISSING, INVOKATOR_MISSING, LISTENER_MISSING, NODE_NOT_CHILD, PATH_MISSING, SIBLING_ALREADY_EXISTS, SIBLING_NONEXISTENT, SIBLING_REFERENCE_ALREADY_EXISTS, SIBLING_REFERENCE_NONEXISTENT, STATUS_OK, VALUE_ALREADY_EXISTS, VALUE_NOT_PRESENT
 
Constructor Summary
PRDAssemblyList()
           
PRDAssemblyList(List p0, String p1, String p2, String p3)
           
PRDAssemblyList(PRDAssembly initialVer)
           
PRDAssemblyList(String format)
           
 
Method Summary
 void addChildFromXMLElement(XMLRepresentable child)
          The implementation up here is empty.
 void addPRDAssembly(PRDAssembly node)
           
 void addPRDSecondOrder(PRDSecondOrder node)
           
 boolean addVersion(PRDAssembly ai)
          Add a version to the PRDAssemblyList, if it matches previously set name/version or name is unset.
 Object clone()
           
 ASTNode copy()
           
 List diffAdded(PRDAssemblyList ad)
          Return the set of versions present in ad but not in this I.e, ad - this If ad and this do not share the same base version, the result is the empty set.
 void flushCache()
           
 ASTNode fullCopy()
           
 String getAssemblyLabel()
           
 String getBaseVersion()
           
 Object[] getChildArray()
          Helper method for the TreeView
 String getCreatingURN()
           
 String getFormat()
           
 String getInitialTimestamp()
           
 String getLogicalVersion()
           
 String getName()
           
 int getNumPRDAssembly()
           
 int getNumPRDSecondOrder()
           
 String getParentTimestamp()
           
 String getParentURN()
           
 String getParentVersion()
           
 PRDAssembly getPRDAssembly(int i)
           
 List getPRDAssemblyList()
           
 PRDSecondOrder getPRDSecondOrder(int i)
           
 List getPRDSecondOrderList()
           
 List getPRDSecondOrderListNoTransform()
           
 String getTagName()
           
 String getUpdatingTimestamp()
           
 String getUpdatingURN()
           
 String getVersion()
           
 boolean hasPRDAssembly(PRDAssembly ai)
          Deprecated.  
 void initializeFromElement(XmlPullParser parser)
          Initialize the XMLRepresentable from the element where the parser is currently standing.
 boolean isAboutTheSameEntityAs(PRDData info)
           
 boolean isNewVersion(PRDAssembly ai)
           
 boolean isRelatedTo(PRDAssembly ai)
          Checks if ai and this are versions of the same entity, i.e., they share a common ancestor.
 boolean isRelatedTo(PRDAssemblyList ad)
          Checks if ad and this are versions of the same entity, i.e., they share a common ancestor.
 boolean isUpdate(PRDAssembly ai)
           
 void mergeAddedVersionsFrom(PRDAssemblyList ad)
          Add each version present in ad not present in this to this I.e., after the operation, this will contain the union of the versions in ad and this.
protected  int numChildren()
           
 void setFormat(String value)
           
 void setName(String value)
           
 void setPRDAssembly(PRDAssembly node, int i)
           
 void setPRDSecondOrder(PRDSecondOrder node, int i)
           
 void setPRDSecondOrderList(List list)
           
 void setVersion(String value)
           
protected static String tsStr()
           
 boolean updateIfNewer(PRDAssembly ai)
           
 void writeAttributes(KXmlSerializer serializer)
           
 void writeXMLElement(KXmlSerializer serializer)
           
 
Methods inherited from class ist.palcom.resource.descriptor.PRDSecondOrderList
Define_PRDSecondOrderList_list
 
Methods inherited from class ist.palcom.resource.descriptor.PRDData
addNodeChild, getChildIterator, getDeviceURN, getFuncFunc, getNodeName, getNodeParent, getPath, getPRDDataThatEquals, getPRDDataThatIsAboutTheSameEntityAs, getSiblingFunc, getURN, getValueFunc, hasChildNamed, isAncestorOf, removeNodeChild, safeEqual, setChild, setNodeName, setNodeParent, toXML, toXMLFull, toXMLFullRecursively, toXMLRecursively, updatePath, urnToServiceURN
 
Methods inherited from class ist.palcom.resource.descriptor.AbstractXMLRepresentable
addToAssembly, equals, getBrowserLabel, getXMLData, getXMLData, removeFromAssembly, toString
 
Methods inherited from class ist.palcom.resource.descriptor.ASTNode
addASTtoList, addChild, Define_CommandInfo_ci, Define_Device_parentDevice, Define_Identifier_getLocalName, Define_NetworkNode_lookup, Define_PRDAssembly_ai, Define_Service_inhCust, Define_Service_inhProv, Define_String_expectedType, Define_Universe_universe, encloseInBraces, getChild, getChildNoTransform, getErrorList, getIDforEditing, getIndent, getIndexOfChild, getNumChild, getParent, getParentPRDAssembly, getPrettyClosingString, getPrettyString, insertChild, prettyprint, prettyPrintChildren, remove, removeChild, reset, resetTree, setParent, updateIDfromEditor
 
Methods inherited from class java.lang.Object
getClass, hashCode, println
 

Field Detail

VERSION_DELIM

public static final String VERSION_DELIM
See Also:
Constant Field Values

getAssemblyLabel_visited

protected boolean getAssemblyLabel_visited
Constructor Detail

PRDAssemblyList

public PRDAssemblyList(PRDAssembly initialVer)

PRDAssemblyList

public PRDAssemblyList(String format)

PRDAssemblyList

public PRDAssemblyList()

PRDAssemblyList

public PRDAssemblyList(List p0,
                       String p1,
                       String p2,
                       String p3)
Method Detail

flushCache

public void flushCache()
Overrides:
flushCache in class PRDSecondOrderList

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class PRDSecondOrderList
Throws:
CloneNotSupportedException

copy

public ASTNode copy()
Overrides:
copy in class ASTNode

fullCopy

public ASTNode fullCopy()
Overrides:
fullCopy in class ASTNode

isAboutTheSameEntityAs

public boolean isAboutTheSameEntityAs(PRDData info)
Overrides:
isAboutTheSameEntityAs in class PRDData
Returns:
True if info and this info are for the same entity. This can be /**

getChildArray

public Object[] getChildArray()
Description copied from class: ASTNode
Helper method for the TreeView

Overrides:
getChildArray in class ASTNode
Returns:
The (interesting) children of a node, as an Object array possibly bypassing levels in the tree or ignoring certain children.

getCreatingURN

public String getCreatingURN()

getInitialTimestamp

public String getInitialTimestamp()

getLogicalVersion

public String getLogicalVersion()

getParentURN

public String getParentURN()

getParentTimestamp

public String getParentTimestamp()

getUpdatingURN

public String getUpdatingURN()

getUpdatingTimestamp

public String getUpdatingTimestamp()

tsStr

protected static String tsStr()

getBaseVersion

public String getBaseVersion()

getParentVersion

public String getParentVersion()

isRelatedTo

public boolean isRelatedTo(PRDAssembly ai)
Checks if ai and this are versions of the same entity, i.e., they share a common ancestor.


isRelatedTo

public boolean isRelatedTo(PRDAssemblyList ad)
Checks if ad and this are versions of the same entity, i.e., they share a common ancestor.


addVersion

public boolean addVersion(PRDAssembly ai)
Add a version to the PRDAssemblyList, if it matches previously set name/version or name is unset.

Returns:
true on sucess

isNewVersion

public boolean isNewVersion(PRDAssembly ai)

isUpdate

public boolean isUpdate(PRDAssembly ai)

updateIfNewer

public boolean updateIfNewer(PRDAssembly ai)

hasPRDAssembly

public boolean hasPRDAssembly(PRDAssembly ai)
Deprecated. 

Aux method, for implementing update/merge. Made public for use in the test case (which is why it is marked as deprecated), it is really an internal method.


diffAdded

public List diffAdded(PRDAssemblyList ad)
Return the set of versions present in ad but not in this I.e, ad - this If ad and this do not share the same base version, the result is the empty set.


mergeAddedVersionsFrom

public void mergeAddedVersionsFrom(PRDAssemblyList ad)
Add each version present in ad not present in this to this I.e., after the operation, this will contain the union of the versions in ad and this. If ad and this do not share the same base version, nothing happens.


writeAttributes

public void writeAttributes(KXmlSerializer serializer)
                     throws IOException
Throws:
IOException

getTagName

public String getTagName()
Specified by:
getTagName in interface XMLRepresentable
Specified by:
getTagName in class AbstractXMLRepresentable

initializeFromElement

public void initializeFromElement(XmlPullParser parser)
Description copied from interface: XMLRepresentable
Initialize the XMLRepresentable from the element where the parser is currently standing. When calling this method, the parser must be on the start tag of the element. After returning from the method, the parser will be at the end tag of the element.

Specified by:
initializeFromElement in interface XMLRepresentable

addChildFromXMLElement

public void addChildFromXMLElement(XMLRepresentable child)
Description copied from class: AbstractXMLRepresentable
The implementation up here is empty.

Specified by:
addChildFromXMLElement in interface XMLRepresentable
Overrides:
addChildFromXMLElement in class AbstractXMLRepresentable

writeXMLElement

public void writeXMLElement(KXmlSerializer serializer)
                     throws IOException
Specified by:
writeXMLElement in interface XMLRepresentable
Throws:
IOException

getNumPRDAssembly

public int getNumPRDAssembly()

getPRDAssemblyList

public List getPRDAssemblyList()

getPRDAssembly

public PRDAssembly getPRDAssembly(int i)

addPRDAssembly

public void addPRDAssembly(PRDAssembly node)

setPRDAssembly

public void setPRDAssembly(PRDAssembly node,
                           int i)

numChildren

protected int numChildren()
Overrides:
numChildren in class PRDSecondOrderList

setPRDSecondOrderList

public void setPRDSecondOrderList(List list)
Overrides:
setPRDSecondOrderList in class PRDSecondOrderList

getNumPRDSecondOrder

public int getNumPRDSecondOrder()
Overrides:
getNumPRDSecondOrder in class PRDSecondOrderList

getPRDSecondOrder

public PRDSecondOrder getPRDSecondOrder(int i)
Overrides:
getPRDSecondOrder in class PRDSecondOrderList

addPRDSecondOrder

public void addPRDSecondOrder(PRDSecondOrder node)
Overrides:
addPRDSecondOrder in class PRDSecondOrderList

setPRDSecondOrder

public void setPRDSecondOrder(PRDSecondOrder node,
                              int i)
Overrides:
setPRDSecondOrder in class PRDSecondOrderList

getPRDSecondOrderList

public List getPRDSecondOrderList()
Overrides:
getPRDSecondOrderList in class PRDSecondOrderList

getPRDSecondOrderListNoTransform

public List getPRDSecondOrderListNoTransform()
Overrides:
getPRDSecondOrderListNoTransform in class PRDSecondOrderList

setFormat

public void setFormat(String value)

getFormat

public String getFormat()

setName

public void setName(String value)

getName

public String getName()
Overrides:
getName in class PRDData

setVersion

public void setVersion(String value)

getVersion

public String getVersion()

getAssemblyLabel

public String getAssemblyLabel()
Overrides:
getAssemblyLabel in class ASTNode