Class Standard

java.lang.Object
org.dlese.dpc.standards.commcore.StdElement
org.dlese.dpc.standards.commcore.Standard
Direct Known Subclasses:
RootStandard

public class Standard extends StdElement
Extends StdElement to include hierarchy information, such as "children" and "ancestors"
Author:
Jonathan Ostwald
  • Field Details

    • stdDoc

      protected StdDocument stdDoc
    • children

      protected List children
    • ancestors

      protected List ancestors
  • Constructor Details

    • Standard

      public Standard(org.dom4j.Element e, StdDocument stdDoc)
      Constructor for the Standard object given an XML Element and the containing StdDocument instance;
      Parameters:
      e - the element defining the Standard
      stdDoc - the Document containing this standard
  • Method Details

    • getDocumentIdentifier

      public String getDocumentIdentifier()
      Gets the documentIdentifier attribute of the Standard object
      Returns:
      The documentIdentifier value
    • getStd

      protected Standard getStd(String id)
      Gets the std attribute of the Standard object
      Parameters:
      id - Description of the Parameter
      Returns:
      The std value
    • getAuthor

      public String getAuthor()
      Gets the author attribute of the Standard object
      Returns:
      The author value
    • getTopic

      public String getTopic()
      Gets the topic attribute of the Standard object
      Returns:
      The topic value
    • isLeaf

      public boolean isLeaf()
      Returns true if the Standard object is a leaf
      Returns:
      The leaf value
    • getChildren

      public List getChildren()
      Returns children as Standard instances in same order as the XML Element defining this Standard
      Returns:
      The children value
    • addChild

      protected void addChild(Standard std)
      Adds a Child to the Standard object
      Parameters:
      std - The feature to be added to the Child attribute
    • getParentStandard

      public Standard getParentStandard()
      Gets the parentStandard attribute of the Standard 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 an ordered list of ancestors from root to this standard's parent
      Returns:
      The ancestors value
    • getLevel

      public int getLevel()
      Gets the level attribute of the Standard object
      Returns:
      The level value
    • toString

      public String toString()
      NOT YET DOCUMENTED
      Overrides:
      toString in class StdElement
      Returns:
      NOT YET DOCUMENTED