org.oclc.purl.dsdl.svrl.SuccessfulReport Maven / Gradle / Ivy
Show all versions of phloc-schematron Show documentation
package org.oclc.purl.dsdl.svrl;
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 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.XmlID;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import com.phloc.commons.annotations.ReturnsMutableObject;
import com.phloc.commons.equals.EqualsUtils;
import com.phloc.commons.hash.HashCodeGenerator;
import com.phloc.commons.string.ToStringGenerator;
/**
* 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 ref="{http://purl.oclc.org/dsdl/svrl}diagnostic-reference" maxOccurs="unbounded" minOccurs="0"/>
* <element ref="{http://purl.oclc.org/dsdl/svrl}text"/>
* </sequence>
* <attGroup ref="{http://purl.oclc.org/dsdl/svrl}attlist.assert-and-report"/>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"diagnosticReference",
"text"
})
@XmlRootElement(name = "successful-report")
public class SuccessfulReport implements Serializable
{
@XmlElement(name = "diagnostic-reference")
private List diagnosticReference;
@XmlElement(required = true)
private String text;
@XmlAttribute(name = "id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
private String id;
@XmlAttribute(name = "location", required = true)
@XmlSchemaType(name = "anySimpleType")
private String location;
@XmlAttribute(name = "test", required = true)
@XmlSchemaType(name = "anySimpleType")
private String test;
@XmlAttribute(name = "role")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "NMTOKEN")
private String role;
@XmlAttribute(name = "flag")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "NMTOKEN")
private String flag;
/**
* Gets the value of the diagnosticReference 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 diagnosticReference property.
*
*
* For example, to add a new item, do as follows:
*
* getDiagnosticReference().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link DiagnosticReference }
*
*
*/
@Nonnull
@ReturnsMutableObject(reason = "JAXB implementation style")
public List getDiagnosticReference() {
if (diagnosticReference == null) {
diagnosticReference = new ArrayList();
}
return this.diagnosticReference;
}
/**
* Gets the value of the text property.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getText() {
return text;
}
/**
* Sets the value of the text property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setText(
@Nullable
String value) {
this.text = value;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(
@Nullable
String value) {
this.id = value;
}
/**
* Gets the value of the location property.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getLocation() {
return location;
}
/**
* Sets the value of the location property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLocation(
@Nullable
String value) {
this.location = value;
}
/**
* Gets the value of the test property.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getTest() {
return test;
}
/**
* Sets the value of the test property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTest(
@Nullable
String value) {
this.test = 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 flag property.
*
* @return
* possible object is
* {@link String }
*
*/
@Nullable
public String getFlag() {
return flag;
}
/**
* Sets the value of the flag property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFlag(
@Nullable
String value) {
this.flag = value;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-equalshashcode
*
*/
@Override
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if ((o == null)||(!getClass().equals(o.getClass()))) {
return false;
}
final SuccessfulReport rhs = ((SuccessfulReport) o);
if (!EqualsUtils.equals(diagnosticReference, rhs.diagnosticReference)) {
return false;
}
if (!EqualsUtils.equals(text, rhs.text)) {
return false;
}
if (!EqualsUtils.equals(id, rhs.id)) {
return false;
}
if (!EqualsUtils.equals(location, rhs.location)) {
return false;
}
if (!EqualsUtils.equals(test, rhs.test)) {
return false;
}
if (!EqualsUtils.equals(role, rhs.role)) {
return false;
}
if (!EqualsUtils.equals(flag, rhs.flag)) {
return false;
}
return true;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-equalshashcode
*
*/
@Override
public int hashCode() {
return new HashCodeGenerator(this).append(diagnosticReference).append(text).append(id).append(location).append(test).append(role).append(flag).getHashCode();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-tostring
*
*/
@Override
public String toString() {
return new ToStringGenerator(this).append("diagnosticReference", diagnosticReference).append("text", text).append("id", id).append("location", location).append("test", test).append("role", role).append("flag", flag).toString();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @param aList
* The new list member to set. May be null
.
*/
public void setDiagnosticReference(
@Nullable
final List aList) {
diagnosticReference = aList;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* true
if at least one item is contained, false
otherwise.
*/
public boolean hasDiagnosticReferenceEntries() {
return (!getDiagnosticReference().isEmpty());
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* true
if no item is contained, false
otherwise.
*/
public boolean hasNoDiagnosticReferenceEntries() {
return getDiagnosticReference().isEmpty();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* The number of contained elements. Always ≥ 0.
*/
@Nonnegative
public int getDiagnosticReferenceCount() {
return getDiagnosticReference().size();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @param index
* The index to retrieve
* @return
* The element at the specified index. May be null
* @throws ArrayIndexOutOfBoundsException
* if the index is invalid!
*/
@Nullable
public DiagnosticReference getDiagnosticReferenceAtIndex(
@Nonnegative
final int index) {
return getDiagnosticReference().get(index);
}
}