Class EngineConfigParser
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.epics.archiverappliance.config.ChannelArchiver.EngineConfigParser
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
public class EngineConfigParser extends DefaultHandler
Ability to import a ChannelArchiver engine config file. Support for PVNames, periods and scan/monitor so far.- Author:
- mshankar
-
-
Constructor Summary
Constructors Constructor Description EngineConfigParser()
-
Method Summary
Modifier and Type Method Description void
characters(char[] ch, int start, int length)
void
endElement(String uri, String localName, String qName)
static LinkedList<PVConfig>
importEngineConfig(InputStream is)
Main import method.InputSource
resolveEntity(String publicId, String systemId)
void
startElement(String uri, String localName, String qName, Attributes attributes)
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Method Detail
-
importEngineConfig
public static LinkedList<PVConfig> importEngineConfig(InputStream is) throws Exception
Main import method. Pass in an input stream (perhaps from an HTTP POST) and get a list of PVConfigs.- Parameters:
is
- InputStream- Returns:
- PVConfig The list of PVconfigs
- Throws:
Exception
-
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-
resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException
- Specified by:
resolveEntity
in interfaceEntityResolver
- Overrides:
resolveEntity
in classDefaultHandler
- Throws:
IOException
SAXException
-
-