DLESE Tools
v1.6.0

org.dlese.dpc.standards.asn
Class AsnStandard

java.lang.Object
  extended by org.dlese.dpc.standards.asn.AsnStandard
Direct Known Subclasses:
AAASBenchmark, AsnMappingStandard, ColoradoBenchmark, RootAsnStandard

public class AsnStandard
extends Object

Wraps AsnStatement to expose object based hierarchy information, such as "children" and "ancestors" as AsnStandards rather than ASN IDs, and to expose resolved ASN purl-based Attributes as human-readable strings, such as "Science" rather than "http://purl.org/ASN/scheme/ASNTopic/science".

Author:
Jonathan Ostwald

Field Summary
protected  List ancestors
           
protected  AsnDocument asnDoc
           
protected  List children
           
 
Constructor Summary
AsnStandard(AsnStatement asnStmnt, AsnDocument asnDoc)
          Constructor for the AsnStandard object given an XML Element and the containing AsnDocument instance;
 
Method Summary
protected  void addChild(AsnStandard std)
          Adds a Child to the AsnStandard object
 List getAncestors()
          Gets the ancestors attribute of the AsnStandard object
 AsnStatement getAsnStatement()
           
 String getAuthor()
          Gets the author attribute of the AsnStandard object
 List getChildren()
          Returns children as AsnStandard instances in same order as the XML Element defining this Standard
 String getDescription()
           
 String getDisplayText()
          Walk the ancestor list, adding text from each node
 String getDocumentIdentifier()
          Gets the documentIdentifier attribute of the AsnStandard object
 int getEndGradeLevel()
          Gets the endGradeLevel attribute of the AsnStandard object
 String getGradeRange()
           
 String getId()
           
 int getLevel()
          Gets the level attribute of the AsnStandard object
 String getParentId()
           
 AsnStandard getParentStandard()
          Gets the parentStandard attribute of the AsnStandard object
 int getStartGradeLevel()
          Gets the startGradeLevel attribute of the AsnStandard object
protected  AsnStandard getStd(String id)
          Gets the std attribute of the AsnStandard object
 AsnDocument getStdDocument()
           
 String getTopic()
          Gets the topic attribute of the AsnStandard object
 boolean isLeaf()
          Returns true if the AsnStandard object is a leaf
static String removeEntityRefs(String in)
          Removes entityRefs from the provided string
 String toString()
          NOT YET DOCUMENTED
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

asnDoc

protected AsnDocument asnDoc

children

protected List children

ancestors

protected List ancestors
Constructor Detail

AsnStandard

public AsnStandard(AsnStatement asnStmnt,
                   AsnDocument asnDoc)
Constructor for the AsnStandard object given an XML Element and the containing AsnDocument instance;

Parameters:
e - the element defining the AsnStandard
asnDoc - the Document containing this standard
Method Detail

getStdDocument

public AsnDocument getStdDocument()

getAsnStatement

public AsnStatement getAsnStatement()

getDescription

public String getDescription()

getId

public String getId()

getGradeRange

public String getGradeRange()

getDocumentIdentifier

public String getDocumentIdentifier()
Gets the documentIdentifier attribute of the AsnStandard object

Returns:
The documentIdentifier value

getStd

protected AsnStandard getStd(String id)
Gets the std attribute of the AsnStandard object

Parameters:
id - Description of the Parameter
Returns:
The std value

getAuthor

public String getAuthor()
Gets the author attribute of the AsnStandard object

Returns:
The author value

getTopic

public String getTopic()
Gets the topic attribute of the AsnStandard object

Returns:
The topic value

isLeaf

public boolean isLeaf()
Returns true if the AsnStandard object is a leaf

Returns:
The leaf value

getChildren

public List getChildren()
Returns children as AsnStandard instances in same order as the XML Element defining this Standard

Returns:
The children value

addChild

protected void addChild(AsnStandard std)
Adds a Child to the AsnStandard object

Parameters:
std - The feature to be added to the Child attribute

getStartGradeLevel

public int getStartGradeLevel()
Gets the startGradeLevel attribute of the AsnStandard object

Returns:
The startGradeLevel value

getEndGradeLevel

public int getEndGradeLevel()
Gets the endGradeLevel attribute of the AsnStandard object

Returns:
The endGradeLevel value

getParentId

public String getParentId()

getParentStandard

public AsnStandard getParentStandard()
Gets the parentStandard attribute of the AsnStandard object

Returns:
The parentStandard value

removeEntityRefs

public static String removeEntityRefs(String in)
Removes entityRefs from the provided string

Parameters:
in - input string
Returns:
string with entity refs removed

getDisplayText

public String getDisplayText()
Walk the ancestor list, adding text from each node

Returns:
The displayText value

getAncestors

public List getAncestors()
Gets the ancestors attribute of the AsnStandard object

Returns:
The ancestors value

getLevel

public int getLevel()
Gets the level attribute of the AsnStandard object

Returns:
The level value

toString

public String toString()
NOT YET DOCUMENTED

Overrides:
toString in class Object
Returns:
NOT YET DOCUMENTED

DLESE Tools
v1.6.0