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

org.hudsonci.maven.model.config.DocumentDTO Maven / Gradle / Ivy

The newest version!
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2 
// See http://java.sun.com/xml/jaxb 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2011.12.06 at 07:15:37 PM GMT 
//


package org.hudsonci.maven.model.config;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.annotation.Generated;
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.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import com.flipthebird.gwthashcodeequals.EqualsBuilder;
import com.flipthebird.gwthashcodeequals.HashCodeBuilder;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import org.codehaus.jackson.annotate.JsonProperty;


/**
 * 

Java class for document complex type. * *

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

 * <complexType name="document">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="content" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="attribute" type="{http://hudson-ci.org/xsd/hudson/2.1.0/maven/config}documentAttribute" maxOccurs="unbounded"/>
 *       </sequence>
 *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="type" use="required" type="{http://hudson-ci.org/xsd/hudson/2.1.0/maven/config}documentType" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "document", propOrder = { "description", "content", "attributes" }) @XmlRootElement(name = "document") @XStreamAlias("document") @Generated(value = "XJC hudson-jaxb-ri-2.1-2", date = "2011-12-06T19:15:37") public class DocumentDTO implements Serializable { private final static long serialVersionUID = 1L; @JsonProperty("description") protected String description; @JsonProperty("content") protected String content; @XmlElement(name = "attribute", required = true) @JsonProperty("attributes") protected List attributes; @XmlAttribute(name = "id", required = true) @XStreamAsAttribute @JsonProperty("id") protected String id; @XmlAttribute(name = "name", required = true) @XStreamAsAttribute @JsonProperty("name") protected String name; @XmlAttribute(name = "type", required = true) @XStreamAsAttribute @JsonProperty("type") protected DocumentTypeDTO type; /** * Gets the value of the description property. * * @return * possible object is * {@link String } * */ public String getDescription() { return description; } /** * Sets the value of the description property. * * @param value * allowed object is * {@link String } * */ public void setDescription(String value) { this.description = value; } /** * Gets the value of the content property. * * @return * possible object is * {@link String } * */ public String getContent() { return content; } /** * Sets the value of the content property. * * @param value * allowed object is * {@link String } * */ public void setContent(String value) { this.content = value; } /** * Gets the value of the attributes 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 attributes property. * *

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

     *    getAttributes().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link DocumentAttributeDTO } * * */ public List getAttributes() { if (attributes == null) { attributes = new ArrayList(); } return this.attributes; } /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } /** * Gets the value of the type property. * * @return * possible object is * {@link DocumentTypeDTO } * */ public DocumentTypeDTO getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link DocumentTypeDTO } * */ public void setType(DocumentTypeDTO value) { this.type = value; } public DocumentDTO withDescription(String value) { setDescription(value); return this; } public DocumentDTO withContent(String value) { setContent(value); return this; } public DocumentDTO withAttributes(DocumentAttributeDTO... values) { if (values!= null) { for (DocumentAttributeDTO value: values) { getAttributes().add(value); } } return this; } public DocumentDTO withAttributes(Collection values) { if (values!= null) { getAttributes().addAll(values); } return this; } public DocumentDTO withId(String value) { setId(value); return this; } public DocumentDTO withName(String value) { setName(value); return this; } public DocumentDTO withType(DocumentTypeDTO value) { setType(value); return this; } @Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (this == obj) { return true; } if (!(obj instanceof DocumentDTO)) { return false; } final DocumentDTO that = ((DocumentDTO) obj); final EqualsBuilder builder = new EqualsBuilder(); builder.append(this.getDescription(), that.getDescription()); builder.append(this.getContent(), that.getContent()); builder.append(this.getAttributes(), that.getAttributes()); builder.append(this.getId(), that.getId()); builder.append(this.getName(), that.getName()); builder.append(this.getType(), that.getType()); return builder.build(); } @Override public int hashCode() { final HashCodeBuilder builder = new HashCodeBuilder(); builder.append(this.getDescription()); builder.append(this.getContent()); builder.append(this.getAttributes()); builder.append(this.getId()); builder.append(this.getName()); builder.append(this.getType()); return builder.build(); } @Override public String toString() { return DocumentDTOHelper.asString(this); } public void setAttribute(final Object name, final Object value) { DocumentDTOHelper.setAttribute(this, name, value); } public DocumentDTO withAttribute(final Object name, final Object value) { setAttribute(name, value); return this; } public Object getAttribute(final Object name) { return DocumentDTOHelper.getAttribute(this, name); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy