deegree 2.5 (2011/06/29 09:44 build-8-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: 23794 $, $Date: 2010-04-23 15:05:33 +0200 (Fr, 23 Apr 2010) $
Author:
Anup Deshmukh , Markus Schneider , last edited by: $Author: aionita $

Constructor Summary
Update(java.lang.String handle, QualifiedName typeName, Feature replacementFeature, Filter filter)
          Creates a new Update instance.
Update(java.lang.String handle, QualifiedName typeName, java.util.Map<PropertyPath,FeatureProperty> replacementProps, Filter filter)
          Creates a new Update instance.
Update(java.lang.String handle, QualifiedName typeName, java.util.Map<PropertyPath,FeatureProperty> replacementProps, java.util.Map<PropertyPath,org.w3c.dom.Node> rawProps, Filter filter)
          Deprecated. This method breaks the layering -- it makes the DOM representation available.
 
Method Summary
 java.util.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.
 java.util.Map<PropertyPath,org.w3c.dom.Node> getRawProperties()
          Deprecated. This method breaks the layering -- it makes the DOM representation available.
 java.util.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.
 void setReplacementProperties(java.util.Map<PropertyPath,FeatureProperty> replacementProps)
          Setter method for replacement properties
 void setTypeName(QualifiedName typeName)
          TypeName setter method
 
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(java.lang.String handle,
              QualifiedName typeName,
              java.util.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(java.lang.String handle,
                  QualifiedName typeName,
                  java.util.Map<PropertyPath,FeatureProperty> replacementProps,
                  java.util.Map<PropertyPath,org.w3c.dom.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(java.lang.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.

setTypeName

public void setTypeName(QualifiedName typeName)
TypeName setter method

Parameters:
typeName - a

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 java.util.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

setReplacementProperties

public void setReplacementProperties(java.util.Map<PropertyPath,FeatureProperty> replacementProps)
Setter method for replacement properties

Parameters:
replacementProps - a map between PropertyPaths and FeaturePropertys

getRawProperties

@Deprecated
public java.util.Map<PropertyPath,org.w3c.dom.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 java.util.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.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