Package edu.pdx.cs410J.grader.gradebook
Class XmlGradeBookParser
java.lang.Object
edu.pdx.cs410J.grader.gradebook.XmlHelper
edu.pdx.cs410J.grader.gradebook.XmlGradeBookParser
- All Implemented Interfaces:
EntityResolver,ErrorHandler
This class creates a
GradeBook from the contents of an
XML file.-
Field Summary
Fields inherited from class edu.pdx.cs410J.grader.gradebook.XmlHelper
DATE_TIME_FORMAT, publicID, systemID -
Constructor Summary
ConstructorsConstructorDescriptionXmlGradeBookParser(File file) Creates anXmlGradeBookParserthat creates aGradeBookfrom the contents of aFile.Creates anXmlGradeBookParserthat creates aGradeBookfrom the contents of anInputStream.XmlGradeBookParser(String fileName) Creates anXmlGradeBookParserthat creates aGradeBookfrom a file of a given name. -
Method Summary
Modifier and TypeMethodDescriptionparse()Parses the source and from it creates aGradeBook.voidsetStudentDir(File dir) Sets the directory in which the XML files for students are generated.Methods inherited from class edu.pdx.cs410J.grader.gradebook.XmlHelper
error, extractNotesFrom, extractTextFrom, fatalError, getBytesForXmlDocument, resolveEntity, warning, writeXmlToPrintWriter
-
Constructor Details
-
XmlGradeBookParser
Creates anXmlGradeBookParserthat creates aGradeBookfrom a file of a given name.- Throws:
IOException
-
XmlGradeBookParser
Creates anXmlGradeBookParserthat creates aGradeBookfrom the contents of aFile.- Throws:
IOException
-
XmlGradeBookParser
Creates anXmlGradeBookParserthat creates aGradeBookfrom the contents of anInputStream.
-
-
Method Details
-
setStudentDir
Sets the directory in which the XML files for students are generated. -
parse
Parses the source and from it creates aGradeBook.- Throws:
ParserException
-