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.
eu.toop.edm.jaxb.w3.odrl.Prohibition Maven / Gradle / Ivy
package eu.toop.edm.jaxb.w3.odrl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
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.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlIDREF;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
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.lang.IExplicitlyCloneable;
import com.helger.commons.string.ToStringGenerator;
import org.w3c.dom.Element;
/**
* Java class for Prohibition complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Prohibition">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://www.w3.org/ns/odrl/2/}asset" maxOccurs="unbounded"/>
* <element ref="{http://www.w3.org/ns/odrl/2/}action"/>
* <element ref="{http://www.w3.org/ns/odrl/2/}constraint" maxOccurs="unbounded" minOccurs="0"/>
* <element ref="{http://www.w3.org/ns/odrl/2/}party" maxOccurs="unbounded" minOccurs="0"/>
* <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attGroup ref="{http://www.w3.org/ns/odrl/2/}idAttributes"/>
* <anyAttribute processContents='lax' namespace='##other'/>
* </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-cloneable2
* This class contains methods created by ph-jaxb22-plugin -Xph-value-extender
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Prohibition", propOrder = {
"asset",
"action",
"constraint",
"party",
"any"
})
@CodingStyleguideUnaware
public class Prohibition implements Serializable, IExplicitlyCloneable
{
@XmlElement(required = true)
private List asset;
@XmlElement(required = true)
private Action action;
private List constraint;
private List party;
@XmlAnyElement(lax = true)
private List any;
@XmlAttribute(name = "id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
private String id;
@XmlAttribute(name = "idref")
@XmlIDREF
@XmlSchemaType(name = "IDREF")
private Object idref;
@XmlAnyAttribute
private Map otherAttributes = new HashMap();
/**
* Default constructor
* Note: automatically created by ph-jaxb22-plugin -Xph-value-extender
*
*/
public Prohibition() {
}
/**
* Gets the value of the asset 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 asset property.
*
*
* For example, to add a new item, do as follows:
*
* getAsset().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Asset }
*
*
*/
@Nonnull
@ReturnsMutableObject("JAXB implementation style")
public List getAsset() {
if (asset == null) {
asset = new ArrayList();
}
return this.asset;
}
/**
* Gets the value of the action property.
*
* @return
* possible object is
* {@link Action }
*
*/
@Nullable
public Action getAction() {
return action;
}
/**
* Sets the value of the action property.
*
* @param value
* allowed object is
* {@link Action }
*
*/
public void setAction(
@Nullable
Action value) {
this.action = value;
}
/**
* Gets the value of the constraint 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 constraint property.
*
*
* For example, to add a new item, do as follows:
*
* getConstraint().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Constraint }
*
*
*/
@Nonnull
@ReturnsMutableObject("JAXB implementation style")
public List getConstraint() {
if (constraint == null) {
constraint = new ArrayList();
}
return this.constraint;
}
/**
* Gets the value of the party 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 party property.
*
*
* For example, to add a new item, do as follows:
*
* getParty().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Party }
*
*
*/
@Nonnull
@ReturnsMutableObject("JAXB implementation style")
public List getParty() {
if (party == null) {
party = new ArrayList();
}
return this.party;
}
/**
* Gets the value of the any 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 any property.
*
*
* For example, to add a new item, do as follows:
*
* getAny().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
@Nonnull
@ReturnsMutableObject("JAXB implementation style")
public List getAny() {
if (any == null) {
any = new ArrayList();
}
return this.any;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(
@Nullable
String value) {
this.id = value;
}
/**
* Gets the value of the idref property.
*
* @return
* possible object is
* {@link Object }
*
*/
@Nullable
public Object getIdref() {
return idref;
}
/**
* Sets the value of the idref property.
*
* @param value
* allowed object is
* {@link Object }
*
*/
public void setIdref(
@Nullable
Object value) {
this.idref = value;
}
/**
* 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
*/
@Nullable
public Map getOtherAttributes() {
return otherAttributes;
}
/**
* 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 Prohibition rhs = ((Prohibition) o);
if (!EqualsHelper.equals(action, rhs.action)) {
return false;
}
if (!EqualsHelper.equalsCollection(any, rhs.any)) {
return false;
}
if (!EqualsHelper.equalsCollection(asset, rhs.asset)) {
return false;
}
if (!EqualsHelper.equalsCollection(constraint, rhs.constraint)) {
return false;
}
if (!EqualsHelper.equals(id, rhs.id)) {
return false;
}
if (!EqualsHelper.equals(idref, rhs.idref)) {
return false;
}
if (!EqualsHelper.equals(otherAttributes, rhs.otherAttributes)) {
return false;
}
if (!EqualsHelper.equalsCollection(party, rhs.party)) {
return false;
}
return true;
}
/**
* Created by ph-jaxb22-plugin -Xph-equalshashcode
*
*/
@Override
public int hashCode() {
return new HashCodeGenerator(this).append(action).append(any).append(asset).append(constraint).append(id).append(idref).append(otherAttributes).append(party).getHashCode();
}
/**
* Created by ph-jaxb22-plugin -Xph-tostring
*
*/
@Override
public String toString() {
return new ToStringGenerator(this).append("action", action).append("any", any).append("asset", asset).append("constraint", constraint).append("id", id).append("idref", idref).append("otherAttributes", otherAttributes).append("party", party).getToString();
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param aList
* The new list member to set. May be null
.
*/
public void setAsset(
@Nullable
final List aList) {
asset = aList;
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param aList
* The new list member to set. May be null
.
*/
public void setConstraint(
@Nullable
final List aList) {
constraint = aList;
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param aList
* The new list member to set. May be null
.
*/
public void setParty(
@Nullable
final List aList) {
party = aList;
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param aList
* The new list member to set. May be null
.
*/
public void setAny(
@Nullable
final List aList) {
any = aList;
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* true
if at least one item is contained, false
otherwise.
*/
public boolean hasAssetEntries() {
return (!getAsset().isEmpty());
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* true
if no item is contained, false
otherwise.
*/
public boolean hasNoAssetEntries() {
return getAsset().isEmpty();
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* The number of contained elements. Always ≥ 0.
*/
@Nonnegative
public int getAssetCount() {
return getAsset().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 Asset getAssetAtIndex(
@Nonnegative
final int index)
throws IndexOutOfBoundsException
{
return getAsset().get(index);
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param elem
* The element to be added. May not be null
.
*/
public void addAsset(
@Nonnull
final Asset elem) {
getAsset().add(elem);
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* true
if at least one item is contained, false
otherwise.
*/
public boolean hasConstraintEntries() {
return (!getConstraint().isEmpty());
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* true
if no item is contained, false
otherwise.
*/
public boolean hasNoConstraintEntries() {
return getConstraint().isEmpty();
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* The number of contained elements. Always ≥ 0.
*/
@Nonnegative
public int getConstraintCount() {
return getConstraint().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 Constraint getConstraintAtIndex(
@Nonnegative
final int index)
throws IndexOutOfBoundsException
{
return getConstraint().get(index);
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param elem
* The element to be added. May not be null
.
*/
public void addConstraint(
@Nonnull
final Constraint elem) {
getConstraint().add(elem);
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* true
if at least one item is contained, false
otherwise.
*/
public boolean hasPartyEntries() {
return (!getParty().isEmpty());
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* true
if no item is contained, false
otherwise.
*/
public boolean hasNoPartyEntries() {
return getParty().isEmpty();
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* The number of contained elements. Always ≥ 0.
*/
@Nonnegative
public int getPartyCount() {
return getParty().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 Party getPartyAtIndex(
@Nonnegative
final int index)
throws IndexOutOfBoundsException
{
return getParty().get(index);
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param elem
* The element to be added. May not be null
.
*/
public void addParty(
@Nonnull
final Party elem) {
getParty().add(elem);
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* true
if at least one item is contained, false
otherwise.
*/
public boolean hasAnyEntries() {
return (!getAny().isEmpty());
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* true
if no item is contained, false
otherwise.
*/
public boolean hasNoAnyEntries() {
return getAny().isEmpty();
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @return
* The number of contained elements. Always ≥ 0.
*/
@Nonnegative
public int getAnyCount() {
return getAny().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 getAnyAtIndex(
@Nonnegative
final int index)
throws IndexOutOfBoundsException
{
return getAny().get(index);
}
/**
* Created by ph-jaxb22-plugin -Xph-list-extension
*
* @param elem
* The element to be added. May not be null
.
*/
public void addAny(
@Nonnull
final Object elem) {
getAny().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-cloneable2
*
* @param ret
* The target object to clone to. May not be null
.
*/
public void cloneTo(
@Nonnull
Prohibition ret) {
ret.action = ((action == null)?null:action.clone());
if (any == null) {
ret.any = null;
} else {
List retAny = new ArrayList();
for (Object aItem: getAny()) {
retAny.add(aItem);
}
ret.any = retAny;
}
if (asset == null) {
ret.asset = null;
} else {
List retAsset = new ArrayList();
for (Asset aItem: getAsset()) {
retAsset.add(((aItem == null)?null:aItem.clone()));
}
ret.asset = retAsset;
}
if (constraint == null) {
ret.constraint = null;
} else {
List retConstraint = new ArrayList();
for (Constraint aItem: getConstraint()) {
retConstraint.add(((aItem == null)?null:aItem.clone()));
}
ret.constraint = retConstraint;
}
ret.id = id;
ret.idref = idref;
if (otherAttributes == null) {
ret.otherAttributes = null;
} else {
ret.otherAttributes = new HashMap(otherAttributes);
}
if (party == null) {
ret.party = null;
} else {
List retParty = new ArrayList();
for (Party aItem: getParty()) {
retParty.add(((aItem == null)?null:aItem.clone()));
}
ret.party = retParty;
}
}
/**
* Created by ph-jaxb22-plugin -Xph-cloneable2
*
* @return
* The cloned object. Never null
.
*/
@Nonnull
@ReturnsMutableCopy
@Override
public Prohibition clone() {
Prohibition ret = new Prohibition();
cloneTo(ret);
return ret;
}
}