-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuilt-in-inference-reasoning-product-subClassOf.sql
80 lines (61 loc) · 3.3 KB
/
built-in-inference-reasoning-product-subClassOf.sql
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
-- Cleanup
SPARQL CLEAR GRAPH <https://www.openlinksw.com/DAV/uda2.openlinksw.com/data/turtle/multi-tier/2019/UDAMTProductFeatures.ttl> ;
SPARQL CLEAR GRAPH <urn:inference:product:feature:subclass:odbc> ;
SPARQL CLEAR GRAPH <urn:inference:product:feature:subclass:data>;
DELETE FROM DB.DBA.SYS_RDF_SCHEMA
WHERE RS_NAME = 'urn:inference:product:feature:subclass:odbc:rule' ;
-- Load Data
SPARQL
PREFIX odbc-postgres-mt: <http://data.openlinksw.com/oplweb/product/odbc-postgresql-mt#>
INSERT INTO GRAPH <urn:inference:product:feature:subclass:data>
{
<http://data.openlinksw.com/oplweb/product/odbc-oracle-mt#this> a <http://www.openlinksw.com/ontology/products#odbcDriver> .
<http://data.openlinksw.com/oplweb/product/odbc-db2-mt#this> a <http://www.openlinksw.com/ontology/products#odbcDriver> .
<http://data.openlinksw.com/oplweb/product/uda-drivers-suite-mt#this> a <http://www.openlinksw.com/ontology/products#odbcDriver> .
<http://data.openlinksw.com/oplweb/product/odbc-dbsuite-mt#this> a <http://www.openlinksw.com/ontology/products#odbcDriver> .
<http://data.openlinksw.com/oplweb/product/odbc-ingres-mt#this> a <http://www.openlinksw.com/ontology/products#odbcDriver> .
<http://data.openlinksw.com/oplweb/product/odbc-sqlserver-mt#this> a <http://www.openlinksw.com/ontology/products#odbcDriver> .
<http://data.openlinksw.com/oplweb/product/odbc-progress-mt#this> a <http://www.openlinksw.com/ontology/products#odbcDriver> .
<http://data.openlinksw.com/oplweb/product/odbc-sybase-mt#this> a <http://www.openlinksw.com/ontology/products#odbcDriver> .
<http://data.openlinksw.com/oplweb/product/odbc-mysql-mt#this> a <http://www.openlinksw.com/ontology/products#odbcDriver> .
<http://data.openlinksw.com/oplweb/product/odbc-jdbc-bridge-mt#this> a <http://www.openlinksw.com/ontology/products#odbcDriver> .
<http://data.openlinksw.com/oplweb/product/odbc-informix-mt#this> a <http://www.openlinksw.com/ontology/products#odbcDriver> .
<http://data.openlinksw.com/oplweb/product/odbc-odbc-mt#this> a <http://www.openlinksw.com/ontology/products#odbcDriver> .
<http://data.openlinksw.com/oplweb/product/odbc-postgres-mt#this> a <http://www.openlinksw.com/ontology/products#odbcDriver> .
};
SPARQL
INSERT INTO GRAPH <urn:inference:product:feature:subclass:odbc>
{
<http://www.openlinksw.com/ontology/products#odbcDriver> rdfs:subClassOf <http://www.openlinksw.com/ontology/odbc#OpenDatabaseConnectivityDriver>
};
SPARQL
SELECT ( COUNT ( * ) AS ?count )
FROM <urn:inference:product:feature:subclass:odbc>
WHERE { ?s ?p ?o } ;
RDFS_RULE_SET('urn:inference:product:feature:subclass:odbc:rule','urn:inference:product:feature:subclass:odbc');
-- Test Query 1
SPARQL
DEFINE input:inference 'urn:inference:product:feature:subclass:odbc:rule'
SELECT ( COUNT ( DISTINCT * ) AS ?count )
{
?s a <http://www.openlinksw.com/ontology/odbc#OpenDatabaseConnectivityDriver>.
};
-- Test Query 1.2 Rules Disabled
SPARQL
SELECT ( COUNT ( DISTINCT * ) AS ?count )
{
?s a <http://www.openlinksw.com/ontology/odbc#OpenDatabaseConnectivityDriver>.
};
-- Test Query 2
SPARQL
DEFINE input:inference 'urn:inference:product:feature:subclass:odbc:rule'
SELECT *
{
?s a <http://www.openlinksw.com/ontology/odbc#OpenDatabaseConnectivityDriver>.
};
-- Test Query 2.1
SPARQL
SELECT *
{
?s a <http://www.openlinksw.com/ontology/odbc#OpenDatabaseConnectivityDriver>.
};