-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #964 from ontodev/expand-command
Implementation of expand command.
- Loading branch information
Showing
9 changed files
with
788 additions
and
0 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
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,151 @@ | ||
@prefix : <http://example.org/> . | ||
@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix xml: <http://www.w3.org/XML/1998/namespace> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@base <http://example.org/> . | ||
|
||
<http://example.org/> rdf:type owl:Ontology . | ||
|
||
################################################################# | ||
# Annotation properties | ||
################################################################# | ||
|
||
### http://example.org/never_part_of | ||
:never_part_of rdf:type owl:AnnotationProperty ; | ||
<http://purl.obolibrary.org/obo/OMO_0002000> """PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
PREFIX : <http://example.org/> | ||
CONSTRUCT { | ||
?a a owl:Class . | ||
?b a owl:Class . | ||
?a owl:disjointWith [ | ||
a owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom ?b | ||
] | ||
} | ||
WHERE { | ||
?a :never_part_of ?b . | ||
}""" . | ||
|
||
|
||
### http://example.org/part_disjoint_with | ||
:part_disjoint_with rdf:type owl:AnnotationProperty ; | ||
<http://purl.obolibrary.org/obo/OMO_0002000> """PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
PREFIX : <http://example.org/> | ||
CONSTRUCT { | ||
?a a owl:Class . | ||
?b a owl:Class . | ||
[ | ||
a owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom ?a ; | ||
owl:disjointWith [ | ||
a owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom ?b | ||
] | ||
] | ||
} | ||
WHERE { | ||
?a :part_disjoint_with ?b . | ||
}""" . | ||
|
||
|
||
### http://purl.obolibrary.org/obo/OMO_0002000 | ||
<http://purl.obolibrary.org/obo/OMO_0002000> rdf:type owl:AnnotationProperty ; | ||
rdfs:label "defined by construct" . | ||
|
||
|
||
### http://purl.org/dc/terms/source | ||
<http://purl.org/dc/terms/source> rdf:type owl:AnnotationProperty . | ||
|
||
|
||
################################################################# | ||
# Object Properties | ||
################################################################# | ||
|
||
### http://example.org/part_of | ||
:part_of rdf:type owl:ObjectProperty . | ||
|
||
|
||
################################################################# | ||
# Classes | ||
################################################################# | ||
|
||
### http://example.org/A | ||
:A rdf:type owl:Class ; | ||
:part_disjoint_with :B . | ||
|
||
[ rdf:type owl:Axiom ; | ||
owl:annotatedSource :A ; | ||
owl:annotatedProperty rdf:type ; | ||
owl:annotatedTarget owl:Class ; | ||
<http://purl.org/dc/terms/source> :never_part_of | ||
] . | ||
|
||
[ rdf:type owl:Axiom ; | ||
owl:annotatedSource :A ; | ||
owl:annotatedProperty rdf:type ; | ||
owl:annotatedTarget owl:Class ; | ||
<http://purl.org/dc/terms/source> :part_disjoint_with | ||
] . | ||
|
||
|
||
### http://example.org/B | ||
:B rdf:type owl:Class ; | ||
owl:disjointWith [ rdf:type owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom :A | ||
] ; | ||
:never_part_of :A . | ||
|
||
[ rdf:type owl:Axiom ; | ||
owl:annotatedSource :B ; | ||
owl:annotatedProperty rdf:type ; | ||
owl:annotatedTarget owl:Class ; | ||
<http://purl.org/dc/terms/source> :never_part_of | ||
] . | ||
|
||
[ rdf:type owl:Axiom ; | ||
owl:annotatedSource :B ; | ||
owl:annotatedProperty rdf:type ; | ||
owl:annotatedTarget owl:Class ; | ||
<http://purl.org/dc/terms/source> :part_disjoint_with | ||
] . | ||
|
||
[ rdf:type owl:Axiom ; | ||
owl:annotatedSource :B ; | ||
owl:annotatedProperty owl:disjointWith ; | ||
owl:annotatedTarget [ rdf:type owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom :A | ||
] ; | ||
<http://purl.org/dc/terms/source> :never_part_of | ||
] . | ||
|
||
|
||
################################################################# | ||
# General axioms | ||
################################################################# | ||
|
||
[ rdf:type owl:Axiom ; | ||
owl:annotatedSource [ rdf:type owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom :A ; | ||
owl:disjointWith [ rdf:type owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom :B | ||
] | ||
] ; | ||
owl:annotatedProperty owl:disjointWith ; | ||
owl:annotatedTarget [ rdf:type owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom :B | ||
] ; | ||
<http://purl.org/dc/terms/source> :part_disjoint_with | ||
] . | ||
|
||
|
||
### Generated by the OWL API (version 4.5.6) https://github.com/owlcs/owlapi |
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,87 @@ | ||
@prefix : <http://example.org/> . | ||
@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix xml: <http://www.w3.org/XML/1998/namespace> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@base <http://example.org/> . | ||
|
||
<http://example.org/> rdf:type owl:Ontology . | ||
|
||
################################################################# | ||
# Annotation properties | ||
################################################################# | ||
|
||
### http://example.org/never_part_of | ||
:never_part_of rdf:type owl:AnnotationProperty ; | ||
<http://purl.obolibrary.org/obo/OMO_0002000> """PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
PREFIX : <http://example.org/> | ||
CONSTRUCT { | ||
?a a owl:Class . | ||
?b a owl:Class . | ||
?a owl:disjointWith [ | ||
a owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom ?b | ||
] | ||
} | ||
WHERE { | ||
?a :never_part_of ?b . | ||
}""" . | ||
|
||
|
||
### http://example.org/part_disjoint_with | ||
:part_disjoint_with rdf:type owl:AnnotationProperty ; | ||
<http://purl.obolibrary.org/obo/OMO_0002000> """PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
PREFIX : <http://example.org/> | ||
CONSTRUCT { | ||
?a a owl:Class . | ||
?b a owl:Class . | ||
[ | ||
a owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom ?a ; | ||
owl:disjointWith [ | ||
a owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom ?b | ||
] | ||
] | ||
} | ||
WHERE { | ||
?a :part_disjoint_with ?b . | ||
}""" . | ||
|
||
|
||
### http://purl.obolibrary.org/obo/OMO_0002000 | ||
<http://purl.obolibrary.org/obo/OMO_0002000> rdf:type owl:AnnotationProperty ; | ||
rdfs:label "defined by construct" . | ||
|
||
|
||
################################################################# | ||
# Object Properties | ||
################################################################# | ||
|
||
### http://example.org/part_of | ||
:part_of rdf:type owl:ObjectProperty . | ||
|
||
|
||
################################################################# | ||
# Classes | ||
################################################################# | ||
|
||
### http://example.org/A | ||
:A rdf:type owl:Class ; | ||
:part_disjoint_with :B . | ||
|
||
|
||
### http://example.org/B | ||
:B rdf:type owl:Class ; | ||
owl:disjointWith [ rdf:type owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom :A | ||
] ; | ||
:never_part_of :A . | ||
|
||
|
||
### Generated by the OWL API (version 4.5.6) https://github.com/owlcs/owlapi |
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,101 @@ | ||
@prefix : <http://example.org/> . | ||
@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix xml: <http://www.w3.org/XML/1998/namespace> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@base <http://example.org/> . | ||
|
||
<http://example.org/> rdf:type owl:Ontology . | ||
|
||
################################################################# | ||
# Annotation properties | ||
################################################################# | ||
|
||
### http://example.org/never_part_of | ||
:never_part_of rdf:type owl:AnnotationProperty ; | ||
<http://purl.obolibrary.org/obo/OMO_0002000> """PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
PREFIX : <http://example.org/> | ||
CONSTRUCT { | ||
?a a owl:Class . | ||
?b a owl:Class . | ||
?a owl:disjointWith [ | ||
a owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom ?b | ||
] | ||
} | ||
WHERE { | ||
?a :never_part_of ?b . | ||
}""" . | ||
|
||
|
||
### http://example.org/part_disjoint_with | ||
:part_disjoint_with rdf:type owl:AnnotationProperty ; | ||
<http://purl.obolibrary.org/obo/OMO_0002000> """PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
PREFIX : <http://example.org/> | ||
CONSTRUCT { | ||
?a a owl:Class . | ||
?b a owl:Class . | ||
[ | ||
a owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom ?a ; | ||
owl:disjointWith [ | ||
a owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom ?b | ||
] | ||
] | ||
} | ||
WHERE { | ||
?a :part_disjoint_with ?b . | ||
}""" . | ||
|
||
|
||
### http://purl.obolibrary.org/obo/OMO_0002000 | ||
<http://purl.obolibrary.org/obo/OMO_0002000> rdf:type owl:AnnotationProperty ; | ||
rdfs:label "defined by construct" . | ||
|
||
|
||
################################################################# | ||
# Object Properties | ||
################################################################# | ||
|
||
### http://example.org/part_of | ||
:part_of rdf:type owl:ObjectProperty . | ||
|
||
|
||
################################################################# | ||
# Classes | ||
################################################################# | ||
|
||
### http://example.org/A | ||
:A rdf:type owl:Class ; | ||
:part_disjoint_with :B . | ||
|
||
|
||
### http://example.org/B | ||
:B rdf:type owl:Class ; | ||
owl:disjointWith [ rdf:type owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom :A | ||
] ; | ||
:never_part_of :A . | ||
|
||
|
||
################################################################# | ||
# General axioms | ||
################################################################# | ||
|
||
[ rdf:type owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom :A ; | ||
owl:disjointWith [ rdf:type owl:Restriction ; | ||
owl:onProperty :part_of ; | ||
owl:someValuesFrom :B | ||
] | ||
] . | ||
|
||
|
||
### Generated by the OWL API (version 4.5.6) https://github.com/owlcs/owlapi |
Oops, something went wrong.