All files mentionned hereunder are located in http://www.askosi.org/example/
ASKOSI manages sets of SKOS data. Each set has its configuration files in a single directory. The set is therefore identified by the complete path of this directory. Lower/upper case are significant even under Windows. You can unzip the examples in such a directory. More explanations further below.
ASKOSI.jar must be in the shared lib directory of your Tomcat server. Depending on the version of Tomcat, you may have to configure this directory in tomcat/conf/catalina.properties:
Libraries called by ASKOSI must be also shared (Sesame, JDBC Drivers, Apache Commons, XSLT, etc.). This is an image of the sharedlib directory of a server running DSpace and ASKOSI. AD4J and DSLucene are not necessary if you do not run DSpace with ASKOSI.
"askosi" Web Application:#
Please unzip askosiWebapp.zip in tomcat/webapps/askosi and edit tomcat/webapps/askosi/WEB-INF/web.xml to indicate the SKOS Data directory for which you will be running ASKOSI Web Application. You can also change the list of ConceptSchemes that you want to preload for access.
These instructions applies to DSpace 1.7 and later for which there is an Authority Control Plugin API.
Unzip classes.zip in tomcat/webapps/dspace-jspui/WEB-INF/classes: this will install AskosiPlugin class and a very small addition to the DCInputSet class.
The same plugin (AskosiPlugin) is used for every field to be controlled. The AskosiPlugin looks in the InputForms defined for each collections (input-forms.xml) to decide which vocabularies to use. Example:
dcsubject true AgroVoc Keywords onebox Enter appropriate subject keywords below. c
"c" is the name of the ConceptScheme for AgroVoc. If another thesaurus could also be used in the same field, one could write: c,mesh
In dspace.cfg, you will put:
ASKOSI.directory = C:/ plugin.named.org.dspace.content.authority.ChoiceAuthority = \ be.destin.dspace.AskosiPlugin = ASKOSI choices.plugin.dc.subject = ASKOSI choices.presentation.dc.subject = lookup authority.controlled.dc.subject = true
The three last configuration lines above being repeated for each field controlled by ASKOSI (and with ConceptSchemes specified in input-forms.xml).
SKOS Data Examples and configurations#
In the ASKOSI Data/Configuration directory, you may unzip exampleAskosiData.zip:
- Files with extension .cfg, .rdf, .xml, .skos: those files are opened automatically when the ConceptScheme with the same name than the file is accessed.
- A .cfg file is needed if default parameters are not enough to open correctly a .rdf, a .skos or an .xml file.
The examples are:
- AAkeys.skos is processed using the standard Skos2skosXml.xslt to generate the standard ASKOSI XML format file AAkeys-cache.xml which can be loaded very rapidly in memory
- language.xml is only in XML
- userLanguage.cfg defines a SKOS Collection, subset of the "language" ConceptScheme
- dc.xml is an example of how we configure Update forms for DSpace 1.4 (not 1.7)
- c.skos is a SKOS/RDF file generated by ASKOSI after reading AgroVoc in its MySQL format
- c.cfg-mysql and agrovoc-pool.cfg is a configuration example for accessing AgroVoc in MySQL format
- c.cfg-bigskos is a configuration example for reading the big AgroVoc SKOS file from FAO (more than 700 megs!). It uses chunkSkosXml.xslt to translate each RDF statement in XML.
First access to ASKOSI:#
The access URL for ASKOSI is relative to your Tomcat installation and looks like: http://yourHost:8080/askosi/index.jsp
It is not because a ConceptScheme is configured that it is loaded. To load a ConceptScheme, you can either:
- access it: http://yourHost:8080/askosi/view.jsp?scheme=conceptSchemeCode
- preload it using a configuration file askosiSchemes.cfg containing a line:
It is recommended to have all your ASKOSI configuration files and data encoded in UTF-8. To do so, the best is to use an UTF-8 aware text editor (for instance Notepad++). We also recommend to leave empty the first line of .cfg files...
Tomcat and its JAVA Virtual Machine may have to be also configured for UTF-8 as the default character set.
To produce graphs, GraphViz.org must be installed on the same computer than Tomcat and tomcat/webapps/askosi/concept.jsp must be modified to point to the right GraphViz executable and also to the /webapps/askosi/graf directory where the graphs are written by GraphViz (and read by the browser through Tomcat).
Recent versions of GraphViz have problems with "splines=ortho": it is better to remove that line from concept.jsp.