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
.XMLGregorianCalendar
getDefaultReleaseDate()
getDefaultReleaseDate.PsiXmlElementWriter<Publication>
getPublicationWriter()
Getter for the fieldpublicationWriter
.protected XMLStreamWriter
getStreamWriter()
Getter for the fieldstreamWriter
.PsiXmlXrefWriter
getXrefWriter()
Getter for the fieldxrefWriter
.protected abstract void
initialisePublicationWriter()
initialisePublicationWriter.protected void
initialiseXrefWriter()
initialiseXrefWriter.void
setAliasWriter(PsiXmlElementWriter<Alias> aliasWriter)
Setter for the fieldaliasWriter
.void
setAttributeWriter(PsiXmlElementWriter<Annotation> attributeWriter)
Setter for the fieldattributeWriter
.void
setDefaultReleaseDate(XMLGregorianCalendar date)
Sets the default release datevoid
setPublicationWriter(PsiXmlElementWriter<Publication> publicationWriter)
Setter for the fieldpublicationWriter
.void
setXrefWriter(PsiXmlXrefWriter xrefWriter)
Setter for the fieldxrefWriter
.void
write(Source object)
write.protected void
writeAttributes(Source object)
writeAttributes.protected void
writeBibRef(Source object)
writeBibRef.protected void
writeNames(Source object)
writeNames.protected void
writeReleaseAttributes(Source object)
writeReleaseAttributes.protected void
writeXref(Source object)
writeXref.protected void
writeXrefFromSourceIdentifiers(Source object)
writeXrefFromSourceIdentifiers.protected void
writeXrefFromSourceXrefs(Source object)
writeXrefFromSourceXrefs.
-
-
-
Constructor Detail
-
AbstractXmlSourceWriter
public AbstractXmlSourceWriter(XMLStreamWriter writer)
Constructor for AbstractXmlSourceWriter.
- Parameters:
writer
- aXMLStreamWriter
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 void initialiseXrefWriter()
initialiseXrefWriter.
-
setXrefWriter
public void setXrefWriter(PsiXmlXrefWriter xrefWriter)
Setter for the field
xrefWriter
.- Parameters:
xrefWriter
- aPsiXmlXrefWriter
object.
-
getPublicationWriter
public PsiXmlElementWriter<Publication> getPublicationWriter()
Getter for the field
publicationWriter
.- Returns:
- a
PsiXmlElementWriter
object.
-
initialisePublicationWriter
protected abstract void initialisePublicationWriter()
initialisePublicationWriter.
-
setPublicationWriter
public void setPublicationWriter(PsiXmlElementWriter<Publication> publicationWriter)
Setter for the field
publicationWriter
.- Parameters:
publicationWriter
- aPsiXmlElementWriter
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.
-
write
public void write(Source object) throws MIIOException
write.
- Specified by:
write
in interfacePsiXmlElementWriter<Source>
- Parameters:
object
- a T object.- Throws:
MIIOException
- if any.
-
writeAttributes
protected void writeAttributes(Source object) throws XMLStreamException
writeAttributes.
- Parameters:
object
- aSource
object.- Throws:
XMLStreamException
- if any.
-
writeXref
protected void writeXref(Source object) throws XMLStreamException
writeXref.
- Parameters:
object
- aSource
object.- Throws:
XMLStreamException
- if any.
-
writeBibRef
protected void writeBibRef(Source object)
writeBibRef.
- Parameters:
object
- aSource
object.
-
writeNames
protected void writeNames(Source object) throws XMLStreamException
writeNames.
- Parameters:
object
- aSource
object.- Throws:
XMLStreamException
- if any.
-
writeReleaseAttributes
protected void writeReleaseAttributes(Source object) throws XMLStreamException
writeReleaseAttributes.
- Parameters:
object
- aSource
object.- Throws:
XMLStreamException
- if any.
-
writeXrefFromSourceXrefs
protected void writeXrefFromSourceXrefs(Source object) throws XMLStreamException
writeXrefFromSourceXrefs.
- Parameters:
object
- aSource
object.- Throws:
XMLStreamException
- if any.
-
writeXrefFromSourceIdentifiers
protected void writeXrefFromSourceIdentifiers(Source object) throws XMLStreamException
writeXrefFromSourceIdentifiers.
- Parameters:
object
- aSource
object.- Throws:
XMLStreamException
- if any.
-
getStreamWriter
protected XMLStreamWriter getStreamWriter()
Getter for the field
streamWriter
.- Returns:
- a
XMLStreamWriter
object.
-
getDefaultReleaseDate
public XMLGregorianCalendar getDefaultReleaseDate()
getDefaultReleaseDate.
- Specified by:
getDefaultReleaseDate
in interfacePsiXmlSourceWriter
- Returns:
- the default release date. Can be null
-
setDefaultReleaseDate
public void setDefaultReleaseDate(XMLGregorianCalendar date)
Sets the default release date- Specified by:
setDefaultReleaseDate
in interfacePsiXmlSourceWriter
- Parameters:
date
- aXMLGregorianCalendar
object.
-
-