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 PsiXmlObjectCache
getObjectIndex()
Getter for the fieldobjectIndex
.protected XMLStreamWriter
getStreamWriter()
Getter for the fieldstreamWriter
.protected PsiXmlVersion
getVersion()
PsiXmlXrefWriter
getXrefWriter()
Getter for the fieldxrefWriter
.protected abstract void
initialiseBiologicalRoleWriter()
initialiseBiologicalRoleWriter.protected abstract void
initialiseFeatureWriter()
initialiseFeatureWriter.protected abstract void
initialiseInteractorWriter()
initialiseInteractorWriter.protected abstract void
initialiseXrefWriter()
initialiseXrefWriter.void
setAliasWriter(PsiXmlElementWriter<Alias> aliasWriter)
Setter for the fieldaliasWriter
.void
setAttributeWriter(PsiXmlElementWriter<Annotation> attributeWriter)
Setter for the fieldattributeWriter
.void
setBiologicalRoleWriter(PsiXmlVariableNameWriter<CvTerm> biologicalRoleWriter)
Setter for the fieldbiologicalRoleWriter
.void
setComplexAsInteractor(boolean complexAsInteractor)
Sets the property of the writer to write a complex as an interactor or as an interactionvoid
setFeatureWriter(PsiXmlElementWriter<F> featureWriter)
Setter for the fieldfeatureWriter
.void
setInteractorWriter(PsiXmlElementWriter<Interactor> interactorWriter)
Setter for the fieldinteractorWriter
.void
setXrefWriter(PsiXmlXrefWriter xrefWriter)
Setter for the fieldxrefWriter
.void
write(P object)
write.protected void
writeAttributes(P object)
writeAttributes.protected void
writeBiologicalRole(P object)
writeBiologicalRole.boolean
writeComplexAsInteractor()
writeComplexAsInteractor.protected abstract void
writeConfidences(P object)
writeConfidences.protected abstract void
writeExperimentalInteractor(P object)
writeExperimentalInteractor.protected abstract void
writeExperimentalPreparations(P object)
writeExperimentalPreparations.protected abstract void
writeExperimentalRoles(P object)
writeExperimentalRoles.protected void
writeFeatures(P object)
writeFeatures.protected abstract void
writeHostOrganisms(P object)
writeHostOrganisms.protected void
writeInteractor(P object)
writeInteractor.protected abstract void
writeMolecule(Interactor interactor)
writeMolecule.protected void
writeMoleculeDescription(Interactor interactor)
writeMoleculeDescription.protected void
writeMoleculeRef(Interactor interactor)
writeMoleculeRef.protected void
writeNames(P object)
writeNames.protected abstract void
writeOtherAttributes(P object, boolean writeAttributeList)
writeOtherAttributes.protected abstract void
writeParameters(P object)
writeParameters.void
writeParticipant(P object, CvTerm detectionMethod)
writeParticipant.protected abstract void
writeParticipantIdentificationMethods(P object, CvTerm method)
writeParticipantIdentificationMethods.protected abstract void
writeParticipantPool(ParticipantPool pool)
writeParticipantPool.protected abstract void
writeStoichiometry(P object)
writeStoichiometry.protected void
writeXref(P object)
writeXref.protected void
writeXrefFromParticipantXrefs(P object)
writeXrefFromParticipantXrefs.
-
-
-
Constructor Detail
-
AbstractXmlParticipantWriter
public AbstractXmlParticipantWriter(PsiXmlVersion version, XMLStreamWriter writer, PsiXmlObjectCache objectIndex)
Constructor for AbstractXmlParticipantWriter.
- Parameters:
version
- aPsiXmlVersion
object.writer
- aXMLStreamWriter
object.objectIndex
- aPsiXmlObjectCache
object.
-
-
Method Detail
-
getAliasWriter
public PsiXmlElementWriter<Alias> getAliasWriter()
Getter for the field
aliasWriter
.- Returns:
- a
PsiXmlElementWriter
object.
-
setAliasWriter
public void setAliasWriter(PsiXmlElementWriter<Alias> aliasWriter)
Setter for the field
aliasWriter
.- Parameters:
aliasWriter
- aPsiXmlElementWriter
object.
-
getXrefWriter
public PsiXmlXrefWriter getXrefWriter()
Getter for the field
xrefWriter
.- Returns:
- a
PsiXmlXrefWriter
object.
-
initialiseXrefWriter
protected abstract void initialiseXrefWriter()
initialiseXrefWriter.
-
setXrefWriter
public void setXrefWriter(PsiXmlXrefWriter xrefWriter)
Setter for the field
xrefWriter
.- Parameters:
xrefWriter
- aPsiXmlXrefWriter
object.
-
getBiologicalRoleWriter
public PsiXmlVariableNameWriter<CvTerm> getBiologicalRoleWriter()
Getter for the field
biologicalRoleWriter
.- Returns:
- a
PsiXmlVariableNameWriter
object.
-
initialiseBiologicalRoleWriter
protected abstract void initialiseBiologicalRoleWriter()
initialiseBiologicalRoleWriter.
-
setBiologicalRoleWriter
public void setBiologicalRoleWriter(PsiXmlVariableNameWriter<CvTerm> biologicalRoleWriter)
Setter for the field
biologicalRoleWriter
.- Parameters:
biologicalRoleWriter
- aPsiXmlVariableNameWriter
object.
-
getAttributeWriter
public PsiXmlElementWriter<Annotation> getAttributeWriter()
Getter for the field
attributeWriter
.- Returns:
- a
PsiXmlElementWriter
object.
-
setAttributeWriter
public void setAttributeWriter(PsiXmlElementWriter<Annotation> attributeWriter)
Setter for the field
attributeWriter
.- Parameters:
attributeWriter
- aPsiXmlElementWriter
object.
-
getInteractorWriter
public PsiXmlElementWriter<Interactor> getInteractorWriter()
Getter for the field
interactorWriter
.- Returns:
- a
PsiXmlElementWriter
object.
-
initialiseInteractorWriter
protected abstract void initialiseInteractorWriter()
initialiseInteractorWriter.
-
setInteractorWriter
public void setInteractorWriter(PsiXmlElementWriter<Interactor> interactorWriter)
Setter for the field
interactorWriter
.- Parameters:
interactorWriter
- aPsiXmlElementWriter
object.
-
getFeatureWriter
public PsiXmlElementWriter<F> getFeatureWriter()
Getter for the field
featureWriter
.- Returns:
- a
PsiXmlElementWriter
object.
-
initialiseFeatureWriter
protected abstract void initialiseFeatureWriter()
initialiseFeatureWriter.
-
setFeatureWriter
public void setFeatureWriter(PsiXmlElementWriter<F> featureWriter)
Setter for the field
featureWriter
.- Parameters:
featureWriter
- aPsiXmlElementWriter
object.
-
write
public void write(P object) throws MIIOException
write.
- Specified by:
write
in 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:
writeParticipant
in 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:
writeComplexAsInteractor
in 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:
setComplexAsInteractor
in 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
- aParticipantPool
object.- Throws:
XMLStreamException
- if any.
-
writeMolecule
protected abstract void writeMolecule(Interactor interactor) throws XMLStreamException
writeMolecule.
- Parameters:
interactor
- aInteractor
object.- 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
- aCvTerm
object.- 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
- aInteractor
object.- Throws:
XMLStreamException
- if any.
-
writeMoleculeDescription
protected void writeMoleculeDescription(Interactor interactor) throws XMLStreamException
writeMoleculeDescription.
- Parameters:
interactor
- aInteractor
object.- Throws:
XMLStreamException
- if any.
-
getStreamWriter
protected XMLStreamWriter getStreamWriter()
Getter for the field
streamWriter
.- Returns:
- a
XMLStreamWriter
object.
-
getObjectIndex
protected PsiXmlObjectCache getObjectIndex()
Getter for the field
objectIndex
.- Returns:
- a
PsiXmlObjectCache
object.
-
getVersion
protected PsiXmlVersion getVersion()
-
-