annotation_service/commit

backward compat

authorJacco van Ossenbruggen
Tue Jun 19 17:09:41 2012 +0200
committerJacco van Ossenbruggen
Tue Jun 19 17:09:41 2012 +0200
commit3749488fc8b408257fdfed7bb92a975657a02bce
treee042f233c7eb5dc8e849e032bb614865c5e51fa8
parentb6c4d074ce1384bfba779309615408f7d7b93ce8
Diff style: patch stat
diff --git a/api/annotation.pl b/api/annotation.pl
index 551bedf..4df09e6 100644
--- a/api/annotation.pl
+++ b/api/annotation.pl
@@ -89,7 +89,7 @@ http_remove_annotation(Request) :-
         ->  ensure_logged_on(User)
         ;   logged_on(User, anonymous)
         ),
-	once(rdf(Annotation, oa:hasTarget, Target)),
+	once(rdf_has(Annotation, oa:hasTarget, Target)),
 	findall(rdf(Annotation,O,P), rdf(Annotation,O,P,Graph), Triples),
 	gv_resource_commit(Target, User,
 			   remove(Triples),
@@ -197,12 +197,12 @@ annotation_in_field(Target, FieldURI, Annotation, Body, Label, Comment, User) :-
 	->  logged_on(User, anonymous)
 	;   true
 	),
-	rdf(Annotation, oa:hasTarget, Target, Graph),
-	rdf(Annotation, an:annotationField, FieldURI, Graph),
-	rdf(Annotation, oa:annotator, User, Graph),
-	rdf(Annotation, oa:hasBody, Body0, Graph),
-	rdf(Annotation, dcterms:title, Lit, Graph),
-	(   rdf(Annotation, rdfs:comment, Comment0, Graph)
+	rdf_has(Annotation, oa:hasTarget, Target, Graph),
+	rdf_has(Annotation, an:annotationField, FieldURI, Graph),
+	rdf_has(Annotation, oa:annotator, User, Graph),
+	rdf_has(Annotation, oa:hasBody, Body0, Graph),
+	rdf_has(Annotation, dcterms:title, Lit, Graph),
+	(   rdf_has(Annotation, rdfs:comment, Comment0, Graph)
 	->  literal_text(Comment0, Comment)
 	;   Comment=""
 	),
diff --git a/config-available/oac_graphviz.pl b/config-available/oac_graphviz.pl
index d2e2842..f316743 100644
--- a/config-available/oac_graphviz.pl
+++ b/config-available/oac_graphviz.pl
@@ -35,23 +35,26 @@ cliopatria:context_graph(URI, RDF) :-
 graph_context_triple(G, rdf(S,P,O)) :-
 	rdf_equal(P, oa:hasTarget),
 	rdf(S, P, O, G).
+graph_context_triple(G, rdf(S,P,O)) :-
+	rdf_equal(P, oac:hasTarget),
+	rdf(S, P, O, G).
 graph_context_triple(G, rdf(S,P,G)) :-
 	rdf_equal(P, gv:graph),
 	rdf(S,P,G).
 graph_context_triple(G, rdf(H,P,T)) :-
-	rdf(_, oa:hasTarget, T,G),
+	(   rdf(_, oa:hasTarget, T, G) ; rdf(_, oac:hasTarget, T, G)),
 	rdf_equal(P, gv:head),
 	rdf(H,P,T).
 
 annotation_context_triple(S, rdf(S,P,O)) :-
 	rdf_equal(oa:hasTarget, P),
-	rdf(S,P,O).
+	rdf_has(S,P,O).
 annotation_context_triple(S, rdf(S,P,O)) :-
 	rdf_equal(oa:hasBody, P),
-	rdf(S,P,O).
+	rdf_has(S,P,O).
 annotation_context_triple(S, rdf(S,P,O)) :-
 	rdf_equal(oa:annotator, P),
-	rdf(S,P,O).
+	rdf_has(S,P,O).
 
 annotation_context_triple(S, rdf(Commit,P,G)) :-
 	rdf(S,rdf:type,_,G),
@@ -66,3 +69,6 @@ cliopatria:node_shape(URI, Shape, _Options) :-
 cliopatria:node_shape(URI, Shape, _Options) :-
 	rdf(URI, gv:head, _),
 	Shape = [fontize('20.00'), style(filled),fillcolor('#FF8888')].
+
+
+