Class AsnStandard

java.lang.Object
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 Details

    • asnDoc

      protected AsnDocument asnDoc
    • children

      protected List children
    • ancestors

      protected List ancestors
  • Constructor Details

    • AsnStandard

      public AsnStandard(AsnStatement asnStmnt, AsnDocument asnDoc)
      Constructor for the AsnStandard object given an XML Element and the containing AsnDocument instance;
      Parameters:
      asnDoc - the Document containing this standard
      e - the element defining the AsnStandard
  • Method Details

    • 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