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 voidclose()closevoidend()endvoidflush()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 WritergetWriter()Getter for the fieldwriter.voidinitialiseContext(Map<String,Object> options)Initialise the context of the InteractionWriter given a map of optionsvoidreset()resetvoidsetWriteHeader(boolean writeHeader)Setter for the fieldwriteHeader.voidstart()startvoidwrite(Collection<? extends T> interactions)writevoidwrite(Iterator<? extends T> interactions)Writes Interaction objects using iteratorvoidwrite(T interaction)writeprotected abstract voidwriteConfidences(P participant)writeConfidencesprotected abstract voidwriteConfidences(T interaction)writeConfidencesprotected abstract voidwriteCooperativeEffects(T interaction)writeCooperativeEffectsprotected voidwriteCvTerm(String label, CvTerm term)writeCvTermprotected abstract voidwriteDetectionMethods(F feature)writeDetectionMethodsprotected voidwriteEndDocument()writeEndDocumentprotected abstract voidwriteExperiment(T interaction)writeExperimentprotected abstract voidwriteExperimentalPreparations(P participant)writeExperimentalPreparationsprotected abstract voidwriteExperimentalRole(P participant)writeExperimentalRoleprotected abstract voidwriteExpressedInOrganism(P participant)writeExpressedInOrganismprotected voidwriteFeature(F feature)writeFeatureprotected abstract voidwriteGeneralProperties(T interaction)writeGeneralPropertiesprotected voidwriteHeader()writeHeaderprotected voidwriteHtmlStyle()writeHtmlStyleprotected voidwriteInteractionAnchor(Interaction interaction)writeInteractionAnchorprotected voidwriteInteractionList()writeInteractionListprotected voidwriteInteractor(Interactor interactor)writeInteractorprotected voidwriteModelledInteraction(ModelledInteraction c)writeModelledInteractionprotected voidwriteOrganism(String label, Organism organism)writeOrganismprotected abstract voidwriteParameters(P participant)writeParametersprotected abstract voidwriteParameters(T interaction)writeParametersprotected voidwriteParticipant(P participant)writeParticipantprotected abstract voidwriteParticipantIdentificationMethods(P participant)writeParticipantIdentificationMethodsprotected voidwriteProperty(String property, String value)writePropertyprotected voidwritePropertyWithQualifier(String property, String value, String qualifier)writePropertyWithQualifierprotected voidwriterEndBody()writerEndBodyprotected voidwriterStartBody()writerStartBodyprotected voidwriteStartDocument()writeStartDocumentprotected voidwriteSubTitle(String subTitle)writeSubTitleprotected voidwriteTag(String property)writeTag
-
-
-
Constructor Detail
-
AbstractMIHtmlWriter
public AbstractMIHtmlWriter(AbstractMIHtmlWriter<ModelledInteraction,ModelledParticipant,ModelledFeature> complexWriter)
Constructor for AbstractMIHtmlWriter.
- Parameters:
complexWriter- aAbstractMIHtmlWriterobject.
-
AbstractMIHtmlWriter
public AbstractMIHtmlWriter(File file, AbstractMIHtmlWriter<ModelledInteraction,ModelledParticipant,ModelledFeature> complexWriter) throws IOException
Constructor for AbstractMIHtmlWriter.
- Parameters:
file- aFileobject.complexWriter- aAbstractMIHtmlWriterobject.- Throws:
IOException- if any.
-
AbstractMIHtmlWriter
public AbstractMIHtmlWriter(OutputStream output, AbstractMIHtmlWriter<ModelledInteraction,ModelledParticipant,ModelledFeature> complexWriter)
Constructor for AbstractMIHtmlWriter.
- Parameters:
output- aOutputStreamobject.complexWriter- aAbstractMIHtmlWriterobject.
-
AbstractMIHtmlWriter
public AbstractMIHtmlWriter(Writer writer, AbstractMIHtmlWriter<ModelledInteraction,ModelledParticipant,ModelledFeature> complexWriter)
Constructor for AbstractMIHtmlWriter.
- Parameters:
writer- aWriterobject.complexWriter- aAbstractMIHtmlWriterobject.
-
-
Method Detail
-
write
public void write(T interaction) throws MIIOException
write
- Specified by:
writein 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:
writein interfaceInteractionWriter<T extends Interaction>- Parameters:
interactions- aCollectionobject.- Throws:
MIIOException- if any.
-
write
public void write(Iterator<? extends T> interactions) throws MIIOException
Writes Interaction objects using iterator- Specified by:
writein interfaceInteractionWriter<T extends Interaction>- Parameters:
interactions- : the iterator of interactions to write- Throws:
MIIOException- : if cannot write
-
start
public void start() throws MIIOExceptionstart
- Specified by:
startin interfaceInteractionWriter<T extends Interaction>- Throws:
MIIOException- if any.
-
end
public void end() throws MIIOExceptionend
- Specified by:
endin 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:
initialiseContextin interfaceInteractionWriter<T extends Interaction>- Parameters:
options- : the options given by the user
-
flush
public void flush() throws MIIOExceptionflush
- Specified by:
flushin interfaceInteractionWriter<T extends Interaction>- Throws:
MIIOException- if any.
-
close
public void close() throws MIIOExceptionclose
- Specified by:
closein interfaceInteractionWriter<T extends Interaction>- Throws:
MIIOException- if any.
-
reset
public void reset() throws MIIOExceptionreset
- Specified by:
resetin 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- aStringobject.term- aCvTermobject.- Throws:
IOException- if any.
-
writeOrganism
protected void writeOrganism(String label, Organism organism) throws IOException
writeOrganism
- Parameters:
label- aStringobject.organism- aOrganismobject.- Throws:
IOException- if any.
-
writeInteractor
protected void writeInteractor(Interactor interactor) throws IOException
writeInteractor
- Parameters:
interactor- aInteractorobject.- 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- aStringobject.- Throws:
IOException- if any.
-
writeTag
protected void writeTag(String property) throws IOException
writeTag
- Parameters:
property- aStringobject.- Throws:
IOException- if any.
-
writeProperty
protected void writeProperty(String property, String value) throws IOException
writeProperty
- Parameters:
property- aStringobject.value- aStringobject.- Throws:
IOException- if any.
-
writePropertyWithQualifier
protected void writePropertyWithQualifier(String property, String value, String qualifier) throws IOException
writePropertyWithQualifier
- Parameters:
property- aStringobject.value- aStringobject.qualifier- aStringobject.- Throws:
IOException- if any.
-
writeInteractionAnchor
protected void writeInteractionAnchor(Interaction interaction) throws IOException
writeInteractionAnchor
- Parameters:
interaction- aInteractionobject.- Throws:
IOException- if any.
-
writeInteractionList
protected void writeInteractionList() throws IOExceptionwriteInteractionList
- Throws:
IOException- if any.
-
writerStartBody
protected void writerStartBody() throws IOExceptionwriterStartBody
- Throws:
IOException- if any.
-
writerEndBody
protected void writerEndBody() throws IOExceptionwriterEndBody
- Throws:
IOException- if any.
-
writeStartDocument
protected void writeStartDocument() throws IOExceptionwriteStartDocument
- Throws:
IOException- if any.
-
writeEndDocument
protected void writeEndDocument() throws IOExceptionwriteEndDocument
- Throws:
IOException- if any.
-
writeHeader
protected void writeHeader() throws IOExceptionwriteHeader
- Throws:
IOException- if any.
-
writeHtmlStyle
protected void writeHtmlStyle() throws IOExceptionwriteHtmlStyle
- Throws:
IOException- if any.
-
getProcessedObjects
protected Set<Object> getProcessedObjects()
Getter for the field
processedObjects.- Returns:
- a
Setobject.
-
getComplexesToWrite
protected Set<ModelledInteraction> getComplexesToWrite()
Getter for the field
complexesToWrite.- Returns:
- a
Setobject.
-
getComplexWriter
protected AbstractMIHtmlWriter<ModelledInteraction,ModelledParticipant,ModelledFeature> getComplexWriter()
Getter for the field
complexWriter.- Returns:
- a
AbstractMIHtmlWriterobject.
-
writeModelledInteraction
protected void writeModelledInteraction(ModelledInteraction c)
writeModelledInteraction
- Parameters:
c- aModelledInteractionobject.
-
-