Class ReplaceTests


public class ReplaceTests extends TransactionFixture
Tests the response to a Transaction request that includes one or more replace actions. If the WFS supports feature versioning, then the wfs:ReplaceResults element must be present (to convey the new identifiers); however, this is not currently checked.
See Also:
  • "ISO 19142:2010, cl. 15.2.6: Replace action"
  • Field Details

    • REPL_PROPS

      public static final String REPL_PROPS
      Identifier for the collection of replacement property values.
      See Also:
  • Constructor Details

    • ReplaceTests

      public ReplaceTests()
  • Method Details

    • restoreModifiedFeatures

      @AfterClass public void restoreModifiedFeatures()
      Restores the WFS data store to its previous state by replacing all modified features with their original representations.
    • replaceFeature

      public void replaceFeature(ProtocolBinding binding, QName featureType)
      [Test] Submits a Transaction request to replace an existing feature instance. The test is run for all supported protocol bindings (except HTTP GET) and feature types. The response entity (wfs:TransactionResponse) must be schema-valid.
      Parameters:
      binding - A supported transaction request binding.
      featureType - A QName representing the qualified name of some feature type.
      See Also:
      • "ISO 19142:2010, cl. 15.3.3: TransactionSummary element"
      • "ISO 19142:2010, cl. 15.3.6: ReplaceResults element"
    • createReplacementFeature

      Element createReplacementFeature(Element originalFeature)
      Creates a new feature representation by cloning and modifying the original instance. The following standard GML properties are added (or replaced if already present):
      • gml:description ("Lorem ipsum dolor sit amet.")
      • gml:identifier (randomly generated UUID value)

      The resulting Element node will have associated user data with the key value REPL_PROPS. The user data are represented by a Map<XSElementDeclaration, Object> object containing a collection of property-value pairs, where each key is an element declaration denoting a property and the corresponding value is the replacement value.

      Parameters:
      originalFeature - The original feature instance (unmodified).
      Returns:
      A new Element node representing the modified feature.