public class WFSRequest extends Object
| Constructor and Description |
|---|
WFSRequest() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addInsertStatement(Document request,
Node feature)
Appends a wfs:Insert element to the document element in the given request
entity.
|
static void |
addNamespaceBinding(Document doc,
QName qName)
Adds a namespace binding to the document element.
|
static void |
addReplaceStatements(Document trxRequest,
List<Element> replacements)
Adds a sequence of wfs:Replace statements to the given transaction
request entity.
|
static void |
addResourceIdPredicate(Document request,
Set<String> idSet)
Adds a ResourceId predicate to a GetFeature (or GetFeatureWithLock)
request entity that contains a simple query expression without a filter.
|
static void |
appendSimpleQuery(Document doc,
QName... qNames)
Adds a simple wfs:Query element (without a filter) to the given request
entity.
|
static void |
appendStoredQuery(Document doc,
String queryId,
Map<String,Object> params)
Adds a wfs:StoredQuery element to the given request entity.
|
static Document |
createGMLEnvelope()
Creates a GML envelope covering the area of use for the "WGS 84" CRS
(srsName="urn:ogc:def:crs:EPSG::4326").
|
static Document |
createRequestEntity(String requestType)
Creates an XML request entity of the specified request type.
|
static Element |
createValueReference(org.apache.xerces.xs.XSElementDeclaration propertyElem)
Creates an Element node (fes:ValueReference) containing an XPath
expression derived from a property element declaration.
|
static void |
insertGMLProperty(Element feature,
Element gmlProperty)
Inserts a standard GML property into a given feature instance.
|
static Element |
newResourceIdFilter(String id)
Builds a filter predicate containing a fes:ResourceId element that
identifies the feature instance to be modified.
|
static void |
setTypeName(Element elem,
QName qName)
Sets the value of the typeName attribute on an action element
(wfs:Update, wfs:Delete) contained in a Transaction request entity.
|
static String |
transformEntityToKVP(Source xmlSource)
Transforms the XML representation of a WFS request entity to its
corresponding KVP serialization format.
|
static Document |
wrapEntityInSOAPEnvelope(Source xmlSource,
String version)
Wraps the given XML request entity in the body of a SOAP envelope.
|
public static String transformEntityToKVP(Source xmlSource)
xmlSource - A Source representing the XML request entity.public static Document wrapEntityInSOAPEnvelope(Source xmlSource, String version)
xmlSource - The Source providing the XML request entity.version - The version of the SOAP protocol (either "1.1" or "1.2"); if
not specified the latest version is assumed.public static void appendSimpleQuery(Document doc, QName... qNames)
doc - A Document representing a WFS request entity that accepts
wfs:Query elements as children of the document element
(GetFeature, GetPropertyValue, GetFeatureWithLock,
LockFeature).qNames - A sequence of QName objects representing (qualified) feature
type names recognized by the IUT.public static void appendStoredQuery(Document doc, String queryId, Map<String,Object> params)
doc - A Document representing a WFS request entity that accepts
wfs:StoredQuery elements as children of the document element
(GetFeature, GetPropertyValue, GetFeatureWithLock,
LockFeature).queryId - A URI that identifies the stored query to invoke.params - A Map containing query parameters (may be empty, e.g.
Collections.<String, Object>.emptyMap()). A
parameter name is associated with an Object (String or QName)
representing its value.public static Document createRequestEntity(String requestType)
requestType - The local name of the document element.public static void setTypeName(Element elem, QName qName)
elem - An action element in a transaction request.qName - The qualified name of a feature type.public static Element newResourceIdFilter(String id)
id - A String denoting a GML object identifier (gml:id).public static void insertGMLProperty(Element feature, Element gmlProperty)
feature - An Element node representing a GML featuregmlProperty - An Element node representing a standard (non-deprecated) GML
feature property.public static Element createValueReference(org.apache.xerces.xs.XSElementDeclaration propertyElem)
propertyElem - An element declaration that defines some feature property.public static Document createGMLEnvelope()
public static void addNamespaceBinding(Document doc, QName qName)
doc - A Document representing a request entity.qName - A QName containing a namespace URI and prefix; the local part
is ignored.public static void addReplaceStatements(Document trxRequest, List<Element> replacements)
trxRequest - A Document node representing a wfs:Transaction request entity.replacements - A List containing replacement feature representations (as
GML).public static void addInsertStatement(Document request, Node feature)
request - A Document node representing a wfs:Transaction request entity.feature - A Node representing a GML feature instance.public static void addResourceIdPredicate(Document request, Set<String> idSet)
request - The request entity (/wfs:GetFeature/[wfs:Query]).idSet - A Set<String> of feature identifiers that conform
to the xsd:ID datatype.Copyright © 2015 Open Geospatial Consortium. All rights reserved.