Class AbstractXmlSourceWriter
- java.lang.Object
-
- psidev.psi.mi.jami.xml.io.writer.elements.impl.AbstractXmlSourceWriter
-
- All Implemented Interfaces:
PsiXmlElementWriter<Source>,PsiXmlSourceWriter
- Direct Known Subclasses:
XmlSourceWriter,XmlSourceWriter
public abstract class AbstractXmlSourceWriter extends Object implements PsiXmlSourceWriter
Abstract class for writer of a source in an entry.- Since:
11/11/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AbstractXmlSourceWriter(XMLStreamWriter writer)Constructor for AbstractXmlSourceWriter.
-
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.XMLGregorianCalendargetDefaultReleaseDate()getDefaultReleaseDate.PsiXmlElementWriter<Publication>getPublicationWriter()Getter for the fieldpublicationWriter.protected XMLStreamWritergetStreamWriter()Getter for the fieldstreamWriter.PsiXmlXrefWritergetXrefWriter()Getter for the fieldxrefWriter.protected abstract voidinitialisePublicationWriter()initialisePublicationWriter.protected voidinitialiseXrefWriter()initialiseXrefWriter.voidsetAliasWriter(PsiXmlElementWriter<Alias> aliasWriter)Setter for the fieldaliasWriter.voidsetAttributeWriter(PsiXmlElementWriter<Annotation> attributeWriter)Setter for the fieldattributeWriter.voidsetDefaultReleaseDate(XMLGregorianCalendar date)Sets the default release datevoidsetPublicationWriter(PsiXmlElementWriter<Publication> publicationWriter)Setter for the fieldpublicationWriter.voidsetXrefWriter(PsiXmlXrefWriter xrefWriter)Setter for the fieldxrefWriter.voidwrite(Source object)write.protected voidwriteAttributes(Source object)writeAttributes.protected voidwriteBibRef(Source object)writeBibRef.protected voidwriteNames(Source object)writeNames.protected voidwriteReleaseAttributes(Source object)writeReleaseAttributes.protected voidwriteXref(Source object)writeXref.protected voidwriteXrefFromSourceIdentifiers(Source object)writeXrefFromSourceIdentifiers.protected voidwriteXrefFromSourceXrefs(Source object)writeXrefFromSourceXrefs.
-
-
-
Constructor Detail
-
AbstractXmlSourceWriter
public AbstractXmlSourceWriter(XMLStreamWriter writer)
Constructor for AbstractXmlSourceWriter.
- Parameters:
writer- aXMLStreamWriterobject.
-
-
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 void initialiseXrefWriter()
initialiseXrefWriter.
-
setXrefWriter
public void setXrefWriter(PsiXmlXrefWriter xrefWriter)
Setter for the field
xrefWriter.- Parameters:
xrefWriter- aPsiXmlXrefWriterobject.
-
getPublicationWriter
public PsiXmlElementWriter<Publication> getPublicationWriter()
Getter for the field
publicationWriter.- Returns:
- a
PsiXmlElementWriterobject.
-
initialisePublicationWriter
protected abstract void initialisePublicationWriter()
initialisePublicationWriter.
-
setPublicationWriter
public void setPublicationWriter(PsiXmlElementWriter<Publication> publicationWriter)
Setter for the field
publicationWriter.- Parameters:
publicationWriter- aPsiXmlElementWriterobject.
-
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.
-
write
public void write(Source object) throws MIIOException
write.
- Specified by:
writein interfacePsiXmlElementWriter<Source>- Parameters:
object- a T object.- Throws:
MIIOException- if any.
-
writeAttributes
protected void writeAttributes(Source object) throws XMLStreamException
writeAttributes.
- Parameters:
object- aSourceobject.- Throws:
XMLStreamException- if any.
-
writeXref
protected void writeXref(Source object) throws XMLStreamException
writeXref.
- Parameters:
object- aSourceobject.- Throws:
XMLStreamException- if any.
-
writeBibRef
protected void writeBibRef(Source object)
writeBibRef.
- Parameters:
object- aSourceobject.
-
writeNames
protected void writeNames(Source object) throws XMLStreamException
writeNames.
- Parameters:
object- aSourceobject.- Throws:
XMLStreamException- if any.
-
writeReleaseAttributes
protected void writeReleaseAttributes(Source object) throws XMLStreamException
writeReleaseAttributes.
- Parameters:
object- aSourceobject.- Throws:
XMLStreamException- if any.
-
writeXrefFromSourceXrefs
protected void writeXrefFromSourceXrefs(Source object) throws XMLStreamException
writeXrefFromSourceXrefs.
- Parameters:
object- aSourceobject.- Throws:
XMLStreamException- if any.
-
writeXrefFromSourceIdentifiers
protected void writeXrefFromSourceIdentifiers(Source object) throws XMLStreamException
writeXrefFromSourceIdentifiers.
- Parameters:
object- aSourceobject.- Throws:
XMLStreamException- if any.
-
getStreamWriter
protected XMLStreamWriter getStreamWriter()
Getter for the field
streamWriter.- Returns:
- a
XMLStreamWriterobject.
-
getDefaultReleaseDate
public XMLGregorianCalendar getDefaultReleaseDate()
getDefaultReleaseDate.
- Specified by:
getDefaultReleaseDatein interfacePsiXmlSourceWriter- Returns:
- the default release date. Can be null
-
setDefaultReleaseDate
public void setDefaultReleaseDate(XMLGregorianCalendar date)
Sets the default release date- Specified by:
setDefaultReleaseDatein interfacePsiXmlSourceWriter- Parameters:
date- aXMLGregorianCalendarobject.
-
-