Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.io.gml.ui.wfs.wizard.capabilities
Class GetCapabilititiesRetriever

java.lang.Object
  extended by eu.esdihumboldt.hale.io.gml.ui.wfs.wizard.capabilities.GetCapabilititiesRetriever

public class GetCapabilititiesRetriever
extends Object

This utility class is used to build and handle WFS GetCapabilities Requests and Responses.

Author:
Thorsten Reitz, Simon Templer
Partner:
01 / Fraunhofer Institute for Computer Graphics Research

Constructor Summary
GetCapabilititiesRetriever()
           
 
Method Summary
static URL buildURL(String host, int selectionIndex)
          Builds the URL to use for Getting Capabilities of a WFS.
static int countOccurences(String original, String value)
          counts the number of occurences of a string declared in another string.
static org.geotools.data.DataStore getDataStore(String getCapabilitiesUrl)
          Get the data store for the given capabilities URL
static List<org.opengis.feature.type.FeatureType> readFeatureTypes(String getCapabilitiesUrl, org.eclipse.core.runtime.IProgressMonitor monitor)
          Get the feature type from a capabilities document
static boolean validate(String uri)
          Load and validate the schema provided at the given URI string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetCapabilititiesRetriever

public GetCapabilititiesRetriever()
Method Detail

buildURL

public static URL buildURL(String host,
                           int selectionIndex)
                    throws Exception
Builds the URL to use for Getting Capabilities of a WFS.

Parameters:
host - the hostname of the WFS.
selectionIndex - 0 for HTTP GET, 1 and 2 for XML POST.
Returns:
a complete URL.
Throws:
Exception - if any parsing of the URL components fails.

validate

public static boolean validate(String uri)
Load and validate the schema provided at the given URI string.

Parameters:
uri - the URI as a string where the schema can be found.
Returns:
true if all checks are passed.

countOccurences

public static int countOccurences(String original,
                                  String value)
counts the number of occurences of a string declared in another string.

Parameters:
original - the full string
value - the search string
Returns:
the count how often value occured in original.

getDataStore

public static org.geotools.data.DataStore getDataStore(String getCapabilitiesUrl)
                                                throws IOException
Get the data store for the given capabilities URL

Parameters:
getCapabilitiesUrl - the GetCapabilities URL
Returns:
the data store
Throws:
IOException - if reading the capabilities failed

readFeatureTypes

public static List<org.opengis.feature.type.FeatureType> readFeatureTypes(String getCapabilitiesUrl,
                                                                          org.eclipse.core.runtime.IProgressMonitor monitor)
                                                                   throws IOException
Get the feature type from a capabilities document

Parameters:
getCapabilitiesUrl - the GetCapabilities URL
monitor - the progress monitor
Returns:
the list of feature types
Throws:
IOException - if reading the capabilities or features failed

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d