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
ConstructorDescriptionXmlGradeBookParser
(File file) Creates anXmlGradeBookParser
that creates aGradeBook
from the contents of aFile
.Creates anXmlGradeBookParser
that creates aGradeBook
from the contents of anInputStream
.XmlGradeBookParser
(String fileName) Creates anXmlGradeBookParser
that creates aGradeBook
from a file of a given name. -
Method Summary
Modifier and TypeMethodDescriptionparse()
Parses the source and from it creates aGradeBook
.void
setStudentDir
(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 anXmlGradeBookParser
that creates aGradeBook
from a file of a given name.- Throws:
IOException
-
XmlGradeBookParser
Creates anXmlGradeBookParser
that creates aGradeBook
from the contents of aFile
.- Throws:
IOException
-
XmlGradeBookParser
Creates anXmlGradeBookParser
that creates aGradeBook
from 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
-