/*
* Geotoolkit - An Open Source Java GIS Toolkit
* http://www.geotoolkit.org
*
* (C) 2013, Geomatys
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package org.geotoolkit.ows.xml.v200;
import java.util.ArrayList;
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.XmlType;
/**
* An Exception element describes one detected error that a
* server chooses to convey to the client.
*
* <p>Java class for ExceptionType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ExceptionType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ExceptionText" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="exceptionCode" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="locator" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ExceptionType", propOrder = {
"exceptionText"
})
public class ExceptionType {
@XmlElement(name = "ExceptionText")
private List<String> exceptionText;
@XmlAttribute(required = true)
private String exceptionCode;
@XmlAttribute
private String locator;
/**
* Empty constructor used by JAXB.
*/
public ExceptionType() {}
/**
* build a new Exception code.
*
* @param exceptionText
* @param exceptionCode
*/
public ExceptionType(final String exceptionText, final String exceptionCode, final String locator) {
this.exceptionText = new ArrayList<>();
this.exceptionText.add(exceptionText);
this.exceptionCode = exceptionCode;
this.locator = locator;
}
/**
* Gets the value of the exceptionText property.
*
*/
public List<String> getExceptionText() {
if (exceptionText == null) {
exceptionText = new ArrayList<>();
}
return this.exceptionText;
}
/**
* Gets the value of the exceptionCode property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getExceptionCode() {
return exceptionCode;
}
/**
* Sets the value of the exceptionCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setExceptionCode(String value) {
this.exceptionCode = value;
}
/**
* Gets the value of the locator property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLocator() {
return locator;
}
/**
* Sets the value of the locator property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLocator(String value) {
this.locator = value;
}
}