org.openprovenance.prov.xml.QualifiedNameAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of prov-xml Show documentation
Show all versions of prov-xml Show documentation
Java Objects representing the PROV model and an XML serialiser/deserialiser for them. Classes were initially generated by JAXB, from the XML schema for PROV, and over time edited by hand.
package org.openprovenance.prov.xml;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import javax.xml.namespace.QName;
public class QualifiedNameAdapter extends XmlAdapter {
final ProvFactory pf=new ProvFactory();
@Override
public QName marshal(org.openprovenance.prov.model.QualifiedName qualifiedName) throws Exception {
if (qualifiedName==null) {
return null;
} else {
return qualifiedName.toQName();
}
}
@Override
public QualifiedName unmarshal(QName q) throws Exception {
if (q==null) {
return null;
} else {
QualifiedName qq=new QualifiedName(q);
return qq;
}
}
}