Skip to content

Commit

Permalink
Added a task to run count queries.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Rockwell committed Jun 21, 2011
1 parent 6bec923 commit c1269c1
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Rakefile
Expand Up @@ -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
26 changes: 26 additions & 0 deletions tag_entity_constructs/count_grants.sparql
@@ -0,0 +1,26 @@
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX swrl: <http://www.w3.org/2003/11/swrl#>
PREFIX swrlb: <http://www.w3.org/2003/11/swrlb#>
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX dcelem: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX geo: <http://aims.fao.org/aos/geopolitical.owl#>
PREFIX pvs: <http://vivoweb.org/ontology/provenance-support#>
PREFIX ero: <http://purl.obolibrary.org/obo/>
PREFIX scires: <http://vivoweb.org/ontology/scientific-research#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX ufVivo: <http://vivo.ufl.edu/ontology/vivo-ufl/>
PREFIX core: <http://vivoweb.org/ontology/core#>

select count(?grant)
where
{
?grant rdf:type core:Grant .
?grant ufVivo:harvestedBy "DSR-Harvester"
}
26 changes: 26 additions & 0 deletions tag_entity_constructs/count_orgs.sparql
@@ -0,0 +1,26 @@
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX swrl: <http://www.w3.org/2003/11/swrl#>
PREFIX swrlb: <http://www.w3.org/2003/11/swrlb#>
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX dcelem: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX geo: <http://aims.fao.org/aos/geopolitical.owl#>
PREFIX pvs: <http://vivoweb.org/ontology/provenance-support#>
PREFIX ero: <http://purl.obolibrary.org/obo/>
PREFIX scires: <http://vivoweb.org/ontology/scientific-research#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX ufVivo: <http://vivo.ufl.edu/ontology/vivo-ufl/>
PREFIX core: <http://vivoweb.org/ontology/core#>

select count(?org)
where
{
?org rdf:type foaf:Organization .
?org ufVivo:harvestedBy "DSR-Harvester"
}
26 changes: 26 additions & 0 deletions tag_entity_constructs/count_people.sparql
@@ -0,0 +1,26 @@
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX swrl: <http://www.w3.org/2003/11/swrl#>
PREFIX swrlb: <http://www.w3.org/2003/11/swrlb#>
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX dcelem: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX geo: <http://aims.fao.org/aos/geopolitical.owl#>
PREFIX pvs: <http://vivoweb.org/ontology/provenance-support#>
PREFIX ero: <http://purl.obolibrary.org/obo/>
PREFIX scires: <http://vivoweb.org/ontology/scientific-research#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX ufVivo: <http://vivo.ufl.edu/ontology/vivo-ufl/>
PREFIX core: <http://vivoweb.org/ontology/core#>

select count(?people)
where
{
?people rdf:type foaf:Person .
?people ufVivo:harvestedBy "DSR-Harvester"
}

0 comments on commit c1269c1

Please sign in to comment.