|
talx x1.0.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
util.SkillLattice
This class reads in a given XML file and parses it for Skill nodes. The Skills are created, and then sorted into an ordered array and into a TreeMap for quick searching. Skills are intially soft, in that they have not instantiated their tasks or drills until the Skill is choosen by the Training program. Because the XML file may be extremely large, the XML parser used is SAX which uses much less memory than DOM. See SkillLatticeConstants.java for information on how to format the XML.
| Field Summary | |
static Stats |
SKILL_STATS
|
| Constructor Summary | |
SkillLattice(java.lang.String filename)
Constructs a SkillLattice from the file at the given location. |
|
| Method Summary | |
Skill[] |
getSkillArray()
Returns all the skills topologically sorted. |
java.util.TreeMap |
getSkillMap()
Returns a map of skills for quick searching. |
void |
merge(SkillLattice incoming)
This method merges two sets of skills, the skills of this object and the ones passed in from the argument. |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static Stats SKILL_STATS
| Constructor Detail |
public SkillLattice(java.lang.String filename)
filename - The filename of XML file to parse.
java.lang.RuntimeException - if the file cannot be found, parsed, or contains
skills which do not form a lattice (ie admit no topological sort).| Method Detail |
public void merge(SkillLattice incoming)
throws java.lang.Exception
incoming - The new skills to merge with this object's skills.
java.lang.Exceptionpublic Skill[] getSkillArray()
public java.util.TreeMap getSkillMap()
|
talx x1.0.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.