Package org.gvsig.remoteclient.wfs
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 Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Hashtableprotected WFSServiceInformationWFS metadataprotected ArrayListThis class contains all the data that the library is able to retrieve of the server for all the requests.Fields inherited from class org.gvsig.remoteclient.ogc.OGCProtocolHandler
downloader, host, name, port, version -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLastWfsRequestInformation(WFSRequestInformation wfsRequestInformation) Adds a new WFSRequestInformationstatic StringbuildCapabilitiesSuitableVersionRequest(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.protected abstract WFSDescribeFeatureTypeRequestprotected abstract WFSGetFeatureRequestcreateGetFeatureRequest(WFSStatus status) protected abstract WFSTLockFeatureRequestcreateLockFeatureRequest(WFSStatus status) protected abstract WFSTransactionRequestcreateTransactionRequest(WFSStatus status) describeFeatureType(WFSStatus status, boolean override, org.gvsig.compat.net.ICancellable cancel) Builds a describeFeatureType request that is sent to the WFS the response will be parse to extract the data needed by the WFS clientvoidgetCapabilities(WFSStatus status, boolean override, org.gvsig.compat.net.ICancellable cancel) Builds a GetCapabilities request that is sent to the WFS the response will be parse to extract the data needed by the WFS clientgetFeature(WFSStatus status, boolean override, org.gvsig.compat.net.ICancellable cancel) Builds a getFeature request that is sent to the WFS the response will be parse to extract the data needed by the WFS clientorg.gvsig.remoteclient.ogc.OGCServiceInformationvoidlockFeature(WFSStatus status, boolean override, org.gvsig.compat.net.ICancellable cancel) Builds a lockFeature request that is sent to the WFS the response will be parse to extract the data needed by the WFS clientprotected abstract booleanparseGetFeature(File f, String nameSpace) parses the data retrieved by the GetFeature XML document.protected abstract booleanparseLockFeature(File f, String nameSpace, WFSStatus status) parses the data retrieved by the LockFeature operationprotected voidparseNamespaces(org.kxml2.io.KXmlParser parser) It parses the attributes of the current KXMLParser and add the new namespaces to the service informationprotected abstract booleanparseTransaction(File f, WFSStatus status) parses the data retrieved by the transaction operationvoidsetCurrentFeature(String currentFeature) voidtransaction(WFSStatus status, boolean override, org.gvsig.compat.net.ICancellable cancel) Builds a transaction request that is sent to the WFS the response will be parse to extract the data needed by the WFS clientMethods inherited from class org.gvsig.remoteclient.ogc.OGCProtocolHandler
addOperationByAttribute, fileToBytes, getHost, getName, getPort, getSymbol, getVersion, parseCapabilities, parseHTTPTag, parserDcpType, setHost, setName, setPort, setVersion
-
Field Details
-
serviceInfo
WFS metadata -
features
-
currentFeature
-
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
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
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
parses the data retrieved by the transaction operation- Parameters:
f- The retrieved filenameSpace- 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
- Returns:
- Returns the features.
-
getCurrentFeature
- Returns:
- Returns the currentFeature.
-
setCurrentFeature
- 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:
getServiceInformationin classorg.gvsig.remoteclient.ogc.OGCProtocolHandler
-
createDescribeFeatureTypeRequest
- Parameters:
status- The WFS statusprotocolHandler- The handler to parse the requests- Returns:
- an object to send the DescribeFeatureType requests
-
createGetFeatureRequest
- Parameters:
status- The WFS statusprotocolHandler- The handler to parse the requests- Returns:
- an object to send the GetFeature requests
-
createLockFeatureRequest
- Parameters:
status- The WFS statusprotocolHandler- The handler to parse the requests- Returns:
- an object to send the LockFeature requests
-
createTransactionRequest
- Parameters:
status- The WFS statusprotocolHandler- The handler to parse the requests- Returns:
- an object to send the Transaction request
-
addLastWfsRequestInformation
Adds a new WFSRequestInformation- Parameters:
wfsRequestInformation-
-
getLastWfsRequestInformation
- Returns:
- the lastWfsRequestInformation
-