org.tridas.io.util
Class TridasUtils

java.lang.Object
  extended by org.tridas.io.util.TridasUtils

public class TridasUtils
extends Object


Nested Class Summary
static class TridasUtils.TridasValueDataType
           
 
Constructor Summary
TridasUtils()
           
 
Method Summary
static Boolean checkTridasValuesDataType(org.tridas.schema.TridasValues argValues, TridasUtils.TridasValueDataType dataType)
          Checks to see whether a TridasValues block contains only only values of a certain data type.
static Boolean doesEntityMatchIdentifier(org.tridas.interfaces.ITridas entity, org.tridas.schema.TridasIdentifier id)
          Returns true if the TRiDaS entities identifier matches the one specified
static ArrayList<org.tridas.schema.TridasElement> getElementList(org.tridas.schema.TridasObject o)
          Recursively work through objects and sub-objects compiling a list of all the TridasElements associated with them.
static org.tridas.interfaces.ITridas getEntityByIdentifier(org.tridas.schema.TridasProject p, org.tridas.schema.TridasIdentifier id, Class<? extends org.tridas.interfaces.ITridas> parentEntityClass)
          Get the entity from this project that matches the specified identifier.
static Set<org.tridas.schema.TridasMeasurementSeries> getMeasurementSeriesFromTridasObject(org.tridas.schema.TridasObject o)
           
static ArrayList<org.tridas.schema.TridasMeasurementSeries> getMeasurementSeriesFromTridasProject(org.tridas.schema.TridasProject p)
           
static ArrayList<org.tridas.schema.TridasObject> getObjectList(org.tridas.schema.TridasObject o)
          Recursively work through objects and sub-objects compiling a list of all the TridasObjects associated with this TridasObject.
static ArrayList<org.tridas.schema.TridasObject> getObjectList(org.tridas.schema.TridasProject p)
          Get a list of TridasObjects from a project recursively
static org.tridas.schema.TridasRemark getRemarkFromString(String str)
          Attempt to standardise a ring remark into a NormalTridasRemark.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TridasUtils

public TridasUtils()
Method Detail

getMeasurementSeriesFromTridasProject

public static ArrayList<org.tridas.schema.TridasMeasurementSeries> getMeasurementSeriesFromTridasProject(org.tridas.schema.TridasProject p)

getMeasurementSeriesFromTridasObject

public static Set<org.tridas.schema.TridasMeasurementSeries> getMeasurementSeriesFromTridasObject(org.tridas.schema.TridasObject o)

getElementList

public static ArrayList<org.tridas.schema.TridasElement> getElementList(org.tridas.schema.TridasObject o)
Recursively work through objects and sub-objects compiling a list of all the TridasElements associated with them.

Parameters:
o -
Returns:

getObjectList

public static ArrayList<org.tridas.schema.TridasObject> getObjectList(org.tridas.schema.TridasProject p)
Get a list of TridasObjects from a project recursively

Parameters:
p -
Returns:

getObjectList

public static ArrayList<org.tridas.schema.TridasObject> getObjectList(org.tridas.schema.TridasObject o)
Recursively work through objects and sub-objects compiling a list of all the TridasObjects associated with this TridasObject.

Parameters:
p -
Returns:

checkTridasValuesDataType

public static Boolean checkTridasValuesDataType(org.tridas.schema.TridasValues argValues,
                                                TridasUtils.TridasValueDataType dataType)
Checks to see whether a TridasValues block contains only only values of a certain data type. If tests cannot be completed, (e.g. argValues is empty) then it returns null.

Parameters:
argValues -
Returns:

getRemarkFromString

public static org.tridas.schema.TridasRemark getRemarkFromString(String str)
Attempt to standardise a ring remark into a NormalTridasRemark.

Parameters:
str -
Returns:

getEntityByIdentifier

public static org.tridas.interfaces.ITridas getEntityByIdentifier(org.tridas.schema.TridasProject p,
                                                                  org.tridas.schema.TridasIdentifier id,
                                                                  Class<? extends org.tridas.interfaces.ITridas> parentEntityClass)
Get the entity from this project that matches the specified identifier. If parentEntityClass is specified then the parent entity of the class type entered is returned (e.g. perhaps the object of a sample). If the identifier matches a derivedSeries, then this function is called recursively to try and locate the correct entity. If no match is found, then null is returned.

Parameters:
p -
id -
parentEntityClass -
Returns:

doesEntityMatchIdentifier

public static Boolean doesEntityMatchIdentifier(org.tridas.interfaces.ITridas entity,
                                                org.tridas.schema.TridasIdentifier id)
Returns true if the TRiDaS entities identifier matches the one specified

Parameters:
entity -
id -
Returns:


Copyright © 2011. All Rights Reserved.