DLESE Tools
v1.6.0

org.dlese.dpc.standards.commcore
Class Standard

java.lang.Object
  extended by org.dlese.dpc.standards.commcore.StdElement
      extended by 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 Summary
protected  List ancestors
           
protected  List children
           
protected  StdDocument stdDoc
           
 
Fields inherited from class org.dlese.dpc.standards.commcore.StdElement
element
 
Constructor Summary
Standard(Element e, StdDocument stdDoc)
          Constructor for the Standard object given an XML Element and the containing StdDocument instance;
 
Method Summary
protected  void addChild(Standard std)
          Adds a Child to the Standard object
 List getAncestors()
          Gets an ordered list of ancestors from root to this standard's parent
 String getAuthor()
          Gets the author attribute of the Standard object
 List getChildren()
          Returns children as Standard instances in same order as the XML Element defining this Standard
 String getDisplayText()
          Walk the ancestor list, adding text from each node
 String getDocumentIdentifier()
          Gets the documentIdentifier attribute of the Standard object
 int getLevel()
          Gets the level attribute of the Standard object
 Standard getParentStandard()
          Gets the parentStandard attribute of the Standard object
protected  Standard getStd(String id)
          Gets the std attribute of the Standard object
 String getTopic()
          Gets the topic attribute of the Standard object
 boolean isLeaf()
          Returns true if the Standard object is a leaf
static String removeEntityRefs(String in)
          Removes entityRefs from the provided string
 String toString()
          NOT YET DOCUMENTED
 
Methods inherited from class org.dlese.dpc.standards.commcore.StdElement
getDescription, getEndGradeLevel, getGradeRange, getId, getItemText, getParentId, getStartGradeLevel, getSubElementText, getSubElementText, getSubElementText, getSubElementText, setItemText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stdDoc

protected StdDocument stdDoc

children

protected List children

ancestors

protected List ancestors
Constructor Detail

Standard

public Standard(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 Detail

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

DLESE Tools
v1.6.0