The eENVplus infrastructure includes the Linked Thesaurus fRamework for the Environment (LusTRE) consisting of a compilation of various environmental thesauri and the interlinking between the concepts addressed by them. Thesauri in the framework are exposed as a collection of SKOS concept schemes, which provides lightweight semantics for thesaurus concepts.
The main goal of having such a framework is to be able to preserve and retrieve the information based on the semantic definitions, rather than just lexical keywords. This would guarantee the uniformity of the persisted metadata information, as well as discoverability of metadata based on the semantic meanings even if metadata include diverse and dissimilar keywords.
To be able to utilize this wealth of semantic information in various applications of the eENVplus project, particularly in metadata compilation and discovery, LusTRE must be enhanced by a set of exploitation/retrieval means. The Thesaurus Framework Exploitation Services (TFES) is an application which provides such exploitation capabilities within a web interface.
TFES is licensed under the Apache Licence 2.0.
TFES is developed as a Java web application and can be deployed to a servlet container such as Apache Tomcat.
/WEB-INF/classes/config/rest-endpoints.properties
/WEB-INF/classes/config/service-capabilities.properties
This configuration file defines static service metadata for usage inside a GetCapabilities response.
Please adapt the property service.metadata.onlineReference to your environment: http://<hostname>:<port>/<tfes_application>/rest
/WEB-INF/classes/config/service-modules.properties
This configuration file defines the active service modules and the SPARQL endpoint. Currently the following service modules are available:
keyword.completion.module
(KeywordCompletion module)keyword.completion.cross-walking.module
(KeywordCompletion module, cross-walking enabled)keyword.explanation.module
(KeywordExplanation module)keyword.translation.module
(KeywordTranslation module)keyword.translation.cross-walking.module
(KeywordTranslation module, cross-walking enabled)thesaurus.resolution.module
(ThesaurusResolution module)semantic.explorative.search.module
(SemanticExplorativeSearch module)semantic.explorative.search.cross-walking.module
(SemanticExplorativeSearch module, cross-walking enabled)topmost.concept.module
(TopMostConcepts module)
/WEB-INF/dataSources-config.xml
This configuration files defines the active thesauri, while the service assumes that these thesauri are available within the configured SPARQL endpoint in the service-modules.properties
file.
To enable and configure SPARQL forwarding at the endpoint defined in rest-endpoints.properties
, set an URL to which the requests should be forwarded to in the service-module.properties
, e.g.:
sparql.endpoint.url=http://linkeddata.ge.imati.cnr.it:8890/sparql
The GetCapabilities operation provides all information about the deployed TFES instance. It contains information about the institution hosting the service. Also it lists all available operations and thesauri.
Request example:
http://<hostname>:<port>/<tfes_application>/rest/GetCapabilities
The sparql operation is a direct forward to the internally used SparQL endpoint. It supports all HTTP methods despite the capabilities document which reports GET which is the HTTP method TFES uses itself.
Request example:
http://<hostname>:<port>/<tfes_application>/rest/sparql?query=select+distinct+\*+where+%7B%3Fx+a+skos%3AConceptScheme%3B+dcterms%3Atitle+%3Ftitle++%7D+LIMIT+2&format=application%2fsparql-results%2bjson
The GetSuggestions operation is used to find concepts which have a label starting with the provided keyword. Case is ignored. As labels currently skos:prefLabel and skos:altLabel are considered. When languages are given TFES considers only labels of the given languages. Similarly only requested thesauri or service modules are used. By default all available languages, thesauri and service modules are used.
The GetSuggestions operation can be enhanced by specifying the cross-walking=true
parameter. This generally leads to a smaller but more focused result set. With active cross-walking TFES will take the concept uri into account. Concepts linked by skos:exactMatch are considered the same concept. This concept will only be contained the response once using label from the thesaurus with highest rank.
Request examples:
http://:/<tfes_application>/rest/GetSuggestions?keyword=geography&maxCount=3&languages=en&source=true http://:/<tfes_application>/rest/GetSuggestions?keyword=geography&languages=en&cross-walking=true&source=true
The DescribeConcept operation is used to find all information to the given concept. Literals can be constrained to respect the given languages. The reported properties can be enlarged to include all properties of exact matches by setting the cross-walking parameter to true. By using the source parameter such external properties can be identified.
Request example:
http://<hostname>:<port>/<tfes_application>/rest/DescribeConcept?concept=http://linkeddata.ge.imati.cnr.it/resource/EARTh/64850&languages=en&cross-walking=true&source=true
The GetSynonyms operation is used to find different labels of the given concept while considering only given languages. With active cross-walking also concepts related by skos:exactMatch are considered. In that case filtering for specific thesauri can be useful.
Request examples:
http://<hostname>:<port>/<tfes_application>/rest/GetSynonyms?concept=http://linkeddata.ge.imati.cnr.it/resource/EARTh/64850&languages=en,it
http://<hostname>:<port>/<tfes_application>/rest/GetSynonyms?concept=http://linkeddata.ge.imati.cnr.it/resource/EARTh/64850&languages=en,it&cross-walking=true
The GetRelatives operation is used to find related concepts to the given concepts. All concepts related by skos:related , skos:broader or skos:narrower are returned. The result items are filtered by the given languages and thesauri. Again cross-walking can be used to increase the result count by also considering relatives of exact matches of the given concept.
The GetRelatives operation is one of the main features of TFES. When cross-walking is used with this operation not only the result set is increased by the described semantics. Additionally the relations obtained from exact matches are mapped according to the table.
Request examples:
http://<hostname>:<port>/<tfes_application>/rest/GetRelatives?concept=http://linkeddata.ge.imati.cnr.it/resource/EARTh/64850&languages=en
The GetTopMostConcepts operation is used to find the root elements of the given thesauri. When no thesauri are given the root concepts of all thesauri are returned. The result items are filtered to contain only keywords in the given languages.
Request examples:
http://<hostname>:<port>/<tfes_application>/rest/GetTopMostConcepts?thesauri=http://linkeddata.ge.imati.cnr.it/resource/SkosConceptScheme/1&languages=en&maxCount=2
The ResolveThesaurus operation is used to provide citation metadata to the given concept.
Request example:
http://<hostname>:<port>/<tfes_application>/rest/ResolveThesaurus?concept=http://linkeddata.ge.imati.cnr.it/resource/EARTh/64850
TFES was developed as a Java web application. The build process of the application is managed by Maven. There is a parent project which serves as the main entry point for building TFES. A complete build can be triggered within this project. The final artefact, the deployable war file, can be found in the target directory of the web project after a successful build.
Note that for the integration tests a working sparql connection is required. It may be necessary to change the configuration to suit the build environment. Since the war file is created before running the integration tests even without a working connection TFES can be built.
To build the application run maven on its main directory.
mvn clean install
Feel free to contribute! :-)