Class AbstractXmlPublicationWriter
- java.lang.Object
-
- psidev.psi.mi.jami.xml.io.writer.elements.impl.abstracts.AbstractXmlPublicationWriter
-
- All Implemented Interfaces:
PsiXmlElementWriter<Publication>
,PsiXmlPublicationWriter
- Direct Known Subclasses:
XmlPublicationWriter
,XmlPublicationWriter
public abstract class AbstractXmlPublicationWriter extends Object implements PsiXmlPublicationWriter
Abstract Xml writer for publications (bibref objects)- Since:
11/11/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AbstractXmlPublicationWriter(XMLStreamWriter writer)
Constructor for AbstractXmlPublicationWriter.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PsiXmlElementWriter<Annotation>
getAttributeWriter()
Getter for the fieldattributeWriter
.protected XMLStreamWriter
getStreamWriter()
Getter for the fieldstreamWriter
.PsiXmlXrefWriter
getXrefWriter()
Getter for the fieldxrefWriter
.protected abstract void
initialiseXrefWriter()
initialiseXrefWriter.void
setAttributeWriter(PsiXmlElementWriter<Annotation> attributeWriter)
Setter for the fieldattributeWriter
.void
setXrefWriter(PsiXmlXrefWriter xrefWriter)
Setter for the fieldxrefWriter
.void
write(Publication object)
write.void
writeAllPublicationAttributes(Publication object)
writeAllPublicationAttributes.void
writeAllPublicationAttributes(Publication object, Collection<Annotation> attributesToFilter)
writeAllPublicationAttributes.protected void
writeAnnotation(String name, String nameAc, String value)
writeAnnotation.protected abstract void
writeBibrefContent(Publication object)
writeBibrefContent.protected void
writePrimaryRef(PsiXmlXrefWriter writer, Xref ref, String name)
writePrimaryRef.protected void
writePublicationPropertiesAsAttributes(Publication object, boolean hasTitle, boolean hasJournal, boolean hasPublicationDate, boolean hasCurationDepth, boolean hasAuthors)
writePublicationPropertiesAsAttributes.protected void
writeXrefFromPublicationIdentifiers(Publication object)
writeXrefFromPublicationIdentifiers.protected void
writeXrefFromPublicationXrefs(Publication object)
writeXrefFromPublicationXrefs.
-
-
-
Constructor Detail
-
AbstractXmlPublicationWriter
public AbstractXmlPublicationWriter(XMLStreamWriter writer)
Constructor for AbstractXmlPublicationWriter.
- Parameters:
writer
- aXMLStreamWriter
object.
-
-
Method Detail
-
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.
-
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(Publication object) throws MIIOException
write.
- Specified by:
write
in interfacePsiXmlElementWriter<Publication>
- Parameters:
object
- a T object.- Throws:
MIIOException
- if any.
-
writeAllPublicationAttributes
public void writeAllPublicationAttributes(Publication object)
writeAllPublicationAttributes.
- Specified by:
writeAllPublicationAttributes
in interfacePsiXmlPublicationWriter
- Parameters:
object
- aPublication
object.
-
writeAllPublicationAttributes
public void writeAllPublicationAttributes(Publication object, Collection<Annotation> attributesToFilter)
writeAllPublicationAttributes.
- Specified by:
writeAllPublicationAttributes
in interfacePsiXmlPublicationWriter
- Parameters:
object
- aPublication
object.attributesToFilter
- aCollection
object.
-
writePublicationPropertiesAsAttributes
protected void writePublicationPropertiesAsAttributes(Publication object, boolean hasTitle, boolean hasJournal, boolean hasPublicationDate, boolean hasCurationDepth, boolean hasAuthors) throws XMLStreamException
writePublicationPropertiesAsAttributes.
- Parameters:
object
- aPublication
object.hasTitle
- a boolean.hasJournal
- a boolean.hasPublicationDate
- a boolean.hasCurationDepth
- a boolean.hasAuthors
- a boolean.- Throws:
XMLStreamException
- if any.
-
writeAnnotation
protected void writeAnnotation(String name, String nameAc, String value) throws XMLStreamException
writeAnnotation.
- Parameters:
name
- aString
object.nameAc
- aString
object.value
- aString
object.- Throws:
XMLStreamException
- if any.
-
writeXrefFromPublicationXrefs
protected void writeXrefFromPublicationXrefs(Publication object) throws XMLStreamException
writeXrefFromPublicationXrefs.
- Parameters:
object
- aPublication
object.- Throws:
XMLStreamException
- if any.
-
writeXrefFromPublicationIdentifiers
protected void writeXrefFromPublicationIdentifiers(Publication object) throws XMLStreamException
writeXrefFromPublicationIdentifiers.
- Parameters:
object
- aPublication
object.- Throws:
XMLStreamException
- if any.
-
writePrimaryRef
protected void writePrimaryRef(PsiXmlXrefWriter writer, Xref ref, String name) throws XMLStreamException
writePrimaryRef.
- Parameters:
writer
- aPsiXmlXrefWriter
object.ref
- aXref
object.name
- aString
object.- Throws:
XMLStreamException
- if any.
-
writeBibrefContent
protected abstract void writeBibrefContent(Publication object)
writeBibrefContent.
- Parameters:
object
- aPublication
object.
-
getStreamWriter
protected XMLStreamWriter getStreamWriter()
Getter for the field
streamWriter
.- Returns:
- a
XMLStreamWriter
object.
-
-