Package org.dlese.dpc.standards.asn
Class AsnStandard
java.lang.Object
org.dlese.dpc.standards.asn.AsnStandard
- Direct Known Subclasses:
AAASBenchmark,AsnMappingStandard,ColoradoBenchmark,RootAsnStandard
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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAsnStandard(AsnStatement asnStmnt, AsnDocument asnDoc) Constructor for the AsnStandard object given an XML Element and the containing AsnDocument instance; -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddChild(AsnStandard std) Adds a Child to the AsnStandard objectGets the ancestors attribute of the AsnStandard objectGets the author attribute of the AsnStandard objectReturns children as AsnStandard instances in same order as the XML Element defining this StandardWalk the ancestor list, adding text from each nodeGets the documentIdentifier attribute of the AsnStandard objectintGets the endGradeLevel attribute of the AsnStandard objectgetId()intgetLevel()Gets the level attribute of the AsnStandard objectGets the parentStandard attribute of the AsnStandard objectintGets the startGradeLevel attribute of the AsnStandard objectprotected AsnStandardGets the std attribute of the AsnStandard objectgetTopic()Gets the topic attribute of the AsnStandard objectbooleanisLeaf()Returns true if the AsnStandard object is a leafstatic StringRemoves entityRefs from the provided stringtoString()NOT YET DOCUMENTED
-
Field Details
-
asnDoc
-
children
-
ancestors
-
-
Constructor Details
-
AsnStandard
Constructor for the AsnStandard object given an XML Element and the containing AsnDocument instance;- Parameters:
asnDoc- the Document containing this standarde- the element defining the AsnStandard
-
-
Method Details
-
getStdDocument
-
getAsnStatement
-
getDescription
-
getId
-
getGradeRange
-
getDocumentIdentifier
Gets the documentIdentifier attribute of the AsnStandard object- Returns:
- The documentIdentifier value
-
getStd
Gets the std attribute of the AsnStandard object- Parameters:
id- Description of the Parameter- Returns:
- The std value
-
getAuthor
Gets the author attribute of the AsnStandard object- Returns:
- The author value
-
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
Returns children as AsnStandard instances in same order as the XML Element defining this Standard- Returns:
- The children value
-
addChild
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
-
getParentStandard
Gets the parentStandard attribute of the AsnStandard object- Returns:
- The parentStandard value
-
removeEntityRefs
Removes entityRefs from the provided string- Parameters:
in- input string- Returns:
- string with entity refs removed
-
getDisplayText
Walk the ancestor list, adding text from each node- Returns:
- The displayText value
-
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
NOT YET DOCUMENTED
-