org.openprovenance.prov.sql.Other Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of prov-sql Show documentation
Show all versions of prov-sql Show documentation
Java Objects representing the PROV model, XML serialiser/deserialiser for them, and ORM mapping generated by HyperJaxb.
The newest version!
package org.openprovenance.prov.sql;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.JoinColumn;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import org.openprovenance.prov.xml.builder.Equals;
import org.openprovenance.prov.xml.builder.HashCode;
import org.openprovenance.prov.xml.builder.ToString;
import org.openprovenance.prov.model.DOMProcessing;
import org.openprovenance.prov.model.ProvUtilities;
import org.openprovenance.prov.model.QualifiedName;
/**
* Java class for Other complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Other">
* <simpleContent>
* <extension base="<http://www.w3.org/ns/prov#>TypedValue">
* </extension>
* </simpleContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Other")
@Entity(name = "Other")
@Table(name = "OTHER")
public class Other
extends TypedValue
implements Equals, HashCode, ToString, org.openprovenance.prov.model.Other, org.openprovenance.prov.model.Attribute
{
QualifiedName elementName;
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = {
CascadeType.ALL
})
@JoinColumn(name = "ELEMENT")
public QualifiedName getElementName() {
return elementName;
}
public void setElementName(QualifiedName elementName) {
this.elementName=elementName;
}
private static final AttributeKind OTHER_KIND = org.openprovenance.prov.model.Attribute.AttributeKind.OTHER;
@Transient
public AttributeKind getKind() {
return OTHER_KIND;
}
public String toNotationString() {
return DOMProcessing.qualifiedNameToString(getElementName()) + " = " + ProvUtilities.valueToNotationString(getValue(), getType());
}
}