org.tridas.util
Class TridasObjectEx

java.lang.Object
  extended by org.tridas.schema.TridasEntity
      extended by org.tridas.schema.TridasObject
          extended by org.tridas.util.TridasObjectEx
All Implemented Interfaces:
Serializable, Cloneable, org.jvnet.jaxb2_commons.lang.CopyTo, org.jvnet.jaxb2_commons.lang.Equals, org.jvnet.jaxb2_commons.lang.HashCode, org.jvnet.jaxb2_commons.lang.ToString, ITridas, ITridasGeneric, TridasIdentifiable

public class TridasObjectEx
extends TridasObject

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.tridas.schema.TridasObject
coverage, creator, description, elements, files, genericFields, linkSeries, location, objects, owner, type
 
Fields inherited from class org.tridas.schema.TridasEntity
comments, createdTimestamp, identifier, lastModifiedTimestamp, title
 
Constructor Summary
TridasObjectEx()
           
 
Method Summary
protected  void afterUnmarshal(Unmarshaller unmarshaller, Object parent)
          This is called after unmarshalling is complete.
 Integer getChildSeriesCount()
          Get the number of objects that this series and its children have
 String getLabCode()
          Get the lab code, or (n/a) if there is no lab code
 TridasObjectEx getParent()
          Get the parent object
 String getParentLabCode()
          Get the parent lab code, or (n/a) if there is no code
 Integer getSeriesCount()
          Get the number of series that this particular object has
 boolean hasChildren()
          Determines if this has any children
 boolean hasLabCode()
          Does this object have a lab code?
 boolean isTopLevelObject()
          Determines if this is a top level object (has no parent)
 String toTitleString()
          Get a text representation of this site
 String toTitleStringWithParentCode()
          Get a text representation of this site
 
Methods inherited from class org.tridas.schema.TridasObject
append, appendFields, clone, copyTo, copyTo, createNewInstance, equals, equals, getCoverage, getCreator, getDescription, getElements, getFiles, getGenericFields, getLinkSeries, getLocation, getObjects, getOwner, getType, hashCode, hashCode, isSetCoverage, isSetCreator, isSetDescription, isSetElements, isSetFiles, isSetGenericFields, isSetLinkSeries, isSetLocation, isSetObjects, isSetOwner, isSetType, setCoverage, setCreator, setDescription, setElements, setFiles, setGenericFields, setLinkSeries, setLocation, setObjects, setOwner, setType, toString, unsetElements, unsetFiles, unsetGenericFields, unsetObjects
 
Methods inherited from class org.tridas.schema.TridasEntity
getComments, getCreatedTimestamp, getIdentifier, getLastModifiedTimestamp, getTitle, isSetComments, isSetCreatedTimestamp, isSetIdentifier, isSetLastModifiedTimestamp, isSetTitle, setComments, setCreatedTimestamp, setIdentifier, setLastModifiedTimestamp, setTitle
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.tridas.interfaces.ITridas
getComments, getCreatedTimestamp, getLastModifiedTimestamp, getTitle, isSetComments, isSetCreatedTimestamp, isSetIdentifier, isSetLastModifiedTimestamp, isSetTitle, setComments, setCreatedTimestamp, setIdentifier, setLastModifiedTimestamp, setTitle
 
Methods inherited from interface org.tridas.interfaces.TridasIdentifiable
getIdentifier
 

Constructor Detail

TridasObjectEx

public TridasObjectEx()
Method Detail

isTopLevelObject

public boolean isTopLevelObject()
Determines if this is a top level object (has no parent)

Returns:
true if this is a top level object

getParent

public TridasObjectEx getParent()
Get the parent object

Returns:
The parent object, or null if it doesn't exist

hasChildren

public boolean hasChildren()
Determines if this has any children

Returns:
true of there are any sub-object children

hasLabCode

public boolean hasLabCode()
Does this object have a lab code?

Returns:
true if getLabCode would return a valid labcode

getSeriesCount

public Integer getSeriesCount()
Get the number of series that this particular object has

Returns:
the count of child series that are directly descended from this object

getChildSeriesCount

public Integer getChildSeriesCount()
Get the number of objects that this series and its children have

Returns:
the count of child series that are descended from this object and its children

getLabCode

public String getLabCode()
Get the lab code, or (n/a) if there is no lab code

Returns:
The "lab code" of this object

getParentLabCode

public String getParentLabCode()
Get the parent lab code, or (n/a) if there is no code

Returns:
The "lab code" of the parent of this object

toTitleString

public String toTitleString()
Get a text representation of this site

Returns:
A string in the form of '[CODE] title'

toTitleStringWithParentCode

public String toTitleStringWithParentCode()
Get a text representation of this site

Returns:
A string in the form of '[PARENTCODE] [CODE] title'

afterUnmarshal

protected void afterUnmarshal(Unmarshaller unmarshaller,
                              Object parent)
This is called after unmarshalling is complete. We need to populate any of our values. Note: It is guaranteed a that all child entities are populated. It is NOT guaranteed that parent entities are.

Parameters:
unmarshaller -
parent -


Copyright © 2011 TRiDaS. All Rights Reserved.