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

org.javastro.ivoa.entities.resource.dataservice.Tableset Maven / Gradle / Ivy


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

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
import com.kscs.util.jaxb.Buildable;
import com.kscs.util.jaxb.CollectionProperty;
import com.kscs.util.jaxb.CollectionPropertyInfo;
import com.kscs.util.jaxb.CollectionPropertyInfo;
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 jakarta.annotation.Generated;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAnyAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlSeeAlso;
import jakarta.xml.bind.annotation.XmlType;
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;


/**
 * The set of tables hosted by a resource.
 * 
 * 

Java class for TableSet complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *       
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "TableSet", propOrder = { "schemas" }) @XmlSeeAlso({ org.javastro.ivoa.entities.vosi.tables.Tableset.class }) @XmlRootElement(name = "tableset", namespace = "http://www.ivoa.net/xml/VOSITables/v1.0") @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public class Tableset implements Cloneable, Copyable, PartialCopyable, MergeFrom, ToString { /** * This aggregation does not need to map to an * actual database, catalogue, or schema, though the * publisher may choose to aggregate along such * designations. Particular service protocols may * require stricter patterns. * */ @XmlElement(name = "schema", required = true) @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") protected List schemas; @XmlAnyAttribute @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") private Map otherAttributes = new HashMap<>(); @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") protected transient Tableset.Modifier __cachedModifier__; /** * Default no-arg constructor * */ public Tableset() { super(); } /** * Fully-initialising value constructor * */ public Tableset(final List schemas, final Map otherAttributes) { this.schemas = schemas; this.otherAttributes = otherAttributes; } /** * This aggregation does not need to map to an * actual database, catalogue, or schema, though the * publisher may choose to aggregate along such * designations. Particular service protocols may * require stricter patterns. * * Gets the value of the schemas 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 schemas property.

* *

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

*
     * getSchemas().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link TableSchema } *

* * * @return * The value of the schemas property. */ @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public List getSchemas() { if (schemas == null) { schemas = new ArrayList<>(); } return this.schemas; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * *

* the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public Map getOtherAttributes() { return otherAttributes; } @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 Tableset that = ((Tableset) object); { List leftSchemas; leftSchemas = (((this.schemas!= null)&&(!this.schemas.isEmpty()))?this.getSchemas():null); List rightSchemas; rightSchemas = (((that.schemas!= null)&&(!that.schemas.isEmpty()))?that.getSchemas():null); if ((this.schemas!= null)&&(!this.schemas.isEmpty())) { if ((that.schemas!= null)&&(!that.schemas.isEmpty())) { if (!leftSchemas.equals(rightSchemas)) { return false; } } else { return false; } } else { if ((that.schemas!= null)&&(!that.schemas.isEmpty())) { 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); List theSchemas; theSchemas = (((this.schemas!= null)&&(!this.schemas.isEmpty()))?this.getSchemas():null); if ((this.schemas!= null)&&(!this.schemas.isEmpty())) { currentHashCode += theSchemas.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) { { List theSchemas; theSchemas = (((this.schemas!= null)&&(!this.schemas.isEmpty()))?this.getSchemas():null); strategy.appendField(locator, this, "schemas", buffer, theSchemas, ((this.schemas!= null)&&(!this.schemas.isEmpty()))); } 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 Tableset) { final Tableset target = this; final Tableset leftObject = ((Tableset) left); final Tableset rightObject = ((Tableset) right); { Boolean schemasShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, ((leftObject.schemas!= null)&&(!leftObject.schemas.isEmpty())), ((rightObject.schemas!= null)&&(!rightObject.schemas.isEmpty()))); if (schemasShouldBeMergedAndSet == Boolean.TRUE) { List lhsSchemas; lhsSchemas = (((leftObject.schemas!= null)&&(!leftObject.schemas.isEmpty()))?leftObject.getSchemas():null); List rhsSchemas; rhsSchemas = (((rightObject.schemas!= null)&&(!rightObject.schemas.isEmpty()))?rightObject.getSchemas():null); List mergedSchemas = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "schemas", lhsSchemas), LocatorUtils.property(rightLocator, "schemas", rhsSchemas), lhsSchemas, rhsSchemas, ((leftObject.schemas!= null)&&(!leftObject.schemas.isEmpty())), ((rightObject.schemas!= null)&&(!rightObject.schemas.isEmpty())))); target.schemas = null; if (mergedSchemas!= null) { List uniqueSchemasl = target.getSchemas(); uniqueSchemasl.addAll(mergedSchemas); } } else { if (schemasShouldBeMergedAndSet == Boolean.FALSE) { target.schemas = 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 Tableset(); } @Override @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public Tableset clone() { final Tableset _newObject; try { _newObject = ((Tableset) super.clone()); } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } if (this.schemas == null) { _newObject.schemas = null; } else { _newObject.schemas = new ArrayList<>(); for (TableSchema _item: this.schemas) { _newObject.schemas.add(((_item == null)?null:_item.clone())); } } 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 Tableset createCopy() { final Tableset _newObject; try { _newObject = ((Tableset) super.clone()); } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } if (this.schemas == null) { _newObject.schemas = null; } else { _newObject.schemas = new ArrayList<>(); for (TableSchema _item: this.schemas) { _newObject.schemas.add(((_item == null)?null:_item.createCopy())); } } 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 Tableset createCopy(final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) { final Tableset _newObject; try { _newObject = ((Tableset) super.clone()); } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } final PropertyTree schemasPropertyTree = ((_propertyTree == null)?null:_propertyTree.get("schemas")); if (((_propertyTreeUse == PropertyTreeUse.INCLUDE)?(schemasPropertyTree!= null):((schemasPropertyTree == null)||(!schemasPropertyTree.isLeaf())))) { if (this.schemas == null) { _newObject.schemas = null; } else { _newObject.schemas = new ArrayList<>(); for (TableSchema _item: this.schemas) { _newObject.schemas.add(((_item == null)?null:_item.createCopy(schemasPropertyTree, _propertyTreeUse))); } } } 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 Tableset 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 Tableset 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 Tableset.Modifier modifier() { if (null == this.__cachedModifier__) { this.__cachedModifier__ = new Tableset.Modifier(); } return ((Tableset.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 Tableset.Builder<_B> _other) { if (this.schemas == null) { _other.schemas = null; } else { _other.schemas = new ArrayList<>(); for (TableSchema _item: this.schemas) { _other.schemas.add(((_item == null)?null:_item.newCopyBuilder(_other))); } } } @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public<_B >Tableset.Builder<_B> newCopyBuilder(final _B _parentBuilder) { return new Tableset.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 Tableset.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 Tableset.Builder builder() { return new Tableset.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 >Tableset.Builder<_B> copyOf(final Tableset _other) { final Tableset.Builder<_B> _newBuilder = new Tableset.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 Tableset.Builder<_B> _other, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) { final PropertyTree schemasPropertyTree = ((_propertyTree == null)?null:_propertyTree.get("schemas")); if (((_propertyTreeUse == PropertyTreeUse.INCLUDE)?(schemasPropertyTree!= null):((schemasPropertyTree == null)||(!schemasPropertyTree.isLeaf())))) { if (this.schemas == null) { _other.schemas = null; } else { _other.schemas = new ArrayList<>(); for (TableSchema _item: this.schemas) { _other.schemas.add(((_item == null)?null:_item.newCopyBuilder(_other, schemasPropertyTree, _propertyTreeUse))); } } } } @Generated(value = "com.sun.tools.xjc.Driver", comments = "JAXB RI v4.0.4", date = "2024-10-20T18:15:02+01:00") public<_B >Tableset.Builder<_B> newCopyBuilder(final _B _parentBuilder, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) { return new Tableset.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 Tableset.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 >Tableset.Builder<_B> copyOf(final Tableset _other, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) { final Tableset.Builder<_B> _newBuilder = new Tableset.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 Tableset.Builder copyExcept(final Tableset _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 Tableset.Builder copyOnly(final Tableset _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 Tableset visit(final PropertyVisitor _visitor_) { _visitor_.visit(this); if (_visitor_.visit(new CollectionProperty<>(Tableset.PropInfo.SCHEMAS, this))&&(this.schemas!= null)) { for (TableSchema _item_: this.schemas) { if (_item_!= null) { _item_.visit(_visitor_); } } } return this; } public static class Builder<_B >implements Buildable { protected final _B _parentBuilder; protected final Tableset _storedValue; private List>> schemas; public Builder(final _B _parentBuilder, final Tableset _other, final boolean _copy) { this._parentBuilder = _parentBuilder; if (_other!= null) { if (_copy) { _storedValue = null; if (_other.schemas == null) { this.schemas = null; } else { this.schemas = new ArrayList<>(); for (TableSchema _item: _other.schemas) { this.schemas.add(((_item == null)?null:_item.newCopyBuilder(this))); } } } else { _storedValue = _other; } } else { _storedValue = null; } } public Builder(final _B _parentBuilder, final Tableset _other, final boolean _copy, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) { this._parentBuilder = _parentBuilder; if (_other!= null) { if (_copy) { _storedValue = null; final PropertyTree schemasPropertyTree = ((_propertyTree == null)?null:_propertyTree.get("schemas")); if (((_propertyTreeUse == PropertyTreeUse.INCLUDE)?(schemasPropertyTree!= null):((schemasPropertyTree == null)||(!schemasPropertyTree.isLeaf())))) { if (_other.schemas == null) { this.schemas = null; } else { this.schemas = new ArrayList<>(); for (TableSchema _item: _other.schemas) { this.schemas.add(((_item == null)?null:_item.newCopyBuilder(this, schemasPropertyTree, _propertyTreeUse))); } } } } else { _storedValue = _other; } } else { _storedValue = null; } } public _B end() { return this._parentBuilder; } protected<_P extends Tableset >_P init(final _P _product) { if (this.schemas!= null) { final List schemas = new ArrayList<>(this.schemas.size()); for (TableSchema.Builder> _item: this.schemas) { schemas.add(_item.build()); } _product.schemas = schemas; } return _product; } /** * Adds the given items to the value of "schemas" * * @param schemas * Items to add to the value of the "schemas" property */ public Tableset.Builder<_B> addSchemas(final Iterable schemas) { if (schemas!= null) { if (this.schemas == null) { this.schemas = new ArrayList<>(); } for (TableSchema _item: schemas) { this.schemas.add(new TableSchema.Builder<>(this, _item, false)); } } return this; } /** * Sets the new value of "schemas" (any previous value will be replaced) * * @param schemas * New value of the "schemas" property. */ public Tableset.Builder<_B> withSchemas(final Iterable schemas) { if (this.schemas!= null) { this.schemas.clear(); } return addSchemas(schemas); } /** * Adds the given items to the value of "schemas" * * @param schemas * Items to add to the value of the "schemas" property */ public Tableset.Builder<_B> addSchemas(TableSchema... schemas) { addSchemas(Arrays.asList(schemas)); return this; } /** * Sets the new value of "schemas" (any previous value will be replaced) * * @param schemas * New value of the "schemas" property. */ public Tableset.Builder<_B> withSchemas(TableSchema... schemas) { withSchemas(Arrays.asList(schemas)); return this; } /** * Returns a new builder to build an additional value of the "Schemas" property. * Use {@link * org.javastro.ivoa.entities.resource.dataservice.TableSchema.Builder#end()} to * return to the current builder. * * @return * a new builder to build an additional value of the "Schemas" property. * Use {@link * org.javastro.ivoa.entities.resource.dataservice.TableSchema.Builder#end()} to * return to the current builder. */ public TableSchema.Builder> addSchemas() { if (this.schemas == null) { this.schemas = new ArrayList<>(); } final TableSchema.Builder> schemas_Builder = new TableSchema.Builder<>(this, null, false); this.schemas.add(schemas_Builder); return schemas_Builder; } @Override public Tableset build() { if (_storedValue == null) { return this.init(new Tableset()); } else { return ((Tableset) _storedValue); } } public Tableset.Builder<_B> copyOf(final Tableset _other) { _other.copyTo(this); return this; } public Tableset.Builder<_B> copyOf(final Tableset.Builder _other) { return copyOf(_other.build()); } } public class Modifier { public List getSchemas() { if (Tableset.this.schemas == null) { Tableset.this.schemas = new ArrayList<>(); } return Tableset.this.schemas; } } public static class PropInfo { public static final transient CollectionPropertyInfo SCHEMAS = new CollectionPropertyInfo("schemas", Tableset.class, TableSchema.class, true, null, new QName("", "schema"), new QName("http://www.ivoa.net/xml/VODataService/v1.1", "TableSchema"), false) { @Override public List get(final Tableset _instance_) { return ((_instance_ == null)?null:_instance_.schemas); } @Override public void set(final Tableset _instance_, final List _value_) { if (_instance_!= null) { _instance_.schemas = _value_; } } } ; } public static class Select extends Tableset.Selector { Select() { super(null, null, null); } public static Tableset.Select _root() { return new Tableset.Select(); } } public static class Selector , TParent > extends com.kscs.util.jaxb.Selector { private TableSchema.Selector> schemas = 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.schemas!= null) { products.put("schemas", this.schemas.init()); } return products; } public TableSchema.Selector> schemas() { return ((this.schemas == null)?this.schemas = new TableSchema.Selector<>(this._root, this, "schemas"):this.schemas); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy