deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.ogcwebservices.wfs.operation.transaction
Class Transaction

java.lang.Object
  extended by org.deegree.ogcwebservices.AbstractOGCWebServiceRequest
      extended by org.deegree.ogcwebservices.wfs.operation.AbstractWFSRequest
          extended by org.deegree.ogcwebservices.wfs.operation.transaction.Transaction
All Implemented Interfaces:
java.io.Serializable, OGCWebServiceRequest

public class Transaction
extends AbstractWFSRequest

Represents a Transaction request to a web feature service.

A Transaction consists of a sequence of Insert, Update, Delete and Native operations.

From the WFS Specification 1.1.0 OGC 04-094 (#12, Pg.63):

A Transaction request is used to describe data transformation operations that are to be applied to web accessible feature instances. When the transaction has been completed, a web feature service will generate an XML response document indicating the completion status of the transaction.

Version:
$Revision: 23794 $, $Date: 2010-04-23 15:05:33 +0200 (Fr, 23 Apr 2010) $
Author:
Markus Schneider , last edited by: $Author: aionita $
See Also:
Serialized Form

Nested Class Summary
static class Transaction.RELEASE_ACTION
          Controls how locked features are treated when a transaction request is completed.
 
Field Summary
 
Fields inherited from class org.deegree.ogcwebservices.wfs.operation.AbstractWFSRequest
FORMAT_GML2, FORMAT_GML2_WFS100, FORMAT_GML3, FORMAT_XML
 
Constructor Summary
Transaction(java.lang.String id, java.lang.String version, java.util.Map<java.lang.String,java.lang.String> versionSpecificParameter, java.lang.String lockID, java.util.List<TransactionOperation> operations, boolean releaseAllFeatures, TransactionDocument sourceDocument)
          Creates a new Transaction instance.
 
Method Summary
static Transaction create(java.util.Map<java.lang.String,java.lang.String> model)
          Creates a Transaction request from a key-value-pair encoding of the parameters contained in the given Map.
static Transaction create(java.lang.String id, org.w3c.dom.Element root)
          Creates a Transaction instance from a document that contains the DOM representation of the request.
static Transaction create(java.lang.String id, java.lang.String request)
          Creates a Transaction request from a key-value-pair encoding of the parameters contained in the passed variable 'request'.
 java.util.Set<QualifiedName> getAffectedFeatureTypes()
          Returns the names of the feature types that are affected by the transaction.
 java.lang.String getLockId()
          Returns the lock identifier associated with this transaction.
 java.util.List<TransactionOperation> getOperations()
          Returns the TransactionOperations that are contained in the transaction.
 Transaction.RELEASE_ACTION getReleaseAction()
          Returns the release action mode to be applied after the transaction finished successfully.
 TransactionDocument getSourceDocument()
          Returns the source document that was used to create this Transaction instance.
 void guessMissingNamespaces(WFService wfs)
          Adds missing namespaces in the names of requested feature types.
 java.lang.String toString()
           
 
Methods inherited from class org.deegree.ogcwebservices.wfs.operation.AbstractWFSRequest
checkServiceParameter, checkVersionParameter, extractBBOXFilter, extractFilters, extractNamespaceParameter, extractTypeNames, getHandle, getServiceName
 
Methods inherited from class org.deegree.ogcwebservices.AbstractOGCWebServiceRequest
getId, getParam, getParamAsInt, getParamValues, getRequestParameter, getRequiredParam, getVendorSpecificParameter, getVendorSpecificParameters, getVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Transaction

public Transaction(java.lang.String id,
                   java.lang.String version,
                   java.util.Map<java.lang.String,java.lang.String> versionSpecificParameter,
                   java.lang.String lockID,
                   java.util.List<TransactionOperation> operations,
                   boolean releaseAllFeatures,
                   TransactionDocument sourceDocument)
Creates a new Transaction instance.

Parameters:
version - WFS version
id - Transaction id
versionSpecificParameter -
lockID - Lock Id
operations - List of operations to be carried out
releaseAllFeatures -
sourceDocument -
Method Detail

getSourceDocument

public TransactionDocument getSourceDocument()
Returns the source document that was used to create this Transaction instance.

Returns:
the source document

getOperations

public java.util.List<TransactionOperation> getOperations()
Returns the TransactionOperations that are contained in the transaction.

Returns:
the contained operations

getLockId

public java.lang.String getLockId()
Returns the lock identifier associated with this transaction.

Returns:
the lock identifier associated with this transaction if it exists, null otherwise

getReleaseAction

public Transaction.RELEASE_ACTION getReleaseAction()
Returns the release action mode to be applied after the transaction finished successfully.

Returns:
the release action mode to be applied after the transaction finished successfully
See Also:
Transaction.RELEASE_ACTION

getAffectedFeatureTypes

public java.util.Set<QualifiedName> getAffectedFeatureTypes()
Returns the names of the feature types that are affected by the transaction.

Returns:
the names of the affected feature types

create

public static Transaction create(java.lang.String id,
                                 java.lang.String request)
                          throws InconsistentRequestException,
                                 InvalidParameterValueException,
                                 MissingParameterValueException
Creates a Transaction request from a key-value-pair encoding of the parameters contained in the passed variable 'request'.

Parameters:
id - id of the request
request - key-value-pair encoded GetFeature request
Returns:
new created Transaction instance
Throws:
InconsistentRequestException
InvalidParameterValueException
MissingParameterValueException

create

public static Transaction create(java.util.Map<java.lang.String,java.lang.String> model)
                          throws InconsistentRequestException,
                                 InvalidParameterValueException,
                                 MissingParameterValueException
Creates a Transaction request from a key-value-pair encoding of the parameters contained in the given Map.

Parameters:
model - key-value-pair encoded Transaction request
Returns:
new Transaction instance
Throws:
InconsistentRequestException
InvalidParameterValueException
MissingParameterValueException

create

public static Transaction create(java.lang.String id,
                                 org.w3c.dom.Element root)
                          throws OGCWebServiceException
Creates a Transaction instance from a document that contains the DOM representation of the request.

Parameters:
id -
root - element that contains the DOM representation of the request
Returns:
transaction instance
Throws:
OGCWebServiceException

toString

public java.lang.String toString()
Overrides:
toString in class AbstractOGCWebServiceRequest

guessMissingNamespaces

public void guessMissingNamespaces(WFService wfs)
Adds missing namespaces in the names of requested feature types.

If the QualifiedName of a requested type has a null namespace, the first qualified feature type name of the given WFService with the same local name is used instead.

Note: The method changes this request (the feature type names) and should only be called by the WFSHandler class.

Parameters:
wfs - WFService instance that is used for the lookup of proper (qualified) feature type names

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org