|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.DefaultHandler jwo.landserf.process.io.MasterMapReader
Reads in an Ordnance Survey MasterMap file in serial fashion using a SAX parser.
Constructor Summary | |
MasterMapReader(String fileName,
GISFrame gisFrame,
LSThread lsThread)
Starts the parsing of the given XML file, and gathers information about the attribute types. |
|
MasterMapReader(String fileName,
VectorMap vectorMap,
GISFrame gisFrame,
LSThread lsThread)
Starts the parsing of the given XML file, placing all objects into the given vector map and reporting progress to the GISFrame. |
|
MasterMapReader(String fileName,
VectorMap vectorMap,
TreeMap attributeTypes,
int readStyle,
GISFrame gisFrame,
LSThread lsThread)
Starts the parsing of the given XML file. |
Method Summary | |
void |
characters(char[] text,
int offset,
int length)
Called by the parser when character text is found. |
protected void |
display(String message,
boolean position)
Displays the given message with an option of identifying the approximate currently parsed line and column identified by the parser Locator. |
void |
endDocument()
Called by the parser when the document represented by the XML is finally closed. |
void |
endElement(String uri,
String sName,
String qName)
Called by the parser when the end of an element is found. |
void |
error(SAXParseException e)
Called when the parser encounters a non-fatal error. |
void |
fatalError(SAXParseException e)
Called when the parser encounters a fatal error. |
TreeMap |
getAttributeTypes()
Reports a sorted list of attribute types found after scanning the XML file. |
String |
getLastError()
Reports last error that was generated by the parser, or null if no error or warning has occurred. |
void |
setDocumentLocator(Locator locator)
This method is called by the parser when the XML file for parsing is first opened. |
void |
startDocument()
Called by the parser when the document represented by the XML is first opened. |
void |
startElement(String uri,
String sName,
String qName,
Attributes atts)
Called by the parser when the start of an element is found. |
void |
warning(SAXParseException e)
Called when the parser encounters a non-fatal warning. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MasterMapReader(String fileName, VectorMap vectorMap, GISFrame gisFrame, LSThread lsThread)
fileName
- Name of XML file to process.vectorMap
- Vector map to contain XML data.gisFrame
- GIS Frame in which to report progress.lsThread
- Thread which called this method (allows it to be interrupted).
Can be null if no external interruption allowed.public MasterMapReader(String fileName, GISFrame gisFrame, LSThread lsThread)
fileName
- Name of XML file to process.gisFrame
- GIS Frame in which to report progress.lsThread
- Thread which called this method (allows it to be interrupted).
Can be null if no external interruption allowed.public MasterMapReader(String fileName, VectorMap vectorMap, TreeMap attributeTypes, int readStyle, GISFrame gisFrame, LSThread lsThread)
fileName
- Name of XML file to process.vectorMap
- Vector map to contain XML data.attributeTypes
- List of attribute types to be read (only applied to LOAD_SELECTED).readStyle
- Determines how file is processed.gisFrame
- GIS Frame in which to report progress.lsThread
- Thread which called this method (allows it to be interrupted).
Can be null if no external interruption allowed.Method Detail |
public TreeMap getAttributeTypes()
public String getLastError()
public void setDocumentLocator(Locator locator)
locator
- Keeps track of the parsing process.public void startDocument() throws SAXException
SAXException
public void endDocument() throws SAXException
SAXException
public void startElement(String uri, String sName, String qName, Attributes atts) throws SAXException
uri
- Namespace reference (ignored).sName
- Simple name of the element.qName
- Fully qualified name of the element.atts
- Attributes associated with the element.
SAXException
public void endElement(String uri, String sName, String qName) throws SAXException
uri
- Namespace reference (ignored).sName
- Simple name of the element.qName
- Fully qualified name of the element.
SAXException
public void characters(char[] text, int offset, int length) throws SAXException
text
- Array of characters.offset
- Position in array where characters start.length
- Number of characters to use from text array.
SAXException
public void warning(SAXParseException e) throws SAXException
e
- Exception that caused the warning.
SAXException
public void error(SAXParseException e) throws SAXException
e
- Exception that caused the warning.
SAXException
public void fatalError(SAXParseException e) throws SAXException
e
- Exception that caused the warning.
SAXException
protected void display(String message, boolean position)
message
- Message to display.position
- Position in the file identified if true.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |