jitas.xml.parser
Class StudentModelParser
java.lang.Object
jitas.xml.parser.XMLParser
jitas.xml.parser.StudentModelParser
public class StudentModelParser
- extends XMLParser
An XML parser to parse a set of Student Models from a given file.
There will be one such file for each domain.
- Version:
- 04 July 2007
- Author:
- DeathMarch (c314g2)
Constructor Summary |
StudentModelParser(java.lang.String pathName,
java.lang.String domainName,
java.lang.String studentName)
The constructor sorts out the arguments, then hands
over the DOM work to the DOM parser; which is used to build
the DOM tree and then parse the student model docs (.xml). |
Method Summary |
StudentModel |
loadStudentModel(java.lang.String domainName,
java.lang.String studentName)
The root of the tree is easy to find since the document
itself implements the Node interface... |
StudentModel |
processTree()
Using DOM parser to parse the XML file and return the collections of
needed object |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StudentModelParser
public StudentModelParser(java.lang.String pathName,
java.lang.String domainName,
java.lang.String studentName)
throws StudentModelsNotFoundException
- The constructor sorts out the arguments, then hands
over the DOM work to the DOM parser; which is used to build
the DOM tree and then parse the student model docs (.xml).
- Parameters:
pathName
- Pathname to the filedomainName
- The domain namestudentName
- The Students names
- Throws:
StudentModelsNotFoundException
- If the models for the student weren't found
processTree
public StudentModel processTree()
- Description copied from class:
XMLParser
- Using DOM parser to parse the XML file and return the collections of
needed object
- Specified by:
processTree
in class XMLParser
loadStudentModel
public StudentModel loadStudentModel(java.lang.String domainName,
java.lang.String studentName)
throws StudentModelNotFoundException
- The root of the tree is easy to find since the document
itself implements the Node interface...
- Returns:
- studentModels The set of StudentModels
- Throws:
StudentModelNotFoundException
- If it cannot find the model for the student