11/03/2014

Visualiser rapidement une ontologie dans une page WEB

1. Créez votre ontologie avec Protege.
2. Convertissez votre fichier XML/RDF en json-exhibit : http://service.simile-widgets.org/babel/
3. Faites valider le contenu de votre fichier : http://jsonlint.com/ (attention problème avec les apostrophes !!!)
4. Créez un fichier HTML incluant Exhibit http://simile-widgets.org/wiki/Exhibit (voir la doc de l'utilisateur) ou un exemple de code ci-dessous : (remplacer "comptabiliteM14apost.js" par votre fichier.
Voir la doc de l'utilisation de Exhibit pour personnaliser l'affichage.

exemple de page html : 

<html>
<head>
<title> Exhibit | Examples | MIT Nobel Prize Winners</title>
<link href="comptabiliteM14apost.js" type="application/json" rel="exhibit-data" />
<!-- Replace the URL here with your Exhibit 3.0 script location -->
<script src="http://api.simile-widgets.org/exhibit/3.0.0rc1/exhibit-api.js"
type="text/javascript"></script>
<style>
</style>
</head>
<body>
<div id="main-content">
<div id="title-panel">
<h1>63 MIT-related Nobel Prize Winners</h1>
</div>
<div id="top-panels">
<table width="100%"><tr>
Facets for sorting and browsing go here</tr></table>
</div>
<div ex:role="viewPanel" style="padding: 1em 0.5in;">
<div ex:role="view"
ex:label="Details"
ex:viewClass="Tile"
ex:showAll="true"
</div>
</td>
</tr>
</table>
</table>
</body>
</html>

exemple de fichier de données : comptabiliteM14apost.js (comptabilité pour les communes de moins de 500 habitants)





Aucun commentaire:

Enregistrer un commentaire