|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.pdx.cs399J.grader.XmlGradeBookParser
public class XmlGradeBookParser
This class creates a GradeBook from the contents of an
XML file.
| Field Summary | |
|---|---|
protected static String |
publicID
The Public ID for the Grade Bookd DTD |
protected static String |
systemID
The System ID for the Grade Book DTD |
| Constructor Summary | |
|---|---|
XmlGradeBookParser(File file)
Creates an XmlGradeBookParser that creates a
GradeBook from the contents of a File. |
|
XmlGradeBookParser(String fileName)
Creates an XmlGradeBookParser that creates a
GradeBook from a file of a given name. |
|
| Method Summary | |
|---|---|
void |
error(SAXParseException ex)
|
protected static List<String> |
extractNotesFrom(Element element)
Extracts a bunch of notes from an Element |
protected static String |
extractTextFrom(Element element)
Extracts the text from an Element. |
void |
fatalError(SAXParseException ex)
|
GradeBook |
parse()
Parses the source and from it creates a GradeBook. |
InputSource |
resolveEntity(String publicId,
String systemId)
Attempt to resolve the external entity (such as a DTD) described by the given public and system ID. |
void |
setStudentDir(File dir)
Sets the directory in which the XML files for students are generated. |
void |
warning(SAXParseException ex)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String systemID
protected static final String publicID
| Constructor Detail |
|---|
public XmlGradeBookParser(String fileName)
throws FileNotFoundException,
IOException
XmlGradeBookParser that creates a
GradeBook from a file of a given name.
FileNotFoundException
IOException
public XmlGradeBookParser(File file)
throws FileNotFoundException,
IOException
XmlGradeBookParser that creates a
GradeBook from the contents of a File.
FileNotFoundException
IOException| Method Detail |
|---|
public void setStudentDir(File dir)
public GradeBook parse()
throws ParserException
GradeBook.
ParserException
public InputSource resolveEntity(String publicId,
String systemId)
throws SAXException,
IOException
InputSource
resolveEntity in interface EntityResolverSAXException
IOException
public void warning(SAXParseException ex)
throws SAXException
warning in interface ErrorHandlerSAXException
public void error(SAXParseException ex)
throws SAXException
error in interface ErrorHandlerSAXException
public void fatalError(SAXParseException ex)
throws SAXException
fatalError in interface ErrorHandlerSAXExceptionprotected static List<String> extractNotesFrom(Element element)
Element
protected static String extractTextFrom(Element element)
Element.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||