Package eu.clarin.sru.server.fcs
Interface EndpointDescription
-
- All Known Implementing Classes:
AbstractEndpointDescriptionBase
,SimpleEndpointDescription
public interface EndpointDescription
An interface for abstracting resource endpoint descriptions. This interface allows you to provide a version of a endpoint description tailored to your environment.The implementation of this interface must be thread-safe.
-
-
Field Summary
Fields Modifier and Type Field Description static String
PID_ROOT
Constant for a (synthetic) persistent identifier identifying the top-most (= root) resources in the resource inventory.static int
VERSION_1
Constant for endpoint description version number for FCS 1.0static int
VERSION_2
Constant for endpoint description version number for FCS 1.0
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
destroy()
Destroy the resource info inventory.List<URI>
getCapabilities()
Get the list of capabilities supported by this endpoint.List<ResourceInfo>
getResourceList(String pid)
Get a list of all resources sub-ordinate to a resource identified by a given persistent identifier.List<DataView>
getSupportedDataViews()
Get the list of data views supported by this endpoint.List<Layer>
getSupportedLayers()
Get the list of layers that are supported in Advanced Search by this endpoint.int
getVersion()
Get the version number of this endpoint description.boolean
isVersion(int version)
Check if this endpoint description is in a certain version.
-
-
-
Field Detail
-
VERSION_1
static final int VERSION_1
Constant for endpoint description version number for FCS 1.0- See Also:
- Constant Field Values
-
VERSION_2
static final int VERSION_2
Constant for endpoint description version number for FCS 1.0- See Also:
- Constant Field Values
-
PID_ROOT
static final String PID_ROOT
Constant for a (synthetic) persistent identifier identifying the top-most (= root) resources in the resource inventory.- See Also:
- Constant Field Values
-
-
Method Detail
-
destroy
void destroy()
Destroy the resource info inventory. Use this method for any cleanup the resource info inventory needs to perform upon termination, i.e. closing of persistent database connections, etc.
-
getVersion
int getVersion()
Get the version number of this endpoint description.
Valid version are 1 for FCS 1.0 and 2 fpr FCS 2.0.- Returns:
- the version number for this endpoint description
-
isVersion
boolean isVersion(int version)
Check if this endpoint description is in a certain version.- Parameters:
version
- the version to check for- Returns:
true
, if version number matches
-
getCapabilities
List<URI> getCapabilities()
Get the list of capabilities supported by this endpoint. The list contains the appropriate URIs defined by the CLARIN-FCS specification to indicate support for certain capabilities. This list must always contain at leasthttp://clarin.eu/fcs/capability/basic-search
for the Basic Search capability.The implementation of this method must be thread-safe.
- Returns:
- the list of capabilities supported by this endpoint
-
getSupportedDataViews
List<DataView> getSupportedDataViews()
Get the list of data views supported by this endpoint. This list must always contain an entry for the Generic Hits (HITS) data view.The implementation of this method must be thread-safe.
- Returns:
- the list of data views supported by this endpoint
-
getSupportedLayers
List<Layer> getSupportedLayers()
Get the list of layers that are supported in Advanced Search by this endpoint.The implementation of this method must be thread-safe.
- Returns:
- the list of layers supported in Advanced Search by this endpoint
-
getResourceList
List<ResourceInfo> getResourceList(String pid) throws SRUException
Get a list of all resources sub-ordinate to a resource identified by a given persistent identifier.The implementation of this method must be thread-safe.
- Parameters:
pid
- the persistent identifier of the superior resource- Returns:
- a list of all sub-ordinate ResourceInfo or
null
if not applicable - Throws:
SRUException
- if an error occurred
-
-