public class DataCiteXmlMapper
extends java.lang.Object
MetaData object to a valid DataCite XML
document.| Constructor and Description |
|---|
DataCiteXmlMapper(PrimaryDataEntityVersion version)
Constructor to set the
MetaData for this
DataCiteXmlMapper. |
| Modifier and Type | Method and Description |
|---|---|
javax.xml.bind.Marshaller |
createXmlMarshaller()
Generate a JAXB-
Marshaller for a XmlResource object. |
XmlResource |
createXmlResource()
Create a
XmlResource from the given MetaData and validate
the Document against the DataCite Schema before return. |
protected MetaData |
getMetaData()
Getter for the
MetaData of this DataCiteXmlMapper. |
protected PrimaryDataEntityVersion |
getVersion()
Getter for the
PrimaryDataEntityVersion of this
DataCiteXmlMapper. |
void |
validateSchema(XmlResource resource)
Validate the
MetaData schema of the generated XmlResource
. |
public DataCiteXmlMapper(PrimaryDataEntityVersion version)
MetaData for this
DataCiteXmlMapper.version - the PrimaryDataEntityVersion to create DataCite xml.public javax.xml.bind.Marshaller createXmlMarshaller()
throws EdalPublicationMetaDataException
Marshaller for a XmlResource object.Marshaller.EdalPublicationMetaDataException - if unable to initialize Marshaller.public XmlResource createXmlResource() throws EdalPublicationMetaDataException
XmlResource from the given MetaData and validate
the Document against the DataCite Schema before return.XmlResource.EdalPublicationMetaDataException - if unable to create XmlResource.protected MetaData getMetaData()
MetaData of this DataCiteXmlMapper.MetaData.protected PrimaryDataEntityVersion getVersion()
PrimaryDataEntityVersion of this
DataCiteXmlMapper.PrimaryDataEntityVersion to this
DataCiteXmlMapper.public void validateSchema(XmlResource resource) throws EdalPublicationMetaDataException
MetaData schema of the generated XmlResource
.resource - the XmlResource to check.EdalPublicationMetaDataException - if validation failed.