Package org.openstreetmap.josm.io
Class Capabilities.CapabilitiesParser
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.openstreetmap.josm.io.Capabilities.CapabilitiesParser
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
- Enclosing class:
- Capabilities
public static final class Capabilities.CapabilitiesParser extends org.xml.sax.helpers.DefaultHandler
A parser for the "capabilities" response XML.- Since:
- 7473
-
-
Field Summary
Fields Modifier and Type Field Description private Capabilities
capabilities
-
Constructor Summary
Constructors Constructor Description CapabilitiesParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Capabilities
getCapabilities()
Returns the read capabilities.static Capabilities
parse(org.xml.sax.InputSource inputSource)
Parses and returns capabilities from the given input source.void
startDocument()
void
startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
-
-
-
Field Detail
-
capabilities
private Capabilities capabilities
-
-
Constructor Detail
-
CapabilitiesParser
public CapabilitiesParser()
-
-
Method Detail
-
startDocument
public void startDocument()
- Specified by:
startDocument
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startDocument
in classorg.xml.sax.helpers.DefaultHandler
-
startElement
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
- Specified by:
startElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startElement
in classorg.xml.sax.helpers.DefaultHandler
-
getCapabilities
public Capabilities getCapabilities()
Returns the read capabilities.- Returns:
- the read capabilities
-
parse
public static Capabilities parse(org.xml.sax.InputSource inputSource) throws org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.ParserConfigurationException
Parses and returns capabilities from the given input source.- Parameters:
inputSource
- The input source to read capabilities from- Returns:
- the capabilities
- Throws:
org.xml.sax.SAXException
- if any SAX errors occur during processingjava.io.IOException
- if any I/O errors occurjavax.xml.parsers.ParserConfigurationException
- if a parser cannot be created
-
-