public class WfsSource extends MaskableImpl implements FederatedSource, ConnectedSource, ConfiguredService
Modifier and Type | Field and Description |
---|---|
protected String |
configurationPid |
static String |
DISABLE_CN_CHECK_PROPERTY |
protected Map<QName,WfsFilterDelegate> |
featureTypeFilters |
static int |
WFS_MAX_FEATURES_RETURNED |
protected static int |
WFS_QUERY_PAGE_SIZE_MULTIPLIER |
Constructor and Description |
---|
WfsSource(EncryptionService encryptionService) |
WfsSource(FilterAdapter filterAdapter,
org.osgi.framework.BundleContext context,
AvailabilityTask task,
SecureCxfClientFactory factory,
EncryptionService encryptionService) |
Modifier and Type | Method and Description |
---|---|
protected GetFeatureType |
buildGetFeatureRequest(Query query) |
void |
destroy(int code) |
String |
getConfigurationPid()
Returns the PID of the configuration that corresponds to this service
|
Integer |
getConnectionTimeout() |
Set<ContentType> |
getContentTypes()
Gets the
ContentType s that are currently stored by the Source . |
String |
getDescription()
Returns a description of the describable item.
|
FeatureCollectionMessageBodyReaderWfs20 |
getFeatureCollectionReader() |
String |
getForceSpatialFilter() |
String |
getId()
Returns the name, aka ID, of the describable item.
|
List<MetacardMapper> |
getMetacardToFeatureMapper() |
Set<String> |
getOptions(Metacard metacard)
Obtain a set of all options supported by this ResourceReader.
|
String |
getOrganization()
Returns the organization associated with the describable item.
|
Integer |
getPollInterval() |
Integer |
getReceiveTimeout() |
String |
getSrsName() |
Set<String> |
getSupportedSchemes()
|
String |
getTitle()
Returns the title of the describable item.
|
String |
getVersion()
Retrieve the version.
|
String |
getWfsUrl() |
void |
init()
Init is called when the bundle is initially configured.
|
boolean |
isAvailable()
This method states whether this source is available, typically connecting and performing some
sort of simple query or ping to the native catalog.
|
boolean |
isAvailable(SourceMonitor callback)
This method is the same as
Source.isAvailable() but allows a caller to provide a SourceMonitor callback object which is meant to be used as a way for the Source to
dynamically contact the caller with its availability. |
void |
maskId(String newSourceId)
Sets the masked ID of this maskable item to the specified ID, and then sets an internal flag
indicating that the masked ID cannot be changed.
|
SourceResponse |
query(QueryRequest request) |
void |
refresh(Map<String,Object> configuration)
Refresh is called if the bundle configuration is updated.
|
ResourceResponse |
retrieveResource(URI uri,
Map<String,Serializable> arguments)
|
void |
setConfigurationPid(String configurationPid)
Sets the PID of this service's corresponding configuration
|
void |
setConnectionTimeout(Integer timeout) |
void |
setContext(org.osgi.framework.BundleContext context) |
void |
setCoordinateOrder(String coordinateOrder) |
void |
setDisableCnCheck(Boolean disableCnCheck) |
void |
setDisableSorting(boolean disableSorting) |
void |
setFeatureCollectionReader(FeatureCollectionMessageBodyReaderWfs20 featureCollectionMessageBodyReaderWfs20) |
void |
setFeatureConverterFactoryList(List<FeatureConverterFactory> factories) |
void |
setFilterAdapter(FilterAdapter filterAdapter) |
void |
setFilterDelgates(Map<QName,WfsFilterDelegate> delegates) |
void |
setForcedFeatureType(String featureType) |
void |
setForceSpatialFilter(String forceSpatialFilter) |
void |
setMetacardToFeatureMapper(List<MetacardMapper> mappers) |
void |
setNonQueryableProperties(String[] newNonQueryableProperties) |
void |
setPassword(String password) |
void |
setPollInterval(Integer interval) |
void |
setReceiveTimeout(Integer timeout) |
void |
setSrsName(String srsName) |
void |
setUsername(String username) |
void |
setWfsUrl(String wfsUrl) |
setId
setDescription, setOrganization, setShortname, setTitle, setVersion
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSecurityAttributes
public static final int WFS_MAX_FEATURES_RETURNED
protected static final int WFS_QUERY_PAGE_SIZE_MULTIPLIER
public static final String DISABLE_CN_CHECK_PROPERTY
protected Map<QName,WfsFilterDelegate> featureTypeFilters
protected String configurationPid
public WfsSource(FilterAdapter filterAdapter, org.osgi.framework.BundleContext context, AvailabilityTask task, SecureCxfClientFactory factory, EncryptionService encryptionService) throws SecurityServiceException
SecurityServiceException
public WfsSource(EncryptionService encryptionService)
public void init()
The init process creates a RemoteWfs object using the connection parameters from the configuration.
public void destroy(int code)
public void refresh(Map<String,Object> configuration) throws SecurityServiceException
If any of the connection related properties change, an attempt is made to re-connect.
configuration
- SecurityServiceException
public boolean isAvailable()
Source
This is expected to be an expensive operation, possibly involving network I/O.
Typically only CatalogFramework
implementations will call this and only
periodically.
isAvailable
in interface Source
ddf.catalog.util.SourcePoller
public boolean isAvailable(SourceMonitor callback)
Source
Source.isAvailable()
but allows a caller to provide a SourceMonitor
callback object which is meant to be used as a way for the Source
to
dynamically contact the caller with its availability. The intent is to return a boolean as to
whether the Source
is available at this very moment and also to use the SourceMonitor
object to update the caller of this method if this Source's availability changes
later in the future.isAvailable
in interface Source
callback
- - used to notify the caller of this method when the Source
object wants
to update its availability.public SourceResponse query(QueryRequest request) throws UnsupportedQueryException
query
in interface Source
request
- the query to executeSourceResponse
with query results and query response detailsUnsupportedQueryException
- when the query is not understood, malformed, or not supported
by a Source
protected GetFeatureType buildGetFeatureRequest(Query query) throws UnsupportedQueryException
UnsupportedQueryException
public Set<ContentType> getContentTypes()
Source
ContentType
s that are currently stored by the Source
. Notice the
return object is a Set
, meaning it returns all unique content types found in the Source
without duplications.getContentTypes
in interface Source
Set
of ContentType
s currently available from this Source
.public String getId()
Describable
html for a MetacardTransformer
that transforms Metacard
s to HTML
getId
in interface Describable
getId
in class DescribableImpl
public void maskId(String newSourceId)
MaskableImpl
maskId
in interface Maskable
maskId
in class MaskableImpl
newSourceId
- the new id to usepublic String getDescription()
Describable
getDescription
in interface Describable
getDescription
in class DescribableImpl
public String getOrganization()
Describable
getOrganization
in interface Describable
getOrganization
in class DescribableImpl
public String getTitle()
Describable
getTitle
in interface Describable
getTitle
in class DescribableImpl
public String getVersion()
Describable
getVersion
in interface Describable
getVersion
in class DescribableImpl
public ResourceResponse retrieveResource(URI uri, Map<String,Serializable> arguments) throws IOException, ResourceNotFoundException, ResourceNotSupportedException
ResourceReader
retrieveResource
in interface ResourceReader
uri
- A URI
that defines what Resource
to retrieve and how to do it.arguments
- Any additional arguments that should be passed to the ResourceReader.ResourceResponse
containing the retrieved Resource
.IOException
ResourceNotFoundException
ResourceNotSupportedException
public Set<String> getSupportedSchemes()
ResourceReader
URI
schemes that the ResourceReader can accept when doing a Resource
lookup. Custom schemes can be created for a ResourceReader to support.getSupportedSchemes
in interface ResourceReader
Set
of supported schemespublic Set<String> getOptions(Metacard metacard)
ResourceReader
Resource
in a unique way.getOptions
in interface ResourceReader
Set
of all options that this ResourceReader supports. This will be an empty set
if no options are supported.public String getWfsUrl()
public void setWfsUrl(String wfsUrl) throws SecurityServiceException
SecurityServiceException
public void setUsername(String username)
public void setPassword(String password)
public void setDisableCnCheck(Boolean disableCnCheck)
public void setPollInterval(Integer interval)
public Integer getPollInterval()
public void setConnectionTimeout(Integer timeout)
public Integer getConnectionTimeout()
public void setReceiveTimeout(Integer timeout)
public Integer getReceiveTimeout()
public void setSrsName(String srsName)
public String getSrsName()
public void setFilterAdapter(FilterAdapter filterAdapter)
public void setFilterDelgates(Map<QName,WfsFilterDelegate> delegates)
public void setContext(org.osgi.framework.BundleContext context)
public void setNonQueryableProperties(String[] newNonQueryableProperties)
public String getForceSpatialFilter()
public void setForceSpatialFilter(String forceSpatialFilter)
public void setFeatureConverterFactoryList(List<FeatureConverterFactory> factories)
public List<MetacardMapper> getMetacardToFeatureMapper()
public void setMetacardToFeatureMapper(List<MetacardMapper> mappers)
public void setCoordinateOrder(String coordinateOrder)
public void setDisableSorting(boolean disableSorting)
public String getConfigurationPid()
ConfiguredService
getConfigurationPid
in interface ConfiguredService
public void setConfigurationPid(String configurationPid)
ConfiguredService
setConfigurationPid
in interface ConfiguredService
configurationPid
- The unique PID of the configuration associated with this servicepublic FeatureCollectionMessageBodyReaderWfs20 getFeatureCollectionReader()
public void setFeatureCollectionReader(FeatureCollectionMessageBodyReaderWfs20 featureCollectionMessageBodyReaderWfs20)
public void setForcedFeatureType(String featureType)
This work is licensed under a Creative Commons Attribution 4.0 International License.