Class AbstractExpandedXmlMixWriter<I extends Interaction,M extends ModelledInteraction,E extends InteractionEvidence>
- java.lang.Object
-
- psidev.psi.mi.jami.xml.io.writer.AbstractXmlWriter<T>
-
- psidev.psi.mi.jami.xml.io.writer.expanded.AbstractExpandedXmlWriter<I>
-
- psidev.psi.mi.jami.xml.io.writer.expanded.AbstractExpandedXmlMixWriter<I,M,E>
-
- All Implemented Interfaces:
InteractionWriter<I>
- Direct Known Subclasses:
ExpandedXmlBinaryWriter
,ExpandedXmlBinaryWriter
,ExpandedXmlNamedBinaryWriter
,ExpandedXmlNamedWriter
,ExpandedXmlWriter
,ExpandedXmlWriter
public abstract class AbstractExpandedXmlMixWriter<I extends Interaction,M extends ModelledInteraction,E extends InteractionEvidence> extends AbstractExpandedXmlWriter<I>
Abstract class for an expanded PSI-XML writer of mixed interactions- Since:
20/11/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AbstractExpandedXmlMixWriter(PsiXmlVersion version, Class<I> type)
Constructor for AbstractExpandedXmlMixWriter.AbstractExpandedXmlMixWriter(PsiXmlVersion version, Class<I> type, File file)
Constructor for AbstractExpandedXmlMixWriter.AbstractExpandedXmlMixWriter(PsiXmlVersion version, Class<I> type, OutputStream output)
Constructor for AbstractExpandedXmlMixWriter.AbstractExpandedXmlMixWriter(PsiXmlVersion version, Class<I> type, Writer writer)
Constructor for AbstractExpandedXmlMixWriter.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
close.void
flush()
Flushes the writer (commit or write on disk)protected AbstractExpandedXmlWriter<E>
getEvidenceWriter()
Getter for the fieldevidenceWriter
.protected AbstractExpandedXmlWriter<I>
getLightWriter()
Getter for the fieldlightWriter
.protected AbstractExpandedXmlWriter<M>
getModelledWriter()
Getter for the fieldmodelledWriter
.protected abstract void
initialiseDelegateWriters()
initialiseDelegateWriters.protected void
initialiseSubWriters()
initialiseSubWriters.void
reset()
reset.void
setComplexWriter(PsiXmlInteractionWriter<ModelledInteraction> complexWriter)
Setter for the fieldcomplexWriter
.void
setDefaultReleaseDate(XMLGregorianCalendar defaultReleaseDate)
Setter for the fielddefaultReleaseDate
.void
setDefaultSource(Source defaultSource)
Setter for the fielddefaultSource
.void
setElementCache(PsiXmlObjectCache elementCache)
Setter for the fieldelementCache
.protected void
setEvidenceWriter(AbstractExpandedXmlWriter<E> evidenceWriter)
Setter for the fieldevidenceWriter
.void
setInteractionSet(Set<Interaction> processedInteractions)
setInteractionSet.protected void
setLightWriter(AbstractExpandedXmlWriter<I> lightWriter)
Setter for the fieldlightWriter
.protected void
setModelledWriter(AbstractExpandedXmlWriter<M> modelledWriter)
Setter for the fieldmodelledWriter
.void
setSourceWriter(PsiXmlSourceWriter sourceWriter)
Setter for the fieldsourceWriter
.void
setVersion(PsiXmlVersion version)
Setter for the fieldversion
.void
setWriteComplexesAsInteractors(boolean writeComplexesAsInteractors)
Setter for the fieldwriteComplexesAsInteractors
.void
write(I interaction)
Writes an interactionvoid
write(Collection<? extends I> interactions)
Writes a collection of Interaction objectsvoid
write(Iterator<? extends I> interactions)
Writes Interaction objects using iterator-
Methods inherited from class psidev.psi.mi.jami.xml.io.writer.expanded.AbstractExpandedXmlWriter
getInteractionType, initialiseDefaultElementCache, initialiseOptionalWriters, writeComplex, writeInteraction, writeStartEntryContent
-
Methods inherited from class psidev.psi.mi.jami.xml.io.writer.AbstractXmlWriter
end, extractSourceFromInteraction, getComplexWriter, getCurrentInteraction, getCurrentSource, getElementCache, getInteractionsIterator, getInteractionWriter, getProcessedInteractions, getStreamWriter, getSubWritersFactory, getVersion, initialiseContext, initialiseDefaultInteractionSet, initialiseDefaultSource, initialiseSubWriters, isStarted, newXmlSource, setAnnotationsWriter, setCurrentInteraction, setCurrentSource, setEntryAnnotations, setInteractionsIterator, setInteractionWriter, setStarted, setSubWritersFactory, start, writeComplexesAsInteractors, writeEndEntry, writeEndEntryContent, writeEndInteractionList, writeEntryAttributes, writeEntrySetAttributes, writeInteractionListContent, writeSource, writeStartEntry, writeStartInteractionList, writeSubComplexInEntry
-
-
-
-
Constructor Detail
-
AbstractExpandedXmlMixWriter
public AbstractExpandedXmlMixWriter(PsiXmlVersion version, Class<I> type)
Constructor for AbstractExpandedXmlMixWriter.
- Parameters:
version
- aPsiXmlVersion
object.type
- aClass
object.
-
AbstractExpandedXmlMixWriter
public AbstractExpandedXmlMixWriter(PsiXmlVersion version, Class<I> type, File file) throws IOException, XMLStreamException
Constructor for AbstractExpandedXmlMixWriter.
- Parameters:
version
- aPsiXmlVersion
object.type
- aClass
object.file
- aFile
object.- Throws:
IOException
- if any.XMLStreamException
- if any.
-
AbstractExpandedXmlMixWriter
public AbstractExpandedXmlMixWriter(PsiXmlVersion version, Class<I> type, OutputStream output) throws XMLStreamException
Constructor for AbstractExpandedXmlMixWriter.
- Parameters:
version
- aPsiXmlVersion
object.type
- aClass
object.output
- aOutputStream
object.- Throws:
XMLStreamException
- if any.
-
AbstractExpandedXmlMixWriter
public AbstractExpandedXmlMixWriter(PsiXmlVersion version, Class<I> type, Writer writer) throws XMLStreamException
Constructor for AbstractExpandedXmlMixWriter.
- Parameters:
version
- aPsiXmlVersion
object.type
- aClass
object.writer
- aWriter
object.- Throws:
XMLStreamException
- if any.
-
-
Method Detail
-
initialiseSubWriters
protected void initialiseSubWriters()
initialiseSubWriters.
- Specified by:
initialiseSubWriters
in classAbstractXmlWriter<I extends Interaction>
-
close
public void close() throws MIIOException
close.
- Specified by:
close
in interfaceInteractionWriter<I extends Interaction>
- Overrides:
close
in classAbstractXmlWriter<I extends Interaction>
- Throws:
MIIOException
- if any.
-
reset
public void reset() throws MIIOException
reset.
- Specified by:
reset
in interfaceInteractionWriter<I extends Interaction>
- Overrides:
reset
in classAbstractXmlWriter<I extends Interaction>
- Throws:
MIIOException
- if any.
-
flush
public void flush() throws MIIOException
Flushes the writer (commit or write on disk)- Specified by:
flush
in interfaceInteractionWriter<I extends Interaction>
- Overrides:
flush
in classAbstractXmlWriter<I extends Interaction>
- Throws:
MIIOException
- : if cannot flush
-
setWriteComplexesAsInteractors
public void setWriteComplexesAsInteractors(boolean writeComplexesAsInteractors)
Setter for the field
writeComplexesAsInteractors
.- Overrides:
setWriteComplexesAsInteractors
in classAbstractXmlWriter<I extends Interaction>
- Parameters:
writeComplexesAsInteractors
- a boolean.
-
setInteractionSet
public void setInteractionSet(Set<Interaction> processedInteractions)
setInteractionSet.
- Overrides:
setInteractionSet
in classAbstractXmlWriter<I extends Interaction>
- Parameters:
processedInteractions
- aSet
object.
-
setDefaultSource
public void setDefaultSource(Source defaultSource)
Setter for the field
defaultSource
.- Overrides:
setDefaultSource
in classAbstractXmlWriter<I extends Interaction>
- Parameters:
defaultSource
- aSource
object.
-
setDefaultReleaseDate
public void setDefaultReleaseDate(XMLGregorianCalendar defaultReleaseDate)
Setter for the field
defaultReleaseDate
.- Overrides:
setDefaultReleaseDate
in classAbstractXmlWriter<I extends Interaction>
- Parameters:
defaultReleaseDate
- aXMLGregorianCalendar
object.
-
write
public void write(Iterator<? extends I> interactions) throws MIIOException
Writes Interaction objects using iterator- Specified by:
write
in interfaceInteractionWriter<I extends Interaction>
- Overrides:
write
in classAbstractXmlWriter<I extends Interaction>
- Parameters:
interactions
- : the iterator of interactions to write- Throws:
MIIOException
- : if cannot write
-
write
public void write(Collection<? extends I> interactions) throws MIIOException
Writes a collection of Interaction objects- Specified by:
write
in interfaceInteractionWriter<I extends Interaction>
- Overrides:
write
in classAbstractXmlWriter<I extends Interaction>
- Parameters:
interactions
- : the interactions to write- Throws:
MIIOException
- : if cannot write
-
write
public void write(I interaction) throws MIIOException
Writes an interaction- Specified by:
write
in interfaceInteractionWriter<I extends Interaction>
- Overrides:
write
in classAbstractXmlWriter<I extends Interaction>
- Parameters:
interaction
- : the interaction to write- Throws:
MIIOException
- : if cannot write
-
setSourceWriter
public void setSourceWriter(PsiXmlSourceWriter sourceWriter)
Setter for the field
sourceWriter
.- Overrides:
setSourceWriter
in classAbstractXmlWriter<I extends Interaction>
- Parameters:
sourceWriter
- aPsiXmlSourceWriter
object.
-
setComplexWriter
public void setComplexWriter(PsiXmlInteractionWriter<ModelledInteraction> complexWriter)
Setter for the field
complexWriter
.- Overrides:
setComplexWriter
in classAbstractXmlWriter<I extends Interaction>
- Parameters:
complexWriter
- aPsiXmlInteractionWriter
object.
-
setElementCache
public void setElementCache(PsiXmlObjectCache elementCache)
Setter for the field
elementCache
.- Overrides:
setElementCache
in classAbstractXmlWriter<I extends Interaction>
- Parameters:
elementCache
- aPsiXmlObjectCache
object.
-
setVersion
public void setVersion(PsiXmlVersion version)
Setter for the field
version
.- Overrides:
setVersion
in classAbstractXmlWriter<I extends Interaction>
- Parameters:
version
- aPsiXmlVersion
object.
-
getEvidenceWriter
protected AbstractExpandedXmlWriter<E> getEvidenceWriter()
Getter for the field
evidenceWriter
.- Returns:
- a
AbstractExpandedXmlWriter
object.
-
setEvidenceWriter
protected void setEvidenceWriter(AbstractExpandedXmlWriter<E> evidenceWriter)
Setter for the field
evidenceWriter
.- Parameters:
evidenceWriter
- aAbstractExpandedXmlWriter
object.
-
getModelledWriter
protected AbstractExpandedXmlWriter<M> getModelledWriter()
Getter for the field
modelledWriter
.- Returns:
- a
AbstractExpandedXmlWriter
object.
-
setModelledWriter
protected void setModelledWriter(AbstractExpandedXmlWriter<M> modelledWriter)
Setter for the field
modelledWriter
.- Parameters:
modelledWriter
- aAbstractExpandedXmlWriter
object.
-
getLightWriter
protected AbstractExpandedXmlWriter<I> getLightWriter()
Getter for the field
lightWriter
.- Returns:
- a
AbstractExpandedXmlWriter
object.
-
setLightWriter
protected void setLightWriter(AbstractExpandedXmlWriter<I> lightWriter)
Setter for the field
lightWriter
.- Parameters:
lightWriter
- aAbstractExpandedXmlWriter
object.
-
initialiseDelegateWriters
protected abstract void initialiseDelegateWriters()
initialiseDelegateWriters.
-
-