01 - Ajout d'un vocabulaire statique dans ori-oai-vocabulary

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

Compare with Current View Page History

Version 1 Current »

Les valeurs citées ci-dessus peuvent être potentiellement utilisées par plusieurs des modules ORI-OAI. On souhaite donc définir un nouveau vocabulaire dans le module ori-oai-vocabulary.

Ici ce vocabulaire est statique, on suivra donc la documentation de la publication de vocabulaires statiques.

On donnera comme identifiant à ce nouveau vocabulaire common_lom_educ_semantic_density.
Ce nouveau vocabulaire sera donc donné dans un fichier XML statique ayant pour nom common_lom_educ_semantic_density.xml.

common_lom_educ_semantic_density.xml est à positionner dans le répertoire
[ORI_HOME]/src/ori-oai-vocabulary-svn/conf/properties/ori_vocabularies/override

Contenu de common_lom_educ_semantic_density.xml:

<vdex:vdex xmlns:vdex="http://www.imsglobal.org/xsd/imsvdex_v1p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsvdex_v1p0 http://www.imsglobal.org/xsd/imsvdex_v1p0.xsd" xs:version="0.2">
  <vdex:vocabIdentifier isRegistered="false">semantic_density</vdex:vocabIdentifier>
  <vdex:term>
    <vdex:termIdentifier>very_low</vdex:termIdentifier>
    <vdex:caption>
      <vdex:langstring language="fr">très bas</vdex:langstring>
      <vdex:langstring language="en">very_low</vdex:langstring>
    </vdex:caption>
  </vdex:term>
  <vdex:term>
    <vdex:termIdentifier>low</vdex:termIdentifier>
    <vdex:caption>
      <vdex:langstring language="fr">facile</vdex:langstring>
      <vdex:langstring language="en">easy</vdex:langstring>
    </vdex:caption>
  </vdex:term>
  <vdex:term>
    <vdex:termIdentifier>medium</vdex:termIdentifier>
    <vdex:caption>
      <vdex:langstring language="fr">moyen</vdex:langstring>
      <vdex:langstring language="en">medium</vdex:langstring>
    </vdex:caption>
  </vdex:term>
  <vdex:term>
    <vdex:termIdentifier>high</vdex:termIdentifier>
    <vdex:caption>
      <vdex:langstring language="fr">élevé</vdex:langstring>
      <vdex:langstring language="en">high</vdex:langstring>
    </vdex:caption>
  </vdex:term>
<vdex:term>
   <vdex:termIdentifier>very_high</vdex:termIdentifier>
    <vdex:caption>
      <vdex:langstring language="fr">trés élevé</vdex:langstring>
      <vdex:langstring language="en">very high</vdex:langstring>
    </vdex:caption>
  </vdex:term>
</vdex:vdex>

Pour prendre en compte ce nouveau vocabulaire, il faut maintenant déployer le module de vocabulaires :

ant all

et relancer le Tomcat correspondant au module de vocabulaires (histoire de relancer l'application de vocabulaires)

Le plus simple pour tester la récupération de ce vocabulaire (et donc vérifier qu'il a bien été configuré, bien pris en compte par le module) est de consulter sur votre navigateur l'URL suivante :
http:// [HOST_INSTALL] :8183/ori-oai-vocabulary/?id=common_lom_educ_semantic_density

Cela devrait vous renvoyer le XML correspondant.

Note : Le module de vocabulaires utilise un système de cache évolué. Aussi lorsque vous modifiez un vocabulaire, si vous souhaitez que celui-ci soit pris en compte directement, le plus simple est de stopper Tomcat, supprimer les fichiers vocabularyServiceCache.data et vocabularyServiceCache.index qui se trouvent dans le répertoire temporaire de Java/Tomcat (normalement le répertoire temp du Tomcat (répertoire tmp par défaut de Tomcat), cela peut aussi être sous /tmp (répertoire tmp par défaut de Java) ...

Vocabulaires dynamiques

Pour la publication de vocabulaires dynamiques, voir cette page.

  • No labels