annotation_service/commit
move ns decl back into the api file for explicit inclusion
author | Jacco van Ossenbruggen |
---|---|
Tue Jun 19 15:04:35 2012 +0200 | |
committer | Jacco van Ossenbruggen |
Tue Jun 19 15:04:35 2012 +0200 | |
commit | b386493bfa8e17c0196e97ff1fb695e5c95c8dea |
tree | af44ac56244187bac5325a8e29efb381939a4e29 |
parent | 6716a4884969b6e35a504588eb285d109dd81f0f |
Diff style: patch stat
diff --git a/api/annotation.pl b/api/annotation.pl index 0e62724..202174a 100644 --- a/api/annotation.pl +++ b/api/annotation.pl @@ -11,6 +11,9 @@ :- use_module(components(label)). :- use_module(user(user_db)). +:- rdf_register_ns(oac, 'http://www.openannotation.org/ns/'). +:- rdf_register_ns(an, 'http://semanticweb.cs.vu.nl/annotate/'). + :- setting(login, boolean, true, 'Require login'). :- setting(user_restrict, boolean, false, 'When set to true only own annotations are shown.'). @@ -215,6 +218,14 @@ annotation_label(Label0, Body, Label) :- ; Label = Label0 ). +%% time_stamp(-Integer) +% +% Return time-stamp rounded to integer. + +time_stamp(Int) :- + get_time(Now), + Int is round(Now). + http:convert_parameter(json_rdf_object, Atom, Term) :- atom_json_term(Atom, JSON, []), diff --git a/config-available/annotation_service.pl b/config-available/annotation_service.pl index bf0ca40..e365ae0 100644 --- a/config-available/annotation_service.pl +++ b/config-available/annotation_service.pl @@ -2,8 +2,3 @@ /** <module> Configurable RDF annotation webservice */ - -:- use_module(library(semweb/rdf_db)). -:- rdf_register_ns(oac, 'http://www.openannotation.org/ns/'). -:- rdf_register_ns(an, 'http://semanticweb.cs.vu.nl/annotate/'). - diff --git a/config-available/oac_graphviz.pl b/config-available/oac_graphviz.pl index f005049..ba3878c 100644 --- a/config-available/oac_graphviz.pl +++ b/config-available/oac_graphviz.pl @@ -6,8 +6,9 @@ :- use_module(library(semweb/rdfs)). :- use_module(library(semweb/rdf_abstract)). -% Need this module for the gv namespace declaration: +% Need these modules solely for their namespace declarations: :- use_module(library(graph_version)). +:- use_module(api(annotation)). :- rdf_meta graph_context_triple(r, t).