-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcount-software-with-common-input-or-output-format.rq
45 lines (42 loc) · 2.15 KB
/
count-software-with-common-input-or-output-format.rq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
prefix obo: <http://purl.obolibrary.org/obo/>
prefix dc: <http://purl.org/dc/elements/1.1/>
select (count (distinct ?x) as ?numberSoftwareWithLicense)
from <http://www.pitt.edu/obc/ide/apollo-sv>
from <http://www.pitt.edu/obc/ide/classes-and-indexing-instances>
from <http://www.pitt.edu/obc/ide/article-instances>
from <http://www.pitt.edu/obc/ide/article-deleted-instances>
from <http://ide.obc.io/auth>
from <http://www.pitt.edu/obc/mdc/content>
where {
{
?x rdf:type ?softwareOrSubclass .
?softwareOrSubclass rdfs:subClassOf* obo:IAO_0000010 .
?v rdf:type obo:APOLLO_SV_00000525 . #v is executable
?u rdf:type obo:APOLLO_SV_00000524 . #u is compiling
?u obo:OBI_0000293 ?x . #compiling has source code as input
?u obo:OBI_0000299 ?v . #compiling has executable as output
?parsingPlan obo:BFO_0000050 ?v . #data parsing plan spec part of executable
?dataParsing obo:OBI_0000417 ?parsingPlan . #parsing achieves parsing plan objective
?dataParsing obo:OBI_0000417 ?inputSpec . #parsing achieves spec objective
?dataParsing rdf:type obo:APOLLO_SV_00000566 . #parsing individual is instance of parsing
?inputSpec rdf:type obo:IAO_0000098
}
UNION
{
?x rdf:type ?softwareOrSubclass .
?softwareOrSubclass rdfs:subClassOf* obo:IAO_0000010 .
?v rdf:type obo:APOLLO_SV_00000525 . #v is executable
?u rdf:type obo:APOLLO_SV_00000524 . #u is compiling
?u obo:OBI_0000293 ?x . #compiling has source code as input
?u obo:OBI_0000299 ?v . #compiling has executable as output
?encodingPlan obo:BFO_0000050 ?v . #data encoding plan spec part of executable
?dataEncoding obo:OBI_0000417 ?encodingPlan . #encoding achieves encoding plan objective
?dataEncoding obo:OBI_0000417 ?outputSpec . #encoding achieves spec objective
?dataEncoding rdf:type obo:OBI_0000227 . #encoding individual is instance of encoding
?outputSpec rdf:type obo:IAO_0000098 #output spec is data format spec
}
#filter out punned individuals
FILTER ( ?x != obo:IAO_0000010 )
FILTER ( ?x != ?softwareOrSubclass )
FILTER ( ?softwareOrSubclass != obo:APOLLO_SV_00000525 )
}