deegree 2.3 (2010/04/09 10:10 build-4-official)

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

java.lang.Object
  extended by org.deegree.ogcwebservices.wfs.operation.transaction.TransactionOperation
      extended by org.deegree.ogcwebservices.wfs.operation.transaction.Update

public class Update
extends TransactionOperation

Represents an Update operation as a part of a Transaction request.

WFS Specification OBC 04-094 (#12.2.5 Pg.68)

The Update element describes one update operation that is to be applied to a Feature or a set of Features of a single FeatureType.

Multiple Update operations can be contained in a single Transaction request. An Update element contains one or more Property elements that specify the name and replacement value for a property that belongs to the FeatureType specified using the mandatory typeName attribute.

Additionally, a deegree specific addition to this specification is supported:
Instead of a number of properties, it is also possible to specify a root feature that will replace the feature that is matched by the filter. In this case, the filter must match exactly one (or zero) feature instances.

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Anup Deshmukh , Markus Schneider , last edited by: $Author: mschneider $

Constructor Summary
Update(String handle, QualifiedName typeName, Feature replacementFeature, Filter filter)
          Creates a new Update instance.
Update(String handle, QualifiedName typeName, Map<PropertyPath,FeatureProperty> replacementProps, Filter filter)
          Creates a new Update instance.
Update(String handle, QualifiedName typeName, Map<PropertyPath,FeatureProperty> replacementProps, Map<PropertyPath,Node> rawProps, Filter filter)
          Deprecated. This method breaks the layering -- it makes the DOM representation available.
 
Method Summary
 List<QualifiedName> getAffectedFeatureTypes()
          Returns the names of the feature types that are affected by the operation.
 Feature getFeature()
          Returns the feature that will replace the matched feature instance.
 Filter getFilter()
          Returns the filter that selects the feature instances to be updated.
 Map<PropertyPath,Node> getRawProperties()
          Deprecated. This method breaks the layering -- it makes the DOM representation available.
 Map<PropertyPath,FeatureProperty> getReplacementProperties()
          Return the properties and their replacement values that are targeted by this update operation.
 QualifiedName getTypeName()
          Returns the name of the targeted feature type.
 void setFilter(Filter filter)
          Sets the filter that determines the features that are affected by the operation.
 
Methods inherited from class org.deegree.ogcwebservices.wfs.operation.transaction.TransactionOperation
getHandle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Update

public Update(String handle,
              QualifiedName typeName,
              Map<PropertyPath,FeatureProperty> replacementProps,
              Filter filter)
Creates a new Update instance.

Parameters:
handle - optional identifier for the operation (for error messsages)
typeName - the name of the targeted feature type
replacementProps - property paths and their replacement values
filter - selects the feature instances to be updated

Update

@Deprecated
Update(String handle,
                  QualifiedName typeName,
                  Map<PropertyPath,FeatureProperty> replacementProps,
                  Map<PropertyPath,Node> rawProps,
                  Filter filter)
Deprecated. This method breaks the layering -- it makes the DOM representation available.

Creates a new Update instance.

NOTE: This constructor will be removed in the future, because it makes the DOM representation available and breaks the layering (DOM should not be used on this level).

Parameters:
handle - optional identifier for the operation (for error messsages)
typeName - the name of the targeted feature type
replacementProps - property paths and their replacement values
rawProps - property paths and their DOM nodes
filter - selects the feature instances to be updated

Update

public Update(String handle,
              QualifiedName typeName,
              Feature replacementFeature,
              Filter filter)
Creates a new Update instance.

Parameters:
handle - optional identifier for the operation (for error messsages)
typeName - the name of the targeted feature type
replacementFeature - property names and their replacement values
filter - selects the (single) feature instance to be replaced
Method Detail

getTypeName

public QualifiedName getTypeName()
Returns the name of the targeted feature type.

Returns:
the name of the targeted feature type.

getFilter

public Filter getFilter()
Returns the filter that selects the feature instances to be updated.

Returns:
the filter that selects the feature instances to be updated

setFilter

public void setFilter(Filter filter)
Sets the filter that determines the features that are affected by the operation.

Parameters:
filter - determines the features that are affected by the operation

getFeature

public Feature getFeature()
Returns the feature that will replace the matched feature instance. If the returned value is null, this is a "standard" update operation that updates a number of flat properties instead.

Returns:
the feature that will replace the (single) matched feature instance

getReplacementProperties

public Map<PropertyPath,FeatureProperty> getReplacementProperties()
Return the properties and their replacement values that are targeted by this update operation.

Returns:
the properties and their replacement values

getRawProperties

@Deprecated
public Map<PropertyPath,Node> getRawProperties()
Deprecated. This method breaks the layering -- it makes the DOM representation available.

Return the properties and their replacement values (as DOM representation). NOTE: This constructor will be removed in the future, because it makes the DOM representation available and breaks the layering (DOM should not be used on this level).

Returns:
the properties and their replacement values (as Nodes)

getAffectedFeatureTypes

public List<QualifiedName> getAffectedFeatureTypes()
Description copied from class: TransactionOperation
Returns the names of the feature types that are affected by the operation.

Specified by:
getAffectedFeatureTypes in class TransactionOperation
Returns:
the names of the affected feature types.

deegree 2.3 (2010/04/09 10:10 build-4-official)

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