annotation_service/commit

get x,y,w,h out of oa namespace

authorJacco van Ossenbruggen
Tue May 13 17:55:52 2014 +0200
committerJacco van Ossenbruggen
Tue May 13 17:55:52 2014 +0200
commite158bb7338429c2dc31107b939422ba0c5ffca2f
tree0febb9c6c86022ab4f21309fc8a7c9889f2f6a30
parentc2dda71aea001fd120a022cb75ea33b26eb028e7
Diff style: patch stat
diff --git a/lib/oa_annotation.pl b/lib/oa_annotation.pl
index 749c634..e00580a 100644
--- a/lib/oa_annotation.pl
+++ b/lib/oa_annotation.pl
@@ -56,10 +56,10 @@ normalize_object(TargetNode, hasTarget, TargetDict) :-
 	rdf_has(TargetNode, oa:hasSource, Source),
 	rdf_has(TargetNode, oa:hasSelector, SelectorNode),
 	rdf_has(SelectorNode, rdf:value, literal(Value)),
-	(   rdf_has(SelectorNode, oa:x, literal(type(_,X))),
-	    rdf_has(SelectorNode, oa:y, literal(type(_,Y))),
-	    rdf_has(SelectorNode, oa:w, literal(type(_,W))),
-	    rdf_has(SelectorNode, oa:h, literal(type(_,H)))
+	(   rdf_has(SelectorNode, ann_ui:x, literal(type(_,X))),
+	    rdf_has(SelectorNode, ann_ui:y, literal(type(_,Y))),
+	    rdf_has(SelectorNode, ann_ui:w, literal(type(_,W))),
+	    rdf_has(SelectorNode, ann_ui:h, literal(type(_,H)))
 	->  true
 	;   atomic_list_concat([_,V], ':', Value),
 	    atomic_list_concat([XA,YA,WA,HA], ',', V),
@@ -204,10 +204,10 @@ make_selector_node(Fragment, Shape, Graph, Node) :-
 	rdf_assert(Node, rdf:type, oa:'FragmentSelector', Graph),
 	rdf_assert(Node, rdf:value, literal(Fragment), Graph),
 	rdf_assert(Node, dcterms:conformsTo, 'http://www.w3.org/TR/media-frags/', Graph),
-	rdf_assert(Node, oa:x, literal(type(xsd:float, Shape.x)), Graph),
-	rdf_assert(Node, oa:y, literal(type(xsd:float, Shape.y)), Graph),
-	rdf_assert(Node, oa:w, literal(type(xsd:float, Shape.width)), Graph),
-	rdf_assert(Node, oa:h, literal(type(xsd:float, Shape.height)), Graph).
+	rdf_assert(Node, ann_ui:x, literal(type(xsd:float, Shape.x)), Graph),
+	rdf_assert(Node, ann_ui:y, literal(type(xsd:float, Shape.y)), Graph),
+	rdf_assert(Node, ann_ui:w, literal(type(xsd:float, Shape.width)), Graph),
+	rdf_assert(Node, ann_ui:h, literal(type(xsd:float, Shape.height)), Graph).
 
 %%	rdf_get_annotation(+Annotation:url, -Props:list) is det.
 %
diff --git a/rdf/oa_compat.ttl b/rdf/oa_compat.ttl
index 0c20ae7..65455da 100644
--- a/rdf/oa_compat.ttl
+++ b/rdf/oa_compat.ttl
@@ -1,3 +1,4 @@
+@prefix ann_ui: <http://semanticweb.cs.vu.nl/annotate/ui/> .
 @prefix old: <http://www.w3.org/ns/openannotation/core/> .
 @prefix oa: <http://www.w3.org/ns/oa#> .
 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@@ -11,3 +12,8 @@ old:hasBody rdfs:subPropertyOf oa:hasBody .
 old:hasSelector rdfs:subPropertyOf oa:hasSelector .
 old:hasSource rdfs:subPropertyOf oa:hasSource .
 old:hasTarget rdfs:subPropertyOf oa:hasTarget .
+
+oa:x rdfs:subPropertyOf ann_ui:x .
+oa:y rdfs:subPropertyOf ann_ui:y .
+oa:w rdfs:subPropertyOf ann_ui:w .
+oa:h rdfs:subPropertyOf ann_ui:h .