annotation_service/commit
FIXED: wrong cut ...
author | Jacco van Ossenbruggen |
---|---|
Fri Sep 19 17:10:35 2014 +0200 | |
committer | Jacco van Ossenbruggen |
Fri Sep 19 17:10:35 2014 +0200 | |
commit | 06bcf3db2372c94baaf6b68311e27b4014962a36 |
tree | baaebb29e5ecbc53609b37969dde76eed0c02863 |
parent | 23ee1d298dd099dfdc3fd51c03da74067897c7da |
Diff style: patch stat
diff --git a/lib/oa_annotation.pl b/lib/oa_annotation.pl index fdbfcea..5e3ddd1 100644 --- a/lib/oa_annotation.pl +++ b/lib/oa_annotation.pl @@ -235,22 +235,26 @@ make_selector_node(Fragment, Shape, Graph, Node) :- rdf_get_annotation(Annotation, Props) :- get_annotation_properties(Annotation, _Graph, Props). -%% rdf_get_annotation_target(+Annotation, -TargetUri) is semidet. +%% rdf_get_annotation_target(+Annotation, -TargetUri) is nondet. %% rdf_get_annotation_target(-Annotation, +TargetUri) is nondet. % % Get Target uri, abstracting away OA selector stuff. % Prefer direct Target over oa:hasSource of oa:SpecificResource. rdf_get_annotation_target(Annotation, TargetUri) :- - ground(Annotation), !, + ground(Annotation), rdf_has(Annotation, oa:hasTarget, TargetUri), \+ rdfs_individual_of(TargetUri, oa:'SpecificResource'). rdf_get_annotation_target(Annotation, TargetUri) :- - ground(Annotation), !, + ground(Annotation), rdf_has(Annotation, oa:hasTarget, TargetNode), rdfs_individual_of(TargetNode, oa:'SpecificResource'), rdf_has(TargetNode, oa:hasSource, TargetUri). +rdf_get_annotation_target(Annotation, _) :- + ground(Annotation), + debug(annotation,'Failed to get target for annotation ~p', [Annotation]). + rdf_get_annotation_target(Annotation, TargetUri) :- ground(TargetUri), rdf_has(TargetNode, oa:hasSource, TargetUri),