-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RDFS tested with test data and test queries
- Loading branch information
Showing
7 changed files
with
121 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/animals.ttl | ||
/queries.txt |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
@prefix dc: <http://purl.org/dc/elements/1.1/> . | ||
@prefix maxi: <http://mz.name/#> . | ||
|
||
maxi:Animal a rdfs:Class ; | ||
rdfs:label "Animal" . | ||
|
||
maxi:Dog a rdfs:Class ; | ||
rdfs:label "Dog" ; | ||
rdfs:subClassOf maxi:Animal . | ||
|
||
maxi:Husky a rdfs:Class ; | ||
rdfs:label "Husky" ; | ||
rdfs:subClassOf maxi:Dog . | ||
|
||
maxi:RedHusky a rdfs:Class ; | ||
rdfs:label "Red Husky" ; | ||
rdfs:subClassOf maxi:Husky . | ||
|
||
maxi:Cat a rdfs:Class ; | ||
rdfs:label "Cat" ; | ||
rdfs:subClassOf maxi:Animal . | ||
|
||
maxi:Milo a maxi:RedHusky . | ||
|
||
maxi:hates a rdf:Property . | ||
|
||
maxi:reallyHates rdfs:subPropertyOf maxi:hates . | ||
|
||
maxi:reallyReallyHates rdfs:subPropertyOf maxi:reallyHates . | ||
|
||
maxi:Grebo a maxi:Cat . | ||
|
||
maxi:Grebo maxi:reallyReallyHates maxi:Milo . | ||
|
||
maxi:hasColor rdfs:range maxi:Color . | ||
|
||
maxi:pen maxi:hasColor maxi:red . | ||
|
||
maxi:isPoisonous rdfs:domain maxi:Mushroom . | ||
|
||
maxi:Amanita maxi:isPoisonous false . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
## rule rdf-instancesOf-subclassof: | ||
## Milo as RedHusky > Husky > Dog > Animal | ||
match $t (rdf-subject:$s, rdf-predicate:$p, rdf-object:$o) isa rdf-triple; $s "http://mz.name/#Milo"; get $s, $p, $o; | ||
|
||
## rule rdf-reflexive-subclassof: | ||
## Animal is a subclas of itself | ||
match $t (rdf-subject:$s, rdf-predicate:$p, rdf-object:$o) isa rdf-triple; $s "http://mz.name/#Animal"; get $s, $p, $o; | ||
|
||
## rule rdf-transitive-subclassof: | ||
## RedHusky > Husky > Dog > Animal | ||
match $t (rdf-subject:$s, rdf-predicate:$p, rdf-object:$o) isa rdf-triple; $s "http://mz.name/#RedHusky"; get $s, $p, $o; | ||
|
||
## rule rdf-sub-property: | ||
## reallyReallyHates > reallyHates > hates > Property | ||
match $t (rdf-subject:$s, rdf-predicate:$p, rdf-object:$o) isa rdf-triple; $s "http://mz.name/#Grebo"; get $s, $p, $o; | ||
|
||
##rule rdf-transitive-subpropertyof: | ||
## reallyReallyHates > reallyHates > hates > Property | ||
match $t (rdf-subject:$s, rdf-predicate:$p, rdf-object:$o) isa rdf-triple; $s "http://mz.name/#reallyReallyHates"; get $s, $p, $o; | ||
|
||
## rule rdf-properties-have-range: | ||
## hasColor is a Property | ||
match $t (rdf-subject:$s, rdf-predicate:$p, rdf-object:$o) isa rdf-triple; $s "http://mz.name/#hasColor"; get $s, $p, $o; | ||
|
||
## rule rdf-classes-are-range: | ||
## Color is a class | ||
match $t (rdf-subject:$s, rdf-predicate:$p, rdf-object:$o) isa rdf-triple; $s "http://mz.name/#Color"; get $s, $p, $o; | ||
|
||
## rule rdf-instances-in-range: | ||
## red is a Color | ||
match $t (rdf-subject:$s, rdf-predicate:$p, rdf-object:$o) isa rdf-triple; $s "http://mz.name/#red"; get $s, $p, $o; | ||
|
||
## rule rdf-properties-have-domain: | ||
## isPoisonous is a Property | ||
match $t (rdf-subject:$s, rdf-predicate:$p, rdf-object:$o) isa rdf-triple; $s "http://mz.name/#isPoisonous"; get $s, $p, $o; | ||
|
||
## rule rdf-classes-are-domain: | ||
## Mushroom is a class | ||
match $t (rdf-subject:$s, rdf-predicate:$p, rdf-object:$o) isa rdf-triple; $s "http://mz.name/#Mushroom"; get $s, $p, $o; | ||
|
||
## rule rdf-instances-in-domain: | ||
## Amanita is a Mushroom | ||
match $t (rdf-subject:$s, rdf-predicate:$p, rdf-object:$o) isa rdf-triple; $s "http://mz.name/#Amanita"; get $s, $p, $o; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters