|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
crn.OtherSettingsFileHandler
A class used to parse an XML file containing settings used by the comparison functions.
Field Summary | |
private boolean |
fInOtherSettings
Indicates whether the parser is inside the `OtherSettings' tag. |
private org.xml.sax.Locator |
locator
The SAX locator. |
int |
maxSimilarChangesCountsDifference
Max similar changes counts difference. |
int |
maxSimilarDepartureHoursOfDayDifference
Max similar departure hours of day difference. |
double |
maxSimilarLocationsDistance
Max similar locations distance. |
int |
maxSimilarRanksDifference
Max similar ranks difference. |
int |
maxSimilarTotalDurationsDifference
Max similar total durations difference. |
Constructor Summary | |
OtherSettingsFileHandler()
Constructor. |
Method Summary | |
private static javax.xml.parsers.SAXParser |
CreateSAXParser()
Creates an instance of the SAXParser. |
void |
endElement(java.lang.String uriNamespace,
java.lang.String qualifiedName,
java.lang.String simpleName)
|
static void |
LoadFromFile(java.lang.String fileName)
Loads the `other settings' from the given file. |
void |
Parse(java.lang.String fileName)
Parses the given file. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
|
void |
startElement(java.lang.String uriNamespace,
java.lang.String simpleName,
java.lang.String qualifiedName,
org.xml.sax.Attributes attributes)
|
static void |
StoreToFile(java.lang.String fileName)
Stores the `other settings' to the given file. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private boolean fInOtherSettings
public int maxSimilarChangesCountsDifference
public int maxSimilarDepartureHoursOfDayDifference
public double maxSimilarLocationsDistance
public int maxSimilarRanksDifference
public int maxSimilarTotalDurationsDifference
private org.xml.sax.Locator locator
Constructor Detail |
public OtherSettingsFileHandler()
Method Detail |
public static void StoreToFile(java.lang.String fileName) throws java.io.IOException
fileName
- The name of file to store the `other seetings' to.
java.io.IOException
- Thrown in case of IO problems.public static void LoadFromFile(java.lang.String fileName)
fileName
- The name of file to load the data from.public void Parse(java.lang.String fileName) throws java.lang.Exception, java.io.IOException, org.xml.sax.SAXException
fileName
- The name of the file to be parsed.
java.lang.Exception
- Thrown in case of error.
java.io.IOException
- In case of any IO error.
org.xml.sax.SAXException
- In case of some parsing error.private static javax.xml.parsers.SAXParser CreateSAXParser() throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
- If it was imposible to create a parser satisfing the current configuration.
org.xml.sax.SAXException
public void startElement(java.lang.String uriNamespace, java.lang.String simpleName, java.lang.String qualifiedName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
org.xml.sax.SAXException
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void endElement(java.lang.String uriNamespace, java.lang.String qualifiedName, java.lang.String simpleName)
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
public void setDocumentLocator(org.xml.sax.Locator locator)
ContentHandler.setDocumentLocator(org.xml.sax.Locator)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |