Class ModuleInfoParser
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.inductiveautomation.ignition.common.modules.ModuleInfoParser
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
This class parses the module descriptor file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) void
endElement
(String uri, String localName, String name) static ModuleInfo
fromXML
(InputStream is) Parses the given XML file, returning theModuleInfo
object represented within.void
startElement
(String uri, String localName, String name, Attributes attributes) Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
ModuleInfoParser
public ModuleInfoParser()
-
-
Method Details
-
getModule
-
characters
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
fromXML
Parses the given XML file, returning theModuleInfo
object represented within.- Parameters:
is
-InputStream
to read from.- Returns:
- a
ModuleInfo
parsed from the XMLInputStream
. - Throws:
SAXException
IOException
-