Class WFSProtocolHandler

java.lang.Object
org.gvsig.remoteclient.ogc.OGCProtocolHandler
org.gvsig.remoteclient.wfs.WFSProtocolHandler
Direct Known Subclasses:
WFSProtocolHandler1_0_0

public abstract class WFSProtocolHandler extends org.gvsig.remoteclient.ogc.OGCProtocolHandler
Author:
Jorge Piera LlodrĂ¡ (piera_jor@gva.es)
  • Field Details

    • serviceInfo

      protected WFSServiceInformation serviceInfo
      WFS metadata
    • features

      protected Hashtable features
    • currentFeature

      protected String currentFeature
    • wfsRequestInformations

      protected ArrayList wfsRequestInformations
      This class contains all the data that the library is able to retrieve of the server for all the requests.
  • Constructor Details

    • WFSProtocolHandler

      public WFSProtocolHandler()
  • Method Details

    • getCapabilities

      public void getCapabilities(WFSStatus status, boolean override, org.gvsig.compat.net.ICancellable cancel) throws WFSException

      Builds a GetCapabilities request that is sent to the WFS the response will be parse to extract the data needed by the WFS client

      Throws:
      WFSException
    • buildCapabilitiesSuitableVersionRequest

      public static String buildCapabilitiesSuitableVersionRequest(String _host, String _version)
      Builds the GetCapabilitiesRequest according to the OGC WFS Specifications without a VERSION, to get the highest version than a WFS supports.
    • describeFeatureType

      public File describeFeatureType(WFSStatus status, boolean override, org.gvsig.compat.net.ICancellable cancel) throws WFSException

      Builds a describeFeatureType request that is sent to the WFS the response will be parse to extract the data needed by the WFS client

      Parameters:
      status - WFS client status. Contains all the information to create the query. In this case, the only the feature name is needed.
      Throws:
      WFSException
    • getFeature

      public File getFeature(WFSStatus status, boolean override, org.gvsig.compat.net.ICancellable cancel) throws WFSException

      Builds a getFeature request that is sent to the WFS the response will be parse to extract the data needed by the WFS client

      Parameters:
      status - WFS client status. Contains all the information to create the query.
      Returns:
      File GML file
      Throws:
      WFSException
    • parseGetFeature

      protected abstract boolean parseGetFeature(File f, String nameSpace) throws WFSException
      parses the data retrieved by the GetFeature XML document. It is used just to find errors
      Throws:
      WFSException
    • transaction

      public void transaction(WFSStatus status, boolean override, org.gvsig.compat.net.ICancellable cancel) throws WFSException

      Builds a transaction request that is sent to the WFS the response will be parse to extract the data needed by the WFS client

      Parameters:
      status - WFS client status. Contains all the information to create the query.
      Throws:
      WFSException
    • parseTransaction

      protected abstract boolean parseTransaction(File f, WFSStatus status) throws WFSException
      parses the data retrieved by the transaction operation
      Parameters:
      f - The retrieved file
      nameSpace - The namespace
      Throws:
      WFSException
    • lockFeature

      public void lockFeature(WFSStatus status, boolean override, org.gvsig.compat.net.ICancellable cancel) throws WFSException

      Builds a lockFeature request that is sent to the WFS the response will be parse to extract the data needed by the WFS client

      Parameters:
      status - WFS client status. Contains all the information to create the query.
      Throws:
      WFSException
    • parseLockFeature

      protected abstract boolean parseLockFeature(File f, String nameSpace, WFSStatus status) throws WFSException
      parses the data retrieved by the LockFeature operation
      Throws:
      WFSException
    • getFeatures

      public Hashtable getFeatures()
      Returns:
      Returns the features.
    • getCurrentFeature

      public String getCurrentFeature()
      Returns:
      Returns the currentFeature.
    • setCurrentFeature

      public void setCurrentFeature(String currentFeature)
      Parameters:
      currentFeature - The currentFeature to set.
    • parseNamespaces

      protected void parseNamespaces(org.kxml2.io.KXmlParser parser)
      It parses the attributes of the current KXMLParser and add the new namespaces to the service information
      Parameters:
      parser - The KXML parser
    • getServiceInformation

      public org.gvsig.remoteclient.ogc.OGCServiceInformation getServiceInformation()
      Specified by:
      getServiceInformation in class org.gvsig.remoteclient.ogc.OGCProtocolHandler
    • createDescribeFeatureTypeRequest

      protected abstract WFSDescribeFeatureTypeRequest createDescribeFeatureTypeRequest(WFSStatus status)
      Parameters:
      status - The WFS status
      protocolHandler - The handler to parse the requests
      Returns:
      an object to send the DescribeFeatureType requests
    • createGetFeatureRequest

      protected abstract WFSGetFeatureRequest createGetFeatureRequest(WFSStatus status)
      Parameters:
      status - The WFS status
      protocolHandler - The handler to parse the requests
      Returns:
      an object to send the GetFeature requests
    • createLockFeatureRequest

      protected abstract WFSTLockFeatureRequest createLockFeatureRequest(WFSStatus status)
      Parameters:
      status - The WFS status
      protocolHandler - The handler to parse the requests
      Returns:
      an object to send the LockFeature requests
    • createTransactionRequest

      protected abstract WFSTransactionRequest createTransactionRequest(WFSStatus status)
      Parameters:
      status - The WFS status
      protocolHandler - The handler to parse the requests
      Returns:
      an object to send the Transaction request
    • addLastWfsRequestInformation

      public void addLastWfsRequestInformation(WFSRequestInformation wfsRequestInformation)
      Adds a new WFSRequestInformation
      Parameters:
      wfsRequestInformation -
    • getLastWfsRequestInformation

      public WFSRequestInformation getLastWfsRequestInformation()
      Returns:
      the lastWfsRequestInformation