Package org.dlese.dpc.standards.commcore
Class Standard
java.lang.Object
org.dlese.dpc.standards.commcore.StdElement
org.dlese.dpc.standards.commcore.Standard
- Direct Known Subclasses:
RootStandard
Extends StdElement to include hierarchy information, such as "children" and
"ancestors"
- Author:
- Jonathan Ostwald
-
Field Summary
FieldsFields inherited from class org.dlese.dpc.standards.commcore.StdElement
element -
Constructor Summary
ConstructorsConstructorDescriptionStandard(org.dom4j.Element e, StdDocument stdDoc) Constructor for the Standard object given an XML Element and the containing StdDocument instance; -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds a Child to the Standard objectGets an ordered list of ancestors from root to this standard's parentGets the author attribute of the Standard objectReturns children as Standard instances in same order as the XML Element defining this StandardWalk the ancestor list, adding text from each nodeGets the documentIdentifier attribute of the Standard objectintgetLevel()Gets the level attribute of the Standard objectGets the parentStandard attribute of the Standard objectprotected StandardGets the std attribute of the Standard objectgetTopic()Gets the topic attribute of the Standard objectbooleanisLeaf()Returns true if the Standard object is a leafstatic StringRemoves entityRefs from the provided stringtoString()NOT YET DOCUMENTEDMethods inherited from class org.dlese.dpc.standards.commcore.StdElement
getDescription, getEndGradeLevel, getGradeRange, getId, getItemText, getParentId, getStartGradeLevel, getSubElementText, getSubElementText, getSubElementText, getSubElementText, setItemText
-
Field Details
-
stdDoc
-
children
-
ancestors
-
-
Constructor Details
-
Standard
Constructor for the Standard object given an XML Element and the containing StdDocument instance;- Parameters:
e- the element defining the StandardstdDoc- the Document containing this standard
-
-
Method Details
-
getDocumentIdentifier
Gets the documentIdentifier attribute of the Standard object- Returns:
- The documentIdentifier value
-
getStd
Gets the std attribute of the Standard object- Parameters:
id- Description of the Parameter- Returns:
- The std value
-
getAuthor
Gets the author attribute of the Standard object- Returns:
- The author value
-
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
Returns children as Standard instances in same order as the XML Element defining this Standard- Returns:
- The children value
-
addChild
Adds a Child to the Standard object- Parameters:
std- The feature to be added to the Child attribute
-
getParentStandard
Gets the parentStandard attribute of the Standard 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 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
NOT YET DOCUMENTED- Overrides:
toStringin classStdElement- Returns:
- NOT YET DOCUMENTED
-