Class MapGraph.Handler
- java.lang.Object
- 
- org.xml.sax.helpers.DefaultHandler
- 
- MapGraph.Handler
 
 
- 
- All Implemented Interfaces:
- ContentHandler,- DTDHandler,- EntityResolver,- ErrorHandler
 - Enclosing class:
- MapGraph
 
 private class MapGraph.Handler extends DefaultHandler Parses OSM XML files to construct a StreetMapGraph.
- 
- 
Field SummaryFields Modifier and Type Field Description private Set<String>allowedHighwayTypesprivate Map<Long,org.locationtech.spatial4j.shape.Point>byIdprivate Map<String,List<org.locationtech.spatial4j.shape.Point>>byNameprivate longidprivate org.locationtech.spatial4j.shape.Pointlocationprivate Stringnameprivate Queue<org.locationtech.spatial4j.shape.Point>pathprivate Stringstateprivate booleanvalidWay
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendElement(String uri, String localName, String qName)Called at the end of an element.private voidreset()Reset the handler state before processing a new way or node.voidstartElement(String uri, String localName, String qName, Attributes attributes)Called at the beginning of an element.- 
Methods inherited from class org.xml.sax.helpers.DefaultHandlercharacters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
- 
 
- 
- 
- 
Method Detail- 
resetprivate void reset() Reset the handler state before processing a new way or node.
 - 
startElementpublic void startElement(String uri, String localName, String qName, Attributes attributes) Called at the beginning of an element.- Specified by:
- startElementin interface- ContentHandler
- Overrides:
- startElementin class- DefaultHandler
- Parameters:
- uri- The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
- localName- The local name (without prefix), or the empty string if Namespace processing is not being performed.
- qName- The qualified name (with prefix), or the empty string if qualified names are not available. This tells us which element we're looking at.
- attributes- The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
- See Also:
- Attributes
 
 - 
endElementpublic void endElement(String uri, String localName, String qName) Called at the end of an element.- Specified by:
- endElementin interface- ContentHandler
- Overrides:
- endElementin class- DefaultHandler
- Parameters:
- uri- The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
- localName- The local name (without prefix), or the empty string if Namespace processing is not being performed.
- qName- The qualified name (with prefix), or the empty string if qualified names are not available.
 
 
- 
 
-