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.
no.digipost.org.w3.xlink.Extended Maven / Gradle / Ivy
//
// This file was generated by the Eclipse Implementation of JAXB, v2.3.7
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2024.11.06 at 01:54:33 PM UTC
//
package no.digipost.org.w3.xlink;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
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.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
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.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
*
* Intended for use as the type of user-declared elements to make them
* extended links.
* Note that the elements referenced in the content model are all abstract.
* The intention is that by simply declaring elements with these as their
* substitutionGroup, all the right things will happen.
*
*
* Java class for extended complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="extended">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <group ref="{http://www.w3.org/1999/xlink}extendedModel" maxOccurs="unbounded" minOccurs="0"/>
* <attGroup ref="{http://www.w3.org/1999/xlink}extendedAttrs"/>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "extended", propOrder = {
"titlesAndResourcesAndLocators"
})
public class Extended implements Equals2, HashCode2, ToString2
{
@XmlElements({
@XmlElement(name = "title", type = Title.class),
@XmlElement(name = "resource", type = Resource.class),
@XmlElement(name = "locator", type = Locator.class),
@XmlElement(name = "arc", type = Arc.class)
})
protected List titlesAndResourcesAndLocators;
@XmlAttribute(name = "type", namespace = "http://www.w3.org/1999/xlink", required = true)
protected TypeType type;
@XmlAttribute(name = "role", namespace = "http://www.w3.org/1999/xlink")
protected String role;
@XmlAttribute(name = "title", namespace = "http://www.w3.org/1999/xlink")
protected String title;
/**
* Default no-arg constructor
*
*/
public Extended() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public Extended(final List titlesAndResourcesAndLocators, final TypeType type, final String role, final String title) {
this.titlesAndResourcesAndLocators = titlesAndResourcesAndLocators;
this.type = type;
this.role = role;
this.title = title;
}
/**
* Gets the value of the titlesAndResourcesAndLocators 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 titlesAndResourcesAndLocators property.
*
*
* For example, to add a new item, do as follows:
*
* getTitlesAndResourcesAndLocators().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Arc }
* {@link Locator }
* {@link Resource }
* {@link Title }
*
*
*/
public List getTitlesAndResourcesAndLocators() {
if (titlesAndResourcesAndLocators == null) {
titlesAndResourcesAndLocators = new ArrayList();
}
return this.titlesAndResourcesAndLocators;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link TypeType }
*
*/
public TypeType getType() {
if (type == null) {
return TypeType.EXTENDED;
} else {
return type;
}
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link TypeType }
*
*/
public void setType(TypeType value) {
this.type = value;
}
/**
* Gets the value of the role property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRole() {
return role;
}
/**
* Sets the value of the role property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRole(String value) {
this.role = value;
}
/**
* Gets the value of the title property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTitle() {
return title;
}
/**
* Sets the value of the title property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTitle(String value) {
this.title = value;
}
public void setTitlesAndResourcesAndLocators(List value) {
this.titlesAndResourcesAndLocators = null;
if (value!= null) {
List draftl = this.getTitlesAndResourcesAndLocators();
draftl.addAll(value);
}
}
@Override
public String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
@Override
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
{
List theTitlesAndResourcesAndLocators;
theTitlesAndResourcesAndLocators = (((this.titlesAndResourcesAndLocators!= null)&&(!this.titlesAndResourcesAndLocators.isEmpty()))?this.getTitlesAndResourcesAndLocators():null);
strategy.appendField(locator, this, "titlesAndResourcesAndLocators", buffer, theTitlesAndResourcesAndLocators, ((this.titlesAndResourcesAndLocators!= null)&&(!this.titlesAndResourcesAndLocators.isEmpty())));
}
{
TypeType theType;
theType = this.getType();
strategy.appendField(locator, this, "type", buffer, theType, (this.type!= null));
}
{
String theRole;
theRole = this.getRole();
strategy.appendField(locator, this, "role", buffer, theRole, (this.role!= null));
}
{
String theTitle;
theTitle = this.getTitle();
strategy.appendField(locator, this, "title", buffer, theTitle, (this.title!= null));
}
return buffer;
}
@Override
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final Extended that = ((Extended) object);
{
List lhsTitlesAndResourcesAndLocators;
lhsTitlesAndResourcesAndLocators = (((this.titlesAndResourcesAndLocators!= null)&&(!this.titlesAndResourcesAndLocators.isEmpty()))?this.getTitlesAndResourcesAndLocators():null);
List rhsTitlesAndResourcesAndLocators;
rhsTitlesAndResourcesAndLocators = (((that.titlesAndResourcesAndLocators!= null)&&(!that.titlesAndResourcesAndLocators.isEmpty()))?that.getTitlesAndResourcesAndLocators():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "titlesAndResourcesAndLocators", lhsTitlesAndResourcesAndLocators), LocatorUtils.property(thatLocator, "titlesAndResourcesAndLocators", rhsTitlesAndResourcesAndLocators), lhsTitlesAndResourcesAndLocators, rhsTitlesAndResourcesAndLocators, ((this.titlesAndResourcesAndLocators!= null)&&(!this.titlesAndResourcesAndLocators.isEmpty())), ((that.titlesAndResourcesAndLocators!= null)&&(!that.titlesAndResourcesAndLocators.isEmpty())))) {
return false;
}
}
{
TypeType lhsType;
lhsType = this.getType();
TypeType rhsType;
rhsType = that.getType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType, (this.type!= null), (that.type!= null))) {
return false;
}
}
{
String lhsRole;
lhsRole = this.getRole();
String rhsRole;
rhsRole = that.getRole();
if (!strategy.equals(LocatorUtils.property(thisLocator, "role", lhsRole), LocatorUtils.property(thatLocator, "role", rhsRole), lhsRole, rhsRole, (this.role!= null), (that.role!= null))) {
return false;
}
}
{
String lhsTitle;
lhsTitle = this.getTitle();
String rhsTitle;
rhsTitle = that.getTitle();
if (!strategy.equals(LocatorUtils.property(thisLocator, "title", lhsTitle), LocatorUtils.property(thatLocator, "title", rhsTitle), lhsTitle, rhsTitle, (this.title!= null), (that.title!= null))) {
return false;
}
}
return true;
}
@Override
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.getInstance();
return equals(null, null, object, strategy);
}
@Override
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) {
int currentHashCode = 1;
{
List theTitlesAndResourcesAndLocators;
theTitlesAndResourcesAndLocators = (((this.titlesAndResourcesAndLocators!= null)&&(!this.titlesAndResourcesAndLocators.isEmpty()))?this.getTitlesAndResourcesAndLocators():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "titlesAndResourcesAndLocators", theTitlesAndResourcesAndLocators), currentHashCode, theTitlesAndResourcesAndLocators, ((this.titlesAndResourcesAndLocators!= null)&&(!this.titlesAndResourcesAndLocators.isEmpty())));
}
{
TypeType theType;
theType = this.getType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, (this.type!= null));
}
{
String theRole;
theRole = this.getRole();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "role", theRole), currentHashCode, theRole, (this.role!= null));
}
{
String theTitle;
theTitle = this.getTitle();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "title", theTitle), currentHashCode, theTitle, (this.title!= null));
}
return currentHashCode;
}
@Override
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.getInstance();
return this.hashCode(null, strategy);
}
public Extended withTitlesAndResourcesAndLocators(Object... values) {
if (values!= null) {
for (Object value: values) {
getTitlesAndResourcesAndLocators().add(value);
}
}
return this;
}
public Extended withTitlesAndResourcesAndLocators(Collection values) {
if (values!= null) {
getTitlesAndResourcesAndLocators().addAll(values);
}
return this;
}
public Extended withType(TypeType value) {
setType(value);
return this;
}
public Extended withRole(String value) {
setRole(value);
return this;
}
public Extended withTitle(String value) {
setTitle(value);
return this;
}
public Extended withTitlesAndResourcesAndLocators(List value) {
setTitlesAndResourcesAndLocators(value);
return this;
}
}