/*
* Geotoolkit - An Open Source Java GIS Toolkit
* http://www.geotoolkit.org
*
* (C) 2016, 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.wps.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.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import org.apache.sis.util.Version;
import org.geotoolkit.ows.xml.RequestBase;
/**
*
* WPS operation request base, for all WPS operations, except GetCapabilities.
* In this XML encoding, no "request" parameter is included, since the element
* name specifies the specific operation.
* An 'Extension' element provides a placeholder for extra request parameters
* that might be defined by WPS extension standards.
*
*
* <p>Java class for RequestBaseType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="RequestBaseType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Extension" type="{http://www.w3.org/2001/XMLSchema}anyType" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="service" use="required" type="{http://www.w3.org/2001/XMLSchema}string" fixed="WPS" />
* <attribute name="version" use="required" type="{http://www.opengis.net/ows/2.0}VersionType" fixed="2.0.0" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RequestBaseType", propOrder = {
"extension"
})
@XmlSeeAlso({
ExecuteRequestType.class,
DescribeProcess.class,
GetStatus.class,
GetResult.class,
Dismiss.class
})
public abstract class RequestBaseType implements RequestBase {
@XmlElement(name = "Extension")
protected List<Object> extension;
@XmlAttribute(name = "service", required = true)
protected String service;
@XmlAttribute(name = "version", required = true)
protected String version;
public RequestBaseType() {
}
public RequestBaseType(String service) {
this.service = service;
}
/**
* Gets the value of the extension property.
*
* Objects of the following type(s) are allowed in the list
* {@link Object }
*
*
*/
public List<Object> getExtension() {
if (extension == null) {
extension = new ArrayList<>();
}
return this.extension;
}
/**
* Gets the value of the service property.
*
* @return
* possible object is
* {@link String }
*
*/
@Override
public String getService() {
return service;
}
/**
* Sets the value of the service property.
*
* @param value
* allowed object is
* {@link String }
*
*/
@Override
public void setService(String value) {
this.service = value;
}
/**
* Gets the value of the version property.
*
* @return
* possible object is
* {@link String }
*
*/
@Override
public Version getVersion() {
if (version == null) {
return new Version("2.0.0");
} else {
return new Version(version);
}
}
/**
* Sets the value of the version property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setVersion(String value) {
this.version = value;
}
}