public class DataSampler extends Object
Constructor and Description |
---|
DataSampler(Document wfsCapabilities)
Constructs a new DataSampler for a particular WFS implementation.
|
Modifier and Type | Method and Description |
---|---|
void |
acquireFeatureData()
Attempts to acquire instances of all feature types supported by the WFS
using all supported GetFeature message bindings (request encodings).
|
boolean |
deleteData()
Deletes all saved data files.
|
Element |
getFeatureById(String id)
Returns a feature instance from the sample data.
|
Map<QName,FeatureTypeInfo> |
getFeatureTypeInfo()
Returns a Map containing information about the feature types supported by
the WFS.
|
List<String> |
getSimplePropertyValues(QName featureType,
QName propName,
String featureId)
Returns a list containing the values (in document order) of the specified
feature property in the sample data set.
|
Set<String> |
selectRandomFeatureIdentifiers(QName featureType,
int numId)
Returns a set of identifiers for available feature instances of a given
type.
|
void |
setMaxFeatures(int maxFeatures)
Sets the maximum number of features to include in the response entity.
|
public DataSampler(Document wfsCapabilities)
wfsCapabilities
- A DOM Document representing the service metadata
(/wfs:WFS_Capabilities).public void setMaxFeatures(int maxFeatures)
maxFeatures
- An integer value > 0 (the default value is 25).public Set<String> selectRandomFeatureIdentifiers(QName featureType, int numId)
featureType
- A QName representing the qualified name of some feature type.numId
- The desired number of identifiers.public List<String> getSimplePropertyValues(QName featureType, QName propName, String featureId)
featureType
- A QName representing the qualified name of some feature type.propName
- The name of the property.featureId
- A feature identifer (gml:id); if null
or empty the
evaluation context includes all members of the collection.public boolean deleteData()
true
if all data files were deleted; false
otherwise (see warnings in log file for details).public void acquireFeatureData()
FeatureTypeInfo.isInstantiated()
returns false
.public Map<QName,FeatureTypeInfo> getFeatureTypeInfo()
Copyright © 2013. All Rights Reserved.