示例#1
0
        /// <summary>
        /// Use this constructor for initializing this dataprovider with all necessary
        /// parameters to gather metadata from 'GetCapabilities' contract.
        /// </summary>
        public WFSProvider(string getCapabilitiesUri, string nsPrefix, string featureType, GeometryTypeEnum geometryType,
                   WFSVersionEnum wfsVersion)
        {
            _getCapabilitiesUri = getCapabilitiesUri;

            if (wfsVersion == WFSVersionEnum.WFS_1_0_0)
                _textResources = new WFS_1_0_0_TextResources();
            else _textResources = new WFS_1_1_0_TextResources();

            _wfsVersion = wfsVersion;

            if (string.IsNullOrEmpty(nsPrefix))
                ResolveFeatureType(featureType);
            else
            {
                _nsPrefix = nsPrefix;
                _featureType = featureType;
            }

            _geometryType = geometryType;
            GetFeatureTypeInfo();
        }
示例#2
0
        /// <summary>
        /// Use this constructor for initializing this dataprovider with all necessary
        /// parameters to gather metadata from 'GetCapabilities' contract.
        /// </summary>
        /// <param name="getCapabilitiesCache">
        /// This cache (obtained from an already instantiated dataprovider that retrieves a featuretype hosted by the same service) 
        /// helps to speed up gathering metadata. It caches the 'GetCapabilities' response. 
        ///</param>
        /// <param name="nsPrefix">
        /// Use an empty string or 'null', if there is no prefix for the featuretype.
        /// </param>
        /// <param name="geometryType">
        /// Specifying the geometry type helps to accelerate the rendering process, 
        /// if the geometry type in 'DescribeFeatureType is unprecise.   
        /// </param>
        /// <param name="featureType">The name of the feature type</param>
        /// <param name="wfsVersion">The desired WFS Server version.</param>
        public WFS(IXPathQueryManager getCapabilitiesCache, string nsPrefix, string featureType,
                   GeometryTypeEnum geometryType, WFSVersionEnum wfsVersion)
        {
            _featureTypeInfoQueryManager = getCapabilitiesCache;

            if (wfsVersion == WFSVersionEnum.WFS1_0_0)
                _textResources = new WFS_1_0_0_TextResources();
            else _textResources = new WFS_1_1_0_TextResources();

            _wfsVersion = wfsVersion;

            if (string.IsNullOrEmpty(nsPrefix))
                ResolveFeatureType(featureType);
            else
            {
                _nsPrefix = nsPrefix;
                _featureType = featureType;
            }

            _geometryType = geometryType;
            GetFeatureTypeInfo();
        }
示例#3
0
        /// <summary>
        /// Use this constructor for initializing this dataprovider with all mandatory
        /// metadata for retrieving a featuretype, so that 'GetCapabilities' and 'DescribeFeatureType' can be bypassed.
        /// </summary>
        /// <param name="serviceURI">The service URL</param>
        /// <param name="nsPrefix">
        /// Use an empty string or 'null', if there is no prefix for the featuretype.
        /// </param>
        /// <param name="featureTypeNamespace">
        /// Use an empty string or 'null', if there is no namespace for the featuretype.
        /// You don't need to know the namespace of the feature type, if you use the quick geometries option.
        /// </param>
        /// <param name="geometryName">
        /// The name of the geometry.   
        /// </param>
        /// <param name="geometryType">
        /// Specifying the geometry type helps to accelerate the rendering process.   
        /// </param>
        /// <param name="featureType">The name of the feature type</param>
        /// <param name="wfsVersion">The desired WFS Server version.</param>
        public WFS(string serviceURI, string nsPrefix, string featureTypeNamespace, string featureType,
                   string geometryName, GeometryTypeEnum geometryType, WFSVersionEnum wfsVersion)
        {
            _featureTypeInfo = new WfsFeatureTypeInfo(serviceURI, nsPrefix, featureTypeNamespace, featureType,
                                                      geometryName, geometryType);

            if (wfsVersion == WFSVersionEnum.WFS1_0_0)
                _textResources = new WFS_1_0_0_TextResources();
            else _textResources = new WFS_1_1_0_TextResources();

            _wfsVersion = wfsVersion;
        }
示例#4
0
        /// <summary>
        /// Use this constructor for initializing this dataprovider with a 
        /// <see cref="WfsFeatureTypeInfo"/> object, 
        /// so that 'GetCapabilities' and 'DescribeFeatureType' can be bypassed.
        /// </summary>
        public WFS(WfsFeatureTypeInfo featureTypeInfo, WFSVersionEnum wfsVersion)
        {
            _featureTypeInfo = featureTypeInfo;

            if (wfsVersion == WFSVersionEnum.WFS1_0_0)
                _textResources = new WFS_1_0_0_TextResources();
            else _textResources = new WFS_1_1_0_TextResources();

            _wfsVersion = wfsVersion;
        }
示例#5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WFS.WFSClientHTTPConfigurator"/> class.
 /// An instance of this class can be used to configure a <see cref="SharpMap.Utilities.Wfs.HttpClientUtil"/> object.
 /// </summary>
 /// <param name="wfsTextResources">
 /// An instance implementing <see cref="SharpMap.Utilities.Wfs.IWFS_TextResources" /> 
 /// for getting version-specific text resources for WFS request configuration.
 ///</param>
 internal WFSClientHTTPConfigurator(IWFS_TextResources wfsTextResources)
 {
     _WfsTextResources = wfsTextResources;
 }
示例#6
0
        /// <summary>
        /// Use this constructor for initializing this dataprovider with all necessary
        /// parameters to gather metadata from 'GetCapabilities' contract.
        /// </summary>
        /// <param name="nsPrefix">
        /// Use an empty string or 'null', if there is no prefix for the featuretype.
        /// </param>
        /// <param name="geometryType">
        /// Specifying the geometry type helps to accelerate the rendering process, 
        /// if the geometry type in 'DescribeFeatureType is unprecise.   
        /// </param>
        public WFS(string getCapabilitiesURI, string nsPrefix, string featureType, GeometryTypeEnum geometryType, WFSVersionEnum wfsVersion)
        {
            _GetCapabilitiesURI = getCapabilitiesURI;

            if (wfsVersion == WFSVersionEnum.WFS1_0_0)
                _TextResources = new WFS_1_0_0_TextResources();
            else _TextResources = new WFS_1_1_0_TextResources();

            _WfsVersion = wfsVersion;
            
            if (string.IsNullOrEmpty(nsPrefix))
                resolveFeatureType(featureType);
            else
            {
                _NsPrefix = nsPrefix;
                _FeatureType = featureType;
            }
            
            _GeometryType = geometryType;
            GetFeatureTypeInfo();
        }
示例#7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WFSClientHttpConfigurator"/> class.
 /// An instance of this class can be used to configure a <see cref="HttpClientUtil"/> object.
 /// </summary>
 /// <param name="wfsTextResources">
 /// An instance implementing <see cref="IWFS_TextResources" /> 
 /// for getting version-specific text resources for WFS request configuration.
 ///</param>
 internal WFSClientHttpConfigurator(IWFS_TextResources wfsTextResources)
 {
     _wfsTextResources = wfsTextResources;
 }