|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.helpers.DefaultHandler | +--solar.service.dan.lang.XmlSpecParser
An XML parser for FAP graph specification.
Field Summary | |
private static javax.xml.parsers.SAXParserFactory |
_factory
|
private FilterSpec |
_filter
|
private GraphSpec |
_graph
|
private PipeSpec |
_pipe
|
private int |
_pipeNum
|
private static java.lang.String |
ADDRESS
|
private static java.lang.String |
ARGUMENT
|
private static java.lang.String |
CLASSNAME
|
private static java.lang.String |
CODEBASE
|
private static java.lang.String |
FILTER
|
private static java.lang.String |
FLOW
|
private static java.lang.String |
GRAPH
|
private static java.lang.String |
INPORT
|
private static java.lang.String |
MIXED
|
private static java.lang.String |
NAME
|
private static java.lang.String |
OUTPORT
|
private static java.lang.String |
PIPE
|
private static java.lang.String |
PULL
|
private static java.lang.String |
PUSH
|
private static java.lang.String |
SINK
|
private static java.lang.String |
SOURCE
|
private static java.lang.String |
TYPE
|
private static java.lang.String |
VALUE
|
Fields inherited from interface solar.service.fap.FapConstants |
FAP_DATA, FAP_MIXED, FAP_PID, FAP_PULL, FAP_PUSH |
Constructor Summary | |
XmlSpecParser()
|
Method Summary | |
private void |
assertEquals(java.lang.String s1,
java.lang.String s2)
|
void |
endDocument()
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String name)
|
private void |
endFilter()
|
GraphSpec |
getGraphSpec()
Return recent parsed graph spec. |
static void |
main(java.lang.String[] args)
|
GraphSpec |
parse(java.io.File file)
Parse the graph spec from a file. |
static GraphSpec |
parse(org.xml.sax.InputSource in)
|
GraphSpec |
parse(java.io.InputStream in)
Parse the graph spec from an input stream. |
GraphSpec |
parse(java.io.Reader reader)
Parse the graph spec from a reader. |
GraphSpec |
parse(java.lang.String xml)
Parse the graph spec from a string. |
private void |
startArgument(org.xml.sax.Attributes attrs)
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String name,
org.xml.sax.Attributes attrs)
|
private void |
startFilter(org.xml.sax.Attributes attrs)
|
private void |
startGraph(org.xml.sax.Attributes attrs)
|
private void |
startInport(org.xml.sax.Attributes attrs)
|
private void |
startOutport(org.xml.sax.Attributes attrs)
|
private void |
startPipe(org.xml.sax.Attributes attrs)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, 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 |
Field Detail |
private static final java.lang.String GRAPH
private static final java.lang.String FILTER
private static final java.lang.String NAME
private static final java.lang.String CLASSNAME
private static final java.lang.String CODEBASE
private static final java.lang.String ADDRESS
private static final java.lang.String ARGUMENT
private static final java.lang.String VALUE
private static final java.lang.String PIPE
private static final java.lang.String TYPE
private static final java.lang.String PUSH
private static final java.lang.String PULL
private static final java.lang.String MIXED
private static final java.lang.String SOURCE
private static final java.lang.String SINK
private static final java.lang.String INPORT
private static final java.lang.String OUTPORT
private static final java.lang.String FLOW
private static final javax.xml.parsers.SAXParserFactory _factory
private GraphSpec _graph
private FilterSpec _filter
private PipeSpec _pipe
private int _pipeNum
Constructor Detail |
public XmlSpecParser()
Method Detail |
public GraphSpec parse(java.io.File file) throws ParsingException
SpecParser
parse
in interface SpecParser
ParsingException
public GraphSpec parse(java.io.InputStream in) throws ParsingException
SpecParser
parse
in interface SpecParser
ParsingException
public GraphSpec parse(java.io.Reader reader) throws ParsingException
SpecParser
parse
in interface SpecParser
ParsingException
public GraphSpec parse(java.lang.String xml) throws ParsingException
SpecParser
parse
in interface SpecParser
ParsingException
public static GraphSpec parse(org.xml.sax.InputSource in) throws ParsingException
ParsingException
public GraphSpec getGraphSpec()
public void endDocument()
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class org.xml.sax.helpers.DefaultHandler
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String name, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String name) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
private void startGraph(org.xml.sax.Attributes attrs)
private void startFilter(org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
org.xml.sax.SAXException
private void endFilter()
private void startArgument(org.xml.sax.Attributes attrs)
private void startInport(org.xml.sax.Attributes attrs)
private void startOutport(org.xml.sax.Attributes attrs)
private void startPipe(org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
org.xml.sax.SAXException
private void assertEquals(java.lang.String s1, java.lang.String s2) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |