O - an optional type parameter if you are utilising convert functions, this describes the type of object you
            wish to convert output topublic class MAGETABParser<O> extends AbstractParser<MAGETABInvestigation>
MAGETABInvestigation. The
 MAGETABParser implements logic to discover the IDF and SDRF components from the URL supplied. The URL supplied should
 match the location of the IDF, and the SDRF should be referenced within.  This parser then distributes tasks to
 IDFParser and SDRFParser components.  Alternatively, you can invoke these classes separately - you will just need to
 instantiate a new MAGETABInvestigation to read into yourself. Ultimately, this results in a set of objects that can
 be obtained from a MAGETABInvestigation using public fields or getters.IDFParser, 
SDRFParser, 
MAGETABInvestigationAbstractParser.DefaultHandlerListenerDEFAULT_ENCODING| Constructor and Description | 
|---|
MAGETABParser()
Create a default parser. 
 | 
MAGETABParser(Converter<MAGETABInvestigation,O> converter,
             O... outputResources)
Create a parser that performs conversion using the supplied  
Converter to convert the MAGETABInvestigation that results from the parse into objects in the given object model. | 
MAGETABParser(O... outputResources)
Create a default parser. 
 | 
MAGETABParser(Validator<MAGETABInvestigation> validator)
Create a parser that performs validation using the supplied  
Validator. | 
MAGETABParser(Validator<MAGETABInvestigation> validator,
             Converter<MAGETABInvestigation,O> converter,
             O... outputResources)
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addErrorItemListener(ErrorItemListener listener)
Register an  
ErrorItemListener with this parser. | 
Converter<MAGETABInvestigation,O> | 
getConverter()
Get the currently configured converter for this parser. 
 | 
Validator<MAGETABInvestigation> | 
getValidator()
Get the currently configured validator for this parser. 
 | 
MAGETABInvestigation | 
parse(File idfFile)  | 
MAGETABInvestigation | 
parse(InputStream idfIn)
Perform parsing from the supplied input stream to a new data model instance. 
 | 
MAGETABInvestigation | 
parse(InputStream idfIn,
     MAGETABInvestigation investigation)
Perform parsing from the supplied input stream to a new data model instance. 
 | 
MAGETABInvestigation | 
parse(InputStream idfIn,
     MAGETABInvestigation investigation,
     ExecutorService service)
Perform parsing from the supplied input stream to a new data model instance, delegating all work to the supplied
 Executor Service to enable parsing in parallel. 
 | 
MAGETABInvestigation | 
parse(URL idfURL)  | 
protected void | 
readIDF(InputStream idfIn,
       MAGETABInvestigation investigation,
       boolean isMerged,
       ExecutorService service,
       uk.ac.ebi.arrayexpress2.magetab.parser.MAGETABParser.ProgressFlag flag)  | 
protected void | 
readSDRF(InputStream sdrfIn,
        SDRF sdrf,
        ExecutorService service,
        uk.ac.ebi.arrayexpress2.magetab.parser.MAGETABParser.ProgressFlag flag)  | 
void | 
removeErrorItemListener(ErrorItemListener listener)
Deregister an  
ErrorItemListener with this parser. | 
void | 
setStripEscaping(boolean stripEscaping)  | 
addProgressListener, fireErrorItemEvent, fireParseEvent, fireParsingCompletedEvent, fireParsingFailedEvent, fireParsingStartedEvent, getEncoding, getErrorItemListeners, getLog, getProgressListeners, isStrippingEscaping, removeProgressListener, setEncodingpublic MAGETABParser()
ValidateHandler and ConversionHandler
 implementations to the classpath (appropriately annotated).  The set of handlers located on the classpath will
 then be used to validate and convert MAGE-TAB.
 
 Note that validation happens after parsing is complete, and conversion happens after validation as long as an
 appropriate output resource has been set on the parser.public MAGETABParser(O... outputResources)
ValidateHandler and ConversionHandler
 implementations to the classpath (appropriately annotated).  The set of handlers located on the classpath will
 then be used to validate and convert MAGE-TAB.
 
 Note that validation happens after parsing is complete, and conversion happens after validation as long as an
 appropriate output resource has been set on the parser.outputResources - any output resources to convert intopublic MAGETABParser(Validator<MAGETABInvestigation> validator)
Validator.  Normally, the validate() method
 on the Validator will be called once reading has completed.
 validator - the validator this parser should use to validate once parsing has completed.public MAGETABParser(Converter<MAGETABInvestigation,O> converter, O... outputResources)
Converter to convert the MAGETABInvestigation that results from the parse into objects in the given object model.  The convert() method
 on the Converter will be called once reading and validation (if any) has completed).
 converter - the converter this parser should use to do the conversion once parsing (and any
                        validation) has completedoutputResources - the output resources to convert intopublic MAGETABParser(Validator<MAGETABInvestigation> validator, Converter<MAGETABInvestigation,O> converter, O... outputResources)
Validator and conversion using the supplied
 Converter.  Any escaping in the MAGE-TAB documentation is removed during the parse by default - use
 setStripEscaping(boolean) to change this.  If converters are available on the classpath when parsing,
 you should set an output resource on this parser to utilise them.validator - the validator to use to validate the resulting MAGETABInvestigationconverter - the converter to use to convert the resulting MAGETABInvestigationoutputResources - the output resources to convert intopublic void setStripEscaping(boolean stripEscaping)
setStripEscaping in class AbstractParser<MAGETABInvestigation>public Validator<MAGETABInvestigation> getValidator()
public Converter<MAGETABInvestigation,O> getConverter()
public void addErrorItemListener(ErrorItemListener listener)
ParserErrorItemListener with this parser.  Whenever an error is encountered when parsing from the a
 parserSource, this listener should be notified.addErrorItemListener in interface Parser<MAGETABInvestigation>addErrorItemListener in class AbstractParser<MAGETABInvestigation>listener - the listener to registerpublic void removeErrorItemListener(ErrorItemListener listener)
ParserErrorItemListener with this parser.  This listener will no longer be notified when error
 items are generated.removeErrorItemListener in interface Parser<MAGETABInvestigation>removeErrorItemListener in class AbstractParser<MAGETABInvestigation>listener - the listener to registerpublic MAGETABInvestigation parse(File idfFile) throws ParseException
ParseExceptionpublic MAGETABInvestigation parse(URL idfURL) throws ParseException
ParseExceptionpublic MAGETABInvestigation parse(InputStream idfIn) throws ParseException
ParseridfIn - the input stream to parse fromParseException - if the source format was invalid, or the URL could not be read.public MAGETABInvestigation parse(InputStream idfIn, MAGETABInvestigation investigation) throws ParseException
ParseridfIn - the input stream to parse frominvestigation - the data model to populate with data during this parse operationParseException - if the source format was invalid, or the URL could not be read.public MAGETABInvestigation parse(InputStream idfIn, MAGETABInvestigation investigation, ExecutorService service) throws ParseException, InterruptedException
ParseridfIn - the input stream to parse frominvestigation - the data model to populate with data during this parse operationservice - the service to use to execute parsing tasksParseException - if the source format was invalid, or the URL could not be read.InterruptedException - if execution of a task sent to the Executor Service was interrruptedprotected void readIDF(InputStream idfIn, MAGETABInvestigation investigation, boolean isMerged, ExecutorService service, uk.ac.ebi.arrayexpress2.magetab.parser.MAGETABParser.ProgressFlag flag)
protected void readSDRF(InputStream sdrfIn, SDRF sdrf, ExecutorService service, uk.ac.ebi.arrayexpress2.magetab.parser.MAGETABParser.ProgressFlag flag)
Copyright © 2014. All rights reserved.