Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.embl.ebi.escience.scufl.parser
Class Scufl2XScuflParser  view Scufl2XScuflParser download Scufl2XScuflParser.java

java.lang.Object
  extended byorg.embl.ebi.escience.scufl.parser.Scufl2XScuflParser

public class Scufl2XScuflParser
extends java.lang.Object

Given an input stream from which to read a Scufl definition file, this class exposes an InputStream that contains the corresponding XScufl representation. This can be used in conjunction with the XScuflParser to populate a ScuflModel directly from the human readable Scufl format.


Constructor Summary
Scufl2XScuflParser()
           
 
Method Summary
private static void doCoordinationDefinition(java.lang.String name1, java.lang.String state1, java.lang.String state2, java.lang.String name2, java.lang.String state3, org.jdom.Element root)
          Create a coordination definition
private static void doLine(java.lang.String line, org.jdom.Element root)
          Process a single line of scufl, creating appropriate element declarations and adding them onto the supplied element.
private static void doLinkDefinition(java.lang.String input, java.lang.String output, org.jdom.Element root)
          Create a data link definition
private static void doProcessorDefinition(java.lang.String name, java.lang.String protocol, java.lang.String specifier, org.jdom.Element root)
          Create a processor definition
static java.io.InputStream parse(java.io.InputStream input)
          Read the Scufl format on the supplied InputStream, return a new InputStream from which may be read the XScufl representation.
static java.lang.String parse(java.lang.String input)
          Read the Scufl format contained within the String and produce a String containing the XML format XScufl
static org.jdom.Document parseScufl(java.lang.String scufl)
          Create a JDOM Document containing the XML format representation of the Scufl file passed in as the single string parameter
static org.jdom.Namespace scuflNS()
          The namespace for the Scufl elements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scufl2XScuflParser

public Scufl2XScuflParser()
Method Detail

parse

public static java.io.InputStream parse(java.io.InputStream input)
                                 throws java.io.IOException
Read the Scufl format on the supplied InputStream, return a new InputStream from which may be read the XScufl representation.


parse

public static java.lang.String parse(java.lang.String input)
Read the Scufl format contained within the String and produce a String containing the XML format XScufl


parseScufl

public static org.jdom.Document parseScufl(java.lang.String scufl)
Create a JDOM Document containing the XML format representation of the Scufl file passed in as the single string parameter


doLine

private static void doLine(java.lang.String line,
                           org.jdom.Element root)
Process a single line of scufl, creating appropriate element declarations and adding them onto the supplied element.


doProcessorDefinition

private static void doProcessorDefinition(java.lang.String name,
                                          java.lang.String protocol,
                                          java.lang.String specifier,
                                          org.jdom.Element root)
Create a processor definition


doLinkDefinition

private static void doLinkDefinition(java.lang.String input,
                                     java.lang.String output,
                                     org.jdom.Element root)
Create a data link definition


doCoordinationDefinition

private static void doCoordinationDefinition(java.lang.String name1,
                                             java.lang.String state1,
                                             java.lang.String state2,
                                             java.lang.String name2,
                                             java.lang.String state3,
                                             org.jdom.Element root)
Create a coordination definition


scuflNS

public static org.jdom.Namespace scuflNS()
The namespace for the Scufl elements