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

org.javastro.ivoa.entities.resource.tap.LanguageFeature Maven / Gradle / Ivy


package org.javastro.ivoa.entities.resource.tap;

import java.util.HashMap;
import java.util.Map;
import javax.xml.namespace.QName;
import com.kscs.util.jaxb.Buildable;
import com.kscs.util.jaxb.Copyable;
import com.kscs.util.jaxb.PartialCopyable;
import com.kscs.util.jaxb.PropertyTree;
import com.kscs.util.jaxb.PropertyTreeUse;
import com.kscs.util.jaxb.PropertyVisitor;
import com.kscs.util.jaxb.SingleProperty;
import com.kscs.util.jaxb.SinglePropertyInfo;
import com.kscs.util.jaxb.SinglePropertyInfo;
import jakarta.annotation.Generated;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.adapters.CollapsedStringAdapter;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.jvnet.jaxb.lang.JAXBMergeStrategy;
import org.jvnet.jaxb.lang.JAXBToStringStrategy;
import org.jvnet.jaxb.lang.MergeFrom;
import org.jvnet.jaxb.lang.MergeStrategy;
import org.jvnet.jaxb.lang.ToString;
import org.jvnet.jaxb.lang.ToStringStrategy;
import org.jvnet.jaxb.locator.ObjectLocator;
import org.jvnet.jaxb.locator.util.LocatorUtils;


/**
 * A non-standard or non-mandatory feature implemented
 *       	by the language..
 * 
 * 

Java class for LanguageFeature complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *         
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "LanguageFeature", propOrder = { "form", "description" }) @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public class LanguageFeature implements Cloneable, Copyable, PartialCopyable, MergeFrom, ToString { /** * The syntax for the content of this element is defined by the * type attribute of its parent language list. * */ @XmlElement(required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlSchemaType(name = "token") @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") protected String form; /** * Human-readable freeform documentation for the language feature. * */ @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") protected String description; @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") protected transient LanguageFeature.Modifier __cachedModifier__; /** * Default no-arg constructor * */ public LanguageFeature() { super(); } /** * Fully-initialising value constructor * */ public LanguageFeature(final String form, final String description) { this.form = form; this.description = description; } /** * The syntax for the content of this element is defined by the * type attribute of its parent language list. * * @return * possible object is * {@link String } * */ @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public String getForm() { return form; } /** * Sets the value of the form property. * * @param value * allowed object is * {@link String } * * @see #getForm() */ @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public void setForm(String value) { this.form = value; } /** * Human-readable freeform documentation for the language feature. * * @return * possible object is * {@link String } * */ @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public String getDescription() { return description; } /** * Sets the value of the description property. * * @param value * allowed object is * {@link String } * * @see #getDescription() */ @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public void setDescription(String value) { this.description = value; } @Override @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public boolean equals(Object object) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final LanguageFeature that = ((LanguageFeature) object); { String leftForm; leftForm = this.getForm(); String rightForm; rightForm = that.getForm(); if (this.form!= null) { if (that.form!= null) { if (!leftForm.equals(rightForm)) { return false; } } else { return false; } } else { if (that.form!= null) { return false; } } } { String leftDescription; leftDescription = this.getDescription(); String rightDescription; rightDescription = that.getDescription(); if (this.description!= null) { if (that.description!= null) { if (!leftDescription.equals(rightDescription)) { return false; } } else { return false; } } else { if (that.description!= null) { return false; } } } return true; } @Override @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public int hashCode() { int currentHashCode = 1; { currentHashCode = (currentHashCode* 31); String theForm; theForm = this.getForm(); if (this.form!= null) { currentHashCode += theForm.hashCode(); } } { currentHashCode = (currentHashCode* 31); String theDescription; theDescription = this.getDescription(); if (this.description!= null) { currentHashCode += theDescription.hashCode(); } } return currentHashCode; } @Override @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.getInstance(); final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } @Override @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } @Override @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { String theForm; theForm = this.getForm(); strategy.appendField(locator, this, "form", buffer, theForm, (this.form!= null)); } { String theDescription; theDescription = this.getDescription(); strategy.appendField(locator, this, "description", buffer, theDescription, (this.description!= null)); } return buffer; } @Override @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public void mergeFrom(Object left, Object right) { final MergeStrategy strategy = JAXBMergeStrategy.getInstance(); mergeFrom(null, null, left, right, strategy); } @Override @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public void mergeFrom(ObjectLocator leftLocator, ObjectLocator rightLocator, Object left, Object right, MergeStrategy strategy) { if (right instanceof LanguageFeature) { final LanguageFeature target = this; final LanguageFeature leftObject = ((LanguageFeature) left); final LanguageFeature rightObject = ((LanguageFeature) right); { Boolean formShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.form!= null), (rightObject.form!= null)); if (formShouldBeMergedAndSet == Boolean.TRUE) { String lhsForm; lhsForm = leftObject.getForm(); String rhsForm; rhsForm = rightObject.getForm(); String mergedForm = ((String) strategy.merge(LocatorUtils.property(leftLocator, "form", lhsForm), LocatorUtils.property(rightLocator, "form", rhsForm), lhsForm, rhsForm, (leftObject.form!= null), (rightObject.form!= null))); target.setForm(mergedForm); } else { if (formShouldBeMergedAndSet == Boolean.FALSE) { target.form = null; } } } { Boolean descriptionShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.description!= null), (rightObject.description!= null)); if (descriptionShouldBeMergedAndSet == Boolean.TRUE) { String lhsDescription; lhsDescription = leftObject.getDescription(); String rhsDescription; rhsDescription = rightObject.getDescription(); String mergedDescription = ((String) strategy.merge(LocatorUtils.property(leftLocator, "description", lhsDescription), LocatorUtils.property(rightLocator, "description", rhsDescription), lhsDescription, rhsDescription, (leftObject.description!= null), (rightObject.description!= null))); target.setDescription(mergedDescription); } else { if (descriptionShouldBeMergedAndSet == Boolean.FALSE) { target.description = null; } } } } } @Override @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public Object createNewInstance() { return new LanguageFeature(); } @Override @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public LanguageFeature clone() { final LanguageFeature _newObject; try { _newObject = ((LanguageFeature) super.clone()); } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } return _newObject; } @Override @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public LanguageFeature createCopy() { final LanguageFeature _newObject; try { _newObject = ((LanguageFeature) super.clone()); } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } _newObject.form = this.form; _newObject.description = this.description; return _newObject; } @Override @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public LanguageFeature createCopy(final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) { final LanguageFeature _newObject; try { _newObject = ((LanguageFeature) super.clone()); } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } final PropertyTree formPropertyTree = ((_propertyTree == null)?null:_propertyTree.get("form")); if (((_propertyTreeUse == PropertyTreeUse.INCLUDE)?(formPropertyTree!= null):((formPropertyTree == null)||(!formPropertyTree.isLeaf())))) { _newObject.form = this.form; } final PropertyTree descriptionPropertyTree = ((_propertyTree == null)?null:_propertyTree.get("description")); if (((_propertyTreeUse == PropertyTreeUse.INCLUDE)?(descriptionPropertyTree!= null):((descriptionPropertyTree == null)||(!descriptionPropertyTree.isLeaf())))) { _newObject.description = this.description; } return _newObject; } @Override @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public LanguageFeature copyExcept(final PropertyTree _propertyTree) { return createCopy(_propertyTree, PropertyTreeUse.EXCLUDE); } @Override @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public LanguageFeature copyOnly(final PropertyTree _propertyTree) { return createCopy(_propertyTree, PropertyTreeUse.INCLUDE); } @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public LanguageFeature.Modifier modifier() { if (null == this.__cachedModifier__) { this.__cachedModifier__ = new LanguageFeature.Modifier(); } return ((LanguageFeature.Modifier) this.__cachedModifier__); } /** * Copies all state of this object to a builder. This method is used by the copyOf * method and should not be called directly by client code. * * @param _other * A builder instance to which the state of this object will be copied. */ @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public<_B >void copyTo(final LanguageFeature.Builder<_B> _other) { _other.form = this.form; _other.description = this.description; } @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public<_B >LanguageFeature.Builder<_B> newCopyBuilder(final _B _parentBuilder) { return new LanguageFeature.Builder<_B>(_parentBuilder, this, true); } @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public LanguageFeature.Builder newCopyBuilder() { return newCopyBuilder(null); } @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public static LanguageFeature.Builder builder() { return new LanguageFeature.Builder<>(null, null, false); } @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public static<_B >LanguageFeature.Builder<_B> copyOf(final LanguageFeature _other) { final LanguageFeature.Builder<_B> _newBuilder = new LanguageFeature.Builder<>(null, null, false); _other.copyTo(_newBuilder); return _newBuilder; } /** * Copies all state of this object to a builder. This method is used by the copyOf * method and should not be called directly by client code. * * @param _other * A builder instance to which the state of this object will be copied. */ @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public<_B >void copyTo(final LanguageFeature.Builder<_B> _other, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) { final PropertyTree formPropertyTree = ((_propertyTree == null)?null:_propertyTree.get("form")); if (((_propertyTreeUse == PropertyTreeUse.INCLUDE)?(formPropertyTree!= null):((formPropertyTree == null)||(!formPropertyTree.isLeaf())))) { _other.form = this.form; } final PropertyTree descriptionPropertyTree = ((_propertyTree == null)?null:_propertyTree.get("description")); if (((_propertyTreeUse == PropertyTreeUse.INCLUDE)?(descriptionPropertyTree!= null):((descriptionPropertyTree == null)||(!descriptionPropertyTree.isLeaf())))) { _other.description = this.description; } } @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public<_B >LanguageFeature.Builder<_B> newCopyBuilder(final _B _parentBuilder, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) { return new LanguageFeature.Builder<_B>(_parentBuilder, this, true, _propertyTree, _propertyTreeUse); } @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public LanguageFeature.Builder newCopyBuilder(final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) { return newCopyBuilder(null, _propertyTree, _propertyTreeUse); } @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public static<_B >LanguageFeature.Builder<_B> copyOf(final LanguageFeature _other, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) { final LanguageFeature.Builder<_B> _newBuilder = new LanguageFeature.Builder<>(null, null, false); _other.copyTo(_newBuilder, _propertyTree, _propertyTreeUse); return _newBuilder; } @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public static LanguageFeature.Builder copyExcept(final LanguageFeature _other, final PropertyTree _propertyTree) { return copyOf(_other, _propertyTree, PropertyTreeUse.EXCLUDE); } @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public static LanguageFeature.Builder copyOnly(final LanguageFeature _other, final PropertyTree _propertyTree) { return copyOf(_other, _propertyTree, PropertyTreeUse.INCLUDE); } @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public LanguageFeature visit(final PropertyVisitor _visitor_) { _visitor_.visit(this); _visitor_.visit(new SingleProperty<>(LanguageFeature.PropInfo.FORM, this)); _visitor_.visit(new SingleProperty<>(LanguageFeature.PropInfo.DESCRIPTION, this)); return this; } public static class Builder<_B >implements Buildable { protected final _B _parentBuilder; protected final LanguageFeature _storedValue; private String form; private String description; public Builder(final _B _parentBuilder, final LanguageFeature _other, final boolean _copy) { this._parentBuilder = _parentBuilder; if (_other!= null) { if (_copy) { _storedValue = null; this.form = _other.form; this.description = _other.description; } else { _storedValue = _other; } } else { _storedValue = null; } } public Builder(final _B _parentBuilder, final LanguageFeature _other, final boolean _copy, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) { this._parentBuilder = _parentBuilder; if (_other!= null) { if (_copy) { _storedValue = null; final PropertyTree formPropertyTree = ((_propertyTree == null)?null:_propertyTree.get("form")); if (((_propertyTreeUse == PropertyTreeUse.INCLUDE)?(formPropertyTree!= null):((formPropertyTree == null)||(!formPropertyTree.isLeaf())))) { this.form = _other.form; } final PropertyTree descriptionPropertyTree = ((_propertyTree == null)?null:_propertyTree.get("description")); if (((_propertyTreeUse == PropertyTreeUse.INCLUDE)?(descriptionPropertyTree!= null):((descriptionPropertyTree == null)||(!descriptionPropertyTree.isLeaf())))) { this.description = _other.description; } } else { _storedValue = _other; } } else { _storedValue = null; } } public _B end() { return this._parentBuilder; } protected<_P extends LanguageFeature >_P init(final _P _product) { _product.form = this.form; _product.description = this.description; return _product; } /** * Sets the new value of "form" (any previous value will be replaced) * * @param form * New value of the "form" property. */ public LanguageFeature.Builder<_B> withForm(final String form) { this.form = form; return this; } /** * Sets the new value of "description" (any previous value will be replaced) * * @param description * New value of the "description" property. */ public LanguageFeature.Builder<_B> withDescription(final String description) { this.description = description; return this; } @Override public LanguageFeature build() { if (_storedValue == null) { return this.init(new LanguageFeature()); } else { return ((LanguageFeature) _storedValue); } } public LanguageFeature.Builder<_B> copyOf(final LanguageFeature _other) { _other.copyTo(this); return this; } public LanguageFeature.Builder<_B> copyOf(final LanguageFeature.Builder _other) { return copyOf(_other.build()); } } public class Modifier { public void setForm(final String form) { LanguageFeature.this.setForm(form); } public void setDescription(final String description) { LanguageFeature.this.setDescription(description); } } public static class PropInfo { public static final transient SinglePropertyInfo FORM = new SinglePropertyInfo("form", LanguageFeature.class, String.class, false, null, new QName("", "form"), new QName("http://www.w3.org/2001/XMLSchema", "token"), false) { @Override public String get(final LanguageFeature _instance_) { return ((_instance_ == null)?null:_instance_.form); } @Override public void set(final LanguageFeature _instance_, final String _value_) { if (_instance_!= null) { _instance_.form = _value_; } } } ; public static final transient SinglePropertyInfo DESCRIPTION = new SinglePropertyInfo("description", LanguageFeature.class, String.class, false, null, new QName("", "description"), new QName("http://www.w3.org/2001/XMLSchema", "string"), false) { @Override public String get(final LanguageFeature _instance_) { return ((_instance_ == null)?null:_instance_.description); } @Override public void set(final LanguageFeature _instance_, final String _value_) { if (_instance_!= null) { _instance_.description = _value_; } } } ; } public static class Select extends LanguageFeature.Selector { Select() { super(null, null, null); } public static LanguageFeature.Select _root() { return new LanguageFeature.Select(); } } public static class Selector , TParent > extends com.kscs.util.jaxb.Selector { private com.kscs.util.jaxb.Selector> form = null; private com.kscs.util.jaxb.Selector> description = null; public Selector(final TRoot root, final TParent parent, final String propertyName) { super(root, parent, propertyName); } @Override public Map buildChildren() { final Map products = new HashMap<>(); products.putAll(super.buildChildren()); if (this.form!= null) { products.put("form", this.form.init()); } if (this.description!= null) { products.put("description", this.description.init()); } return products; } public com.kscs.util.jaxb.Selector> form() { return ((this.form == null)?this.form = new com.kscs.util.jaxb.Selector<>(this._root, this, "form"):this.form); } public com.kscs.util.jaxb.Selector> description() { return ((this.description == null)?this.description = new com.kscs.util.jaxb.Selector<>(this._root, this, "description"):this.description); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy