Thesaurus full example

From OpenKM Documentation
Jump to: navigation, search

OpenKM.cfg configuration


Nota advertencia.png Starting from OpenKM 5.1.x all this configuration should be configured from Administration > Configuration, so do not edit this OpenKM.cfg file because will be ignored.

kea.thesaurus.owl.file=vocabulary/inroute.owl
kea.thesaurus.base.url=http://www.inroutenetwork.org
kea.thesaurus.tree.root=SELECT DISTINCT UID, TEXT FROM {UID} Y {OBJECT}, {UID} rdfs:label {TEXT} ; [rdfs:subClassOf {CLAZZ}] where not bound(CLAZZ) and lang(TEXT)="en" USING NAMESPACE foaf=<http://xmlns.com/foaf/0.1/>, dcterms=<http://purl.org/dc/terms/>, rdf=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>, owl=<http://www.w3.org/2002/07/owl#>, rdfs=<http://www.w3.org/2000/01/rdf-schema#>, skos=<http://www.w3.org/2004/02/skos/core#>, dc=<http://purl.org/dc/elements/1.1/>
kea.thesaurus.tree.childs=SELECT DISTINCT UID, TEXT FROM {UID} rdfs:subClassOf {CLAZZ}, {UID} rdfs:label {TEXT} where xsd:string(CLAZZ) = "RDFparentID" and lang(TEXT)="en" USING NAMESPACE foaf=<http://xmlns.com/foaf/0.1/>, dcterms=<http://purl.org/dc/terms/>, rdf=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>, owl=<http://www.w3.org/2002/07/owl#>, rdfs=<http://www.w3.org/2000/01/rdf-schema#>, skos=<http://www.w3.org/2004/02/skos/core#>, dc=<http://purl.org/dc/elements/1.1/>

Nota clasica.png Exceptionaly, after OpenKM thesaurus parameters are configured Tomcat must be restarted, because thesaurus dictionary is loaded during Tomcat startup. After that you can run the thesaurus generation process.

inroute.owl file

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
	xmlns:foaf="http://xmlns.com/foaf/0.1/"
	xmlns:dcterms="http://purl.org/dc/terms/"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:owl="http://www.w3.org/2002/07/owl#"
	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
	xmlns:skos="http://www.w3.org/2004/02/skos/core#"
	xmlns:dc="http://purl.org/dc/elements/1.1/">

<rdf:Description rdf:about="http://www.inroutenetwork.org">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Ontology"/>
	<rdfs:comment>INROUTE</rdfs:comment>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_1">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Visitors trips and activities</rdfs:label>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_2">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Supply and employment</rdfs:label>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_3">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Tourism and territory</rdfs:label>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_4">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Tourism destination management</rdfs:label>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_5">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Research and tools</rdfs:label>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_1_1">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Visitor</rdfs:label>
	<rdfs:subClassOf rdf:resource="http://www.inroutenetwork.org#c_1"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_1_2">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Trip</rdfs:label>
	<rdfs:subClassOf rdf:resource="http://www.inroutenetwork.org#c_1"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_1_3">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Activities</rdfs:label>
	<rdfs:subClassOf rdf:resource="http://www.inroutenetwork.org#c_1"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_1_4">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Measurement and analysis tools (A.5)</rdfs:label>
	<rdfs:subClassOf rdf:resource="http://www.inroutenetwork.org#c_1"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_1_5">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Forecast modellinsg (A.6)</rdfs:label>
	<rdfs:subClassOf rdf:resource="http://www.inroutenetwork.org#c_1"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_1_6">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Other accounting tools (A7)</rdfs:label>
	<rdfs:subClassOf rdf:resource="http://www.inroutenetwork.org#c_1"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_1_7">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Other terms</rdfs:label>
	<rdfs:subClassOf rdf:resource="http://www.inroutenetwork.org#c_1"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_1_8">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Forms of toruism</rdfs:label>
	<rdfs:subClassOf rdf:resource="http://www.inroutenetwork.org#c_1"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_2_1">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Establishments ( productive )</rdfs:label>
	<rdfs:subClassOf rdf:resource="http://www.inroutenetwork.org#c_2"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_2_2">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Companies</rdfs:label>
	<rdfs:subClassOf rdf:resource="http://www.inroutenetwork.org#c_2"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_2_3">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Tourism industries</rdfs:label>
	<rdfs:subClassOf rdf:resource="http://www.inroutenetwork.org#c_2"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_2_4">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Job</rdfs:label>
	<rdfs:subClassOf rdf:resource="http://www.inroutenetwork.org#c_2"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.inroutenetwork.org#c_2_5">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
	<rdfs:label xml:lang="en">Other terms</rdfs:label>
	<rdfs:subClassOf rdf:resource="http://www.inroutenetwork.org#c_2"/>
</rdf:Description>

</rdf:RDF>

Additional steps

  • Create folder $TOMCAT_HOME/vocabulary
  • Copy the file inroute.owl into vocabulary folder
  • Login with some user with administrator grants
  • Select administrator tab
  • Select generate thesaurus option


Okm installation guide 001.jpeg


  • Select the show level and execute send


Okm installation guide 002.jpeg


Now in thesaurus view you'll see


Okm installation guide 003.jpeg