Class AbstractCompactXmlMixWriter<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.compact.AbstractCompactXmlWriter<I>
-
- psidev.psi.mi.jami.xml.io.writer.compact.AbstractCompactXmlMixWriter<I,M,E>
-
- All Implemented Interfaces:
InteractionWriter<I>
- Direct Known Subclasses:
CompactXmlBinaryWriter
,CompactXmlBinaryWriter
,CompactXmlNamedBinaryWriter
,CompactXmlNamedWriter
,CompactXmlWriter
,CompactXmlWriter
public abstract class AbstractCompactXmlMixWriter<I extends Interaction,M extends ModelledInteraction,E extends InteractionEvidence> extends AbstractCompactXmlWriter<I>
Abstract class for a compact PSI-XML writer of mixed interactions- Since:
20/11/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AbstractCompactXmlMixWriter(PsiXmlVersion version, Class<I> type)
Constructor for AbstractCompactXmlMixWriter.AbstractCompactXmlMixWriter(PsiXmlVersion version, Class<I> type, File file)
Constructor for AbstractCompactXmlMixWriter.AbstractCompactXmlMixWriter(PsiXmlVersion version, Class<I> type, OutputStream output)
Constructor for AbstractCompactXmlMixWriter.AbstractCompactXmlMixWriter(PsiXmlVersion version, Class<I> type, Writer writer)
Constructor for AbstractCompactXmlMixWriter.
-
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 abstract void
initialiseDelegateWriters()
initialiseDelegateWriters.protected void
initialiseSubWriters()
initialiseSubWriters.protected void
registerAvailabilities(I interaction)
registerAvailabilities.protected void
registerExperiment(I interaction)
registerExperiment.void
reset()
reset.void
setAvailabilitySet(Set<String> availabilities)
setAvailabilitySet.protected void
setAvailabilityWriter(PsiXmlElementWriter<String> availabilityWriter)
Setter for the fieldavailabilityWriter
.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(AbstractCompactXmlWriter<E> evidenceWriter)
Setter for the fieldevidenceWriter
.void
setExperimentSet(Set<Experiment> experiments)
setExperimentSet.protected void
setExperimentWriter(PsiXmlExperimentWriter experimentWriter)
Setter for the fieldexperimentWriter
.void
setInteractionSet(Set<Interaction> processedInteractions)
setInteractionSet.void
setInteractorSet(Set<Interactor> interactors)
setInteractorSet.protected void
setInteractorWriter(PsiXmlElementWriter<Interactor> interactorWriter)
Setter for the fieldinteractorWriter
.protected void
setLightWriter(AbstractCompactXmlWriter<I> lightWriter)
Setter for the fieldlightWriter
.protected void
setModelledWriter(AbstractCompactXmlWriter<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.compact.AbstractCompactXmlWriter
getAvailabilities, getAvailabilityWriter, getExperiments, getExperimentWriter, getInteractionType, getInteractors, getInteractorWriter, initialiseContext, initialiseDefaultAvailabilitySet, initialiseDefaultElementCache, initialiseDefaultExperimentSet, initialiseDefaultInteractorSet, initialiseOptionalWriters, registerAllInteractionsProperties, registerAllInteractors, registerAllInteractorsAndExperimentsFrom, registerInteractionProperties, registerParticipantInteractor, registerParticipantPoolInteractor, 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, initialiseDefaultInteractionSet, initialiseDefaultSource, initialiseSubWriters, isStarted, newXmlSource, setAnnotationsWriter, setCurrentInteraction, setCurrentSource, setEntryAnnotations, setInteractionsIterator, setInteractionWriter, setStarted, setSubWritersFactory, start, writeComplex, writeComplexesAsInteractors, writeEndEntry, writeEndEntryContent, writeEndInteractionList, writeEntryAttributes, writeEntrySetAttributes, writeInteraction, writeInteractionListContent, writeSource, writeStartEntry, writeStartInteractionList, writeSubComplexInEntry
-
-
-
-
Constructor Detail
-
AbstractCompactXmlMixWriter
public AbstractCompactXmlMixWriter(PsiXmlVersion version, Class<I> type)
Constructor for AbstractCompactXmlMixWriter.
- Parameters:
version
- aPsiXmlVersion
object.type
- aClass
object.
-
AbstractCompactXmlMixWriter
public AbstractCompactXmlMixWriter(PsiXmlVersion version, Class<I> type, File file) throws IOException, XMLStreamException
Constructor for AbstractCompactXmlMixWriter.
- Parameters:
version
- aPsiXmlVersion
object.type
- aClass
object.file
- aFile
object.- Throws:
IOException
- if any.XMLStreamException
- if any.
-
AbstractCompactXmlMixWriter
public AbstractCompactXmlMixWriter(PsiXmlVersion version, Class<I> type, OutputStream output) throws XMLStreamException
Constructor for AbstractCompactXmlMixWriter.
- Parameters:
version
- aPsiXmlVersion
object.type
- aClass
object.output
- aOutputStream
object.- Throws:
XMLStreamException
- if any.
-
AbstractCompactXmlMixWriter
public AbstractCompactXmlMixWriter(PsiXmlVersion version, Class<I> type, Writer writer) throws XMLStreamException
Constructor for AbstractCompactXmlMixWriter.
- 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 classAbstractCompactXmlWriter<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 classAbstractCompactXmlWriter<I extends Interaction>
- Throws:
MIIOException
- if any.
-
setAvailabilityWriter
protected void setAvailabilityWriter(PsiXmlElementWriter<String> availabilityWriter)
Setter for the field
availabilityWriter
.- Overrides:
setAvailabilityWriter
in classAbstractCompactXmlWriter<I extends Interaction>
- Parameters:
availabilityWriter
- aPsiXmlElementWriter
object.
-
setExperimentWriter
protected void setExperimentWriter(PsiXmlExperimentWriter experimentWriter)
Setter for the field
experimentWriter
.- Overrides:
setExperimentWriter
in classAbstractCompactXmlWriter<I extends Interaction>
- Parameters:
experimentWriter
- aPsiXmlExperimentWriter
object.
-
setInteractorWriter
protected void setInteractorWriter(PsiXmlElementWriter<Interactor> interactorWriter)
Setter for the field
interactorWriter
.- Overrides:
setInteractorWriter
in classAbstractCompactXmlWriter<I extends Interaction>
- Parameters:
interactorWriter
- aPsiXmlElementWriter
object.
-
setExperimentSet
public void setExperimentSet(Set<Experiment> experiments)
setExperimentSet.
- Overrides:
setExperimentSet
in classAbstractCompactXmlWriter<I extends Interaction>
- Parameters:
experiments
- aSet
object.
-
setAvailabilitySet
public void setAvailabilitySet(Set<String> availabilities)
setAvailabilitySet.
- Overrides:
setAvailabilitySet
in classAbstractCompactXmlWriter<I extends Interaction>
- Parameters:
availabilities
- aSet
object.
-
setVersion
public void setVersion(PsiXmlVersion version)
Setter for the field
version
.- Overrides:
setVersion
in classAbstractXmlWriter<I extends Interaction>
- Parameters:
version
- aPsiXmlVersion
object.
-
setInteractorSet
public void setInteractorSet(Set<Interactor> interactors)
setInteractorSet.
- Overrides:
setInteractorSet
in classAbstractCompactXmlWriter<I extends Interaction>
- Parameters:
interactors
- aSet
object.
-
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.
-
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.
-
registerExperiment
protected void registerExperiment(I interaction)
registerExperiment.
- Specified by:
registerExperiment
in classAbstractCompactXmlWriter<I extends Interaction>
- Parameters:
interaction
- a T object.
-
registerAvailabilities
protected void registerAvailabilities(I interaction)
registerAvailabilities.
- Specified by:
registerAvailabilities
in classAbstractCompactXmlWriter<I extends Interaction>
- Parameters:
interaction
- a T 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.
-
setEvidenceWriter
protected void setEvidenceWriter(AbstractCompactXmlWriter<E> evidenceWriter)
Setter for the field
evidenceWriter
.- Parameters:
evidenceWriter
- aAbstractCompactXmlWriter
object.
-
setModelledWriter
protected void setModelledWriter(AbstractCompactXmlWriter<M> modelledWriter)
Setter for the field
modelledWriter
.- Parameters:
modelledWriter
- aAbstractCompactXmlWriter
object.
-
setLightWriter
protected void setLightWriter(AbstractCompactXmlWriter<I> lightWriter)
Setter for the field
lightWriter
.- Parameters:
lightWriter
- aAbstractCompactXmlWriter
object.
-
initialiseDelegateWriters
protected abstract void initialiseDelegateWriters()
initialiseDelegateWriters.
-
-