![JAR search and dependency download from the Maven repository](/logo.png)
org.openestate.io.openimmo.xml.ProvisionTeilen Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of OpenEstate-IO-OpenImmo Show documentation
Show all versions of OpenEstate-IO-OpenImmo Show documentation
OpenEstate-IO-OpenImmo is a Java library to read and write real estate data in the OpenImmo format.
package org.openestate.io.openimmo.xml;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import org.jvnet.jaxb2_commons.lang.CopyStrategy2;
import org.jvnet.jaxb2_commons.lang.CopyTo2;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* Java class for <provision_teilen> element.
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"content"
})
@XmlRootElement(name = "provision_teilen")
public class ProvisionTeilen implements Cloneable, CopyTo2, Equals2, ToString2
{
@XmlValue
protected String content;
@XmlAttribute(name = "wert")
protected ProvisionTeilen.Wert wert;
/**
* Gets the value of the content property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getContent() {
return content;
}
/**
* Sets the value of the content property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setContent(String value) {
this.content = value;
}
/**
* Gets the value of the wert property.
*
* @return
* possible object is
* {@link ProvisionTeilen.Wert }
*
*/
public ProvisionTeilen.Wert getWert() {
return wert;
}
/**
* Sets the value of the wert property.
*
* @param value
* allowed object is
* {@link ProvisionTeilen.Wert }
*
*/
public void setWert(ProvisionTeilen.Wert value) {
this.wert = value;
}
public String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
{
String theContent;
theContent = this.getContent();
strategy.appendField(locator, this, "content", buffer, theContent, (this.content!= null));
}
{
ProvisionTeilen.Wert theWert;
theWert = this.getWert();
strategy.appendField(locator, this, "wert", buffer, theWert, (this.wert!= null));
}
return buffer;
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof ProvisionTeilen) {
final ProvisionTeilen copy = ((ProvisionTeilen) draftCopy);
{
Boolean contentShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.content!= null));
if (contentShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceContent;
sourceContent = this.getContent();
String copyContent = ((String) strategy.copy(LocatorUtils.property(locator, "content", sourceContent), sourceContent, (this.content!= null)));
copy.setContent(copyContent);
} else {
if (contentShouldBeCopiedAndSet == Boolean.FALSE) {
copy.content = null;
}
}
}
{
Boolean wertShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.wert!= null));
if (wertShouldBeCopiedAndSet == Boolean.TRUE) {
ProvisionTeilen.Wert sourceWert;
sourceWert = this.getWert();
ProvisionTeilen.Wert copyWert = ((ProvisionTeilen.Wert) strategy.copy(LocatorUtils.property(locator, "wert", sourceWert), sourceWert, (this.wert!= null)));
copy.setWert(copyWert);
} else {
if (wertShouldBeCopiedAndSet == Boolean.FALSE) {
copy.wert = null;
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new ProvisionTeilen();
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final ProvisionTeilen that = ((ProvisionTeilen) object);
{
String lhsContent;
lhsContent = this.getContent();
String rhsContent;
rhsContent = that.getContent();
if (!strategy.equals(LocatorUtils.property(thisLocator, "content", lhsContent), LocatorUtils.property(thatLocator, "content", rhsContent), lhsContent, rhsContent, (this.content!= null), (that.content!= null))) {
return false;
}
}
{
ProvisionTeilen.Wert lhsWert;
lhsWert = this.getWert();
ProvisionTeilen.Wert rhsWert;
rhsWert = that.getWert();
if (!strategy.equals(LocatorUtils.property(thisLocator, "wert", lhsWert), LocatorUtils.property(thatLocator, "wert", rhsWert), lhsWert, rhsWert, (this.wert!= null), (that.wert!= null))) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
/**
* Java enum for wert attribute in <provision_teilen> elements.
*/
@XmlType(name = "")
@XmlEnum
public enum Wert {
@XmlEnumValue("absolut")
ABSOLUT("absolut"),
@XmlEnumValue("prozent")
PROZENT("prozent"),
@XmlEnumValue("text")
TEXT("text");
private final String value;
Wert(String v) {
value = v;
}
public String value() {
return value;
}
public static ProvisionTeilen.Wert fromValue(String v) {
for (ProvisionTeilen.Wert c: ProvisionTeilen.Wert.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy