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

com.helger.xsds.xlink.XLinkSimple Maven / Gradle / Ivy

The newest version!

package com.helger.xsds.xlink;

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 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 jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAnyElement;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlMixed;
import jakarta.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;


/**
 * 
 *     Intended for use as the type of user-declared elements to make them
 *     simple links.
 *    
 * 
 * 

Java class for simple complex type. * *

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

{@code
 * 
 *   
 *     
 *       
 *       
 *     
 *   
 * 
 * }
*

This class was annotated by ph-jaxb-plugin -Xph-annotate

*

This class contains methods created by ph-jaxb-plugin -Xph-equalshashcode

*

This class contains methods created by ph-jaxb-plugin -Xph-tostring

*

This class contains methods created by ph-jaxb-plugin -Xph-list-extension

*

This class contains methods created by ph-jaxb-plugin -Xph-cloneable2

*

This class contains methods created by ph-jaxb-plugin -Xph-value-extender

* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "simple", propOrder = { "content" }) @CodingStyleguideUnaware public class XLinkSimple implements Serializable, IExplicitlyCloneable { @XmlMixed @XmlAnyElement(lax = true) private List content; /** * * */ @XmlAttribute(name = "type", namespace = "http://www.w3.org/1999/xlink") private final static XLinkTypeType TYPE = XLinkTypeType.SIMPLE; @XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink") private String href; @XmlAttribute(name = "role", namespace = "http://www.w3.org/1999/xlink") private String role; @XmlAttribute(name = "arcrole", namespace = "http://www.w3.org/1999/xlink") private String arcrole; @XmlAttribute(name = "title", namespace = "http://www.w3.org/1999/xlink") private String title; @XmlAttribute(name = "show", namespace = "http://www.w3.org/1999/xlink") private XLinkShowType show; @XmlAttribute(name = "actuate", namespace = "http://www.w3.org/1999/xlink") private XLinkActuateType actuate; /** * Default constructor
* Note: automatically created by ph-jaxb-plugin -Xph-value-extender * */ public XLinkSimple() { } /** * * Intended for use as the type of user-declared elements to make them * simple links. * Gets the value of the content 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 Jakarta XML Binding object. * This is why there is not a {@code set} method for the content property. * *

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

     *    getContent().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Object } * {@link String } * {@link Element } * * * @return * The value of the content property. */ @Nonnull @ReturnsMutableObject("JAXB implementation style") public List getContent() { if (content == null) { content = new ArrayList<>(); } return this.content; } /** * Gets the value of the href property. * * @return * possible object is * {@link String } * */ @Nullable public String getHref() { return href; } /** * Sets the value of the href property. * * @param value * allowed object is * {@link String } * */ public void setHref( @Nullable String value) { this.href = value; } /** * Gets the value of the role property. * * @return * possible object is * {@link String } * */ @Nullable public String getRole() { return role; } /** * Sets the value of the role property. * * @param value * allowed object is * {@link String } * */ public void setRole( @Nullable String value) { this.role = value; } /** * Gets the value of the arcrole property. * * @return * possible object is * {@link String } * */ @Nullable public String getArcrole() { return arcrole; } /** * Sets the value of the arcrole property. * * @param value * allowed object is * {@link String } * */ public void setArcrole( @Nullable String value) { this.arcrole = value; } /** * Gets the value of the title property. * * @return * possible object is * {@link String } * */ @Nullable public String getTitle() { return title; } /** * Sets the value of the title property. * * @param value * allowed object is * {@link String } * */ public void setTitle( @Nullable String value) { this.title = value; } /** * Gets the value of the show property. * * @return * possible object is * {@link XLinkShowType } * */ @Nullable public XLinkShowType getShow() { return show; } /** * Sets the value of the show property. * * @param value * allowed object is * {@link XLinkShowType } * */ public void setShow( @Nullable XLinkShowType value) { this.show = value; } /** * Gets the value of the actuate property. * * @return * possible object is * {@link XLinkActuateType } * */ @Nullable public XLinkActuateType getActuate() { return actuate; } /** * Sets the value of the actuate property. * * @param value * allowed object is * {@link XLinkActuateType } * */ public void setActuate( @Nullable XLinkActuateType value) { this.actuate = value; } /** * Created by ph-jaxb-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 XLinkSimple rhs = ((XLinkSimple) o); if (!EqualsHelper.equals(actuate, rhs.actuate)) { return false; } if (!EqualsHelper.equals(arcrole, rhs.arcrole)) { return false; } if (!EqualsHelper.equalsCollection(content, rhs.content)) { return false; } if (!EqualsHelper.equals(href, rhs.href)) { return false; } if (!EqualsHelper.equals(role, rhs.role)) { return false; } if (!EqualsHelper.equals(show, rhs.show)) { return false; } if (!EqualsHelper.equals(title, rhs.title)) { return false; } return true; } /** * Created by ph-jaxb-plugin -Xph-equalshashcode * */ @Override public int hashCode() { return new HashCodeGenerator(this).append(actuate).append(arcrole).append(content).append(href).append(role).append(show).append(title).getHashCode(); } /** * Created by ph-jaxb-plugin -Xph-tostring * */ @Override public String toString() { return new ToStringGenerator(this).append("actuate", actuate).append("arcrole", arcrole).append("content", content).append("href", href).append("role", role).append("show", show).append("title", title).getToString(); } /** * Created by ph-jaxb-plugin -Xph-list-extension * * @param aList * The new list member to set. May be null. */ public void setContent( @Nullable final List aList) { content = aList; } /** * Created by ph-jaxb-plugin -Xph-list-extension * * @return * true if at least one item is contained, false otherwise. */ public boolean hasContentEntries() { return (!getContent().isEmpty()); } /** * Created by ph-jaxb-plugin -Xph-list-extension * * @return * true if no item is contained, false otherwise. */ public boolean hasNoContentEntries() { return getContent().isEmpty(); } /** * Created by ph-jaxb-plugin -Xph-list-extension * * @return * The number of contained elements. Always ≥ 0. */ @Nonnegative public int getContentCount() { return getContent().size(); } /** * Created by ph-jaxb-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 getContentAtIndex( @Nonnegative final int index) throws IndexOutOfBoundsException { return getContent().get(index); } /** * Created by ph-jaxb-plugin -Xph-list-extension * * @param elem * The element to be added. May not be null. */ public void addContent( @Nonnull final Object elem) { getContent().add(elem); } /** * This method clones all values from this to the passed object. All data in the parameter object is overwritten!Created by ph-jaxb-plugin -Xph-cloneable2 * * @param ret * The target object to clone to. May not be null. */ public void cloneTo( @Nonnull XLinkSimple ret) { ret.actuate = actuate; ret.arcrole = arcrole; if (content == null) { ret.content = null; } else { List retContent = new ArrayList<>(); for (Object aItem: getContent()) { retContent.add(aItem); } ret.content = retContent; } ret.href = href; ret.role = role; ret.show = show; ret.title = title; } /** * Created by ph-jaxb-plugin -Xph-cloneable2 * * @return * The cloned object. Never null. */ @Nonnull @ReturnsMutableCopy @Override public XLinkSimple clone() { XLinkSimple ret = new XLinkSimple(); cloneTo(ret); return ret; } }