Package eu.clarin.sru.server.fcs.utils
Class AbstractEndpointDescriptionBase
- java.lang.Object
-
- eu.clarin.sru.server.fcs.utils.AbstractEndpointDescriptionBase
-
- All Implemented Interfaces:
EndpointDescription
- Direct Known Subclasses:
SimpleEndpointDescription
public abstract class AbstractEndpointDescriptionBase extends Object implements EndpointDescription
An abstract base class for implementing endpoint descriptions. It already implements the methods required for capabilities and supported data views.- See Also:
EndpointDescription
-
-
Field Summary
Fields Modifier and Type Field Description protected List<URI>
capabilities
protected List<DataView>
supportedDataViews
protected List<Layer>
supportedLayers
protected int
version
-
Fields inherited from interface eu.clarin.sru.server.fcs.EndpointDescription
PID_ROOT, VERSION_1, VERSION_2
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<URI>
getCapabilities()
Get the list of capabilities supported by this endpoint.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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface eu.clarin.sru.server.fcs.EndpointDescription
destroy, getResourceList
-
-
-
-
Constructor Detail
-
AbstractEndpointDescriptionBase
protected AbstractEndpointDescriptionBase(int version, List<URI> capabilities, List<DataView> supportedDataViews, List<Layer> supportedLayers)
Constructor.- Parameters:
version
- version of this endpoint descriptioncapabilities
- a list of capabilities supported by this endpointsupportedDataViews
- a list of data views that are supported by this endpointsupportedLayers
- a list of layers that are supported by this endpoint
-
-
Method Detail
-
getVersion
public int getVersion()
Description copied from interface:EndpointDescription
Get the version number of this endpoint description.
Valid version are 1 for FCS 1.0 and 2 fpr FCS 2.0.- Specified by:
getVersion
in interfaceEndpointDescription
- Returns:
- the version number for this endpoint description
-
isVersion
public boolean isVersion(int version)
Description copied from interface:EndpointDescription
Check if this endpoint description is in a certain version.- Specified by:
isVersion
in interfaceEndpointDescription
- Parameters:
version
- the version to check for- Returns:
true
, if version number matches
-
getCapabilities
public List<URI> getCapabilities()
Description copied from interface:EndpointDescription
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.
- Specified by:
getCapabilities
in interfaceEndpointDescription
- Returns:
- the list of capabilities supported by this endpoint
-
getSupportedDataViews
public List<DataView> getSupportedDataViews()
Description copied from interface:EndpointDescription
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.
- Specified by:
getSupportedDataViews
in interfaceEndpointDescription
- Returns:
- the list of data views supported by this endpoint
-
getSupportedLayers
public List<Layer> getSupportedLayers()
Description copied from interface:EndpointDescription
Get the list of layers that are supported in Advanced Search by this endpoint.The implementation of this method must be thread-safe.
- Specified by:
getSupportedLayers
in interfaceEndpointDescription
- Returns:
- the list of layers supported in Advanced Search by this endpoint
-
-