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>capabilitiesprotected List<DataView>supportedDataViewsprotected List<Layer>supportedLayersprotected List<LexField>supportedLexFieldsprotected intversion-
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.List<LexField>getSupportedLexFields()Get the list of lex fields that are supported in Lexical Search by this endpoint.intgetVersion()Get the version number of this endpoint description.booleanisVersion(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, getResource, getResourceList
-
-
-
-
Constructor Detail
-
AbstractEndpointDescriptionBase
protected AbstractEndpointDescriptionBase(int version, List<URI> capabilities, List<DataView> supportedDataViews, List<Layer> supportedLayers, List<LexField> supportedLexFields)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 endpointsupportedLexFields- a list of lex fields that are supported by this endpoint
-
-
Method Detail
-
getVersion
public int getVersion()
Description copied from interface:EndpointDescriptionGet the version number of this endpoint description.
Valid version are 1 for FCS 1.0 and 2 fpr FCS 2.0.- Specified by:
getVersionin interfaceEndpointDescription- Returns:
- the version number for this endpoint description
-
isVersion
public boolean isVersion(int version)
Description copied from interface:EndpointDescriptionCheck if this endpoint description is in a certain version.- Specified by:
isVersionin interfaceEndpointDescription- Parameters:
version- the version to check for- Returns:
true, if version number matches
-
getCapabilities
public List<URI> getCapabilities()
Description copied from interface:EndpointDescriptionGet 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-searchfor the Basic Search capability.The implementation of this method must be thread-safe.
- Specified by:
getCapabilitiesin interfaceEndpointDescription- Returns:
- the list of capabilities supported by this endpoint
-
getSupportedDataViews
public List<DataView> getSupportedDataViews()
Description copied from interface:EndpointDescriptionGet 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:
getSupportedDataViewsin interfaceEndpointDescription- Returns:
- the list of data views supported by this endpoint
-
getSupportedLayers
public List<Layer> getSupportedLayers()
Description copied from interface:EndpointDescriptionGet the list of layers that are supported in Advanced Search by this endpoint.The implementation of this method must be thread-safe.
- Specified by:
getSupportedLayersin interfaceEndpointDescription- Returns:
- the list of layers supported in Advanced Search by this endpoint
-
getSupportedLexFields
public List<LexField> getSupportedLexFields()
Description copied from interface:EndpointDescriptionGet the list of lex fields that are supported in Lexical Search by this endpoint.The implementation of this method must be thread-safe.
- Specified by:
getSupportedLexFieldsin interfaceEndpointDescription- Returns:
- the list of lex fields supported in Lexical Search by this endpoint
-
-