Class AbstractMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- java.lang.Object
-
- psidev.psi.mi.jami.tab.io.writer.feeder.AbstractMitabColumnFeeder<T,P>
-
- All Implemented Interfaces:
MitabColumnFeeder<T,P>
- Direct Known Subclasses:
DefaultMitabColumnFeeder
,MitabInteractionEvidenceFeeder
,MitabModelledInteractionFeeder
public abstract class AbstractMitabColumnFeeder<T extends BinaryInteraction,P extends Participant> extends Object implements MitabColumnFeeder<T,P>
Abstract Mitab 2.5 column feeder- Since:
20/06/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AbstractMitabColumnFeeder(Writer writer)
Constructor for AbstractMitabColumnFeeder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
escapeAndWriteString(String stringToEscape)
This method replaces line breaks and tab characters with a space.protected Writer
getWriter()
Getter for the fieldwriter
.void
writeAlias(Alias alias)
This methods write the dbsource, alias name and alias type of an aliasvoid
writeAliases(P participant)
writeAliases.void
writeAlternativeIdentifiers(P participant)
writeAlternativeIdentifiers.void
writeAnnotation(Annotation annotation)
Writes an annotationvoid
writeBiologicalRole(P participant)
writeBiologicalRole.void
writeChecksum(Checksum checksum)
Writes the checksumvoid
writeComplexExpansion(T binary)
writeComplexExpansion.void
writeConfidence(Confidence conf)
This method will write a confidence with a text if text is not nullvoid
writeCvTerm(CvTerm cv)
Write the CvTerm.protected void
writeCvTermName(CvTerm cv)
Write full name if not null, otherwise write shortnamevoid
writeDate(Date date)
Writes created date of an interactionvoid
writeFeature(Feature feature)
Writes a featurevoid
writeIdentifier(Xref identifier)
This methods write the database, id and version of an identifiervoid
writeInteractionCausalRegulatoryMechanism(T interaction)
writeInteractionType.void
writeInteractionCausalStatement(T interaction)
writeInteractionType.void
writeInteractionChecksums(T interaction)
writeInteractionChecksums.void
writeInteractionType(T interaction)
writeInteractionType.void
writeInteractorOrganism(P participant)
writeInteractorOrganism.void
writeInteractorType(P participant)
writeInteractorType.void
writeOrganism(Organism organism)
Write an organism.void
writeParameter(Parameter parameter)
Writes the parametervoid
writeParticipantAnnotations(P participant)
writeParticipantAnnotations.void
writeParticipantBiologicalEffect(P participant)
writeBiologicalRole.void
writeParticipantChecksums(P participant)
writeParticipantChecksums.void
writeParticipantFeatures(P participant)
writeParticipantFeatures.void
writeParticipantStoichiometry(P participant)
writeParticipantStoichiometry.void
writeParticipantXrefs(P participant)
writeParticipantXrefs.void
writeUniqueIdentifier(P participant)
writeUniqueIdentifier.void
writeXref(Xref xref)
This methods write the database, id, version and qualifier of an xref-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface psidev.psi.mi.jami.tab.io.writer.feeder.MitabColumnFeeder
writeAlias, writeExperimentalRole, writeFirstAuthor, writeHostOrganism, writeInteractionAnnotations, writeInteractionConfidences, writeInteractionDetectionMethod, writeInteractionIdentifiers, writeInteractionParameters, writeInteractionXrefs, writeNegativeProperty, writeParticipantIdentificationMethod, writePublicationIdentifiers, writeSource
-
-
-
-
Method Detail
-
writeUniqueIdentifier
public void writeUniqueIdentifier(P participant) throws IOException
writeUniqueIdentifier.
- Specified by:
writeUniqueIdentifier
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeAlternativeIdentifiers
public void writeAlternativeIdentifiers(P participant) throws IOException
writeAlternativeIdentifiers.
- Specified by:
writeAlternativeIdentifiers
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeAliases
public void writeAliases(P participant) throws IOException
writeAliases.
- Specified by:
writeAliases
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeInteractorOrganism
public void writeInteractorOrganism(P participant) throws IOException
writeInteractorOrganism.
- Specified by:
writeInteractorOrganism
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeInteractionType
public void writeInteractionType(T interaction) throws IOException
writeInteractionType.
- Specified by:
writeInteractionType
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
interaction
- a T object.- Throws:
IOException
- if any.
-
writeConfidence
public void writeConfidence(Confidence conf) throws IOException
This method will write a confidence with a text if text is not null- Specified by:
writeConfidence
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
conf
- aConfidence
object.- Throws:
IOException
- if any.
-
writeParameter
public void writeParameter(Parameter parameter) throws IOException
Writes the parameter- Specified by:
writeParameter
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
parameter
- aParameter
object.- Throws:
IOException
- if any.
-
writeOrganism
public void writeOrganism(Organism organism) throws IOException
Write an organism. Will duplicate taxid if needs to provide both common name and scientific name- Specified by:
writeOrganism
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
organism
- aOrganism
object.- Throws:
IOException
- if any.
-
writeCvTerm
public void writeCvTerm(CvTerm cv) throws IOException
Write the CvTerm. If it is null, it writes an empty column (-)- Specified by:
writeCvTerm
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
cv
- aCvTerm
object.- Throws:
IOException
- if any.
-
writeAlias
public void writeAlias(Alias alias) throws IOException
This methods write the dbsource, alias name and alias type of an alias- Specified by:
writeAlias
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
alias
- aAlias
object.- Throws:
IOException
- if any.
-
writeIdentifier
public void writeIdentifier(Xref identifier) throws IOException
This methods write the database, id and version of an identifier- Specified by:
writeIdentifier
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
identifier
- aXref
object.- Throws:
IOException
- if any.
-
escapeAndWriteString
public void escapeAndWriteString(String stringToEscape) throws IOException
This method replaces line breaks and tab characters with a space. It escapes the StringToEscape with doble quote if it finds a special MITAB character- Specified by:
escapeAndWriteString
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
stringToEscape
- aString
object.- Throws:
IOException
- if any.
-
writeComplexExpansion
public void writeComplexExpansion(T binary) throws IOException
writeComplexExpansion.
- Specified by:
writeComplexExpansion
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
binary
- a T object.- Throws:
IOException
- if any.
-
writeBiologicalRole
public void writeBiologicalRole(P participant) throws IOException
writeBiologicalRole.
- Specified by:
writeBiologicalRole
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeInteractorType
public void writeInteractorType(P participant) throws IOException
writeInteractorType.
- Specified by:
writeInteractorType
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeParticipantXrefs
public void writeParticipantXrefs(P participant) throws IOException
writeParticipantXrefs.
- Specified by:
writeParticipantXrefs
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeParticipantAnnotations
public void writeParticipantAnnotations(P participant) throws IOException
writeParticipantAnnotations.
- Specified by:
writeParticipantAnnotations
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeDate
public void writeDate(Date date) throws IOException
Writes created date of an interaction- Specified by:
writeDate
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
date
- aDate
object.- Throws:
IOException
- if any.
-
writeParticipantChecksums
public void writeParticipantChecksums(P participant) throws IOException
writeParticipantChecksums.
- Specified by:
writeParticipantChecksums
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeInteractionChecksums
public void writeInteractionChecksums(T interaction) throws IOException
writeInteractionChecksums.
- Specified by:
writeInteractionChecksums
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
interaction
- a T object.- Throws:
IOException
- if any.
-
writeChecksum
public void writeChecksum(Checksum checksum) throws IOException
Writes the checksum- Specified by:
writeChecksum
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
checksum
- aChecksum
object.- Throws:
IOException
- if any.
-
writeAnnotation
public void writeAnnotation(Annotation annotation) throws IOException
Writes an annotation- Specified by:
writeAnnotation
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
annotation
- aAnnotation
object.- Throws:
IOException
- if any.
-
writeXref
public void writeXref(Xref xref) throws IOException
This methods write the database, id, version and qualifier of an xref- Specified by:
writeXref
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
xref
- aXref
object.- Throws:
IOException
- if any.
-
writeParticipantFeatures
public void writeParticipantFeatures(P participant) throws IOException
writeParticipantFeatures.
- Specified by:
writeParticipantFeatures
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeParticipantStoichiometry
public void writeParticipantStoichiometry(P participant) throws IOException
writeParticipantStoichiometry.
- Specified by:
writeParticipantStoichiometry
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeFeature
public void writeFeature(Feature feature) throws IOException
Writes a feature- Specified by:
writeFeature
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
feature
- aFeature
object.- Throws:
IOException
- if any.
-
writeParticipantBiologicalEffect
public void writeParticipantBiologicalEffect(P participant) throws IOException
writeBiologicalRole.
- Specified by:
writeParticipantBiologicalEffect
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
participant
- a P object.- Throws:
IOException
- if any.
-
writeInteractionCausalRegulatoryMechanism
public void writeInteractionCausalRegulatoryMechanism(T interaction) throws IOException
writeInteractionType.
- Specified by:
writeInteractionCausalRegulatoryMechanism
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
interaction
- a T object.- Throws:
IOException
- if any.
-
writeInteractionCausalStatement
public void writeInteractionCausalStatement(T interaction) throws IOException
writeInteractionType.
- Specified by:
writeInteractionCausalStatement
in interfaceMitabColumnFeeder<T extends BinaryInteraction,P extends Participant>
- Parameters:
interaction
- a T object.- Throws:
IOException
- if any.
-
writeCvTermName
protected void writeCvTermName(CvTerm cv) throws IOException
Write full name if not null, otherwise write shortname- Parameters:
cv
- aCvTerm
object.- Throws:
IOException
- if any.
-
-