All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openprovenance.prov.sql.DictionaryMembership Maven / Gradle / Ivy

Go to download

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 java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
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.XmlElement;
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.xml.builder.JAXBEqualsBuilder;
import org.openprovenance.prov.xml.builder.JAXBHashCodeBuilder;
import org.openprovenance.prov.xml.builder.JAXBToStringBuilder;
import org.openprovenance.apache.commons.lang.builder.EqualsBuilder;
import org.openprovenance.apache.commons.lang.builder.HashCodeBuilder;
import org.openprovenance.apache.commons.lang.builder.ToStringBuilder;
import org.openprovenance.prov.model.StatementOrBundle;


/**
 * 

Java class for DictionaryMembership complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType name="DictionaryMembership">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="dictionary" type="{http://www.w3.org/ns/prov#}IDRef"/>
 *         <element name="keyEntityPair" type="{http://www.w3.org/ns/prov#}KeyEntityPair" maxOccurs="unbounded"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "DictionaryMembership", propOrder = { "dictionary", "keyEntityPair" }) @Entity(name = "DictionaryMembership") @Table(name = "DICTIONARYMEMBERSHIP") //@Inheritance(strategy = InheritanceType.JOINED) public class DictionaryMembership extends AStatement implements Equals, HashCode, ToString, org.openprovenance.prov.model.DictionaryMembership { @XmlElement(required = true, type = org.openprovenance.prov.sql.IDRef.class) protected org.openprovenance.prov.model.QualifiedName dictionary; @XmlElement(required = true, type = org.openprovenance.prov.sql.Entry.class) protected List keyEntityPair; /** * Gets the value of the dictionary property. * * @return * possible object is * {@link org.openprovenance.prov.sql.IDRef } * */ @ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = { CascadeType.ALL }) @JoinColumn(name = "DICTIONARY__DICTIONARYMEMBER_0") public org.openprovenance.prov.model.QualifiedName getDictionary() { return dictionary; } /** * Sets the value of the dictionary property. * * @param value * allowed object is * {@link org.openprovenance.prov.sql.IDRef } * */ public void setDictionary(org.openprovenance.prov.model.QualifiedName value) { this.dictionary = value; } /** * Gets the value of the keyEntityPair property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the keyEntityPair property. * *

* For example, to add a new item, do as follows: *

     *    getKeyEntityPair().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link org.openprovenance.prov.sql.Entry } * * */ @Transient public List getKeyEntityPair() { if (keyEntityPair == null) { keyEntityPair = new ArrayList(); } return this.keyEntityPair; } /** * * */ public void setKeyEntityPair(List keyEntityPair) { this.keyEntityPair = keyEntityPair; } public void equals(Object object, EqualsBuilder equalsBuilder) { if (!(object instanceof DictionaryMembership)) { equalsBuilder.appendSuper(false); return ; } if (this == object) { return ; } final DictionaryMembership that = ((DictionaryMembership) object); equalsBuilder.append(this.getDictionary(), that.getDictionary()); equalsBuilder.append(this.getKeyEntityPair(), that.getKeyEntityPair()); } public boolean equals(Object object) { if (!(object instanceof DictionaryMembership)) { return false; } if (this == object) { return true; } final EqualsBuilder equalsBuilder = new JAXBEqualsBuilder(); equals(object, equalsBuilder); return equalsBuilder.isEquals(); } public void hashCode(HashCodeBuilder hashCodeBuilder) { hashCodeBuilder.append(this.getDictionary()); hashCodeBuilder.append(this.getKeyEntityPair()); } public int hashCode() { final HashCodeBuilder hashCodeBuilder = new JAXBHashCodeBuilder(); hashCode(hashCodeBuilder); return hashCodeBuilder.toHashCode(); } public void toString(ToStringBuilder toStringBuilder) { { org.openprovenance.prov.model.QualifiedName theDictionary; theDictionary = this.getDictionary(); toStringBuilder.append("dictionary", theDictionary); } { List theKeyEntityPair; theKeyEntityPair = this.getKeyEntityPair(); toStringBuilder.append("keyEntityPair", theKeyEntityPair); } } public String toString() { final ToStringBuilder toStringBuilder = new JAXBToStringBuilder(this); toString(toStringBuilder); return toStringBuilder.toString(); } @Transient public Kind getKind() { return StatementOrBundle.Kind.PROV_DICTIONARY_MEMBERSHIP; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy