org.syrup.helpers
Class NetworkParser

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended byorg.syrup.helpers.NetworkParser
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class NetworkParser
extends org.xml.sax.helpers.DefaultHandler

XML parser that parses a Workflow definition into a Network.

Author:
Robbert van Dalen

Constructor Summary
NetworkParser()
           
 
Method Summary
 void characters(char[] arg1, int arg2, int arg3)
           
 void endElement(java.lang.String namespaceUri, java.lang.String localName, java.lang.String qName)
           
 void endPrefixMapping(java.lang.String prefix)
           
 void ignorableWhitespace(char[] arg1, int arg2, int arg3)
           
static void main(java.lang.String[] args)
          The main program for the NetworkParser class
 NetworkImpl parse(byte[] b)
          Parses a XML network description deserialized from a byte array.
 NetworkImpl parse(java.io.InputStream in)
          Parses a XML network description, fed by an InputStream.
 void processingInstruction(java.lang.String target, java.lang.String data)
           
 void skippedEntity(java.lang.String arg1)
           
 void startElement(java.lang.String namespaceUri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes att)
           
 void startPrefixMapping(java.lang.String prefix, java.lang.String namespaceUri)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, error, fatalError, notationDecl, resolveEntity, setDocumentLocator, startDocument, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkParser

public NetworkParser()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
The main program for the NetworkParser class

Parameters:
args - No arguments should be given.
Throws:
java.lang.Exception

parse

public NetworkImpl parse(byte[] b)
                  throws java.lang.Exception
Parses a XML network description deserialized from a byte array.

Parameters:
b - The byte array to be deserialized.
Returns:
The NetworkImpl if succesful.
Throws:
java.lang.Exception

parse

public NetworkImpl parse(java.io.InputStream in)
                  throws java.lang.Exception
Parses a XML network description, fed by an InputStream.

Parameters:
in - The InputStream to be parsed.
Returns:
The NetworkImpl if succesful.
Throws:
java.lang.Exception

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String namespaceUri)
                        throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
                      throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String namespaceUri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes att)
                  throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String namespaceUri,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

characters

public void characters(char[] arg1,
                       int arg2,
                       int arg3)
                throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] arg1,
                                int arg2,
                                int arg3)
                         throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

skippedEntity

public void skippedEntity(java.lang.String arg1)
                   throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException