java.lang.Object
org.codice.ddf.spatial.ogc.csw.catalog.common.transaction.UpdateActionImpl
All Implemented Interfaces:
org.codice.ddf.spatial.ogc.csw.catalog.actions.UpdateAction

public class UpdateActionImpl extends Object implements org.codice.ddf.spatial.ogc.csw.catalog.actions.UpdateAction
An UpdateActionImpl represents a single update action within a CSW transaction.
  • Constructor Details

    • UpdateActionImpl

      public UpdateActionImpl(ddf.catalog.data.Metacard metacard, String typeName, String handle)
      Constructs an UpdateActionImpl with the specified metacard, typeName, and handle. This UpdateActionImpl will replace the existing metacard having the same ID as metacard with metacard.

      If an error occurs while processing this update action, handle will be included in the exception report response so the specific action within the transaction that caused the error can be identified.

      Parameters:
      metacard - the updated metacard that will replace the existing metacard with the same ID
      typeName - the type of record being updated, such as csw:Record
      handle - the name to associate with this update action
    • UpdateActionImpl

      public UpdateActionImpl(Map<String,Serializable> recordProperties, String typeName, String handle, net.opengis.cat.csw.v_2_0_2.QueryConstraintType constraint, Map<String,String> prefixToUriMappings)
      Constructs an UpdateActionImpl with the specified map of attributes to new values to update in the metacard, typeName, handle, constraint, and map of XML namespace prefixes to their respective URIs. prefixToUriMappings should contain the prefix to URI mappings declared in the transaction request XML.

      This UpdateActionImpl will update all metacards matching constraint by updating their attributes according to the attribute names and values specified in recordProperties.

      If an error occurs while processing this update action, handle will be included in the exception report response so the specific action within the transaction that caused the error can be identified.

      Parameters:
      recordProperties - the map of attribute names to update to their new values
      typeName - the type of record being updated, such as csw:Record
      handle - the name to associate with this update action
      constraint - the QueryConstraintType that specifies which metacards this update will be applied to
      prefixToUriMappings - the map that contains the XML namespace prefix to URI mappings declared in the transaction request XML
  • Method Details

    • getMetacard

      public ddf.catalog.data.Metacard getMetacard()
      Specified by:
      getMetacard in interface org.codice.ddf.spatial.ogc.csw.catalog.actions.UpdateAction
    • getConstraint

      public net.opengis.cat.csw.v_2_0_2.QueryConstraintType getConstraint()
      Specified by:
      getConstraint in interface org.codice.ddf.spatial.ogc.csw.catalog.actions.UpdateAction
    • getRecordProperties

      public Map<String,Serializable> getRecordProperties()
      Specified by:
      getRecordProperties in interface org.codice.ddf.spatial.ogc.csw.catalog.actions.UpdateAction
    • getPrefixToUriMappings

      public Map<String,String> getPrefixToUriMappings()
      Specified by:
      getPrefixToUriMappings in interface org.codice.ddf.spatial.ogc.csw.catalog.actions.UpdateAction
    • getTypeName

      public String getTypeName()
      Specified by:
      getTypeName in interface org.codice.ddf.spatial.ogc.csw.catalog.actions.UpdateAction
    • getHandle

      public String getHandle()
      Specified by:
      getHandle in interface org.codice.ddf.spatial.ogc.csw.catalog.actions.UpdateAction