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

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

Go to download

Java Objects representing the PROV model, XML serialiser/deserialiser for them, and ORM mapping generated by HyperJaxb.

There is a newer version: 1.0.0
Show newest version
package org.openprovenance.prov.sql;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;

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.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;



/**
 * 

Java class for LangString complex type. * *

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

 * <complexType name="LangString">
 *   <simpleContent>
 *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
 *       <attribute ref="{http://www.w3.org/XML/1998/namespace}lang"/>
 *     </extension>
 *   </simpleContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "LangString", propOrder = { "value" }) @Entity(name = "LangString") @Table(name = "INTERNATIONALIZEDSTRING") @Inheritance(strategy = InheritanceType.JOINED) public class InternationalizedString implements Equals, HashCode, ToString, org.openprovenance.prov.model.LangString { @XmlValue protected String value; @XmlAttribute(name = "lang", namespace = "http://www.w3.org/XML/1998/namespace") protected String lang; @XmlAttribute(name = "pk") protected Long pk; /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ @Basic @Column(name = "VALUE_", length = 255) public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } /** * Gets the value of the lang property. * * @return * possible object is * {@link String } * */ @Basic @Column(name = "LANG") public String getLang() { return lang; } /** * Sets the value of the lang property. * * @param value * allowed object is * {@link String } * */ public void setLang(String value) { this.lang = value; } /** * Gets the value of the pk property. * * @return * possible object is * {@link Long } * */ @Id @Column(name = "PK") @GeneratedValue(strategy = GenerationType.AUTO) public Long getPk() { return pk; } /** * Sets the value of the pk property. * * @param value * allowed object is * {@link Long } * */ public void setPk(Long value) { this.pk = value; } public void equals(Object object, EqualsBuilder equalsBuilder) { if (!(object instanceof InternationalizedString)) { equalsBuilder.appendSuper(false); return ; } if (this == object) { return ; } final InternationalizedString that = ((InternationalizedString) object); equalsBuilder.append(this.getValue(), that.getValue()); equalsBuilder.append(this.getLang(), that.getLang()); } public boolean equals(Object object) { if (!(object instanceof InternationalizedString)) { 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.getValue()); hashCodeBuilder.append(this.getLang()); } public int hashCode() { final HashCodeBuilder hashCodeBuilder = new JAXBHashCodeBuilder(); hashCode(hashCodeBuilder); return hashCodeBuilder.toHashCode(); } public void toString(ToStringBuilder toStringBuilder) { { String theValue; theValue = this.getValue(); toStringBuilder.append("value", theValue); } { String theLang; theLang = this.getLang(); toStringBuilder.append("lang", theLang); } } public String toString() { final ToStringBuilder toStringBuilder = new JAXBToStringBuilder(this); toString(toStringBuilder); return toStringBuilder.toString(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy