f
fluidlog 8 years ago
Historique (2014) :
Nous sauvegardons tout ce qui avait été écrit en 2014 pour r
f
fluidlog 8 years ago
personnellement, j'utilise des liens symboliques depuis /var/www/html vers les r
f
fluidlog 8 years ago
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.h
f
fluidlog 8 years ago
Le "--recursive" permet de récupérer directement le "submudule git" Fluidgraph
la
f
fluidlog 8 years ago
Attention ! Bien mettre le nom complet et non le ~/truc, et éviter les chemins a
- Cartographie des PAIR
- Intro
- Qui ?
- Quoi ?
- Comment ?
- Explications des sous-projets
- Ontologie de l'AV et autres ontologies du web
- FluidgraphClient
- FluidGraph
- LDP Framework
- Rwwplay!
- Semantic Forms
- Références pour aller plus loin :
- Autres implémentations de LDP :
- Discussion correspondante dans basecamp :
- Spécifications LDP :
- Introduction au web sémantique (Linked Data)
- Tutoriel sur le Web distribué avec LDP
- Monter un environnement de test
- Prérequis :
- GO !
- Lancer (en local) le serveur Semantic Forms :
- Lancer (en local) le serveur Rwwplay!
- Vérification de bon fonctionnement
- Pour lancer FluidGraph :
- POST d'un triplet dans Rwwplay!
- Nous allons d'abord créer un container "cartopair"
- GET d'un triplet dans rwwplay!
- A présent, débarrassons-nous du contexte de Sylvain ! :)
- Données de contexte représentant une Carto PAIR
- Données JSOND3 (c'est à dire celles qu'on donne à D3js) de base :
- Création du JSON-LD
- POST dans Semantic forms en ligne de commande
- GET dans Semantic Forms en ligne de commande
- Tests à lancer dans la console de FluidGraph
- Erreur JS dans la console :
- Code JS appelant le LDP-Framework
- Exemple d'objet JS contenant le JSON-LD
- Sauvegarde depuis FluidGraph
- GET (console) une fois sauvegardé avec FluiGraph dans SemForms
- Exercices de sémantisation de l'information
- Nouveau test avec une information simple
- Test sur Semantic Forms
- Bug
- Nouveau test sur Semantic Forms avec le contexte simplifié
- The "John Lennon" test ...
- Comment publier un contexte JSON-LD en ligne ?
- UPDATE d'un JSON-LD existant
- Synthèse des problèmes
Attention : Ce PAD présente certaines technologies qui fonctionnent dans l'état, mais qui ne seront pas maintenues par l'assemblée virtuelle (AV). L'AV migre peu à peu vers les nouveaux protocoles du W3C comme SOLID (intégrant LDP).
Intro
Explications des sous-projets
Références pour aller plus loin :
Monter un environnement de test
cd ~/projets/semantic_forms/scala/forms_play
~/opt/activator-dist-1.3.5/activator
... l'activator télécharge tout ce qu'il faut pour ensuite pouvoir faire :
> run
cd ~/projets/rwweb-0.7.2-SNAPSHOT
bin/rwweb -Dhttps.port=8443 -Dhttps.trustStore=noCA -Drww.root.container.path=/home/yannick/projets/ldpwww
POST d'un triplet dans Rwwplay!
cp -r todos cartopair
var myStore = new MyStore({ container : "https://localhost:8443/2013/cartopair/",
context : "http://owl.openinitiative.com/oicontext.jsonld",
template : "",
partials : ""})
var jsonLd = {
"@context":{
"av" : "http://www.assemblee-virtuelle.org/ontologies/v1.owl#"
},
"@type" : "av:Organization"
}
myStore.save(jsonLd);
GET d'un triplet dans rwwplay!
store.get("https://localhost:8443/2013/cartopair/2ef17ab70e").then(console.log.bind(console))
A présent, débarrassons-nous du contexte de Sylvain ! :)
var serverUri = "https://localhost:8443/2013/cartopair/";
var contextmap = {
"@context":{
"av" : "http://www.assemblee-virtuelle.org/ontologies/v1.owl#"
}}
var store = new MyStore({ container : serverUri,
context : contextmap,
template : "",
partials : ""})
var jsonLd = {"@type" : "av:Organization"}
store.save(jsonLd);
store.get("https://localhost:8443/2013/cartopair/23e45cbe1d").then(console.log.bind(console))
Données de contexte représentant une Carto PAIR
{
"nodes":
[
{"index":0,"label":"A","type":"project","x":100,"y":100,"identifier":"http://fluidlog.com/node/0"},
{"index":1,"label":"B","type":"idea","x":200,"y":200,"identifier":"http://fluidlog.com/node/1"},
{"index":2,"label":"C","type":"project","x":300,"y":300,"identifier":"http://fluidlog.com/node/2"}
],
"edges":
[
{"index" : 0, "source":0, "target":1, "type":"loglink:linkedto", "identifier": "http://fluidlog.com/edge/2"}
]
}
{
"@id" : "http://localhost:9000/ldp/fluidlog/carto5",
"@context":{
"loglink": "http://www.fluidlog.com/2013/05/loglink/core#",
"nodes": "http://www.fluidlog.com/2013/05/loglink/core#node",
"label": "http://www.w3.org/2000/01/rdf-schema#label",
"index": "http://www.fluidlog.com/2013/05/loglink/core#index",
"x": "http://www.fluidlog.com/2013/05/loglink/core#x",
"y": "http://www.fluidlog.com/2013/05/loglink/core#y",
"edges": "http://www.fluidlog.com/2013/05/loglink/core#linkedto",
"source": "http://www.fluidlog.com/2013/05/loglink/core#source",
"target": "http://www.fluidlog.com/2013/05/loglink/core#target",
"av": "http://www.assemblee-virtuelle.org/ontologies/v1.owl#"
},
"nodes":[
{"@id":"http://fluidlog.com/node/0","@type":"av:project","index":"0","label":"A","x":"101","y":"102"},
{"@id":"http://fluidlog.com/node/1","@type":"av:idea","index":"1","label":"B","x":"203","y":"204"},
{"@id":"http://fluidlog.com/node/2","@type":"av:project","index":"2","label":"C","x":"305","y":"306"}
],
"edges" : [
{ "@id" : "http://fluidlog.com/edge/0",
"@type":"loglink:linkedto",
"index": "0",
"source" : "http://fluidlog.com/node/0",
"target" : "http://fluidlog.com/node/1"}
]
}
POST dans Semantic forms en ligne de commande
GET dans Semantic Forms en ligne de commande
wget --header='Accept:text/json-ld' http://localhost:9000/ldp/fluidlog/carto5
Tests à lancer dans la console de FluidGraph
store = new MyStore({container : "http://localhost:9000/ldp/fluidlog/",context : "http://owl.openinitiative.com/oicontext.jsonld", template:"", partials:""})
store.get("http://localhost:9000/ldp/fluidlog/carto5 ").then(console.log.bind(console))
Code JS appelant le LDP-Framework
var myStore = new MyStore({
container : "http://localhost:9000/ldp/fluidlog/",
context : "http://owl.openinitiative.com/oicontext.jsonld",
template : "",
partials : ""});
myStore.save(jsonLd);
var jsonLd = {
"@context":"http://owl.openinitiative.com/oicontext.jsonld",
"nodes":
[
{"@id":"http://fluidlog.com/0","@type":"av:project","index":"0","label":"A","x":"201","y":"202"},
{"@id":"http://fluidlog.com/1","@type":"av:idea","index":"1","label":"B","x":"303","y":"304"},
{"@id":"http://fluidlog.com/2","@type":"av:project","index":"2","label":"C","x":"405","y":"406"}
],
"edges":
[
{"source":"http://fluidlog.com/0","target":"http://fluidlog.com/1"}
],
"@id":""
}
myStore.save(jsonLd);
undefined
mystore.js:31456 XMLHttpRequest cannot load file:///home/jmv/src/SemanticNodes/lesfaitsdesmots/loglink4.6/index.html. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.utils.defaultRequest @ mystore.js:31456(anonymous function) @ mystore.js:29562serialize @ mystore.js:30059self.add @ mystore.js:29556(anonymous function) @ mystore.js:30113(anonymous function) @ mystore.js:30091(anonymous function) @ mystore.js:30082(anonymous function) @ mystore.js:34576
index.html:1 Uncaught (in promise) status code error: 0
PUT http://localhost:9000/assets/SemanticNodes/index.html 404 (Not Found)
utils.defaultRequest @ mystore.js:31456
(anonymous function) @ mystore.js:29562
rdf.serialize @ mystore.js:30059
self.add @ mystore.js:29556
(anonymous function) @ mystore.js:30113
funcTemplate @ mystore.js:30091
funcTemplate @ mystore.js:30082
(anonymous function) @ mystore.js:34576
localhost:9000/assets/SemanticNodes/index.html:1 Uncaught (in promise) status code error: 404
Sauvegarde depuis FluidGraph
GET (console) une fois sauvegardé avec FluiGraph dans SemForms
store = new MyStore({container : "http://localhost:9000/ldp/fluidlog/",context : "http://owl.openinitiative.com/oicontext.jsonld", template:"", partials:""})
store.get("http://localhost:9000/ldp/fluidlog/unnamed ").then(console.log.bind(console))
Exercices de sémantisation de l'information
Nouveau test avec une information simple
{
"@context":{
"av" : "http://www.assemblee-virtuelle.org/ontologies/v1.owl#"
},
"@type" : "av:Organization"
}
Test sur Semantic Forms
var store = new MyStore({
container : "http://localhost:9000/ldp/fluidlog/",
context : "http://owl.openinitiative.com/oicontext.jsonld",
template : "",
partials : ""});
var jsonLd = {
"@context":{
"av" : "http://www.assemblee-virtuelle.org/ontologies/v1.owl#"
},
"@type" : "av:Organization"
}
store.save(jsonLd);
store.get("http://localhost:9000/ldp/fluidlog/unnamed ").then(console.log.bind(console))
Nouveau test sur Semantic Forms avec le contexte simplifié
store.get("http://localhost:9000/ldp/fluidlog/unnamed ").then(console.log.bind(console))
The "John Lennon" test ...
var store = new MyStore({ container : "http://dbpedia.org/resource/",
context : {},
template : "",
partials : ""})
store.get("http://dbpedia.org/resource/John_Lennon").then(console.log.bind(console))
Comment publier un contexte JSON-LD en ligne ?
UPDATE d'un JSON-LD existant
var myStore = new MyStore({ container : "https://localhost:8443/2013/cartopair/",
context : "http://owl.openinitiative.com/oicontext.jsonld",
template : "",
partials : ""})
var jsonLd = {
"@context":{
"av" : "http://www.assemblee-virtuelle.org/ontologies/v1.owl#"
},
"@type" : "av:Organization"
}
myStore.save(jsonLd);
var jsonLd = {
"@id" : "https://localhost:8443/2013/cartopair/c4c5d906a1",
"@context":{
"project" : "http://www.assemblee-virtuelle.org/ontologies/v1.owl#project"
},
"project" : "http://assemblee-virtuelle.org/Assemblée_Virtuelle"
}
myStore.save(jsonLd)
Synthèse des problèmes