All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.helger.genericode.v10.ColumnSet Maven / Gradle / Ivy
Go to download
Library to read and write OASIS GeneriCode and CVA documents
package com.helger.genericode.v10;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import com.helger.commons.annotation.CodingStyleguideUnaware;
import com.helger.commons.annotation.ReturnsMutableCopy;
import com.helger.commons.annotation.ReturnsMutableObject;
import com.helger.commons.equals.EqualsHelper;
import com.helger.commons.hashcode.HashCodeGenerator;
import com.helger.commons.string.ToStringGenerator;
/**
* Definition of a column set (columns and keys for a code list).
*
* Java class for ColumnSet complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="ColumnSet">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <group ref="{http://docs.oasis-open.org/codelist/ns/genericode/1.0/}ColumnSetContent"/>
* <attGroup ref="{http://docs.oasis-open.org/codelist/ns/genericode/1.0/}DefaultDatatypeLibrary"/>
* <attribute ref="{http://www.w3.org/XML/1998/namespace}base"/>
* </restriction>
* </complexContent>
* </complexType>
*
* This class was annotated by ph-jaxb22-plugin -Xph-annotate
* This class contains methods created by ph-jaxb22-plugin -Xph-equalshashcode
* This class contains methods created by ph-jaxb22-plugin -Xph-tostring
* This class contains methods created by ph-jaxb22-plugin -Xph-list-extension
* This class contains methods created by ph-jaxb22-plugin -Xph-cloneable
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ColumnSet", propOrder = {
"columnChoice",
"keyChoice"
})
@CodingStyleguideUnaware
public class ColumnSet implements Serializable, Cloneable
{
@XmlElements({
@XmlElement(name = "Column", type = Column.class),
@XmlElement(name = "ColumnRef", type = ColumnRef.class)
})
private List columnChoice;
@XmlElements({
@XmlElement(name = "Key", type = Key.class),
@XmlElement(name = "KeyRef", type = KeyRef.class)
})
private List keyChoice;
@XmlAttribute(name = "base", namespace = "http://www.w3.org/XML/1998/namespace")
@XmlSchemaType(name = "anyURI")
private String base;
@XmlAttribute(name = "DatatypeLibrary")
@XmlSchemaType(name = "anyURI")
private String datatypeLibrary;
/**
* A choice between a column definition and a column reference.Gets the value of the columnChoice 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 columnChoice property.
*
*
* For example, to add a new item, do as follows:
*
* getColumnChoice().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Column }
* {@link ColumnRef }
*
*
*/
@Nonnull
@ReturnsMutableObject("JAXB implementation style")
public List getColumnChoice() {
if (columnChoice == null) {
columnChoice = new ArrayList();
}
return this.columnChoice;
}
/**
* A choice between a key definition and a key reference.Gets the value of the keyChoice 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 keyChoice property.
*
*
* For example, to add a new item, do as follows:
*
* getKeyChoice().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Key }
* {@link KeyRef }
*
*
*/
@Nonnull
@ReturnsMutableObject("JAXB implementation style")
public List getKeyChoice() {
if (keyChoice == null) {
keyChoice = new ArrayList();
}
return this.keyChoice;
}
/**
*
*
* <?xml version="1.0" encoding="UTF-8"?><rule:text xmlns:rule="http://docs.oasis-open.org/codelist/ns/rule/1.0/" xmlns:gc="http://docs.oasis-open.org/codelist/ns/genericode/1.0/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" category="application" id="R15">xml:base does not apply to canonical URIs.</rule:text>
*
*
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getBase() {
return base;
}
/**
* Sets the value of the base property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBase(
@Nullable
String value) {
this.base = value;
}
/**
* Gets the value of the datatypeLibrary property.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getDatatypeLibrary() {
if (datatypeLibrary == null) {
return "http://www.w3.org/2001/XMLSchema-datatypes";
} else {
return datatypeLibrary;
}
}
/**
* Sets the value of the datatypeLibrary property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDatatypeLibrary(
@Nullable
String value) {
this.datatypeLibrary = value;
}
/**
* Created by ph-jaxb22-plugin -Xph-equalshashcode
*
*/
@Override
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if ((o == null)||(!getClass().equals(o.getClass()))) {
return false;
}
final ColumnSet rhs = ((ColumnSet) o);
if (!EqualsHelper.equals(columnChoice, rhs.columnChoice)) {
return false;
}
if (!EqualsHelper.equals(keyChoice, rhs.keyChoice)) {
return false;
}
if (!EqualsHelper.equals(base, rhs.base)) {
return false;
}
if (!EqualsHelper.equals(datatypeLibrary, rhs.datatypeLibrary)) {
return false;
}
return true;
}
/**
* Created by ph-jaxb22-plugin -Xph-equalshashcode
*
*/
@Override
public int hashCode() {
return new HashCodeGenerator(this).append(columnChoice).append(keyChoice).append(base).append(datatypeLibrary).getHashCode();
}
/**
* Created by ph-jaxb22-plugin -Xph-tostring
*
*/
@Override
public String toString() {
return new ToStringGenerator(this).append("columnChoice", columnChoice).append("keyChoice", keyChoice).append("base", base).append("datatypeLibrary", datatypeLibrary).getToString();
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param aList
* The new list member to set. May be null
.
*/
public void setColumnChoice(
@Nullable
final List aList) {
columnChoice = aList;
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param aList
* The new list member to set. May be null
.
*/
public void setKeyChoice(
@Nullable
final List aList) {
keyChoice = aList;
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* true
if at least one item is contained, false
otherwise.
*/
public boolean hasColumnChoiceEntries() {
return (!getColumnChoice().isEmpty());
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* true
if no item is contained, false
otherwise.
*/
public boolean hasNoColumnChoiceEntries() {
return getColumnChoice().isEmpty();
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* The number of contained elements. Always ≥ 0.
*/
@Nonnegative
public int getColumnChoiceCount() {
return getColumnChoice().size();
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param index
* The index to retrieve
* @return
* The element at the specified index. May be null
* @throws IndexOutOfBoundsException
* if the index is invalid!
*/
@Nullable
public Object getColumnChoiceAtIndex(
@Nonnegative
final int index)
throws IndexOutOfBoundsException
{
return getColumnChoice().get(index);
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param elem
* The element to be added. May not be null
.
*/
public void addColumnChoice(
@Nonnull
final Object elem) {
getColumnChoice().add(elem);
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* true
if at least one item is contained, false
otherwise.
*/
public boolean hasKeyChoiceEntries() {
return (!getKeyChoice().isEmpty());
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* true
if no item is contained, false
otherwise.
*/
public boolean hasNoKeyChoiceEntries() {
return getKeyChoice().isEmpty();
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* The number of contained elements. Always ≥ 0.
*/
@Nonnegative
public int getKeyChoiceCount() {
return getKeyChoice().size();
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param index
* The index to retrieve
* @return
* The element at the specified index. May be null
* @throws IndexOutOfBoundsException
* if the index is invalid!
*/
@Nullable
public Object getKeyChoiceAtIndex(
@Nonnegative
final int index)
throws IndexOutOfBoundsException
{
return getKeyChoice().get(index);
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param elem
* The element to be added. May not be null
.
*/
public void addKeyChoice(
@Nonnull
final Object elem) {
getKeyChoice().add(elem);
}
/**
* This method clones all values from this
to the passed object. All data in the parameter object is overwritten!Created by ph-jaxb22-plugin -Xph-cloneable
*
* @param ret
* The target object to clone to. May not be null
.
*/
public void cloneTo(
@Nonnull
ColumnSet ret) {
ret.base = base;
List retColumnChoice = new ArrayList();
for (Object aItem: getColumnChoice()) {
retColumnChoice.add(aItem);
}
ret.columnChoice = retColumnChoice;
ret.datatypeLibrary = datatypeLibrary;
List retKeyChoice = new ArrayList();
for (Object aItem: getKeyChoice()) {
retKeyChoice.add(aItem);
}
ret.keyChoice = retKeyChoice;
}
/**
* Created by ph-jaxb22-plugin -Xph-cloneable
*
* @return
* The cloned object. Never null
.
*/
@Nonnull
@ReturnsMutableCopy
@Override
public ColumnSet clone() {
ColumnSet ret = new ColumnSet();
cloneTo(ret);
return ret;
}
}