Class WFSClient

java.lang.Object
org.gvsig.remoteclient.RemoteClient
org.gvsig.remoteclient.wfs.WFSClient

public class WFSClient extends org.gvsig.remoteclient.RemoteClient
Represents the class the with the necessary logic to connect to a OGCWFS and interpretate the data
Author:
Jorge Piera LlodrĂ¡ (piera_jor@gva.es)
  • Field Details

  • Constructor Details

  • Method Details

    • getCapabilities

      public void getCapabilities(WFSStatus status, boolean override, org.gvsig.compat.net.ICancellable cancel) throws WFSException
      Every OGC Web Service (OWS), including a Web Feature Service, must have the ability to describe its capabilities by returning service metadata in response to a GetCapabilities request.
      Parameters:
      status - WFS client status. Contains all the information to create the query
      Throws:
      WFSException
    • describeFeatureType

      public File describeFeatureType(WFSStatus status, boolean override, org.gvsig.compat.net.ICancellable cancel) throws WFSException
      The function of the DescribeFeatureType operation is to generate a schema description of feature types serviced by a WFS implementation. The schema descriptions define how a WFS implementation expects feature instances to be encoded on input (via Insert and Update requests) and how feature instances will be generated on output (in response to GetFeature and GetGmlObject requests).
      Parameters:
      status - WFS client status. Contains all the information to create the query
      Throws:
      WFSException
    • getFeature

      public File getFeature(WFSStatus status, boolean override, org.gvsig.compat.net.ICancellable cancel) throws WFSException
      The GetFeature operation allows retrieval of features from a web feature service. A GetFeature request is processed by a WFS and when the value of the outputFormat attribute is set to text/gml a GML instance document, containing the result set, is returned to the client.
      Parameters:
      status - WFS client status. Contains all the information to create the query
      Returns:
      File GML File
      Throws:
      WFSException
    • transaction

      public void transaction(WFSStatus status, boolean override, org.gvsig.compat.net.ICancellable cancel) throws WFSException
      The Transaction operation is used to describe data transformation operations that are to be applied to web accessible feature instances. A web feature service may process a Transaction operation directly or possibly translate it into the language of a target datastore to which it is connected and then have the datastore execute the transaction. When the transaction has been completed, a web feature service will generate an XML response document indicating the completion status of the transaction.
      Parameters:
      status - WFS client status. Contains all the information to create the query
      Throws:
      WFSException
    • lockFeature

      public void lockFeature(WFSStatus status, boolean override, org.gvsig.compat.net.ICancellable cancel) throws WFSException
      Web connections are inherently stateless. As a consequence of this, the semantics of serializable transactions are not preserved. To understand the issue, consider an update operation. The client fetches a feature instance. The feature is then modified on the client side, and submitted back to the database via a Transaction request for update. Serializability is lost since there is nothing to guarantee that while the feature was being modified on the client side, another client did not come along and update that same feature in the database. One way to ensure serializability is to require that access to data be done in a mutually exclusive manner; that is while one transaction accesses a data item, no other transaction can modify the same data item. This can be accomplished by using locks that control access to the data. The purpose of the LockFeature operation is to expose a long term feature locking mechanism to ensure consistency. The lock is considered long term because network latency would make feature locks last relatively longer than native commercial database locks. The LockFeature operation is optional and does not need to be implemented for a WFS implementation to conform to this specification. If a WFS implements the LockFeature operation, this fact must be advertised in the capabilities document
      Parameters:
      status -
      Throws:
      WFSException
    • connect

      public boolean connect(boolean override, org.gvsig.compat.net.ICancellable cancel)

      Checks the connection to de remote WFS and requests its capabilities.

      Specified by:
      connect in class org.gvsig.remoteclient.RemoteClient
    • connect

      public boolean connect(org.gvsig.compat.net.ICancellable cancel)
    • close

      public void close()
      Specified by:
      close in class org.gvsig.remoteclient.RemoteClient
    • getVersion

      public String getVersion()
    • getServiceInformation

      public WFSServiceInformation getServiceInformation()
      Gets the Service information included in the Capabilities
    • getFeatures

      public Hashtable getFeatures()
      Returns the features list
      Returns:
    • getFeature

      public WFSFeature getFeature(String nameSpace, String localName)
    • findNameSpace

      public String findNameSpace(String localName)
    • getLastWfsRequestInformation

      public WFSRequestInformation getLastWfsRequestInformation()
      Returns:
      the lastWfsRequestInformation
    • getWFSRequestInformationCount

      public int getWFSRequestInformationCount()
      Returns:
      the number requests
    • getWFSRequestInformationAt

      public WFSRequestInformation getWFSRequestInformationAt(int index)
      Return the information of a request
      Parameters:
      index - The position of the request
      Returns: