org.embl.ebi.escience.scufl.parser
Class XScuflParser

java.lang.Object
  extended by org.embl.ebi.escience.scufl.parser.XScuflParser

public class XScuflParser
extends java.lang.Object

Reads a definition in XScufl format and populates the supplied model with it.

Author:
Tom Oinn

Constructor Summary
XScuflParser()
           
 
Method Summary
static void populate(org.jdom.Document document, ScuflModel model, java.lang.String prefix)
          Read from the given JDOM Document and populate the given ScuflModel with data from the definition.
static void populate(java.io.InputStream is, ScuflModel model, java.lang.String prefix)
          Read from the given InputStream and populate the given ScuflModel with data from the definition.
static void populate(java.lang.String input, ScuflModel model, java.lang.String prefix)
          Read from the given String containing an XScufl document and populate the given ScuflModel with data from the definition.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XScuflParser

public XScuflParser()
Method Detail

populate

public static void populate(java.lang.String input,
                            ScuflModel model,
                            java.lang.String prefix)
                     throws UnknownProcessorException,
                            UnknownPortException,
                            ProcessorCreationException,
                            DataConstraintCreationException,
                            DuplicateProcessorNameException,
                            MalformedNameException,
                            ConcurrencyConstraintCreationException,
                            DuplicateConcurrencyConstraintNameException,
                            XScuflFormatException
Read from the given String containing an XScufl document and populate the given ScuflModel with data from the definition. You can optionally specify a name prefix that will be used for all new processors created, this might be useful if you want to import more than one data file into the same model. If the prefix is null, none will be applied. The prefix should not contain characters other than alphanumeric ones, and will have a single underscore appended to it.

Throws:
UnknownProcessorException - if a data constraint refers to a processor that isn't defined in the input
UnknownPortException - if a data constraint refers to a port that isn't defined in the input
ProcessorCreationException - if there is a general creation failure in a processor, i.e. when attempting to contact soaplab to get its inputs and outputs
DataConstraintCreationException - if some internal error prevents a data constraint being built
DuplicateProcessorNameException - if a processor is defined in the input with a name that already exists in the model.
MalformedNameException - if a data constraint is not specified in the correct format of [PROCESSOR]:[PORT]
XScuflFormatException - if the format of the input is not valid XScufl, or not valid XML.
ConcurrencyConstraintCreationException
DuplicateConcurrencyConstraintNameException

populate

public static void populate(java.io.InputStream is,
                            ScuflModel model,
                            java.lang.String prefix)
                     throws UnknownProcessorException,
                            UnknownPortException,
                            ProcessorCreationException,
                            DataConstraintCreationException,
                            DuplicateProcessorNameException,
                            MalformedNameException,
                            ConcurrencyConstraintCreationException,
                            DuplicateConcurrencyConstraintNameException,
                            XScuflFormatException
Read from the given InputStream and populate the given ScuflModel with data from the definition. You can optionally specify a name prefix that will be used for all new processors created, this might be useful if you want to import more than one data file into the same model. If the prefix is null, none will be applied. The prefix should not contain characters other than alphanumeric ones, and will have a single underscore appended to it.

Throws:
UnknownProcessorException - if a data constraint refers to a processor that isn't defined in the input
UnknownPortException - if a data constraint refers to a port that isn't defined in the input
ProcessorCreationException - if there is a general creation failure in a processor, i.e. when attempting to contact soaplab to get its inputs and outputs
DataConstraintCreationException - if some internal error prevents a data constraint being built
DuplicateProcessorNameException - if a processor is defined in the input with a name that already exists in the model.
MalformedNameException - if a data constraint is not specified in the correct format of [PROCESSOR]:[PORT]
XScuflFormatException - if the format of the input is not valid XScufl, or not valid XML.
ConcurrencyConstraintCreationException
DuplicateConcurrencyConstraintNameException

populate

public static void populate(org.jdom.Document document,
                            ScuflModel model,
                            java.lang.String prefix)
                     throws UnknownProcessorException,
                            UnknownPortException,
                            ProcessorCreationException,
                            DataConstraintCreationException,
                            DuplicateProcessorNameException,
                            MalformedNameException,
                            ConcurrencyConstraintCreationException,
                            DuplicateConcurrencyConstraintNameException,
                            XScuflFormatException
Read from the given JDOM Document and populate the given ScuflModel with data from the definition. You can optionally specify a name prefix that will be used for all new processors created, this might be useful if you want to import more than one data file into the same model. If the prefix is null, none will be applied. The prefix should not contain characters other than alphanumeric ones, and will have a single underscore appended to it.

Throws:
UnknownProcessorException - if a data constraint refers to a processor that isn't defined in the input
UnknownPortException - if a data constraint refers to a port that isn't defined in the input
ProcessorCreationException - if there is a general creation failure in a processor, i.e. when attempting to contact soaplab to get its inputs and outputs
DataConstraintCreationException - if some internal error prevents a data constraint being built
DuplicateProcessorNameException - if a processor is defined in the input with a name that already exists in the model.
MalformedNameException - if a data constraint is not specified in the correct format of [PROCESSOR]:[PORT]
XScuflFormatException - if the format of the input is not valid XScufl, or not valid XML.
ConcurrencyConstraintCreationException
DuplicateConcurrencyConstraintNameException