public class ADFParser extends AbstractParser<ADF>
ADF. The ADFParser implements a
 parser for ADF documents, creating an in-memory object model to cache this date. The data contained in the cache
 fairly closely models the structure of the spreadsheet as described by the MAGETAB specification.
 
 As for the IDFParser, this importer processes the document in parallel and uses Handlers to distribute the work.  As handlers may, at some point, require
 data that is being processed by another handler that is running in a parallel process, there is a degree of waiting
 and communication between threads.
 ADFAbstractParser.DefaultHandlerListenerDEFAULT_ENCODING| Constructor and Description | 
|---|
ADFParser()  | 
| Modifier and Type | Method and Description | 
|---|---|
ADF | 
parse(InputStream adfIn)
Performs parsing from the specified input stream source, populating an  
ADF object which is returned. | 
ADF | 
parse(InputStream adfIn,
     ADF adf)
Perform parsing from the supplied input stream to a new data model instance. 
 | 
ADF | 
parse(InputStream adfIn,
     ADF adf,
     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. 
 | 
protected void | 
read(String[][] adfData,
    ADF adf,
    ExecutorService service)  | 
void | 
validate(ADF adf)  | 
void | 
validate(ADF adf,
        ExecutorService service)  | 
void | 
write(ADF adf)  | 
void | 
write(ADF adf,
     ExecutorService service)  | 
addErrorItemListener, addProgressListener, fireErrorItemEvent, fireParseEvent, fireParsingCompletedEvent, fireParsingFailedEvent, fireParsingStartedEvent, getEncoding, getErrorItemListeners, getLog, getProgressListeners, isStrippingEscaping, removeErrorItemListener, removeProgressListener, setEncoding, setStripEscapingpublic ADF parse(InputStream adfIn) throws ParseException
ADF object which is returned. This
 class will generate ErrorItems in response to any errors in the ADF file it detects, and report them via
 any registered ErrorItemListeners.
 
 A ParseException will be thrown if and only if there was a problem with the ADF input stream that meant
 the document was unparseable. You not use the absence of a parse exception to indicate that parsing was
 successful, rather you should register an ErrorItemListener and check any generated error items to determine
 whether the ADF is suitable for your own purposes.
 
 Unlike the MAGETABArrayParser, this parse method does not roll in
 validation and writing of the ADF within the parse lifecycle.  This is to allow for dependencies that may need to
 be checked (for example, between an SDRF and an ADF file) and also to remain consistent with the behaviour of
 MAGETABParser.  As such, this class defines its own validate(uk.ac.ebi.arrayexpress2.magetab.datamodel.ADF)
 and write(uk.ac.ebi.arrayexpress2.magetab.datamodel.ADF) methods.  You can perform either of these
 actions manually yourself if you wish to do so.
 
 Calling this method is equivalent to calling parse(adfIn, new ADF());.
 
 ADF files will be parsed in a single threaded manner when calling this form of the parse() method.
 This method blocks until parsing is complete.adfIn - the input stream to use to read ADF data for parsingParseException - if the input stream was unparseablepublic ADF parse(InputStream adfIn, ADF adf) throws ParseException
ParseradfIn - the input stream to parse fromadf - 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 ADF parse(InputStream adfIn, ADF adf, ExecutorService service) throws ParseException
ParseradfIn - the input stream to parse fromadf - 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.protected void read(String[][] adfData, ADF adf, ExecutorService service) throws ExecutionException, InterruptedException
public void validate(ADF adf) throws ValidateException
ValidateExceptionpublic void validate(ADF adf, ExecutorService service)
public void write(ADF adf) throws ConversionException
ConversionExceptionpublic void write(ADF adf, ExecutorService service)
Copyright © 2014. All rights reserved.