From c1269c120a505b36a6b96341efd1fe210287adfd Mon Sep 17 00:00:00 2001 From: Alex Rockwell Date: Tue, 21 Jun 2011 16:07:08 -0400 Subject: [PATCH] Added a task to run count queries. --- Rakefile | 15 +++++++++++++ tag_entity_constructs/count_grants.sparql | 26 +++++++++++++++++++++++ tag_entity_constructs/count_orgs.sparql | 26 +++++++++++++++++++++++ tag_entity_constructs/count_people.sparql | 26 +++++++++++++++++++++++ 4 files changed, 93 insertions(+) create mode 100644 tag_entity_constructs/count_grants.sparql create mode 100644 tag_entity_constructs/count_orgs.sparql create mode 100644 tag_entity_constructs/count_people.sparql diff --git a/Rakefile b/Rakefile index dffcc90..ff42fa3 100644 --- a/Rakefile +++ b/Rakefile @@ -39,3 +39,18 @@ task :query_all_entities do run_query(file) end end + +task :count_entities do + system("date") + puts "Orgs" + run_query("~/dev/remove_data/tag_entity_constructs/count_orgs.sparql") + system("cat ~/dev/remove_data/tag_entity_constructs/count_orgs.sparql.nt") + puts "People" + system("date") + run_query("~/dev/remove_data/tag_entity_constructs/count_people.sparql") + system("cat ~/dev/remove_data/tag_entity_constructs/count_people.sparql.nt") + puts "Grants" + system("date") + run_query("~/dev/remove_data/tag_entity_constructs/count_grants.sparql") + system("cat ~/dev/remove_data/tag_entity_constructs/count_grants.sparql.nt") +end diff --git a/tag_entity_constructs/count_grants.sparql b/tag_entity_constructs/count_grants.sparql new file mode 100644 index 0000000..8c4633d --- /dev/null +++ b/tag_entity_constructs/count_grants.sparql @@ -0,0 +1,26 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX owl: +PREFIX swrl: +PREFIX swrlb: +PREFIX vitro: +PREFIX bibo: +PREFIX dcelem: +PREFIX dcterms: +PREFIX event: +PREFIX foaf: +PREFIX geo: +PREFIX pvs: +PREFIX ero: +PREFIX scires: +PREFIX skos: +PREFIX ufVivo: +PREFIX core: + +select count(?grant) +where +{ + ?grant rdf:type core:Grant . + ?grant ufVivo:harvestedBy "DSR-Harvester" +} diff --git a/tag_entity_constructs/count_orgs.sparql b/tag_entity_constructs/count_orgs.sparql new file mode 100644 index 0000000..e0fa9ab --- /dev/null +++ b/tag_entity_constructs/count_orgs.sparql @@ -0,0 +1,26 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX owl: +PREFIX swrl: +PREFIX swrlb: +PREFIX vitro: +PREFIX bibo: +PREFIX dcelem: +PREFIX dcterms: +PREFIX event: +PREFIX foaf: +PREFIX geo: +PREFIX pvs: +PREFIX ero: +PREFIX scires: +PREFIX skos: +PREFIX ufVivo: +PREFIX core: + +select count(?org) +where +{ + ?org rdf:type foaf:Organization . + ?org ufVivo:harvestedBy "DSR-Harvester" +} diff --git a/tag_entity_constructs/count_people.sparql b/tag_entity_constructs/count_people.sparql new file mode 100644 index 0000000..3060f8c --- /dev/null +++ b/tag_entity_constructs/count_people.sparql @@ -0,0 +1,26 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX owl: +PREFIX swrl: +PREFIX swrlb: +PREFIX vitro: +PREFIX bibo: +PREFIX dcelem: +PREFIX dcterms: +PREFIX event: +PREFIX foaf: +PREFIX geo: +PREFIX pvs: +PREFIX ero: +PREFIX scires: +PREFIX skos: +PREFIX ufVivo: +PREFIX core: + +select count(?people) +where +{ + ?people rdf:type foaf:Person . + ?people ufVivo:harvestedBy "DSR-Harvester" +}