Class AbstractMIHtmlWriter<T extends Interaction,P extends Participant,F extends Feature>
- java.lang.Object
-
- psidev.psi.mi.jami.html.AbstractMIHtmlWriter<T,P,F>
-
- All Implemented Interfaces:
InteractionWriter<T>
- Direct Known Subclasses:
LightMIHtmlWriter
,MIEvidenceHtmlWriter
,MIHtmlWriter
,MIModelledHtmlWriter
public abstract class AbstractMIHtmlWriter<T extends Interaction,P extends Participant,F extends Feature> extends Object implements InteractionWriter<T>
Abstract class for MI HTML writer- Since:
06/12/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AbstractMIHtmlWriter(File file, AbstractMIHtmlWriter<ModelledInteraction,ModelledParticipant,ModelledFeature> complexWriter)
Constructor for AbstractMIHtmlWriter.AbstractMIHtmlWriter(OutputStream output, AbstractMIHtmlWriter<ModelledInteraction,ModelledParticipant,ModelledFeature> complexWriter)
Constructor for AbstractMIHtmlWriter.AbstractMIHtmlWriter(Writer writer, AbstractMIHtmlWriter<ModelledInteraction,ModelledParticipant,ModelledFeature> complexWriter)
Constructor for AbstractMIHtmlWriter.AbstractMIHtmlWriter(AbstractMIHtmlWriter<ModelledInteraction,ModelledParticipant,ModelledFeature> complexWriter)
Constructor for AbstractMIHtmlWriter.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
closevoid
end()
endvoid
flush()
flushprotected Set<ModelledInteraction>
getComplexesToWrite()
Getter for the fieldcomplexesToWrite
.protected AbstractMIHtmlWriter<ModelledInteraction,ModelledParticipant,ModelledFeature>
getComplexWriter()
Getter for the fieldcomplexWriter
.protected Set<Object>
getProcessedObjects()
Getter for the fieldprocessedObjects
.protected Writer
getWriter()
Getter for the fieldwriter
.void
initialiseContext(Map<String,Object> options)
Initialise the context of the InteractionWriter given a map of optionsvoid
reset()
resetvoid
setWriteHeader(boolean writeHeader)
Setter for the fieldwriteHeader
.void
start()
startvoid
write(Collection<? extends T> interactions)
writevoid
write(Iterator<? extends T> interactions)
Writes Interaction objects using iteratorvoid
write(T interaction)
writeprotected abstract void
writeConfidences(P participant)
writeConfidencesprotected abstract void
writeConfidences(T interaction)
writeConfidencesprotected abstract void
writeCooperativeEffects(T interaction)
writeCooperativeEffectsprotected void
writeCvTerm(String label, CvTerm term)
writeCvTermprotected abstract void
writeDetectionMethods(F feature)
writeDetectionMethodsprotected void
writeEndDocument()
writeEndDocumentprotected abstract void
writeExperiment(T interaction)
writeExperimentprotected abstract void
writeExperimentalPreparations(P participant)
writeExperimentalPreparationsprotected abstract void
writeExperimentalRole(P participant)
writeExperimentalRoleprotected abstract void
writeExpressedInOrganism(P participant)
writeExpressedInOrganismprotected void
writeFeature(F feature)
writeFeatureprotected abstract void
writeGeneralProperties(T interaction)
writeGeneralPropertiesprotected void
writeHeader()
writeHeaderprotected void
writeHtmlStyle()
writeHtmlStyleprotected void
writeInteractionAnchor(Interaction interaction)
writeInteractionAnchorprotected void
writeInteractionList()
writeInteractionListprotected void
writeInteractor(Interactor interactor)
writeInteractorprotected void
writeModelledInteraction(ModelledInteraction c)
writeModelledInteractionprotected void
writeOrganism(String label, Organism organism)
writeOrganismprotected abstract void
writeParameters(P participant)
writeParametersprotected abstract void
writeParameters(T interaction)
writeParametersprotected void
writeParticipant(P participant)
writeParticipantprotected abstract void
writeParticipantIdentificationMethods(P participant)
writeParticipantIdentificationMethodsprotected void
writeProperty(String property, String value)
writePropertyprotected void
writePropertyWithQualifier(String property, String value, String qualifier)
writePropertyWithQualifierprotected void
writerEndBody()
writerEndBodyprotected void
writerStartBody()
writerStartBodyprotected void
writeStartDocument()
writeStartDocumentprotected void
writeSubTitle(String subTitle)
writeSubTitleprotected void
writeTag(String property)
writeTag
-
-
-
Constructor Detail
-
AbstractMIHtmlWriter
public AbstractMIHtmlWriter(AbstractMIHtmlWriter<ModelledInteraction,ModelledParticipant,ModelledFeature> complexWriter)
Constructor for AbstractMIHtmlWriter.
- Parameters:
complexWriter
- aAbstractMIHtmlWriter
object.
-
AbstractMIHtmlWriter
public AbstractMIHtmlWriter(File file, AbstractMIHtmlWriter<ModelledInteraction,ModelledParticipant,ModelledFeature> complexWriter) throws IOException
Constructor for AbstractMIHtmlWriter.
- Parameters:
file
- aFile
object.complexWriter
- aAbstractMIHtmlWriter
object.- Throws:
IOException
- if any.
-
AbstractMIHtmlWriter
public AbstractMIHtmlWriter(OutputStream output, AbstractMIHtmlWriter<ModelledInteraction,ModelledParticipant,ModelledFeature> complexWriter)
Constructor for AbstractMIHtmlWriter.
- Parameters:
output
- aOutputStream
object.complexWriter
- aAbstractMIHtmlWriter
object.
-
AbstractMIHtmlWriter
public AbstractMIHtmlWriter(Writer writer, AbstractMIHtmlWriter<ModelledInteraction,ModelledParticipant,ModelledFeature> complexWriter)
Constructor for AbstractMIHtmlWriter.
- Parameters:
writer
- aWriter
object.complexWriter
- aAbstractMIHtmlWriter
object.
-
-
Method Detail
-
write
public void write(T interaction) throws MIIOException
write
- Specified by:
write
in interfaceInteractionWriter<T extends Interaction>
- Parameters:
interaction
- a T object.- Throws:
MIIOException
- if any.
-
write
public void write(Collection<? extends T> interactions) throws MIIOException
write
- Specified by:
write
in interfaceInteractionWriter<T extends Interaction>
- Parameters:
interactions
- aCollection
object.- Throws:
MIIOException
- if any.
-
write
public void write(Iterator<? extends T> interactions) throws MIIOException
Writes Interaction objects using iterator- Specified by:
write
in interfaceInteractionWriter<T extends Interaction>
- Parameters:
interactions
- : the iterator of interactions to write- Throws:
MIIOException
- : if cannot write
-
start
public void start() throws MIIOException
start
- Specified by:
start
in interfaceInteractionWriter<T extends Interaction>
- Throws:
MIIOException
- if any.
-
end
public void end() throws MIIOException
end
- Specified by:
end
in interfaceInteractionWriter<T extends Interaction>
- Throws:
MIIOException
- if any.
-
initialiseContext
public void initialiseContext(Map<String,Object> options)
Initialise the context of the InteractionWriter given a map of options- Specified by:
initialiseContext
in interfaceInteractionWriter<T extends Interaction>
- Parameters:
options
- : the options given by the user
-
flush
public void flush() throws MIIOException
flush
- Specified by:
flush
in interfaceInteractionWriter<T extends Interaction>
- Throws:
MIIOException
- if any.
-
close
public void close() throws MIIOException
close
- Specified by:
close
in interfaceInteractionWriter<T extends Interaction>
- Throws:
MIIOException
- if any.
-
reset
public void reset() throws MIIOException
reset
- Specified by:
reset
in interfaceInteractionWriter<T extends Interaction>
- Throws:
MIIOException
- if any.
-
setWriteHeader
public void setWriteHeader(boolean writeHeader)
Setter for the field
writeHeader
.- Parameters:
writeHeader
- a boolean.
-
writeCooperativeEffects
protected abstract void writeCooperativeEffects(T interaction) throws IOException
writeCooperativeEffects
- Parameters:
interaction
- a T object.- Throws:
IOException
- if any.
-
writeConfidences
protected abstract void writeConfidences(T interaction) throws IOException
writeConfidences
- Parameters:
interaction
- a T object.- Throws:
IOException
- if any.
-
writeParameters
protected abstract void writeParameters(T interaction) throws IOException
writeParameters
- Parameters:
interaction
- a T object.- Throws:
IOException
- if any.
-
writeFeature
protected void writeFeature(F feature) throws IOException
writeFeature
- Parameters:
feature
- a F object.- Throws:
IOException
- if any.
-
writeDetectionMethods
protected abstract void writeDetectionMethods(F feature) throws IOException
writeDetectionMethods
- Parameters:
feature
- a F object.- Throws:
IOException
- if any.
-
writeCvTerm
protected void writeCvTerm(String label, CvTerm term) throws IOException
writeCvTerm
- Parameters:
label
- aString
object.term
- aCvTerm
object.- Throws:
IOException
- if any.
-
writeOrganism
protected void writeOrganism(String label, Organism organism) throws IOException
writeOrganism
- Parameters:
label
- aString
object.organism
- aOrganism
object.- Throws:
IOException
- if any.
-
writeInteractor
protected void writeInteractor(Interactor interactor) throws IOException
writeInteractor
- Parameters:
interactor
- aInteractor
object.- Throws:
IOException
- if any.
-
writeGeneralProperties
protected abstract void writeGeneralProperties(T interaction) throws IOException
writeGeneralProperties
- Parameters:
interaction
- a T object.- Throws:
IOException
- if any.
-
writeExperiment
protected abstract void writeExperiment(T interaction) throws IOException
writeExperiment
- Parameters:
interaction
- a T object.- Throws:
IOException
- if any.
-
writeParticipant
protected void writeParticipant(P participant) throws IOException
writeParticipant
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeConfidences
protected abstract void writeConfidences(P participant) throws IOException
writeConfidences
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeParameters
protected abstract void writeParameters(P participant) throws IOException
writeParameters
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeExperimentalPreparations
protected abstract void writeExperimentalPreparations(P participant) throws IOException
writeExperimentalPreparations
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeExpressedInOrganism
protected abstract void writeExpressedInOrganism(P participant) throws IOException
writeExpressedInOrganism
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeExperimentalRole
protected abstract void writeExperimentalRole(P participant) throws IOException
writeExperimentalRole
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeParticipantIdentificationMethods
protected abstract void writeParticipantIdentificationMethods(P participant) throws IOException
writeParticipantIdentificationMethods
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeSubTitle
protected void writeSubTitle(String subTitle) throws IOException
writeSubTitle
- Parameters:
subTitle
- aString
object.- Throws:
IOException
- if any.
-
writeTag
protected void writeTag(String property) throws IOException
writeTag
- Parameters:
property
- aString
object.- Throws:
IOException
- if any.
-
writeProperty
protected void writeProperty(String property, String value) throws IOException
writeProperty
- Parameters:
property
- aString
object.value
- aString
object.- Throws:
IOException
- if any.
-
writePropertyWithQualifier
protected void writePropertyWithQualifier(String property, String value, String qualifier) throws IOException
writePropertyWithQualifier
- Parameters:
property
- aString
object.value
- aString
object.qualifier
- aString
object.- Throws:
IOException
- if any.
-
writeInteractionAnchor
protected void writeInteractionAnchor(Interaction interaction) throws IOException
writeInteractionAnchor
- Parameters:
interaction
- aInteraction
object.- Throws:
IOException
- if any.
-
writeInteractionList
protected void writeInteractionList() throws IOException
writeInteractionList
- Throws:
IOException
- if any.
-
writerStartBody
protected void writerStartBody() throws IOException
writerStartBody
- Throws:
IOException
- if any.
-
writerEndBody
protected void writerEndBody() throws IOException
writerEndBody
- Throws:
IOException
- if any.
-
writeStartDocument
protected void writeStartDocument() throws IOException
writeStartDocument
- Throws:
IOException
- if any.
-
writeEndDocument
protected void writeEndDocument() throws IOException
writeEndDocument
- Throws:
IOException
- if any.
-
writeHeader
protected void writeHeader() throws IOException
writeHeader
- Throws:
IOException
- if any.
-
writeHtmlStyle
protected void writeHtmlStyle() throws IOException
writeHtmlStyle
- Throws:
IOException
- if any.
-
getProcessedObjects
protected Set<Object> getProcessedObjects()
Getter for the field
processedObjects
.- Returns:
- a
Set
object.
-
getComplexesToWrite
protected Set<ModelledInteraction> getComplexesToWrite()
Getter for the field
complexesToWrite
.- Returns:
- a
Set
object.
-
getComplexWriter
protected AbstractMIHtmlWriter<ModelledInteraction,ModelledParticipant,ModelledFeature> getComplexWriter()
Getter for the field
complexWriter
.- Returns:
- a
AbstractMIHtmlWriter
object.
-
writeModelledInteraction
protected void writeModelledInteraction(ModelledInteraction c)
writeModelledInteraction
- Parameters:
c
- aModelledInteraction
object.
-
-