public abstract class AbstractCswSource extends MaskableImpl implements FederatedSource, ConnectedSource, ConfiguredService
FederatedSource and ConnectedSource for CSW
2.0.2 services.| Constructor and Description |
|---|
AbstractCswSource()
Deprecated.
|
AbstractCswSource(org.osgi.framework.BundleContext context,
CswSourceConfiguration cswSourceConfiguration,
com.thoughtworks.xstream.converters.Converter provider,
SecureCxfClientFactory factory)
Deprecated.
|
AbstractCswSource(org.osgi.framework.BundleContext context,
CswSourceConfiguration cswSourceConfiguration,
com.thoughtworks.xstream.converters.Converter provider,
SecureCxfClientFactory factory,
EncryptionService encryptionService)
Instantiates a CswSource.
|
AbstractCswSource(EncryptionService encryptionService)
Instantiates a CswSource.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSourceMonitor(SourceMonitor sourceMonitor) |
protected void |
availabilityChanged(boolean isAvailable) |
void |
configureCswSource() |
protected List<Result> |
createResults(CswRecordCollection cswRecordCollection) |
void |
destroy(int code)
Clean-up when shutting down the CswSource
|
protected abstract Map<String,Consumer<Object>> |
getAdditionalConsumers() |
protected AvailabilityCommand |
getAvailabilityCommand() |
protected CapabilitiesType |
getCapabilities() |
String |
getConfigurationPid()
Returns the PID of the configuration that corresponds to this service
|
Integer |
getConnectionTimeout() |
Set<ContentType> |
getContentTypes()
Gets the
ContentTypes that are currently stored by the Source. |
com.thoughtworks.xstream.converters.Converter |
getCswTransformConverter() |
String |
getDescription()
Returns a description of the describable item.
|
String |
getForceSpatialFilter() |
String |
getId()
Returns the name, aka ID, of the describable item.
|
protected String |
getMetadataTransformerId() |
Set<String> |
getOptions(Metacard arg0)
Obtain a set of all options supported by this ResourceReader.
|
String |
getOrganization()
Returns the organization associated with the describable item.
|
net.opengis.ows.v_1_0_0.DomainType |
getParameter(net.opengis.ows.v_1_0_0.Operation operation,
String name) |
Integer |
getReceiveTimeout() |
ResourceReader |
getResourceReader() |
Map<String,Set<String>> |
getSecurityAttributes()
Gets the map of security attributes associated with this source
|
Set<String> |
getSupportedSchemes()
|
protected Subject |
getSystemSubject() |
String |
getTitle()
Returns the title of the describable item.
|
String |
getVersion()
Retrieve the version.
|
protected String |
handleClientException(Exception ce) |
protected String |
handleWebApplicationException(javax.ws.rs.WebApplicationException wae) |
void |
init()
Initializes the CswSource by connecting to the Server
|
protected List<? extends Object> |
initProviders(com.thoughtworks.xstream.converters.Converter cswTransformProvider,
CswSourceConfiguration cswSourceConfiguration) |
protected void |
initSubscribeClientFactory() |
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 sourceMonitor)
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. |
protected void |
loadContentTypes() |
protected MetadataTransformer |
lookupMetadataTransformer(String transformerId) |
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 queryRequest) |
protected SourceResponse |
query(QueryRequest queryRequest,
ElementSetType elementSetName,
List<QName> elementNames,
Csw csw) |
void |
refresh(Map<String,Object> configuration)
Reinitializes the CswSource when there is a configuration change.
|
ResourceResponse |
retrieveResource(URI resourceUri,
Map<String,Serializable> requestProperties)
|
void |
setAvailabilityTask(AvailabilityTask availabilityTask) |
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 |
setCsw201()
Set the version to CSW 2.0.1.
|
void |
setCswTransformConverter(com.thoughtworks.xstream.converters.Converter provider) |
void |
setCswUrl(String cswUrl) |
void |
setDisableCnCheck(Boolean disableCnCheck) |
void |
setEventServiceAddress(String eventServiceAddress) |
void |
setFilterAdapter(FilterAdapter filterAdapter) |
void |
setFilterBuilder(FilterBuilder filterBuilder) |
protected void |
setFilterDelegate(net.opengis.ows.v_1_0_0.Operation getRecordsOp,
net.opengis.filter.v_1_1_0.FilterCapabilities filterCapabilities,
net.opengis.ows.v_1_0_0.DomainType outputFormatValues,
net.opengis.ows.v_1_0_0.DomainType resultTypesValues,
CswSourceConfiguration cswSourceConfiguration)
Sets the
FilterDelegate used by the AbstractCswSource. |
void |
setForceSpatialFilter(String forceSpatialFilter) |
void |
setId(String id)
Sets the ID of the maskable item if it is not currently masked.
|
void |
setIsCqlForced(Boolean isCqlForced) |
void |
setMetacardMappings(String[] configuredMappings) |
void |
setMetacardTypes(List<MetacardType> types) |
void |
setOutputSchema(String outputSchema) |
void |
setPassword(String password) |
void |
setPollInterval(Integer interval) |
void |
setQueryTypeName(String queryTypeName) |
void |
setQueryTypeNamespace(String queryTypeNamespace) |
void |
setReceiveTimeout(Integer timeout) |
void |
setRegisterForEvents(Boolean registerForEvents) |
void |
setResourceReader(ResourceReader resourceReader) |
void |
setSecurityManager(SecurityManager securityManager) |
protected void |
setupAvailabilityPoll() |
void |
setUsePosList(Boolean usePosList) |
void |
setUsername(String username) |
protected Metacard |
transform(Metacard metacard,
MetadataTransformer transformer)
Transforms the Metacard created from the CSW Record using the transformer specified by its ID.
|
setDescription, setOrganization, setShortname, setTitle, setVersionprotected static final String CSW_SERVER_ERROR
protected static final String CSWURL_PROPERTY
protected static final String ID_PROPERTY
protected static final String USERNAME_PROPERTY
protected static final String PASSWORD_PROPERTY
protected static final String METACARD_MAPPINGS_PROPERTY
protected static final String COORDINATE_ORDER_PROPERTY
protected static final String POLL_INTERVAL_PROPERTY
protected static final String OUTPUT_SCHEMA_PROPERTY
protected static final String IS_CQL_FORCED_PROPERTY
protected static final String FORCE_SPATIAL_FILTER_PROPERTY
protected static final String NO_FORCE_SPATIAL_FILTER
protected static final String CONNECTION_TIMEOUT_PROPERTY
protected static final String RECEIVE_TIMEOUT_PROPERTY
protected static final String QUERY_TYPE_NAME_PROPERTY
protected static final String QUERY_TYPE_NAMESPACE_PROPERTY
protected static final String USE_POS_LIST_PROPERTY
protected static final String SECURITY_ATTRIBUTES_PROPERTY
protected static final String EVENT_SERVICE_ADDRESS
protected static final String REGISTER_FOR_EVENTS
public static final String DISABLE_CN_CHECK_PROPERTY
protected String configurationPid
protected CswSourceConfiguration cswSourceConfiguration
protected CswFilterDelegate cswFilterDelegate
protected com.thoughtworks.xstream.converters.Converter cswTransformConverter
protected String forceSpatialFilter
protected ScheduledFuture<?> availabilityPollFuture
protected SecurityManager securityManager
protected FilterBuilder filterBuilder
protected FilterAdapter filterAdapter
protected CapabilitiesType capabilities
protected SecureCxfClientFactory<Csw> factory
protected SecureCxfClientFactory<CswSubscribe> subscribeClientFactory
protected CswJAXBElementProvider<GetRecordsType> getRecordsTypeProvider
protected String filterlessSubscriptionId
public AbstractCswSource(org.osgi.framework.BundleContext context,
CswSourceConfiguration cswSourceConfiguration,
com.thoughtworks.xstream.converters.Converter provider,
SecureCxfClientFactory factory,
EncryptionService encryptionService)
context - The BundleContext from the OSGi FrameworkcswSourceConfiguration - the configuration of this sourceprovider - transform provider to transform resultsfactory - client factory already configured for this source@Deprecated public AbstractCswSource(org.osgi.framework.BundleContext context, CswSourceConfiguration cswSourceConfiguration, com.thoughtworks.xstream.converters.Converter provider, SecureCxfClientFactory factory)
public AbstractCswSource(EncryptionService encryptionService)
@Deprecated public AbstractCswSource()
public void init()
protected void initSubscribeClientFactory()
public void destroy(int code)
protected List<? extends Object> initProviders(com.thoughtworks.xstream.converters.Converter cswTransformProvider, CswSourceConfiguration cswSourceConfiguration)
public void refresh(Map<String,Object> configuration)
configuration - The configuration with which to connect to the serverprotected AvailabilityCommand getAvailabilityCommand()
protected void setupAvailabilityPoll()
public void setConnectionTimeout(Integer timeout)
public Integer getConnectionTimeout()
public void setReceiveTimeout(Integer timeout)
public Integer getReceiveTimeout()
public void setContext(org.osgi.framework.BundleContext context)
public Set<ContentType> getContentTypes()
SourceContentTypes 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 SourceSet of ContentTypes currently available from this Source.public ResourceReader getResourceReader()
public void setResourceReader(ResourceReader resourceReader)
public void setOutputSchema(String outputSchema)
public void setQueryTypeName(String queryTypeName)
public void setQueryTypeNamespace(String queryTypeNamespace)
public boolean isAvailable()
SourceThis 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 Sourceddf.catalog.util.SourcePollerpublic boolean isAvailable(SourceMonitor sourceMonitor)
SourceSource.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 SourcesourceMonitor - - used to notify the caller of this method when the Source object wants
to update its availability.public SourceResponse query(QueryRequest queryRequest) throws UnsupportedQueryException
query in interface SourcequeryRequest - the query to executeSourceResponse with query results and query response detailsUnsupportedQueryException - when the query is not understood, malformed, or not supported
by a Sourceprotected SourceResponse query(QueryRequest queryRequest, ElementSetType elementSetName, List<QName> elementNames, Csw csw) throws UnsupportedQueryException
UnsupportedQueryExceptionpublic String getDescription()
DescribablegetDescription in interface DescribablegetDescription in class DescribableImplpublic String getId()
Describablehtml for a MetacardTransformer that transforms Metacards to HTMLgetId in interface DescribablegetId in class DescribableImplpublic void setId(String id)
MaskableImplsetId in class MaskableImplpublic void maskId(String newSourceId)
MaskableImplmaskId in interface MaskablemaskId in class MaskableImplnewSourceId - the new id to usepublic String getOrganization()
DescribablegetOrganization in interface DescribablegetOrganization in class DescribableImplpublic String getTitle()
DescribablegetTitle in interface DescribablegetTitle in class DescribableImplpublic String getVersion()
DescribablegetVersion in interface DescribablegetVersion in class DescribableImplpublic Set<String> getOptions(Metacard arg0)
ResourceReaderResource in a unique way.getOptions in interface ResourceReaderSet of all options that this ResourceReader supports. This will be an empty set
if no options are supported.public Set<String> getSupportedSchemes()
ResourceReaderURI schemes that the ResourceReader can accept when doing a Resource lookup. Custom schemes can be created for a ResourceReader to support.getSupportedSchemes in interface ResourceReaderSet of supported schemespublic ResourceResponse retrieveResource(URI resourceUri, Map<String,Serializable> requestProperties) throws IOException, ResourceNotFoundException, ResourceNotSupportedException
ResourceReaderretrieveResource in interface ResourceReaderresourceUri - A URI that defines what Resource to retrieve and how to do it.requestProperties - Any additional arguments that should be passed to the ResourceReader.ResourceResponse containing the retrieved Resource.IOExceptionResourceNotFoundExceptionResourceNotSupportedExceptionpublic void setCswUrl(String cswUrl)
public void setUsername(String username)
public void setPassword(String password)
public void setDisableCnCheck(Boolean disableCnCheck)
public void setCoordinateOrder(String coordinateOrder)
public void setUsePosList(Boolean usePosList)
public void setIsCqlForced(Boolean isCqlForced)
public void setMetacardMappings(String[] configuredMappings)
public void setFilterAdapter(FilterAdapter filterAdapter)
public void setFilterBuilder(FilterBuilder filterBuilder)
public void setPollInterval(Integer interval)
public com.thoughtworks.xstream.converters.Converter getCswTransformConverter()
public void setCswTransformConverter(com.thoughtworks.xstream.converters.Converter provider)
public String getForceSpatialFilter()
public void setForceSpatialFilter(String forceSpatialFilter)
protected List<Result> createResults(CswRecordCollection cswRecordCollection)
protected String getMetadataTransformerId()
protected Metacard transform(Metacard metacard, MetadataTransformer transformer)
metacard - protected MetadataTransformer lookupMetadataTransformer(String transformerId)
protected CapabilitiesType getCapabilities()
protected Subject getSystemSubject()
public void configureCswSource()
protected void setFilterDelegate(net.opengis.ows.v_1_0_0.Operation getRecordsOp,
net.opengis.filter.v_1_1_0.FilterCapabilities filterCapabilities,
net.opengis.ows.v_1_0_0.DomainType outputFormatValues,
net.opengis.ows.v_1_0_0.DomainType resultTypesValues,
CswSourceConfiguration cswSourceConfiguration)
FilterDelegate used by the AbstractCswSource. May be
overridden in order to provide a custom ddf.catalog.filter.FilterDelegate implementation.getRecordsOp - filterCapabilities - outputFormatValues - resultTypesValues - cswSourceConfiguration - protected void loadContentTypes()
public net.opengis.ows.v_1_0_0.DomainType getParameter(net.opengis.ows.v_1_0_0.Operation operation,
String name)
protected String handleWebApplicationException(javax.ws.rs.WebApplicationException wae)
protected void availabilityChanged(boolean isAvailable)
public void setAvailabilityTask(AvailabilityTask availabilityTask)
public void setSecurityManager(SecurityManager securityManager)
public String getConfigurationPid()
ConfiguredServicegetConfigurationPid in interface ConfiguredServicepublic void setConfigurationPid(String configurationPid)
ConfiguredServicesetConfigurationPid in interface ConfiguredServiceconfigurationPid - The unique PID of the configuration associated with this servicepublic Map<String,Set<String>> getSecurityAttributes()
SourcegetSecurityAttributes in interface Sourcepublic void setMetacardTypes(List<MetacardType> types)
public void setCsw201()
public void setRegisterForEvents(Boolean registerForEvents)
public void setEventServiceAddress(String eventServiceAddress)
protected void addSourceMonitor(SourceMonitor sourceMonitor)
This work is licensed under a Creative Commons Attribution 4.0 International License.