|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.ac.ebi.intact.application.dataConversion.PsiDataBuilder
PSI-specific implementation of DataBuilder interface. This class will
generate a PSI-format file from the data it is supplied with. The implementation
is based on the Graph2MIF application written by Henning Mersch.
| Constructor Summary | |
PsiDataBuilder()
|
|
| Method Summary | |
org.w3c.dom.Element |
buildInteractionsOnly(java.util.Collection interactions,
int limit)
Produces an XML Document which contains only an interactionList. |
org.w3c.dom.Document |
getCurrentDocument()
Used to obtain a PSI Document object that is initialised and ready for use when for example later appending lists. |
org.w3c.dom.Element |
getEntrySet()
Provides the set of PSI entries currently generated. |
org.w3c.dom.Element |
getExperimentList()
Provides access in Document format to the current Experiment List. |
org.w3c.dom.Element |
getInteractorList()
Provides access in Document format to the current Interactor List. |
org.w3c.dom.Document |
newPsiDoc(boolean sourceElementNeeded)
Creates an initialised PSI Document object. |
void |
processExperiments(java.util.Collection experiments)
Generate the PSI xml for a list of experiments |
void |
writeData(java.lang.String fileName,
org.w3c.dom.Document docToWrite)
This method dumps the data created to the specified file destination. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PsiDataBuilder()
| Method Detail |
public org.w3c.dom.Document newPsiDoc(boolean sourceElementNeeded)
sourceElementNeeded - true if an Intact source element is wanted, false otherwise.
For example internal initialisation of this class will not need a source element as
it is generated during processing; however for large datasets a source element may be required
but without affecting the Document held internally by this class (which is what the
generation of a PSI entry alone will do.) NB this aspect will probably be refactored
at some point.
public void writeData(java.lang.String fileName,
org.w3c.dom.Document docToWrite)
throws DataConversionException
DataBuilder
writeData in interface DataBuilderfileName - The name of the file to write to.docToWrite - an XML document to write - if the data held by the builder
is not XML or its own Document should be written, this parameter should
be set to null.
DataConversionException - thrown if there was a problem generating
the file.DataBuilder
public void processExperiments(java.util.Collection experiments)
throws ElementNotParseableException
processExperiments in interface DataBuilderexperiments - to convert to PSI-Format
ElementNotParseableException - if PSIrequired Elements are missing within the object graph
public org.w3c.dom.Document getCurrentDocument()
throws ElementNotParseableException
ElementNotParseableException - thron if somethingis wrong with the entry formatpublic org.w3c.dom.Element getEntrySet()
public org.w3c.dom.Element getInteractorList()
public org.w3c.dom.Element getExperimentList()
public org.w3c.dom.Element buildInteractionsOnly(java.util.Collection interactions,
int limit)
throws DataConversionException,
ElementNotParseableException
interactions - A Collections of Interactions to be proceesedlimit - The maximum number of interactions allowed to be processed
as a single chunk.
ElementNotParseableException - thrown if the Document could not be created.
DataConversionException - thrown if the parameter size is tooo big to be processed in one chunk.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||