org.smartdeveloperhub.jenkins.crawler.xml.ci.Job Maven / Gradle / Ivy
Show all versions of ci-jenkins-crawler Show documentation
//
// 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.07.14 at 09:08:59 AM UTC
//
package org.smartdeveloperhub.jenkins.crawler.xml.ci;
import java.net.URI;
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.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.jvnet.jaxb2_commons.lang.CopyStrategy;
import org.jvnet.jaxb2_commons.lang.CopyTo;
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.JAXBCopyStrategy;
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.w3._2001.xmlschema.Adapter2;
/**
* Java class for Job complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Job">
* <complexContent>
* <extension base="{http://www.smartdeveloperhub.org/harvester/ci/model/v1}Entity">
* <sequence>
* <element name="type" type="{http://www.smartdeveloperhub.org/harvester/ci/model/v1}JobType"/>
* <element name="codebase" type="{http://www.smartdeveloperhub.org/harvester/ci/model/v1}Codebase" minOccurs="0"/>
* <element name="runnable" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* <element name="runs">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="run" type="{http://www.smartdeveloperhub.org/harvester/ci/model/v1}Reference" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* <attribute name="instance" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Job", namespace = "http://www.smartdeveloperhub.org/harvester/ci/model/v1", propOrder = {
"type",
"codebase",
"runnable",
"runs"
})
@XmlSeeAlso({
SubJob.class,
CompositeJob.class,
SimpleJob.class
})
public abstract class Job
extends Entity
implements Cloneable, CopyTo, Equals, HashCode, ToString
{
@XmlElement(required = true)
@XmlSchemaType(name = "string")
protected JobType type;
protected Codebase codebase;
protected boolean runnable;
@XmlElement(required = true)
protected Job.Runs runs;
@XmlAttribute(name = "instance", required = true)
@XmlJavaTypeAdapter(Adapter2 .class)
@XmlSchemaType(name = "anyURI")
protected URI instance;
/**
* Default no-arg constructor
*
*/
public Job() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public Job(final URI url, final String id, final String title, final String description, final JobType type, final Codebase codebase, final boolean runnable, final Job.Runs runs, final URI instance) {
super(url, id, title, description);
this.type = type;
this.codebase = codebase;
this.runnable = runnable;
this.runs = runs;
this.instance = instance;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link JobType }
*
*/
public JobType getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link JobType }
*
*/
public void setType(JobType value) {
this.type = value;
}
public boolean isSetType() {
return (this.type!= null);
}
/**
* Gets the value of the codebase property.
*
* @return
* possible object is
* {@link Codebase }
*
*/
public Codebase getCodebase() {
return codebase;
}
/**
* Sets the value of the codebase property.
*
* @param value
* allowed object is
* {@link Codebase }
*
*/
public void setCodebase(Codebase value) {
this.codebase = value;
}
public boolean isSetCodebase() {
return (this.codebase!= null);
}
/**
* Gets the value of the runnable property.
*
*/
public boolean isRunnable() {
return runnable;
}
/**
* Sets the value of the runnable property.
*
*/
public void setRunnable(boolean value) {
this.runnable = value;
}
public boolean isSetRunnable() {
return true;
}
/**
* Gets the value of the runs property.
*
* @return
* possible object is
* {@link Job.Runs }
*
*/
public Job.Runs getRuns() {
return runs;
}
/**
* Sets the value of the runs property.
*
* @param value
* allowed object is
* {@link Job.Runs }
*
*/
public void setRuns(Job.Runs value) {
this.runs = value;
}
public boolean isSetRuns() {
return (this.runs!= null);
}
/**
* Gets the value of the instance property.
*
* @return
* possible object is
* {@link String }
*
*/
public URI getInstance() {
return instance;
}
/**
* Sets the value of the instance property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setInstance(URI value) {
this.instance = value;
}
public boolean isSetInstance() {
return (this.instance!= null);
}
public Job withType(JobType value) {
setType(value);
return this;
}
public Job withCodebase(Codebase value) {
setCodebase(value);
return this;
}
public Job withRunnable(boolean value) {
setRunnable(value);
return this;
}
public Job withRuns(Job.Runs value) {
setRuns(value);
return this;
}
public Job withInstance(URI value) {
setInstance(value);
return this;
}
@Override
public Job withUrl(URI value) {
setUrl(value);
return this;
}
@Override
public Job withId(String value) {
setId(value);
return this;
}
@Override
public Job withTitle(String value) {
setTitle(value);
return this;
}
@Override
public Job withDescription(String value) {
setDescription(value);
return this;
}
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) {
super.appendFields(locator, buffer, strategy);
{
JobType theType;
theType = this.getType();
strategy.appendField(locator, this, "type", buffer, theType);
}
{
Codebase theCodebase;
theCodebase = this.getCodebase();
strategy.appendField(locator, this, "codebase", buffer, theCodebase);
}
{
boolean theRunnable;
theRunnable = this.isRunnable();
strategy.appendField(locator, this, "runnable", buffer, theRunnable);
}
{
Job.Runs theRuns;
theRuns = this.getRuns();
strategy.appendField(locator, this, "runs", buffer, theRuns);
}
{
URI theInstance;
theInstance = this.getInstance();
strategy.appendField(locator, this, "instance", buffer, theInstance);
}
return buffer;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof Job)) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final Job that = ((Job) object);
{
JobType lhsType;
lhsType = this.getType();
JobType rhsType;
rhsType = that.getType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType)) {
return false;
}
}
{
Codebase lhsCodebase;
lhsCodebase = this.getCodebase();
Codebase rhsCodebase;
rhsCodebase = that.getCodebase();
if (!strategy.equals(LocatorUtils.property(thisLocator, "codebase", lhsCodebase), LocatorUtils.property(thatLocator, "codebase", rhsCodebase), lhsCodebase, rhsCodebase)) {
return false;
}
}
{
boolean lhsRunnable;
lhsRunnable = this.isRunnable();
boolean rhsRunnable;
rhsRunnable = that.isRunnable();
if (!strategy.equals(LocatorUtils.property(thisLocator, "runnable", lhsRunnable), LocatorUtils.property(thatLocator, "runnable", rhsRunnable), lhsRunnable, rhsRunnable)) {
return false;
}
}
{
Job.Runs lhsRuns;
lhsRuns = this.getRuns();
Job.Runs rhsRuns;
rhsRuns = that.getRuns();
if (!strategy.equals(LocatorUtils.property(thisLocator, "runs", lhsRuns), LocatorUtils.property(thatLocator, "runs", rhsRuns), lhsRuns, rhsRuns)) {
return false;
}
}
{
URI lhsInstance;
lhsInstance = this.getInstance();
URI rhsInstance;
rhsInstance = that.getInstance();
if (!strategy.equals(LocatorUtils.property(thisLocator, "instance", lhsInstance), LocatorUtils.property(thatLocator, "instance", rhsInstance), lhsInstance, rhsInstance)) {
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 = super.hashCode(locator, strategy);
{
JobType theType;
theType = this.getType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType);
}
{
Codebase theCodebase;
theCodebase = this.getCodebase();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "codebase", theCodebase), currentHashCode, theCodebase);
}
{
boolean theRunnable;
theRunnable = this.isRunnable();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "runnable", theRunnable), currentHashCode, theRunnable);
}
{
Job.Runs theRuns;
theRuns = this.getRuns();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "runs", theRuns), currentHashCode, theRuns);
}
{
URI theInstance;
theInstance = this.getInstance();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "instance", theInstance), currentHashCode, theInstance);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
if (null == target) {
throw new IllegalArgumentException("Target argument must not be null for abstract copyable classes.");
}
super.copyTo(locator, target, strategy);
if (target instanceof Job) {
final Job copy = ((Job) target);
if (this.isSetType()) {
JobType sourceType;
sourceType = this.getType();
JobType copyType = ((JobType) strategy.copy(LocatorUtils.property(locator, "type", sourceType), sourceType));
copy.setType(copyType);
} else {
copy.type = null;
}
if (this.isSetCodebase()) {
Codebase sourceCodebase;
sourceCodebase = this.getCodebase();
Codebase copyCodebase = ((Codebase) strategy.copy(LocatorUtils.property(locator, "codebase", sourceCodebase), sourceCodebase));
copy.setCodebase(copyCodebase);
} else {
copy.codebase = null;
}
{
boolean sourceRunnable;
sourceRunnable = this.isRunnable();
boolean copyRunnable = strategy.copy(LocatorUtils.property(locator, "runnable", sourceRunnable), sourceRunnable);
copy.setRunnable(copyRunnable);
}
if (this.isSetRuns()) {
Job.Runs sourceRuns;
sourceRuns = this.getRuns();
Job.Runs copyRuns = ((Job.Runs) strategy.copy(LocatorUtils.property(locator, "runs", sourceRuns), sourceRuns));
copy.setRuns(copyRuns);
} else {
copy.runs = null;
}
if (this.isSetInstance()) {
URI sourceInstance;
sourceInstance = this.getInstance();
URI copyInstance = ((URI) strategy.copy(LocatorUtils.property(locator, "instance", sourceInstance), sourceInstance));
copy.setInstance(copyInstance);
} else {
copy.instance = null;
}
}
return target;
}
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="run" type="{http://www.smartdeveloperhub.org/harvester/ci/model/v1}Reference" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"runs"
})
public static class Runs implements Cloneable, CopyTo, Equals, HashCode, ToString
{
@XmlElement(name = "run")
protected List runs;
/**
* Default no-arg constructor
*
*/
public Runs() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public Runs(final List runs) {
this.runs = runs;
}
/**
* Gets the value of the runs 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 runs property.
*
*
* For example, to add a new item, do as follows:
*
* getRuns().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List getRuns() {
if (runs == null) {
runs = new ArrayList();
}
return this.runs;
}
public boolean isSetRuns() {
return ((this.runs!= null)&&(!this.runs.isEmpty()));
}
public void unsetRuns() {
this.runs = null;
}
public Job.Runs withRuns(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getRuns().add(value);
}
}
return this;
}
public Job.Runs withRuns(Collection values) {
if (values!= null) {
getRuns().addAll(values);
}
return this;
}
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) {
{
List theRuns;
theRuns = (this.isSetRuns()?this.getRuns():null);
strategy.appendField(locator, this, "runs", buffer, theRuns);
}
return buffer;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof Job.Runs)) {
return false;
}
if (this == object) {
return true;
}
final Job.Runs that = ((Job.Runs) object);
{
List lhsRuns;
lhsRuns = (this.isSetRuns()?this.getRuns():null);
List rhsRuns;
rhsRuns = (that.isSetRuns()?that.getRuns():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "runs", lhsRuns), LocatorUtils.property(thatLocator, "runs", rhsRuns), lhsRuns, rhsRuns)) {
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;
{
List theRuns;
theRuns = (this.isSetRuns()?this.getRuns():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "runs", theRuns), currentHashCode, theRuns);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof Job.Runs) {
final Job.Runs copy = ((Job.Runs) draftCopy);
if (this.isSetRuns()) {
List sourceRuns;
sourceRuns = (this.isSetRuns()?this.getRuns():null);
@SuppressWarnings("unchecked")
List copyRuns = ((List ) strategy.copy(LocatorUtils.property(locator, "runs", sourceRuns), sourceRuns));
copy.unsetRuns();
if (copyRuns!= null) {
List uniqueRunsl = copy.getRuns();
uniqueRunsl.addAll(copyRuns);
}
} else {
copy.unsetRuns();
}
}
return draftCopy;
}
public Object createNewInstance() {
return new Job.Runs();
}
}
}