Old Release

This documentation relates to an old version of VIVO, version 1.12.x.
Looking for another version? See all documentation.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

Summary

This document presents the process required to develop a new language to be integrated into VIVO and Vitro. It is intended for any developer who wishes to develop a new integrated language. The development process requires a good knowledge of the VIVO internal structure and its internal working mechanisms. This document describes the development cycle of new languages as well as the components required for this development.

Overview

Development Cycle


Vivo's internationalization process is a five-step cycle:

  • Step 1) At the beginning of the cycle, the first step is to compile, deploy, and run the Vivo instance on the local computer.
  • Step 2) The second step is to test and identify problems related to internationalization.
  • Step 3) If everything works properly this ends the development cycle.
    • When a problem is identified it is necessary to search the code to find the problem.
    • This involves doing a lot of pattern managing search activities.
  • Step 4) In fourth place, comes the stage of correcting the problem.
    • Once the problem has been identified, the professional must edit the concerned file to make correction.
  • Step 5) In step five certain databases need to be initialized depending on the type of correction made.
    • Then back to step one of recompiling and running vivo.

Development iteration

The development of VIVO's internationalization is an iterative process that requires several iterations before full internationalization is achieved. Each iteration runs through the development cycle we discussed earlier. In the following section we will present the different iterations by demonstrating the internationalization of the French Canadian. Each iteration will contain a section describing the purpose of the iteration, a section demonstrating each stage of the development cycle, and in conclusion a summary explaining the highlights of the iteration.


Iteration 1: Initializing the development environment

Goal:

This itération consists in setting up the software elements necessary to run an VIVO instance on a local host and prepare directories to undertake the task of internationalizing VIVO's content.

At the end of this iteration all software and data components will be in place to start the process of translating the files into the target language. French Canadian will be used as the demonstration language.

Item A) VIVO's software infrastructure installation

A.1 Linux configuration

Assume the configuration of the following environment variables

Example for Linux
export GIT_HOME=/opt/tomcat/GIT
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export SOLR=/opt/solr
export TOMCAT_HOME=/opt/tomcat
export VIVO_HOME=/opt/tomcat/vivo_i18n

First it is necessary to install Java, Maven, GIT, and SOLR. If necessary, you will find instructions at the following link: Starting with basic installation: Java-Maven-Solr-GIT

Secondly, it is essential to install the Apache Tomcat application server. You will find the necessary instructions for its installation at the following link: Installing Tomcat 8.5 for Vivo-1.11.0-i18n

A.2 UQAM-DEV

An alternative VIVO deployment management solution is also available. You can see it here: UQAM-DEV R.3 : An Interoperable UQAM Development Environment for VIVO (UQAM-DEV)

Item B) Configuring the source code workspace and extracting the code

StepAction

1) Creating the GIT directory

Whether under Windows or on Unix it is necessary to create a space in which it is possible to work. As proposals we suggest creating a directory called under the Tomcat root directory. In the case of users and Unix we suggest to carry out the operations under the tomcat username. This precaution facilitates the management of credentials associated with development under Linux.

sudo -i -u tomcat # sudo in Linux - not on Windows
mkdir $TOMCAT_HOME/GIT # $TOMCAT_HOME is predefined at the installation of Tomcat
cd $TOMCAT_HOME/GIT

2) Retrieving VIVO the code

To VIVO internationalization, it is necessary to extract the four following GitHub repo:


git clone https://github.com/vivo-project/Vitro.git Vitro -b branch_name_to_be_coming
git clone https://github.com/vivo-project/VIVO.git VIVO -b branch_name_to_be_coming
git clone https://github.com/vivo-project/VIVO-languages VIVO-languages -b branch_name_to_be_coming
git clone https://github.com/vivo-project/Vitro-languages Vitro-languages -b branch_name_to_be_coming

3) Retrieving UQAM Vivo-installer-i18n

The installer makes it easy to manage the compilation and deployment of the VIVO instance.

git clone https://github.com/UQAM-SB/Vivo-installer-i18n

Item C) Configuring the VIVO search accelerator (SOLR)

StepAction

1) Configuring SOLR

follow the configuration steps available at this link: Configure and Start Solr

2) Check vivocore in Solr

sudo systemctl start solr
http://localhost:8983/solr/#/vivocore_i18n/core-overview

Item D) Preparing VIVO for first start

StepAction

1) Create VIVO home

sudo -i -u tomcat # for Linux user
mkdir -p $VIVO_HOME/home
cp -r $TOMCAT_HOME/GIT/vivo-uqam-i18n/vivo-project-i18n-config/vivo_i18n/home/* $VIVO_HOME/home/

2) Edit runtime.properties file

Make sure that attribute properties fit with current installation



sudo -u tomcat vi $VIVO_HOME/home/config/runtime.properties
runtime.properties
Vitro.defaultNamespace = http://<your-server-ip-address>:8080/vivo_i18n/individual/
...

rootUser.emailAddress = YOUR_ADRESS
rootUser.passwordChangeRequired = false
rootUser.password = YOUR-PASSWORD
...

vitro.local.solr.url = http://<server-ip-address>:8983/solr/vivocore_i18n
...
RDFService.languageFilter = true
languages.selectableLocales = fr_CA, en_US, de_DE

3) Edit applicationSetup.n3 for TDB data persistence

applicationSetup.n3
# UNCOMMENT
:tdbContentTripleSource
    a   vitroWebapp:triplesource.impl.tdb.ContentTripleSourceTDB ,
        vitroWebapp:modules.tripleSource.ContentTripleSource ;
    # May be an absolute path, or relative to the Vitro home directory.
    :hasTdbDirectory "tdbContentModels" .

:sparqlContentTripleSource
    a   vitroWebapp:triplesource.impl.sparql.ContentTripleSourceSPARQL ,
        vitroWebapp:modules.tripleSource.ContentTripleSource ;
    # The URI of the SPARQL endpoint for your triple-store.
    :hasEndpointURI "http://localhost:3030/vivo/query" ;
    # The URI to use for SPARQL UPDATE calls against your triple-store. 
    :hasUpdateEndpointURI "http://localhost:3030/vivo/update" .

COMMENT
#:sdbContentTripleSource
#    a   vitroWebapp:triplesource.impl.sdb.ContentTripleSourceSDB ,
#        vitroWebapp:modules.tripleSource.ContentTripleSource .

#REPLACE
:application
    a   vitroWebapp:application.ApplicationImpl ,
        vitroWebapp:modules.Application ;
    :hasSearchEngine              :instrumentedSearchEngineWrapper ;
    :hasSearchIndexer             :basicSearchIndexer ;
    :hasImageProcessor            :iioImageProcessor ;
    :hasFileStorage               :ptiFileStorage ;
    :hasContentTripleSource       :tdbContentTripleSource ;
#    :hasContentTripleSource       :sdbContentTripleSource ;
#    :hasConfigurationTripleSource :tdbConfigurationTripleSource ;
    :hasConfigurationTripleSource :tdbConfigurationTripleSource ;
    :hasTBoxReasonerModule        :jfactTBoxReasonerModule .

4) Edit and configure VIVO installation setting file 


Check that the file contains the following code:

cd $GIT_HOME/Vivo-installer-i18n
sudo -u tomcat cp example_settings_i18n_linux.xml settings_i18n_linux.xml
sudo -u tomcat vi settings_i18n_linux.xml
settings_i18n_uqam.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
        <profiles>
                <profile>
                        <id>defaults</id>
                        <properties>
                                <app-name>vivo_i18n</app-name>
                                <vivo-dir>/opt/tomcat/vivo_i18n/home</vivo-dir>
                                <tomcat-dir>/opt/tomcat</tomcat-dir>
                                <default-theme>wilma</default-theme>
                        </properties>
                </profile>
        </profiles>
        <activeProfiles>
                <activeProfile>defaults</activeProfile>
        </activeProfiles>
</settings>


1) Compile and deploye a new/corrected instance of VIVO and start it


2) Running VIVO for testing and/or finding an i18n problem

3) Searching for the problematic file in the VIVO source code

4) Editing the problematic file

5) If necessary reset the various VIVO's indexes and databases

  • No labels