Class AbstractXmlParticipantWriter<P extends Participant,F extends Feature>
- java.lang.Object
-
- psidev.psi.mi.jami.xml.io.writer.elements.impl.abstracts.AbstractXmlParticipantWriter<P,F>
-
- All Implemented Interfaces:
PsiXmlElementWriter<P>,PsiXmlParticipantWriter<P>
- Direct Known Subclasses:
AbstractXmlModelledParticipantWriter,AbstractXmlParticipantEvidenceWriter,AbstractXmlParticipantWriter
public abstract class AbstractXmlParticipantWriter<P extends Participant,F extends Feature> extends Object implements PsiXmlParticipantWriter<P>
Abstract Xml writer for participant- Since:
12/11/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AbstractXmlParticipantWriter(PsiXmlVersion version, XMLStreamWriter writer, PsiXmlObjectCache objectIndex)Constructor for AbstractXmlParticipantWriter.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PsiXmlElementWriter<Alias>getAliasWriter()Getter for the fieldaliasWriter.PsiXmlElementWriter<Annotation>getAttributeWriter()Getter for the fieldattributeWriter.PsiXmlVariableNameWriter<CvTerm>getBiologicalRoleWriter()Getter for the fieldbiologicalRoleWriter.PsiXmlElementWriter<F>getFeatureWriter()Getter for the fieldfeatureWriter.PsiXmlElementWriter<Interactor>getInteractorWriter()Getter for the fieldinteractorWriter.protected PsiXmlObjectCachegetObjectIndex()Getter for the fieldobjectIndex.protected XMLStreamWritergetStreamWriter()Getter for the fieldstreamWriter.protected PsiXmlVersiongetVersion()PsiXmlXrefWritergetXrefWriter()Getter for the fieldxrefWriter.protected abstract voidinitialiseBiologicalRoleWriter()initialiseBiologicalRoleWriter.protected abstract voidinitialiseFeatureWriter()initialiseFeatureWriter.protected abstract voidinitialiseInteractorWriter()initialiseInteractorWriter.protected abstract voidinitialiseXrefWriter()initialiseXrefWriter.voidsetAliasWriter(PsiXmlElementWriter<Alias> aliasWriter)Setter for the fieldaliasWriter.voidsetAttributeWriter(PsiXmlElementWriter<Annotation> attributeWriter)Setter for the fieldattributeWriter.voidsetBiologicalRoleWriter(PsiXmlVariableNameWriter<CvTerm> biologicalRoleWriter)Setter for the fieldbiologicalRoleWriter.voidsetComplexAsInteractor(boolean complexAsInteractor)Sets the property of the writer to write a complex as an interactor or as an interactionvoidsetFeatureWriter(PsiXmlElementWriter<F> featureWriter)Setter for the fieldfeatureWriter.voidsetInteractorWriter(PsiXmlElementWriter<Interactor> interactorWriter)Setter for the fieldinteractorWriter.voidsetXrefWriter(PsiXmlXrefWriter xrefWriter)Setter for the fieldxrefWriter.voidwrite(P object)write.protected voidwriteAttributes(P object)writeAttributes.protected voidwriteBiologicalRole(P object)writeBiologicalRole.booleanwriteComplexAsInteractor()writeComplexAsInteractor.protected abstract voidwriteConfidences(P object)writeConfidences.protected abstract voidwriteExperimentalInteractor(P object)writeExperimentalInteractor.protected abstract voidwriteExperimentalPreparations(P object)writeExperimentalPreparations.protected abstract voidwriteExperimentalRoles(P object)writeExperimentalRoles.protected voidwriteFeatures(P object)writeFeatures.protected abstract voidwriteHostOrganisms(P object)writeHostOrganisms.protected voidwriteInteractor(P object)writeInteractor.protected abstract voidwriteMolecule(Interactor interactor)writeMolecule.protected voidwriteMoleculeDescription(Interactor interactor)writeMoleculeDescription.protected voidwriteMoleculeRef(Interactor interactor)writeMoleculeRef.protected voidwriteNames(P object)writeNames.protected abstract voidwriteOtherAttributes(P object, boolean writeAttributeList)writeOtherAttributes.protected abstract voidwriteParameters(P object)writeParameters.voidwriteParticipant(P object, CvTerm detectionMethod)writeParticipant.protected abstract voidwriteParticipantIdentificationMethods(P object, CvTerm method)writeParticipantIdentificationMethods.protected abstract voidwriteParticipantPool(ParticipantPool pool)writeParticipantPool.protected abstract voidwriteStoichiometry(P object)writeStoichiometry.protected voidwriteXref(P object)writeXref.protected voidwriteXrefFromParticipantXrefs(P object)writeXrefFromParticipantXrefs.
-
-
-
Constructor Detail
-
AbstractXmlParticipantWriter
public AbstractXmlParticipantWriter(PsiXmlVersion version, XMLStreamWriter writer, PsiXmlObjectCache objectIndex)
Constructor for AbstractXmlParticipantWriter.
- Parameters:
version- aPsiXmlVersionobject.writer- aXMLStreamWriterobject.objectIndex- aPsiXmlObjectCacheobject.
-
-
Method Detail
-
getAliasWriter
public PsiXmlElementWriter<Alias> getAliasWriter()
Getter for the field
aliasWriter.- Returns:
- a
PsiXmlElementWriterobject.
-
setAliasWriter
public void setAliasWriter(PsiXmlElementWriter<Alias> aliasWriter)
Setter for the field
aliasWriter.- Parameters:
aliasWriter- aPsiXmlElementWriterobject.
-
getXrefWriter
public PsiXmlXrefWriter getXrefWriter()
Getter for the field
xrefWriter.- Returns:
- a
PsiXmlXrefWriterobject.
-
initialiseXrefWriter
protected abstract void initialiseXrefWriter()
initialiseXrefWriter.
-
setXrefWriter
public void setXrefWriter(PsiXmlXrefWriter xrefWriter)
Setter for the field
xrefWriter.- Parameters:
xrefWriter- aPsiXmlXrefWriterobject.
-
getBiologicalRoleWriter
public PsiXmlVariableNameWriter<CvTerm> getBiologicalRoleWriter()
Getter for the field
biologicalRoleWriter.- Returns:
- a
PsiXmlVariableNameWriterobject.
-
initialiseBiologicalRoleWriter
protected abstract void initialiseBiologicalRoleWriter()
initialiseBiologicalRoleWriter.
-
setBiologicalRoleWriter
public void setBiologicalRoleWriter(PsiXmlVariableNameWriter<CvTerm> biologicalRoleWriter)
Setter for the field
biologicalRoleWriter.- Parameters:
biologicalRoleWriter- aPsiXmlVariableNameWriterobject.
-
getAttributeWriter
public PsiXmlElementWriter<Annotation> getAttributeWriter()
Getter for the field
attributeWriter.- Returns:
- a
PsiXmlElementWriterobject.
-
setAttributeWriter
public void setAttributeWriter(PsiXmlElementWriter<Annotation> attributeWriter)
Setter for the field
attributeWriter.- Parameters:
attributeWriter- aPsiXmlElementWriterobject.
-
getInteractorWriter
public PsiXmlElementWriter<Interactor> getInteractorWriter()
Getter for the field
interactorWriter.- Returns:
- a
PsiXmlElementWriterobject.
-
initialiseInteractorWriter
protected abstract void initialiseInteractorWriter()
initialiseInteractorWriter.
-
setInteractorWriter
public void setInteractorWriter(PsiXmlElementWriter<Interactor> interactorWriter)
Setter for the field
interactorWriter.- Parameters:
interactorWriter- aPsiXmlElementWriterobject.
-
getFeatureWriter
public PsiXmlElementWriter<F> getFeatureWriter()
Getter for the field
featureWriter.- Returns:
- a
PsiXmlElementWriterobject.
-
initialiseFeatureWriter
protected abstract void initialiseFeatureWriter()
initialiseFeatureWriter.
-
setFeatureWriter
public void setFeatureWriter(PsiXmlElementWriter<F> featureWriter)
Setter for the field
featureWriter.- Parameters:
featureWriter- aPsiXmlElementWriterobject.
-
write
public void write(P object) throws MIIOException
write.
- Specified by:
writein interfacePsiXmlElementWriter<P extends Participant>- Parameters:
object- a T object.- Throws:
MIIOException- if any.
-
writeParticipant
public void writeParticipant(P object, CvTerm detectionMethod) throws MIIOException
writeParticipant.
- Specified by:
writeParticipantin interfacePsiXmlParticipantWriter<P extends Participant>- Parameters:
object- : participant to writedetectionMethod- : the experiment participant identification method which can be overridden by the participant- Throws:
MIIOException- if any.
-
writeComplexAsInteractor
public boolean writeComplexAsInteractor()
writeComplexAsInteractor.
- Specified by:
writeComplexAsInteractorin interfacePsiXmlParticipantWriter<P extends Participant>- Returns:
- true if the participant writer will write a complex as an interactor
-
setComplexAsInteractor
public void setComplexAsInteractor(boolean complexAsInteractor)
Sets the property of the writer to write a complex as an interactor or as an interaction- Specified by:
setComplexAsInteractorin interfacePsiXmlParticipantWriter<P extends Participant>- Parameters:
complexAsInteractor- a boolean.
-
writeStoichiometry
protected abstract void writeStoichiometry(P object)
writeStoichiometry.
- Parameters:
object- a P object.
-
writeOtherAttributes
protected abstract void writeOtherAttributes(P object, boolean writeAttributeList) throws XMLStreamException
writeOtherAttributes.
- Parameters:
object- a P object.writeAttributeList- a boolean.- Throws:
XMLStreamException- if any.
-
writeAttributes
protected void writeAttributes(P object) throws XMLStreamException
writeAttributes.
- Parameters:
object- a P object.- Throws:
XMLStreamException- if any.
-
writeFeatures
protected void writeFeatures(P object) throws XMLStreamException
writeFeatures.
- Parameters:
object- a P object.- Throws:
XMLStreamException- if any.
-
writeNames
protected void writeNames(P object) throws XMLStreamException
writeNames.
- Parameters:
object- a P object.- Throws:
XMLStreamException- if any.
-
writeBiologicalRole
protected void writeBiologicalRole(P object) throws XMLStreamException
writeBiologicalRole.
- Parameters:
object- a P object.- Throws:
XMLStreamException- if any.
-
writeInteractor
protected void writeInteractor(P object) throws XMLStreamException
writeInteractor.
- Parameters:
object- a P object.- Throws:
XMLStreamException- if any.
-
writeParticipantPool
protected abstract void writeParticipantPool(ParticipantPool pool) throws XMLStreamException
writeParticipantPool.
- Parameters:
pool- aParticipantPoolobject.- Throws:
XMLStreamException- if any.
-
writeMolecule
protected abstract void writeMolecule(Interactor interactor) throws XMLStreamException
writeMolecule.
- Parameters:
interactor- aInteractorobject.- Throws:
XMLStreamException- if any.
-
writeExperimentalPreparations
protected abstract void writeExperimentalPreparations(P object) throws XMLStreamException
writeExperimentalPreparations.
- Parameters:
object- a P object.- Throws:
XMLStreamException- if any.
-
writeExperimentalRoles
protected abstract void writeExperimentalRoles(P object) throws XMLStreamException
writeExperimentalRoles.
- Parameters:
object- a P object.- Throws:
XMLStreamException- if any.
-
writeParticipantIdentificationMethods
protected abstract void writeParticipantIdentificationMethods(P object, CvTerm method) throws XMLStreamException
writeParticipantIdentificationMethods.
- Parameters:
object- a P object.method- aCvTermobject.- Throws:
XMLStreamException- if any.
-
writeExperimentalInteractor
protected abstract void writeExperimentalInteractor(P object) throws XMLStreamException
writeExperimentalInteractor.
- Parameters:
object- a P object.- Throws:
XMLStreamException- if any.
-
writeHostOrganisms
protected abstract void writeHostOrganisms(P object) throws XMLStreamException
writeHostOrganisms.
- Parameters:
object- a P object.- Throws:
XMLStreamException- if any.
-
writeConfidences
protected abstract void writeConfidences(P object) throws XMLStreamException
writeConfidences.
- Parameters:
object- a P object.- Throws:
XMLStreamException- if any.
-
writeParameters
protected abstract void writeParameters(P object) throws XMLStreamException
writeParameters.
- Parameters:
object- a P object.- Throws:
XMLStreamException- if any.
-
writeXref
protected void writeXref(P object) throws XMLStreamException
writeXref.
- Parameters:
object- a P object.- Throws:
XMLStreamException- if any.
-
writeXrefFromParticipantXrefs
protected void writeXrefFromParticipantXrefs(P object) throws XMLStreamException
writeXrefFromParticipantXrefs.
- Parameters:
object- a P object.- Throws:
XMLStreamException- if any.
-
writeMoleculeRef
protected void writeMoleculeRef(Interactor interactor) throws XMLStreamException
writeMoleculeRef.
- Parameters:
interactor- aInteractorobject.- Throws:
XMLStreamException- if any.
-
writeMoleculeDescription
protected void writeMoleculeDescription(Interactor interactor) throws XMLStreamException
writeMoleculeDescription.
- Parameters:
interactor- aInteractorobject.- Throws:
XMLStreamException- if any.
-
getStreamWriter
protected XMLStreamWriter getStreamWriter()
Getter for the field
streamWriter.- Returns:
- a
XMLStreamWriterobject.
-
getObjectIndex
protected PsiXmlObjectCache getObjectIndex()
Getter for the field
objectIndex.- Returns:
- a
PsiXmlObjectCacheobject.
-
getVersion
protected PsiXmlVersion getVersion()
-
-