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.
org.unece.cefact.namespaces.standardbusinessdocumentheader.Scope Maven / Gradle / Ivy
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2016.05.30 at 01:15:57 PM CEST
//
package org.unece.cefact.namespaces.standardbusinessdocumentheader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
import org.w3c.dom.Element;
/**
* Java class for Scope complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Scope">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <group ref="{http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader}ScopeAttributes"/>
* <element ref="{http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader}ScopeInformation" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Scope", propOrder = {
"type",
"instanceIdentifier",
"identifier",
"scopeInformations"
})
public class Scope implements Equals, HashCode, ToString
{
@XmlElement(name = "Type", required = true)
protected String type;
@XmlElement(name = "InstanceIdentifier", required = true)
protected String instanceIdentifier;
@XmlElement(name = "Identifier")
protected String identifier;
@XmlElementRef(name = "ScopeInformation", namespace = "http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader", type = JAXBElement.class)
@XmlAnyElement(lax = true)
protected List scopeInformations;
/**
* Default no-arg constructor
*
*/
public Scope() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public Scope(final String type, final String instanceIdentifier, final String identifier, final List scopeInformations) {
this.type = type;
this.instanceIdentifier = instanceIdentifier;
this.identifier = identifier;
this.scopeInformations = scopeInformations;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setType(String value) {
this.type = value;
}
/**
* Gets the value of the instanceIdentifier property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getInstanceIdentifier() {
return instanceIdentifier;
}
/**
* Sets the value of the instanceIdentifier property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setInstanceIdentifier(String value) {
this.instanceIdentifier = value;
}
/**
* Gets the value of the identifier property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getIdentifier() {
return identifier;
}
/**
* Sets the value of the identifier property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIdentifier(String value) {
this.identifier = value;
}
/**
* Gets the value of the scopeInformations 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 scopeInformations property.
*
*
* For example, to add a new item, do as follows:
*
* getScopeInformations().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link JAXBElement }{@code <}{@link Object }{@code >}
* {@link JAXBElement }{@code <}{@link BusinessService }{@code >}
* {@link JAXBElement }{@code <}{@link CorrelationInformation }{@code >}
* {@link Element }
* {@link Object }
*
*
*/
public List getScopeInformations() {
if (scopeInformations == null) {
scopeInformations = new ArrayList();
}
return this.scopeInformations;
}
public void setScopeInformations(List value) {
this.scopeInformations = null;
List draftl = this.getScopeInformations();
draftl.addAll(value);
}
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
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;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
{
String theType;
theType = this.getType();
strategy.appendField(locator, this, "type", buffer, theType);
}
{
String theInstanceIdentifier;
theInstanceIdentifier = this.getInstanceIdentifier();
strategy.appendField(locator, this, "instanceIdentifier", buffer, theInstanceIdentifier);
}
{
String theIdentifier;
theIdentifier = this.getIdentifier();
strategy.appendField(locator, this, "identifier", buffer, theIdentifier);
}
{
List theScopeInformations;
theScopeInformations = (((this.scopeInformations!= null)&&(!this.scopeInformations.isEmpty()))?this.getScopeInformations():null);
strategy.appendField(locator, this, "scopeInformations", buffer, theScopeInformations);
}
return buffer;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof Scope)) {
return false;
}
if (this == object) {
return true;
}
final Scope that = ((Scope) object);
{
String lhsType;
lhsType = this.getType();
String rhsType;
rhsType = that.getType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType)) {
return false;
}
}
{
String lhsInstanceIdentifier;
lhsInstanceIdentifier = this.getInstanceIdentifier();
String rhsInstanceIdentifier;
rhsInstanceIdentifier = that.getInstanceIdentifier();
if (!strategy.equals(LocatorUtils.property(thisLocator, "instanceIdentifier", lhsInstanceIdentifier), LocatorUtils.property(thatLocator, "instanceIdentifier", rhsInstanceIdentifier), lhsInstanceIdentifier, rhsInstanceIdentifier)) {
return false;
}
}
{
String lhsIdentifier;
lhsIdentifier = this.getIdentifier();
String rhsIdentifier;
rhsIdentifier = that.getIdentifier();
if (!strategy.equals(LocatorUtils.property(thisLocator, "identifier", lhsIdentifier), LocatorUtils.property(thatLocator, "identifier", rhsIdentifier), lhsIdentifier, rhsIdentifier)) {
return false;
}
}
{
List lhsScopeInformations;
lhsScopeInformations = (((this.scopeInformations!= null)&&(!this.scopeInformations.isEmpty()))?this.getScopeInformations():null);
List rhsScopeInformations;
rhsScopeInformations = (((that.scopeInformations!= null)&&(!that.scopeInformations.isEmpty()))?that.getScopeInformations():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "scopeInformations", lhsScopeInformations), LocatorUtils.property(thatLocator, "scopeInformations", rhsScopeInformations), lhsScopeInformations, rhsScopeInformations)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
String theType;
theType = this.getType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType);
}
{
String theInstanceIdentifier;
theInstanceIdentifier = this.getInstanceIdentifier();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "instanceIdentifier", theInstanceIdentifier), currentHashCode, theInstanceIdentifier);
}
{
String theIdentifier;
theIdentifier = this.getIdentifier();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier);
}
{
List theScopeInformations;
theScopeInformations = (((this.scopeInformations!= null)&&(!this.scopeInformations.isEmpty()))?this.getScopeInformations():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "scopeInformations", theScopeInformations), currentHashCode, theScopeInformations);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public Scope withType(String value) {
setType(value);
return this;
}
public Scope withInstanceIdentifier(String value) {
setInstanceIdentifier(value);
return this;
}
public Scope withIdentifier(String value) {
setIdentifier(value);
return this;
}
public Scope withScopeInformations(Object... values) {
if (values!= null) {
for (Object value: values) {
getScopeInformations().add(value);
}
}
return this;
}
public Scope withScopeInformations(Collection values) {
if (values!= null) {
getScopeInformations().addAll(values);
}
return this;
}
public Scope withScopeInformations(List value) {
setScopeInformations(value);
return this;
}
}