Debian Codegraph @

FaCT++.Java/src/test/java/conformancetests/OWL2TestCase.java

raw symbols SCIP
1 package conformancetests;
2
3 import org.junit.Ignore;
4 /* This file is part of the JFact DL reasoner
5 Copyright 2011-2013 by Ignazio Palmisano, Dmitry Tsarkov, University of Manchester
6 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
7 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
8 You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA*/
9 import org.junit.Test;
10
11 import testbase.TestBase;
12
13 @SuppressWarnings("javadoc")
14 public class OWL2TestCase extends TestBase {
15
16 @Test
17 public void testowl2_rl_anonymous_individual() {
18 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:j.0=\"http://owl2.test/rules#\">\n"
19 + " <owl:Ontology />\n"
20 + " <owl:ObjectProperty rdf:about=\"http://owl2.test/rules#op\"/>\n"
21 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules#I\"/>\n"
22 + " <owl:NamedIndividual>\n"
23 + " <j.0:op rdf:resource=\"http://owl2.test/rules#I\"/></owl:NamedIndividual></rdf:RDF>";
24 String conclusion = "";
25 String id = "owl2_rl_anonymous_individual";
26 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
27 String d = "OWL 2 RL allows anonymous individual.";
28 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
29 r.setReasonerFactory(factory());
30 r.run();
31 }
32
33 @Test
34 public void testowl2_rl_invalid_leftside_allvaluesfrom() {
35 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n"
36 + " <owl:Ontology />\n"
37 + " <owl:Class rdf:about=\"http://owl2.test/rules#C\"/>\n"
38 + " <owl:Class rdf:about=\"http://owl2.test/rules#C1\"/>\n"
39 + " <owl:ObjectProperty rdf:about=\"http://owl2.test/rules#op\"/>\n"
40 + " <owl:Restriction>\n"
41 + " <owl:allValuesFrom rdf:resource=\"http://owl2.test/rules#C1\"/>\n"
42 + " <owl:onProperty rdf:resource=\"http://owl2.test/rules#op\"/>\n"
43 + " <rdfs:subClassOf rdf:resource=\"http://owl2.test/rules#C\"/></owl:Restriction></rdf:RDF>";
44 String conclusion = "";
45 String id = "owl2_rl_invalid_leftside_allvaluesfrom";
46 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
47 String d = "OWL 2 RL does not allow left side allValuesFrom in a subClassOf axiom.";
48 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
49 r.setReasonerFactory(factory());
50 r.run();
51 }
52
53 @Test
54 public void testowl2_rl_invalid_leftside_maxcard() {
55 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n"
56 + " <owl:Ontology />\n"
57 + " <owl:Class rdf:about=\"http://owl2.test/rules#C\"/>\n"
58 + " <owl:ObjectProperty rdf:about=\"http://owl2.test/rules#op\"/>\n"
59 + " <owl:Restriction>\n"
60 + " <rdfs:subClassOf rdf:resource=\"http://owl2.test/rules#C\"/>\n"
61 + " <owl:maxCardinality rdf:datatype=\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\">2</owl:maxCardinality>\n"
62 + " <owl:onProperty rdf:resource=\"http://owl2.test/rules#op\"/></owl:Restriction></rdf:RDF>";
63 String conclusion = "";
64 String id = "owl2_rl_invalid_leftside_maxcard";
65 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
66 String d = "Invalid OWL 2 RL due to maxCardinality usage.";
67 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
68 r.setReasonerFactory(factory());
69 r.run();
70 }
71
72 @Test
73 public void testowl2_rl_invalid_oneof() {
74 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\">\n"
75 + " <owl:Ontology />\n"
76 + " <owl:Class rdf:about=\"http://owl2.test/rules#Cb\">\n"
77 + " <owl:oneOf rdf:parseType=\"Collection\">\n"
78 + " <owl:Thing rdf:about=\"http://owl2.test/rules#X\"/>\n"
79 + " <owl:Thing rdf:about=\"http://owl2.test/rules#Y\"/></owl:oneOf></owl:Class>\n"
80 + "</rdf:RDF>";
81 String conclusion = "";
82 String id = "owl2_rl_invalid_oneof";
83 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
84 String d = "OWL 2 RL does not permit owl:oneOf to define a named class (it can be used as a subclass expression).";
85 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
86 r.setReasonerFactory(factory());
87 r.run();
88 }
89
90 @Test
91 public void testowl2_rl_invalid_owlreal() {
92 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n"
93 + " <owl:Ontology />\n"
94 + " <owl:Class rdf:about=\"http://owl2.test/rules#C_Sub\">\n"
95 + " <rdfs:subClassOf>\n"
96 + " <owl:Restriction>\n"
97 + " <owl:allValuesFrom rdf:resource=\"http://www.w3.org/2002/07/owl#real\"/>\n"
98 + " <owl:onProperty>\n"
99 + " <owl:DatatypeProperty rdf:about=\"http://owl2.test/rules#p\"/></owl:onProperty></owl:Restriction></rdfs:subClassOf>\n"
100 + " </owl:Class></rdf:RDF>";
101 String conclusion = "";
102 String id = "owl2_rl_invalid_owlreal";
103 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
104 String d = "Invalid OWL 2 RL because owl:real is used.";
105 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
106 r.setReasonerFactory(factory());
107 r.run();
108 }
109
110 @Test
111 public void testowl2_rl_invalid_rightside_somevaluesfrom() {
112 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\">\n"
113 + " <owl:Ontology />\n"
114 + " <owl:Class rdf:about=\"http://owl2.test/rules#C_Sub\">\n"
115 + " <rdfs:subClassOf>\n"
116 + " <owl:Restriction>\n"
117 + " <owl:someValuesFrom>\n"
118 + " <owl:Class rdf:about=\"http://owl2.test/rules#C1\"/></owl:someValuesFrom>\n"
119 + " <owl:onProperty>\n"
120 + " <owl:ObjectProperty rdf:about=\"http://owl2.test/rules#p\"/></owl:onProperty></owl:Restriction></rdfs:subClassOf>\n"
121 + " </owl:Class></rdf:RDF>";
122 String conclusion = "";
123 String id = "owl2_rl_invalid_rightside_somevaluesfrom";
124 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
125 String d = "This is not a valid OWL 2 RL because someValuesFrom shows up on the right hand side of a SubClassOf axiom.";
126 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
127 r.setReasonerFactory(factory());
128 r.run();
129 }
130
131 @Test
132 public void testowl2_rl_invalid_rightside_unionof() {
133 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n"
134 + " <owl:Ontology />\n"
135 + " <owl:Class rdf:about=\"http://owl2.test/rules#C_Sub\">\n"
136 + " <rdfs:subClassOf>\n"
137 + " <owl:Class>\n"
138 + " <owl:unionOf rdf:parseType=\"Collection\">\n"
139 + " <owl:Class rdf:about=\"http://owl2.test/rules#C1\"/>\n"
140 + " <owl:Class rdf:about=\"http://owl2.test/rules#C2\"/></owl:unionOf></owl:Class></rdfs:subClassOf>\n"
141 + " </owl:Class></rdf:RDF>";
142 String conclusion = "";
143 String id = "owl2_rl_invalid_rightside_unionof";
144 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
145 String d = "Incorrect OWL 2 RL syntax. unionOf shows up at the right hand side of a SubClassOf axiom.";
146 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
147 r.setReasonerFactory(factory());
148 r.run();
149 }
150
151 @Test
152 public void testowl2_rl_invalid_unionof() {
153 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\">\n"
154 + " <owl:Ontology />\n"
155 + " <owl:Class rdf:about=\"http://owl2.test/rules#C\">\n"
156 + " <owl:unionOf rdf:parseType=\"Collection\">\n"
157 + " <owl:Class rdf:about=\"http://owl2.test/rules#C1\"/>\n"
158 + " <owl:Class rdf:about=\"http://owl2.test/rules#C2\"/></owl:unionOf></owl:Class>\n"
159 + "</rdf:RDF>";
160 String conclusion = "";
161 String id = "owl2_rl_invalid_unionof";
162 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
163 String d = "OWL 2 RL does not allow owl:unionOf to define a named class (it can be used as a subclass expression).";
164 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
165 r.setReasonerFactory(factory());
166 r.run();
167 }
168
169 @Test
170 public void testowl2_rl_rules_fp_differentFrom() {
171 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:j.0=\"http://owl2.test/rules/\">\n"
172 + " <owl:Ontology />\n"
173 + " <owl:FunctionalProperty rdf:about=\"http://owl2.test/rules/fp\">\n"
174 + " <rdf:type rdf:resource=\"http://www.w3.org/2002/07/owl#ObjectProperty\"/></owl:FunctionalProperty>\n"
175 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules/Y2\">\n"
176 + " <j.0:fp>\n"
177 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules/X2\"/></j.0:fp></owl:NamedIndividual>\n"
178 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules/X1\">\n"
179 + " <owl:differentFrom rdf:resource=\"http://owl2.test/rules/X2\"/></owl:NamedIndividual>\n"
180 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules/Y1\">\n"
181 + " <j.0:fp rdf:resource=\"http://owl2.test/rules/X1\"/></owl:NamedIndividual></rdf:RDF>";
182 String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\">\n"
183 + " <owl:Ontology />\n"
184 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules/Y2\"/>\n"
185 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules/Y1\">\n"
186 + " <owl:differentFrom rdf:resource=\"http://owl2.test/rules/Y2\"/></owl:NamedIndividual></rdf:RDF>";
187 String id = "owl2_rl_rules_fp_differentFrom";
188 TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL");
189 String d = "This test checks the interaction between an OWL functional property and differentFrom assertions.";
190 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
191 r.setReasonerFactory(factory());
192 r.run();
193 }
194
195 @Test
196 public void testowl2_rl_rules_ifp_differentFrom() {
197 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:j.0=\"http://owl2.test/rules/\">\n"
198 + " <owl:Ontology />\n"
199 + " <owl:InverseFunctionalProperty rdf:about=\"http://owl2.test/rules/ifp\">\n"
200 + " <rdf:type rdf:resource=\"http://www.w3.org/2002/07/owl#ObjectProperty\"/></owl:InverseFunctionalProperty>\n"
201 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules/Y2\">\n"
202 + " <j.0:ifp>\n"
203 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules/X2\"/></j.0:ifp></owl:NamedIndividual>\n"
204 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules/X1\"/>\n"
205 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules/Y1\">\n"
206 + " <owl:differentFrom rdf:resource=\"http://owl2.test/rules/Y2\"/>\n"
207 + " <j.0:ifp rdf:resource=\"http://owl2.test/rules/X1\"/></owl:NamedIndividual></rdf:RDF>";
208 String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\">\n"
209 + " <owl:Ontology />\n"
210 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules/X1\">\n"
211 + " <owl:differentFrom>\n"
212 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules/X2\"/></owl:differentFrom></owl:NamedIndividual>\n"
213 + "</rdf:RDF>";
214 String id = "owl2_rl_rules_ifp_differentFrom";
215 TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL");
216 String d = "This test checks the interaction between inverse functional property and differentFrom assertions.";
217 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
218 r.setReasonerFactory(factory());
219 r.run();
220 }
221
222 @Test
223 public void testowl2_rl_valid_mincard() {
224 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:j.0=\"http://owl2.test/rules#\">\n"
225 + " <owl:Ontology rdf:about=\"http://org.semanticweb.ontologies/Ontology1232054810511161000\"/>\n"
226 + " <owl:Class rdf:about=\"http://owl2.test/rules#C\">\n"
227 + " <rdfs:subClassOf>\n"
228 + " <owl:Restriction>\n"
229 + " <owl:minCardinality rdf:datatype=\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\">1</owl:minCardinality>\n"
230 + " <owl:onProperty>\n"
231 + " <owl:ObjectProperty rdf:about=\"http://owl2.test/rules#OP\"/></owl:onProperty></owl:Restriction></rdfs:subClassOf></owl:Class>\n"
232 + " <owl:Class rdf:about=\"http://www.w3.org/2002/07/owl#Thing\"/>\n"
233 + " <j.0:C rdf:about=\"http://owl2.test/rules#c\">\n"
234 + " <rdf:type rdf:resource=\"http://www.w3.org/2002/07/owl#Thing\"/></j.0:C></rdf:RDF>";
235 String conclusion = "";
236 String id = "owl2_rl_valid_mincard";
237 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
238 String d = "OWL 2 RL does not allow min cardinality";
239 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
240 r.setReasonerFactory(factory());
241 r.run();
242 }
243
244 @Test
245 public void testowl2_rl_valid_oneof() {
246 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\">\n"
247 + " <owl:Ontology />\n"
248 + " <owl:Class rdf:about=\"http://owl2.test/rules#Cb\"/>\n"
249 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules#X\"/>\n"
250 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules#Y\"/>\n"
251 + " <rdf:Description>\n"
252 + " <rdfs:subClassOf rdf:resource=\"http://owl2.test/rules#Cb\"/>\n"
253 + " <owl:oneOf rdf:parseType=\"Collection\">\n"
254 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules#X\"/>\n"
255 + " <owl:NamedIndividual rdf:about=\"http://owl2.test/rules#Y\"/></owl:oneOf></rdf:Description>\n"
256 + "</rdf:RDF>";
257 String conclusion = "";
258 String id = "owl2_rl_valid_oneof";
259 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
260 String d = "A valid usage of oneOf in OWL 2 RL";
261 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
262 r.setReasonerFactory(factory());
263 r.run();
264 }
265
266 @Test
267 public void testowl2_rl_valid_rightside_allvaluesfrom() {
268 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\">\n"
269 + " <owl:Ontology />\n"
270 + " <owl:Class rdf:about=\"http://owl2.test/rules#C\">\n"
271 + " <rdfs:subClassOf>\n"
272 + " <owl:Restriction>\n"
273 + " <owl:onProperty>\n"
274 + " <owl:ObjectProperty rdf:about=\"http://owl2.test/rules#op\"/></owl:onProperty>\n"
275 + " <owl:allValuesFrom>\n"
276 + " <owl:Class rdf:about=\"http://owl2.test/rules#C1\"/></owl:allValuesFrom></owl:Restriction></rdfs:subClassOf>\n"
277 + " </owl:Class></rdf:RDF>";
278 String conclusion = "";
279 String id = "owl2_rl_valid_rightside_allvaluesfrom";
280 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
281 String d = "Valid RL usage of allValuesFrom.";
282 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
283 r.setReasonerFactory(factory());
284 r.run();
285 }
286
287 @Test
288 public void testNew_Feature_AnnotationAnnotations_001() {
289 String premise = "<?xml version=\"1.0\"?>\n"
290 + "<rdf:RDF\n"
291 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:rdfs= \"http://www.w3.org/2000/01/rdf-schema#\">\n"
292 + '\n'
293 + "<owl:Ontology rdf:about=\"http://example.org/\"/>\n"
294 + '\n'
295 + "<rdf:Description rdf:about=\"http://example.org/\">\n"
296 + " <rdfs:label>An example ontology</rdfs:label></rdf:Description>\n"
297 + '\n'
298 + "<owl:Annotation>\n"
299 + " <owl:annotatedSource rdf:resource=\"http://example.org/\" />\n"
300 + " <owl:annotatedProperty rdf:resource=\"http://www.w3.org/2000/01/rdf-schema#label\" />\n"
301 + " <owl:annotatedTarget>An example ontology</owl:annotatedTarget>\n"
302 + " <author>Mike Smith</author>\n" + "</owl:Annotation>\n"
303 + '\n' + "<owl:AnnotationProperty rdf:about=\"author\" />\n"
304 + "<owl:NamedIndividual rdf:about=\"i\" />\n" + '\n'
305 + "</rdf:RDF>";
306 String conclusion = "";
307 String id = "New_Feature_AnnotationAnnotations_001";
308 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
309 String d = "Demonstrates annotation of an annotation. Adapted from an example in the Mapping to RDF Graphs document.";
310 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
311 r.setReasonerFactory(factory());
312 r.run();
313 }
314
315 @Test
316 public void testNew_Feature_AsymmetricProperty_001() {
317 String premise = "<?xml version=\"1.0\"?>\n"
318 + "<rdf:RDF\n"
319 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
320 + '\n' + "<owl:Ontology/>\n" + '\n'
321 + "<owl:ObjectProperty rdf:about=\"parentOf\" />\n"
322 + "<owl:AsymmetricProperty rdf:about=\"parentOf\" />\n" + '\n'
323 + "<rdf:Description rdf:about=\"Peter\">\n"
324 + " <parentOf rdf:resource=\"Stewie\" />\n"
325 + "</rdf:Description>\n" + '\n'
326 + "<rdf:Description rdf:about=\"Stewie\">\n"
327 + " <parentOf rdf:resource=\"Peter\" />\n"
328 + "</rdf:Description>\n" + '\n' + "</rdf:RDF>";
329 String conclusion = "";
330 String id = "New_Feature_AsymmetricProperty_001";
331 TestClasses tc = TestClasses.valueOf("INCONSISTENCY");
332 String d = "Demonstrates use of an asymmetric object property axiom to cause a trivial inconsistency based on the example in the Structural Specification and Functional-Style Syntax document.";
333 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
334 r.setReasonerFactory(factory());
335 r.run();
336 }
337
338 @Test
339 public void testNew_Feature_AxiomAnnotations_001() {
340 String premise = "<?xml version=\"1.0\"?>\n"
341 + "<rdf:RDF\n"
342 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\">\n"
343 + '\n'
344 + "<owl:Ontology/>\n"
345 + '\n'
346 + "<owl:Class rdf:about=\"Child\" />\n"
347 + "<owl:Class rdf:about=\"Person\" />\n"
348 + '\n'
349 + "<rdf:Description rdf:about=\"Child\">\n"
350 + " <rdfs:subClassOf rdf:resource=\"Person\" /></rdf:Description>\n"
351 + '\n'
352 + "<owl:Axiom>\n"
353 + " <owl:annotatedSource rdf:resource=\"Child\" />\n"
354 + " <owl:annotatedProperty rdf:resource=\"http://www.w3.org/2000/01/rdf-schema#subClassOf\" />\n"
355 + " <owl:annotatedTarget rdf:resource=\"Person\" />\n"
356 + " <rdfs:comment>Children are people.</rdfs:comment></owl:Axiom>\n"
357 + '\n' + "</rdf:RDF>";
358 String conclusion = "";
359 String id = "New_Feature_AxiomAnnotations_001";
360 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
361 String d = "Demonstrates axiom annotation based on an example in the Mapping to RDF Graphs document. The axiom being annotated here generates a main triple when mapped to RDF.";
362 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
363 r.setReasonerFactory(factory());
364 r.run();
365 }
366
367 @Test
368 public void testNew_Feature_BottomDataProperty_001() {
369 String premise = "<?xml version=\"1.0\"?>\n"
370 + "<rdf:RDF\n"
371 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
372 + '\n'
373 + "<owl:Ontology/>\n"
374 + '\n'
375 + "<rdf:Description rdf:about=\"i\">\n"
376 + " <rdf:type>\n"
377 + " <owl:Restriction>\n"
378 + " <owl:onProperty rdf:resource=\"http://www.w3.org/2002/07/owl#bottomDataProperty\" />\n"
379 + " <owl:someValuesFrom rdf:resource=\"http://www.w3.org/2000/01/rdf-schema#Literal\" /></owl:Restriction></rdf:type>\n"
380 + "</rdf:Description>\n" + '\n' + "</rdf:RDF>";
381 String conclusion = "";
382 String id = "New_Feature_BottomDataProperty_001";
383 TestClasses tc = TestClasses.valueOf("INCONSISTENCY");
384 String d = "Demonstrates use of the bottom data property to create an inconsistency.";
385 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
386 r.setReasonerFactory(factory());
387 r.run();
388 }
389
390 @Test
391 public void testNew_Feature_BottomObjectProperty_001() {
392 String premise = "<?xml version=\"1.0\"?>\n"
393 + "<rdf:RDF\n"
394 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
395 + '\n'
396 + "<owl:Ontology/>\n"
397 + '\n'
398 + "<rdf:Description rdf:about=\"i\">\n"
399 + " <rdf:type>\n"
400 + " <owl:Restriction>\n"
401 + " <owl:onProperty rdf:resource=\"http://www.w3.org/2002/07/owl#bottomObjectProperty\" />\n"
402 + " <owl:someValuesFrom rdf:resource=\"http://www.w3.org/2002/07/owl#Thing\" /></owl:Restriction></rdf:type>\n"
403 + "</rdf:Description>\n" + '\n' + "</rdf:RDF>";
404 String conclusion = "";
405 String id = "New_Feature_BottomObjectProperty_001";
406 TestClasses tc = TestClasses.valueOf("INCONSISTENCY");
407 String d = "Demonstrates use of the bottom object property to create an inconsistency.";
408 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
409 r.setReasonerFactory(factory());
410 r.run();
411 }
412
413 @Test
414 public void testNew_Feature_DisjointObjectProperties_001() {
415 String premise = "<?xml version=\"1.0\"?>\n"
416 + "<rdf:RDF\n"
417 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
418 + '\n'
419 + "<owl:Ontology/>\n"
420 + '\n'
421 + "<owl:ObjectProperty rdf:about=\"hasFather\" />\n"
422 + "<owl:ObjectProperty rdf:about=\"hasMother\" />\n"
423 + '\n'
424 + "<rdf:Description rdf:about=\"hasFather\">\n"
425 + " <owl:propertyDisjointWith rdf:resource=\"hasMother\" /></rdf:Description>\n"
426 + '\n' + "<rdf:Description rdf:about=\"Stewie\">\n"
427 + " <hasFather rdf:resource=\"Peter\" />\n"
428 + "</rdf:Description>\n" + '\n'
429 + "<rdf:Description rdf:about=\"Stewie\">\n"
430 + " <hasMother rdf:resource=\"Lois\" />\n"
431 + "</rdf:Description>\n" + '\n' + "</rdf:RDF>";
432 String conclusion = "<?xml version=\"1.0\"?>\n"
433 + "<rdf:RDF\n"
434 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
435 + '\n'
436 + "<owl:Ontology/>\n"
437 + '\n'
438 + "<rdf:Description rdf:about=\"Peter\">\n"
439 + " <owl:differentFrom rdf:resource=\"Lois\" /></rdf:Description>\n"
440 + '\n' + "</rdf:RDF>";
441 String id = "New_Feature_DisjointObjectProperties_001";
442 TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL");
443 String d = "Demonstrates use of a disjoint object properties axiom to infer that two individuals are different based on the example in the Structural Specification and Functional-Style Syntax document.";
444 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
445 r.setReasonerFactory(factory());
446 r.run();
447 }
448
449 @Test
450 public void testNew_Feature_DisjointObjectProperties_002() {
451 String premise = "<?xml version=\"1.0\"?>\n"
452 + "<rdf:RDF\n"
453 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
454 + '\n'
455 + "<owl:Ontology/>\n"
456 + '\n'
457 + "<owl:ObjectProperty rdf:about=\"hasFather\" />\n"
458 + "<owl:ObjectProperty rdf:about=\"hasMother\" />\n"
459 + "<owl:ObjectProperty rdf:about=\"hasChild\" />\n"
460 + '\n'
461 + "<owl:AllDisjointProperties>\n"
462 + " <owl:members rdf:parseType=\"Collection\">\n"
463 + " <rdf:Description rdf:about=\"hasFather\" />\n"
464 + " <rdf:Description rdf:about=\"hasMother\" />\n"
465 + " <rdf:Description rdf:about=\"hasChild\" /></owl:members></owl:AllDisjointProperties>\n"
466 + '\n'
467 + "<rdf:Description rdf:about=\"Stewie\">\n"
468 + " <hasFather rdf:resource=\"Peter\" />\n"
469 + "</rdf:Description>\n"
470 + '\n'
471 + "<rdf:Description rdf:about=\"Stewie\">\n"
472 + " <hasMother rdf:resource=\"Lois\" />\n"
473 + "</rdf:Description>\n"
474 + '\n'
475 + "<rdf:Description rdf:about=\"Stewie\">\n"
476 + " <hasChild rdf:resource=\"StewieJr\" />\n"
477 + "</rdf:Description>\n" + '\n' + "</rdf:RDF>";
478 String conclusion = "<?xml version=\"1.0\"?>\n"
479 + "<rdf:RDF\n"
480 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
481 + '\n'
482 + "<owl:Ontology/>\n"
483 + '\n'
484 + "<owl:AllDifferent>\n"
485 + " <owl:distinctMembers rdf:parseType=\"Collection\">\n"
486 + " <rdf:Description rdf:about=\"Peter\" />\n"
487 + " <rdf:Description rdf:about=\"Lois\" />\n"
488 + " <rdf:Description rdf:about=\"StewieJr\" /></owl:distinctMembers></owl:AllDifferent>\n"
489 + '\n' + "</rdf:RDF>";
490 String id = "New_Feature_DisjointObjectProperties_002";
491 TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL");
492 String d = "A modification of test New-Feature-DisjointObjectProperties-001 to demonstrate a ternary disjoint object properties axiom.";
493 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
494 r.setReasonerFactory(factory());
495 r.run();
496 }
497
498 @Test
499 public void testNew_Feature_DisjointUnion_001() {
500 String premise = "<?xml version=\"1.0\"?>\n"
501 + "<rdf:RDF\n"
502 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
503 + '\n'
504 + "<owl:Ontology/>\n"
505 + '\n'
506 + "<owl:Class rdf:about=\"Child\" />\n"
507 + "<owl:Class rdf:about=\"Boy\" />\n"
508 + "<owl:Class rdf:about=\"Girl\" />\n"
509 + '\n'
510 + "<rdf:Description rdf:about=\"Child\">\n"
511 + " <owl:disjointUnionOf rdf:parseType=\"Collection\">\n"
512 + " <rdf:Description rdf:about=\"Boy\" />\n"
513 + " <rdf:Description rdf:about=\"Girl\" /></owl:disjointUnionOf></rdf:Description>\n"
514 + '\n'
515 + "<Child rdf:about=\"Stewie\" />\n"
516 + "<rdf:Description rdf:about=\"Stewie\">\n"
517 + " <rdf:type>\n"
518 + " <owl:Class>\n"
519 + " <owl:complementOf rdf:resource=\"Girl\" /></owl:Class></rdf:type>\n"
520 + "</rdf:Description>\n" + '\n' + "</rdf:RDF>";
521 String conclusion = "<?xml version=\"1.0\"?>\n"
522 + "<rdf:RDF\n"
523 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
524 + '\n' + "<owl:Ontology/>\n" + '\n'
525 + "<owl:Class rdf:about=\"Boy\" />\n" + '\n'
526 + "<Boy rdf:about=\"Stewie\" />\n" + '\n' + "</rdf:RDF>";
527 String id = "New_Feature_DisjointUnion_001";
528 TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL");
529 String d = "Demonstrates a disjoint union axiom based on the example in the Structural Specification and Functional-Style Syntax document.";
530 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
531 r.setReasonerFactory(factory());
532 r.run();
533 }
534
535 @Test
536 public void testNew_Feature_IrreflexiveProperty_001() {
537 String premise = "<?xml version=\"1.0\"?>\n"
538 + "<rdf:RDF\n"
539 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
540 + '\n' + "<owl:Ontology/>\n" + '\n'
541 + "<owl:ObjectProperty rdf:about=\"marriedTo\" />\n"
542 + "<owl:IrreflexiveProperty rdf:about=\"marriedTo\" />\n"
543 + '\n' + "<rdf:Description rdf:about=\"Peter\">\n"
544 + " <marriedTo rdf:resource=\"Peter\" />\n"
545 + "</rdf:Description>\n" + '\n' + "</rdf:RDF>";
546 String conclusion = "";
547 String id = "New_Feature_IrreflexiveProperty_001";
548 TestClasses tc = TestClasses.valueOf("INCONSISTENCY");
549 String d = "Demonstrates use of an irreflexive object property axiom to cause a trivial inconsistency based on the example in the Structural Specification and Functional-Style Syntax document.";
550 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
551 r.setReasonerFactory(factory());
552 r.run();
553 }
554
555 @Test
556 public void testNew_Feature_NegativeDataPropertyAssertion_001() {
557 String premise = "<?xml version=\"1.0\"?>\n"
558 + "<rdf:RDF\n"
559 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
560 + '\n'
561 + "<owl:Ontology/>\n"
562 + '\n'
563 + "<owl:DatatypeProperty rdf:about=\"hasAge\" />\n"
564 + '\n'
565 + "<owl:NegativePropertyAssertion>\n"
566 + " <owl:sourceIndividual rdf:resource=\"Meg\" />\n"
567 + " <owl:assertionProperty rdf:resource=\"hasAge\" />\n"
568 + " <owl:targetValue rdf:datatype=\"http://www.w3.org/2001/XMLSchema#integer\">5</owl:targetValue></owl:NegativePropertyAssertion>\n"
569 + '\n'
570 + "<rdf:Description rdf:about=\"Meg\">\n"
571 + " <hasAge rdf:datatype=\"http://www.w3.org/2001/XMLSchema#integer\">5</hasAge></rdf:Description>\n"
572 + '\n' + "</rdf:RDF>";
573 String conclusion = "";
574 String id = "New_Feature_NegativeDataPropertyAssertion_001";
575 TestClasses tc = TestClasses.valueOf("INCONSISTENCY");
576 String d = "Demonstrates use of a negative data property assertion to create a trivial inconsistency based on an example in the Structural Specification and Functional-Style Syntax document.";
577 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
578 r.setReasonerFactory(factory());
579 r.run();
580 }
581
582 @Test
583 public void testNew_Feature_NegativeObjectPropertyAssertion_001() {
584 String premise = "<?xml version=\"1.0\"?>\n"
585 + "<rdf:RDF\n"
586 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
587 + '\n'
588 + "<owl:Ontology/>\n"
589 + '\n'
590 + "<owl:ObjectProperty rdf:about=\"hasSon\" />\n"
591 + '\n'
592 + "<owl:NegativePropertyAssertion>\n"
593 + " <owl:sourceIndividual rdf:resource=\"Peter\" />\n"
594 + " <owl:assertionProperty rdf:resource=\"hasSon\" />\n"
595 + " <owl:targetIndividual rdf:resource=\"Meg\" /></owl:NegativePropertyAssertion>\n"
596 + '\n' + "<rdf:Description rdf:about=\"Peter\">\n"
597 + " <hasSon rdf:resource=\"Meg\" />\n"
598 + "</rdf:Description>\n" + "</rdf:RDF>";
599 String conclusion = "";
600 String id = "New_Feature_NegativeObjectPropertyAssertion_001";
601 TestClasses tc = TestClasses.valueOf("INCONSISTENCY");
602 String d = "Demonstrates use of a negative object property assertion to create a trivial inconsistency based on an example in the Structural Specification and Functional-Style Syntax document.";
603 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
604 r.setReasonerFactory(factory());
605 r.run();
606 }
607
608 @Test
609 @Changed
610 public void testNew_Feature_ObjectPropertyChain_001() {
611 String premise = "<?xml version=\"1.0\"?>\n"
612 + "<rdf:RDF\n"
613 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
614 + "<owl:Ontology/><owl:ObjectProperty rdf:about=\"hasMother\" />\n"
615 + "<owl:ObjectProperty rdf:about=\"hasSister\" />\n"
616 + "<owl:ObjectProperty rdf:about=\"hasAunt\" />\n"
617 + "<rdf:Description rdf:about=\"hasAunt\">\n"
618 + " <owl:propertyChainAxiom rdf:parseType=\"Collection\">\n"
619 + " <rdf:Description rdf:about=\"hasMother\" />\n"
620 + " <rdf:Description rdf:about=\"hasSister\" /></owl:propertyChainAxiom></rdf:Description>\n"
621 + "<rdf:Description rdf:about=\"Stewie\">\n"
622 + " <hasMother rdf:resource=\"Lois\" />\n"
623 + "</rdf:Description>\n"
624 + "<rdf:Description rdf:about=\"Lois\">\n"
625 + " <hasSister rdf:resource=\"Carol\" />\n"
626 + "</rdf:Description>\n" + "</rdf:RDF>";
627 String conclusion = "<?xml version=\"1.0\"?>\n"
628 + "<rdf:RDF\n"
629 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
630 + "<owl:Ontology/>\n"
631 + "<owl:ObjectProperty rdf:about=\"hasAunt\" />\n"
632 + "<rdf:Description rdf:about=\"Stewie\"><hasAunt rdf:resource=\"Carol\" /></rdf:Description></rdf:RDF>";
633 String id = "New_Feature_ObjectPropertyChain_001";
634 TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL");
635 String d = "Demonstrates an object property chain in a subproperty axiom based on the example in the Structural Specification and Functional-Style Syntax document.";
636 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
637 r.setReasonerFactory(factory());
638 r.run();
639 }
640
641 @Test
642 public void testNew_Feature_ObjectPropertyChain_BJP_004() {
643 String premise = "<?xml version=\"1.0\"?>\n"
644 + "<rdf:RDF\n"
645 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdfs= \"http://www.w3.org/2000/01/rdf-schema#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
646 + '\n'
647 + "<owl:Ontology/>\n"
648 + '\n'
649 + " <rdf:Description rdf:about=\"p\">\n"
650 + " <owl:propertyChainAxiom rdf:parseType=\"Collection\">\n"
651 + " <owl:ObjectProperty rdf:about=\"p\"/>\n"
652 + " <owl:ObjectProperty rdf:about=\"q\"/></owl:propertyChainAxiom></rdf:Description>\n"
653 + " \n" + " <rdf:Description rdf:about=\"a\">\n"
654 + " <q rdf:resource=\"b\"/>\n"
655 + " </rdf:Description>\n" + " \n"
656 + " <rdf:Description rdf:about=\"b\">\n"
657 + " <q rdf:resource=\"c\"/>\n"
658 + " </rdf:Description>\n" + " \n" + "</rdf:RDF>";
659 String conclusion = "<rdf:RDF\n"
660 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
661 + '\n' + " <owl:Ontology/>\n"
662 + " <owl:ObjectProperty rdf:about=\"p\"/>\n"
663 + " <owl:TransitiveProperty rdf:about=\"p\"/>\n"
664 + "</rdf:RDF>";
665 String id = "New_Feature_ObjectPropertyChain_BJP_004";
666 TestClasses tc = TestClasses.valueOf("NEGATIVE_IMPL");
667 String d = "A test of an interaction between a role chain +hierarchy and transitivity axioms.";
668 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
669 r.setReasonerFactory(factory());
670 r.run();
671 }
672
673 @Test
674 public void testNew_Feature_ObjectQCR_001() {
675 String premise = "<?xml version=\"1.0\"?>\n"
676 + "<rdf:RDF\n"
677 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
678 + '\n'
679 + "<owl:Ontology/>\n"
680 + '\n'
681 + "<owl:ObjectProperty rdf:about=\"fatherOf\" />\n"
682 + "<owl:Class rdf:about=\"Man\" />\n"
683 + '\n'
684 + "<rdf:Description rdf:about=\"Peter\">\n"
685 + " <fatherOf rdf:resource=\"Stewie\" />\n"
686 + " <fatherOf rdf:resource=\"Chris\" />\n"
687 + "</rdf:Description>\n"
688 + '\n'
689 + "<Man rdf:about=\"Stewie\" />\n"
690 + "<Man rdf:about=\"Chris\" />\n"
691 + '\n'
692 + "<rdf:Description rdf:about=\"Stewie\">\n"
693 + " <owl:differentFrom rdf:resource=\"Chris\" /></rdf:Description>\n"
694 + '\n' + "</rdf:RDF>";
695 String conclusion = "<?xml version=\"1.0\"?>\n"
696 + "<rdf:RDF\n"
697 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
698 + '\n'
699 + "<owl:Ontology/>\n"
700 + '\n'
701 + "<owl:ObjectProperty rdf:about=\"fatherOf\" />\n"
702 + "<owl:Class rdf:about=\"Man\" />\n"
703 + '\n'
704 + "<rdf:Description rdf:about=\"Peter\">\n"
705 + " <rdf:type>\n"
706 + " <owl:Restriction>\n"
707 + " <owl:onProperty rdf:resource=\"fatherOf\" />\n"
708 + " <owl:minQualifiedCardinality rdf:datatype=\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\">2</owl:minQualifiedCardinality>\n"
709 + " <owl:onClass rdf:resource=\"Man\" /></owl:Restriction></rdf:type>\n"
710 + "</rdf:Description>\n" + '\n' + "</rdf:RDF>";
711 String id = "New_Feature_ObjectQCR_001";
712 TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL");
713 String d = "Demonstrates a qualified minimum cardinality object property restriction based on example in the Structural Specification and Functional-Style Syntax document.";
714 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
715 r.setReasonerFactory(factory());
716 r.run();
717 }
718
719 @Test
720 public void testNew_Feature_ObjectQCR_002() {
721 String premise = "<?xml version=\"1.0\"?>\n"
722 + "<rdf:RDF\n"
723 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
724 + '\n'
725 + "<owl:Ontology/>\n"
726 + '\n'
727 + "<owl:ObjectProperty rdf:about=\"fatherOf\" />\n"
728 + "<owl:Class rdf:about=\"Woman\" />\n"
729 + '\n'
730 + "<rdf:Description rdf:about=\"Peter\">\n"
731 + " <fatherOf rdf:resource=\"Stewie\" />\n"
732 + " <fatherOf rdf:resource=\"Meg\" /></rdf:Description>\n"
733 + '\n'
734 + "<Woman rdf:about=\"Meg\" />\n"
735 + '\n'
736 + "<rdf:Description rdf:about=\"Peter\">\n"
737 + " <rdf:type>\n"
738 + " <owl:Restriction>\n"
739 + " <owl:onProperty rdf:resource=\"fatherOf\" />\n"
740 + " <owl:maxQualifiedCardinality rdf:datatype=\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\">1</owl:maxQualifiedCardinality>\n"
741 + " <owl:onClass rdf:resource=\"Woman\" /></owl:Restriction></rdf:type>\n"
742 + "</rdf:Description>\n"
743 + '\n'
744 + "<rdf:Description rdf:about=\"Stewie\">\n"
745 + " <owl:differentFrom rdf:resource=\"Meg\" /></rdf:Description>\n"
746 + '\n' + "</rdf:RDF>";
747 String conclusion = "<?xml version=\"1.0\"?>\n"
748 + "<rdf:RDF\n"
749 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
750 + '\n'
751 + "<owl:Ontology/>\n"
752 + '\n'
753 + "<owl:Class rdf:about=\"Woman\" />\n"
754 + '\n'
755 + "<rdf:Description rdf:about=\"Stewie\">\n"
756 + " <rdf:type>\n"
757 + " <owl:Class>\n"
758 + " <owl:complementOf rdf:resource=\"Woman\" /></owl:Class></rdf:type>\n"
759 + "</rdf:Description>\n" + '\n' + "</rdf:RDF>";
760 String id = "New_Feature_ObjectQCR_002";
761 TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL");
762 String d = "Demonstrates a qualified maximum cardinality object property restriction adapted from example in the Structural Specification and Functional-Style Syntax document.";
763 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
764 r.setReasonerFactory(factory());
765 r.run();
766 }
767
768 @Test
769 public void testFS2RDF_different_individuals_2_ar() {
770 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns=\"http://example.org/\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\">\n"
771 + " <owl:Ontology/>\n"
772 + " <rdf:Description rdf:about=\"http://example.org/a\">\n"
773 + " <owl:differentFrom rdf:resource=\"http://example.org/b\"/></rdf:Description></rdf:RDF>";
774 String conclusion = "";
775 String id = "FS2RDF_different_individuals_2_ar";
776 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
777 String d = "Functional syntax to RDFXML translation of ontology consisting of a 2 argument DifferentIndividuals";
778 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
779 r.setReasonerFactory(factory());
780 r.run();
781 }
782
783 @Test
784 public void testFS2RDF_different_individuals_3_ar() {
785 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns=\"http://example.org/\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\">\n"
786 + " <owl:Ontology/>\n"
787 + " <owl:AllDifferent>\n"
788 + " <owl:distinctMembers rdf:parseType=\"Collection\">\n"
789 + " <rdf:Description rdf:about=\"http://example.org/a\"/>\n"
790 + " <rdf:Description rdf:about=\"http://example.org/b\"/>\n"
791 + " <rdf:Description rdf:about=\"http://example.org/c\"/></owl:distinctMembers></owl:AllDifferent>\n"
792 + "</rdf:RDF>";
793 String conclusion = "";
794 String id = "FS2RDF_different_individuals_3_ar";
795 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
796 String d = "Functional syntax to RDFXML translation of ontology consisting of a 3 argument DifferentIndividuals";
797 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
798 r.setReasonerFactory(factory());
799 r.run();
800 }
801
802 @Test
803 public void testFS2RDF_no_builtin_prefixes_ar() {
804 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns=\"http://example.org/\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\">\n"
805 + " <owl:Ontology/>\n"
806 + " <rdf:Description rdf:about=\"http://example.org/d\">\n"
807 + " <owl:sameAs rdf:resource=\"http://example.org/e\"/></rdf:Description>\n"
808 + " <rdf:Description rdf:about=\"http://example.org/a\">\n"
809 + " <owl:sameAs>\n"
810 + " <rdf:Description rdf:about=\"http://example.org/b\">\n"
811 + " <owl:sameAs>\n"
812 + " <rdf:Description rdf:about=\"http://example.org/c\">\n"
813 + " <owl:sameAs rdf:resource=\"http://example.org/d\"/></rdf:Description></owl:sameAs></rdf:Description></owl:sameAs></rdf:Description>\n"
814 + "</rdf:RDF>";
815 String conclusion = "";
816 String id = "FS2RDF_no_builtin_prefixes_ar";
817 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
818 String d = "Functional syntax to RDFXML checking that there aren't builtin prefixes for xsd, rdf, rdfs, owl";
819 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
820 r.setReasonerFactory(factory());
821 r.run();
822 }
823
824 @Test
825 public void testFS2RDF_same_individual_2_ar() {
826 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns=\"http://example.org/\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\">\n"
827 + " <owl:Ontology/>\n"
828 + " <rdf:Description rdf:about=\"http://example.org/a\">\n"
829 + " <owl:sameAs rdf:resource=\"http://example.org/b\"/></rdf:Description></rdf:RDF>";
830 String conclusion = "";
831 String id = "FS2RDF_same_individual_2_ar";
832 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
833 String d = "Functional syntax to RDFXML translation of ontology consisting of a 2 argument SameIndividual";
834 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
835 r.setReasonerFactory(factory());
836 r.run();
837 }
838
839 @Test
840 public void testbnode2somevaluesfrom() {
841 String premise = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\" xmlns:ex=\"http://example.org/\"\n"
842 + " xml:base=\"http://example.org/\">\n"
843 + " <owl:Ontology/>\n"
844 + " <owl:ObjectProperty rdf:about=\"p\"/>\n"
845 + " \n"
846 + " <owl:Thing rdf:about=\"a\">\n"
847 + " <ex:p><rdf:Description rdf:nodeID=\"x\"/></ex:p> </owl:Thing></rdf:RDF>";
848 String conclusion = "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:ex=\"http://example.org/\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\"\n"
849 + " xml:base=\"http://example.org/\">\n"
850 + " <owl:Ontology/>\n"
851 + " <owl:ObjectProperty rdf:about=\"p\"/>\n"
852 + " <owl:Thing rdf:about=\"a\">\n"
853 + " <rdf:type>\n"
854 + " <owl:Restriction>\n"
855 + " <owl:onProperty rdf:resource=\"p\"/>\n"
856 + " <owl:someValuesFrom rdf:resource=\"http://www.w3.org/2002/07/owl#Thing\"/></owl:Restriction></rdf:type></owl:Thing></rdf:RDF>";
857 String id = "bnode2somevaluesfrom";
858 TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL");
859 String d = "Shows that a BNode is an existential variable.";
860 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
861 r.setReasonerFactory(factory());
862 r.run();
863 }
864
865 @Test
866 public void testchain2trans1() {
867 String premise = "<rdf:RDF \n"
868 + " xml:base=\"http://example.org/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\">\n"
869 + '\n'
870 + " <owl:Ontology rdf:about=\"http://owl.semanticweb.org/page/Special:GetOntology/Chain2trans?m=p\"/>\n"
871 + " <owl:ObjectProperty rdf:about=\"#p\"/>\n"
872 + '\n'
873 + " <rdf:Description rdf:about=\"#p\">\n"
874 + " <owl:propertyChainAxiom rdf:parseType=\"Collection\">\n"
875 + " <rdf:Description rdf:about=\"#p\"/>\n"
876 + " <rdf:Description rdf:about=\"#p\"/></owl:propertyChainAxiom></rdf:Description>\n"
877 + "</rdf:RDF>";
878 String conclusion = "<?xml version=\"1.0\"?>\n"
879 + "<rdf:RDF \n"
880 + " xml:base=\"http://example.org/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:owl=\"http://www.w3.org/2002/07/owl#\">\n"
881 + " <owl:Ontology rdf:about=\"http://owl.semanticweb.org/page/Special:GetOntology/Chain2trans?m=c\"/>\n"
882 + " <owl:TransitiveProperty rdf:about=\"#p\"/>\n"
883 + "</rdf:RDF>";
884 String id = "chain2trans1";
885 TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL");
886 String d = "A role chain can be a synonym for transitivity.";
887 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
888 r.setReasonerFactory(factory());
889 r.run();
890 }
891
892 @Test
893 public void testConsistent_dateTime() {
894 String premise = "Prefix(:=<http://example.org/>)\n"
895 + "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n"
896 + "Ontology(\n"
897 + " Declaration(NamedIndividual(:a))\n"
898 + " Declaration(DataProperty(:dp))\n"
899 + " Declaration(Class(:A))\n"
900 + " SubClassOf(:A \n"
901 + " DataSomeValuesFrom(:dp DatatypeRestriction(\n"
902 + " xsd:dateTime \n"
903 + " xsd:minInclusive \"2008-10-08T20:44:11.656+01:00\"^^xsd:dateTime)\n"
904 + " )\n"
905 + " ) \n"
906 + " SubClassOf(:A \n"
907 + " DataAllValuesFrom(:dp DatatypeRestriction(\n"
908 + " xsd:dateTime \n"
909 + " xsd:maxInclusive \"2008-10-08T20:44:11.656+01:00\"^^xsd:dateTime)\n"
910 + " )\n" + " )\n" + " ClassAssertion(:A :a)\n" + ')';
911 String conclusion = "";
912 String id = "Consistent_dateTime";
913 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
914 String d = "The datatype restrictions leave exactly one dateTime value as dp filler for the individual a, so the ontology is consistent.";
915 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
916 r.setReasonerFactory(factory());
917 r.run();
918 }
919
920 @Test
921 public void testconsistent_integer_filler() {
922 String premise = "Prefix(:=<http://example.org/>)\n"
923 + "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n"
924 + "Ontology(\n" + " Declaration(NamedIndividual(:a))\n"
925 + " Declaration(DataProperty(:dp))\n"
926 + " Declaration(Class(:A))\n"
927 + " SubClassOf(:A DataHasValue(:dp \"18\"^^xsd:integer)) \n"
928 + " ClassAssertion(:A :a) \n"
929 + " ClassAssertion(DataAllValuesFrom(:dp xsd:integer) :a)\n"
930 + ')';
931 String conclusion = "";
932 String id = "consistent_integer_filler";
933 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
934 String d = "The individual a is in the extension of the class A, which implies that it has a hasAge filler of 18 as integer, which is consistent with the all values from integer assertion for a.";
935 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
936 r.setReasonerFactory(factory());
937 r.run();
938 }
939
940 @Test
941 @Ignore("FaCT++ datatype problems")
942 public void testDatatype_DataComplementOf_001() {
943 String premise = "<?xml version=\"1.0\"?>\n"
944 + "<rdf:RDF\n"
945 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:rdfs= \"http://www.w3.org/2000/01/rdf-schema#\" >\n"
946 + '\n'
947 + "<owl:Ontology/>\n"
948 + '\n'
949 + "<owl:DatatypeProperty rdf:about=\"p\" />\n"
950 + '\n'
951 + "<rdf:Description rdf:about=\"p\">\n"
952 + " <rdfs:range>\n"
953 + " <rdfs:Datatype>\n"
954 + " <owl:datatypeComplementOf rdf:resource=\"http://www.w3.org/2001/XMLSchema#positiveInteger\" /></rdfs:Datatype></rdfs:range></rdf:Description>\n"
955 + '\n'
956 + "<rdf:Description rdf:about=\"i\">\n"
957 + " <p rdf:datatype=\"http://www.w3.org/2001/XMLSchema#negativeInteger\">-1</p>\n"
958 + " <p rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">A string</p></rdf:Description>\n"
959 + '\n' + "</rdf:RDF>";
960 String conclusion = "";
961 String id = "Datatype_DataComplementOf_001";
962 TestClasses tc = TestClasses.valueOf("CONSISTENCY");
963 String d = "Demonstrates that the complement of a datatype contains literals from other datatypes.";
964 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
965 r.setReasonerFactory(factory());
966 r.run();
967 }
968
969 @Test
970 public void testDifferent_types_in_Datatype_Restrictions_and_Complement() {
971 String premise = "Prefix(:=<http://example.org/>)\n"
972 + "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n"
973 + "Ontology(\n" + " Declaration(NamedIndividual(:a))\n"
974 + " Declaration(DataProperty(:dp))\n"
975 + " Declaration(Class(:A))\n"
976 + " SubClassOf(:A DataAllValuesFrom(:dp \n"
977 + " DataOneOf(\"3\"^^xsd:integer \"4\"^^xsd:int))\n"
978 + " ) \n" + " SubClassOf(:A DataAllValuesFrom(:dp \n"
979 + " DataOneOf(\"2\"^^xsd:short \"3\"^^xsd:integer))\n"
980 + " )\n" + " ClassAssertion(:A :a)\n"
981 + " ClassAssertion(DataSomeValuesFrom(:dp\n"
982 + " DataComplementOf(DataOneOf(\"3\"^^xsd:integer))) :a\n"
983 + " )\n" + ')';
984 String conclusion = "";
985 String id = "Different_types_in_Datatype_Restrictions_and_Complement";
986 TestClasses tc = TestClasses.valueOf("INCONSISTENCY");
987 String d = "The individual a must have dp fillers that are in the sets {3, 4} and {2, 3} (different types are used, but shorts and ints are integers), but at the same time 3 is not allowed as a dp filler for a, which causes the inconsistency.";
988 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
989 r.setReasonerFactory(factory());
990 r.run();
991 }
992
993 @Test
994 public void testinconsistent_integer_filler() {
995 String premise = "Prefix(:=<http://example.org/>)\n"
996 + "Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)\n"
997 + "Ontology(\n"
998 + " Declaration(NamedIndividual(:a))\n"
999 + " Declaration(DataProperty(:hasAge))\n"
1000 + " Declaration(Class(:Eighteen))\n"
1001 + " SubClassOf(DataHasValue(:hasAge \"18\"^^xsd:integer) :Eighteen) \n"
1002 + " ClassAssertion(DataHasValue(:hasAge \"18\"^^xsd:integer) :a) \n"
1003 + " ClassAssertion(ObjectComplementOf(:Eighteen) :a)\n" + ')';
1004 String conclusion = "";
1005 String id = "inconsistent_integer_filler";
1006 TestClasses tc = TestClasses.valueOf("INCONSISTENCY");
1007 String d = "The individual has an asserted hasAge filler of 18 as integer. At the same time it is an instance of the negation of the class Eighteen, which implies that all hasAge fillers for a are not 18.";
1008 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
1009 r.setReasonerFactory(factory());
1010 r.run();
1011 }
1012
1013 @Test
1014 public void testDisjointClasses_001() {
1015 String premise = "<?xml version=\"1.0\"?>\n"
1016 + "<rdf:RDF\n"
1017 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
1018 + '\n'
1019 + "<owl:Ontology/>\n"
1020 + '\n'
1021 + "<owl:Class rdf:about=\"Boy\" />\n"
1022 + "<owl:Class rdf:about=\"Girl\" />\n"
1023 + '\n'
1024 + "<rdf:Description rdf:about=\"Boy\">\n"
1025 + " <owl:disjointWith rdf:resource=\"Girl\" /></rdf:Description>\n"
1026 + '\n' + "<Boy rdf:about=\"Stewie\" />\n" + "</rdf:RDF>";
1027 String conclusion = "<?xml version=\"1.0\"?>\n"
1028 + "<rdf:RDF\n"
1029 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
1030 + '\n'
1031 + "<owl:Ontology/>\n"
1032 + '\n'
1033 + "<owl:Class rdf:about=\"Girl\" />\n"
1034 + '\n'
1035 + "<rdf:Description rdf:about=\"Stewie\">\n"
1036 + " <rdf:type>\n"
1037 + " <owl:Class>\n"
1038 + " <owl:complementOf rdf:resource=\"Girl\" /></owl:Class></rdf:type>\n"
1039 + "</rdf:Description>\n" + '\n' + "</rdf:RDF>";
1040 String id = "DisjointClasses_001";
1041 TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL");
1042 String d = "Demonstrates a binary disjoint classes axiom based on example in the Structural Specification and Functional-Style Syntax document.";
1043 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
1044 r.setReasonerFactory(factory());
1045 r.run();
1046 }
1047
1048 @Test
1049 public void testDisjointClasses_002() {
1050 String premise = "<?xml version=\"1.0\"?>\n"
1051 + "<rdf:RDF\n"
1052 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
1053 + '\n'
1054 + "<owl:Ontology/>\n"
1055 + '\n'
1056 + "<owl:Class rdf:about=\"Boy\" />\n"
1057 + "<owl:Class rdf:about=\"Girl\" />\n"
1058 + '\n'
1059 + "<rdf:Description rdf:about=\"Boy\">\n"
1060 + " <owl:disjointWith rdf:resource=\"Girl\" /></rdf:Description>\n"
1061 + '\n' + "<Boy rdf:about=\"Stewie\" />\n"
1062 + "<Girl rdf:about=\"Stewie\" />\n" + '\n' + "</rdf:RDF>";
1063 String conclusion = "";
1064 String id = "DisjointClasses_002";
1065 TestClasses tc = TestClasses.valueOf("INCONSISTENCY");
1066 String d = "Demonstrates a binary disjoint classes axiom and class assertions causing an inconsistency based on example in the Structural Specification and Functional-Style Syntax document.";
1067 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
1068 r.setReasonerFactory(factory());
1069 r.run();
1070 }
1071
1072 @Test
1073 public void testDisjointClasses_003() {
1074 String premise = "<?xml version=\"1.0\"?>\n"
1075 + "<rdf:RDF\n"
1076 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
1077 + '\n' + "<owl:Ontology/>\n" + '\n'
1078 + "<owl:Class rdf:about=\"Boy\" />\n"
1079 + "<owl:Class rdf:about=\"Girl\" />\n"
1080 + "<owl:Class rdf:about=\"Dog\" />\n" + '\n'
1081 + "<owl:AllDisjointClasses>\n"
1082 + " <owl:members rdf:parseType=\"Collection\">\n"
1083 + " <rdf:Description rdf:about=\"Boy\" />\n"
1084 + " <rdf:Description rdf:about=\"Girl\" />\n"
1085 + " <rdf:Description rdf:about=\"Dog\" />\n"
1086 + " </owl:members></owl:AllDisjointClasses>\n" + '\n'
1087 + "<Boy rdf:about=\"Stewie\" />\n" + '\n' + "</rdf:RDF>";
1088 String conclusion = "<?xml version=\"1.0\"?>\n"
1089 + "<rdf:RDF\n"
1090 + " xml:base = \"http://example.org/\" xmlns = \"http://example.org/\" xmlns:owl = \"http://www.w3.org/2002/07/owl#\" xmlns:rdf = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
1091 + '\n'
1092 + "<owl:Ontology/>\n"
1093 + '\n'
1094 + "<owl:Class rdf:about=\"Girl\" />\n"
1095 + "<owl:Class rdf:about=\"Dog\" />\n"
1096 + '\n'
1097 + "<rdf:Description rdf:about=\"Stewie\">\n"
1098 + " <rdf:type>\n"
1099 + " <owl:Class>\n"
1100 + " <owl:complementOf rdf:resource=\"Girl\" /></owl:Class></rdf:type>\n"
1101 + "</rdf:Description>\n"
1102 + '\n'
1103 + "<rdf:Description rdf:about=\"Stewie\">\n"
1104 + " <rdf:type>\n"
1105 + " <owl:Class>\n"
1106 + " <owl:complementOf rdf:resource=\"Dog\" /></owl:Class></rdf:type>\n"
1107 + "</rdf:Description>\n" + '\n' + "</rdf:RDF>";
1108 String id = "DisjointClasses_003";
1109 TestClasses tc = TestClasses.valueOf("POSITIVE_IMPL");
1110 String d = "A modification of test DisjointClasses-001 to demonstrate a ternary disjoint classes axiom.";
1111 JUnitRunner r = new JUnitRunner(premise, conclusion, id, tc, d);
1112 r.setReasonerFactory(factory());
1113 r.run();
1114 }
1115 }