From 3301e1f64a380b9e4f8f9203f31e90b37e86185f Mon Sep 17 00:00:00 2001 From: RadW2020 Date: Fri, 31 Mar 2017 01:46:40 +0200 Subject: [PATCH 1/9] Update Examples.java errata fix --- contract/src/test/java/org/coode/owlapi/examples/Examples.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contract/src/test/java/org/coode/owlapi/examples/Examples.java b/contract/src/test/java/org/coode/owlapi/examples/Examples.java index deb1f5f0..0585c611 100644 --- a/contract/src/test/java/org/coode/owlapi/examples/Examples.java +++ b/contract/src/test/java/org/coode/owlapi/examples/Examples.java @@ -309,7 +309,7 @@ public void shouldBuildDataRanges() throws OWLOntologyCreationException, OWLOntologyStorageException { // OWLDataRange is the superclass of all data ranges in the OWL API. // Data ranges are used as the types of literals, as the ranges for data - // properties, as filler for data reatrictions. Get hold of a manager to + // properties, as filler for data restrictions. Get hold of a manager to // work with OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); OWLDataFactory factory = manager.getOWLDataFactory(); From e95800962de104fa265e91bf986b5e609e4e4937 Mon Sep 17 00:00:00 2001 From: RadW2020 Date: Fri, 31 Mar 2017 01:54:44 +0200 Subject: [PATCH 2/9] Update Examples.java --- contract/src/test/java/org/coode/owlapi/examples/Examples.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contract/src/test/java/org/coode/owlapi/examples/Examples.java b/contract/src/test/java/org/coode/owlapi/examples/Examples.java index 0585c611..03227ce9 100644 --- a/contract/src/test/java/org/coode/owlapi/examples/Examples.java +++ b/contract/src/test/java/org/coode/owlapi/examples/Examples.java @@ -316,7 +316,7 @@ public void shouldBuildDataRanges() throws OWLOntologyCreationException, // OWLDatatype represents named datatypes in OWL. These are a bit like // classes whose instances are data values OWLDatatype objects are // obtained from a data factory. The OWL2Datatype enum defines built in - // OWL 2 Datatypes Get hold of the integer datatype + // OWL 2 Datatypes. Get hold of the integer datatype OWLDatatype integer = factory.getOWLDatatype(OWL2Datatype.XSD_INTEGER.getIRI()); // For common data types there are some convenience methods of // OWLDataFactory. For example From b6790f24017918f34bbd9005185f71a8f2a61261 Mon Sep 17 00:00:00 2001 From: RadW2020 Date: Fri, 31 Mar 2017 02:44:08 +0200 Subject: [PATCH 3/9] Update Examples.java --- .../src/test/java/org/coode/owlapi/examples/Examples.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contract/src/test/java/org/coode/owlapi/examples/Examples.java b/contract/src/test/java/org/coode/owlapi/examples/Examples.java index 03227ce9..500ef5fa 100644 --- a/contract/src/test/java/org/coode/owlapi/examples/Examples.java +++ b/contract/src/test/java/org/coode/owlapi/examples/Examples.java @@ -314,7 +314,7 @@ public void shouldBuildDataRanges() throws OWLOntologyCreationException, OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); OWLDataFactory factory = manager.getOWLDataFactory(); // OWLDatatype represents named datatypes in OWL. These are a bit like - // classes whose instances are data values OWLDatatype objects are + // classes whose instances are data values OWLDatatype objects // obtained from a data factory. The OWL2Datatype enum defines built in // OWL 2 Datatypes. Get hold of the integer datatype OWLDatatype integer = factory.getOWLDatatype(OWL2Datatype.XSD_INTEGER.getIRI()); @@ -324,13 +324,13 @@ public void shouldBuildDataRanges() throws OWLOntologyCreationException, OWLDatatype floatDatatype = factory.getFloatOWLDatatype(); OWLDatatype doubleDatatype = factory.getDoubleOWLDatatype(); OWLDatatype booleanDatatype = factory.getBooleanOWLDatatype(); - // The top datatype (analgous to owl:Thing) is rdfs:Literal, which can + // The top datatype (analogous to owl:Thing) is rdfs:Literal, which can // be obtained from the data factory OWLDatatype rdfsLiteral = factory.getTopDatatype(); // Custom data ranges can be built up from these basic datatypes. For // example, it is possible to restrict a datatype using facets from XML // Schema Datatypes. For example, lets create a data range that - // describes integers that are greater or equal to 18 To do this, we + // describes integers that are greater or equal to 18. To do this, we // restrict the xsd:integer datatype using the xsd:minInclusive facet // with a value of 18. Get hold of a literal that is an integer value 18 OWLLiteral eighteen = factory.getOWLLiteral(18); From af518907420f38ec0f1177b232e13a779fb4bd49 Mon Sep 17 00:00:00 2001 From: RadW2020 Date: Fri, 31 Mar 2017 11:20:25 +0200 Subject: [PATCH 4/9] Update Examples.java --- contract/src/test/java/org/coode/owlapi/examples/Examples.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contract/src/test/java/org/coode/owlapi/examples/Examples.java b/contract/src/test/java/org/coode/owlapi/examples/Examples.java index 500ef5fa..157528de 100644 --- a/contract/src/test/java/org/coode/owlapi/examples/Examples.java +++ b/contract/src/test/java/org/coode/owlapi/examples/Examples.java @@ -464,7 +464,7 @@ public void shouldInstantiateLiterals() { @Test public void shouldLoadAndSave() throws OWLOntologyCreationException, OWLOntologyStorageException, IOException { - // A simple example of how to load and save an ontology We first need to + // A simple example of how to load and save an ontology. We first need to // obtain a copy of an OWLOntologyManager, which, as the name suggests, // manages a set of ontologies. An ontology is unique within an ontology // manager. Each ontology knows its ontology manager. To load multiple From 6263900ce9ac4aed92dcd3bbcfe832e2db1e22dd Mon Sep 17 00:00:00 2001 From: RadW2020 Date: Fri, 31 Mar 2017 12:34:09 +0200 Subject: [PATCH 5/9] Update Examples.java --- contract/src/test/java/org/coode/owlapi/examples/Examples.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contract/src/test/java/org/coode/owlapi/examples/Examples.java b/contract/src/test/java/org/coode/owlapi/examples/Examples.java index 157528de..22d09f25 100644 --- a/contract/src/test/java/org/coode/owlapi/examples/Examples.java +++ b/contract/src/test/java/org/coode/owlapi/examples/Examples.java @@ -506,7 +506,7 @@ public void shouldAddAxiom() throws OWLOntologyCreationException, // from the URL corresponding to the ontology IRI, which represents the // ontology. In order to have a concrete representation of an ontology // (e.g. an RDF/XML file), we MAP the ontology IRI to a PHYSICAL URI. We - // do this using an IRIMapper Let's create an ontology and name it + // do this using an IRIMapper. Let's create an ontology and name it // "http://www.co-ode.org/ontologies/testont.owl" We need to set up a // mapping which points to a concrete file where the ontology will be // stored. (It's good practice to do this even if we don't intend to From 13e4891422e113cec39e3e8062b59d2bec529338 Mon Sep 17 00:00:00 2001 From: RadW2020 Date: Fri, 31 Mar 2017 19:26:57 +0200 Subject: [PATCH 6/9] Update Examples.java --- .../src/test/java/org/coode/owlapi/examples/Examples.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contract/src/test/java/org/coode/owlapi/examples/Examples.java b/contract/src/test/java/org/coode/owlapi/examples/Examples.java index 22d09f25..6ce5a767 100644 --- a/contract/src/test/java/org/coode/owlapi/examples/Examples.java +++ b/contract/src/test/java/org/coode/owlapi/examples/Examples.java @@ -919,7 +919,7 @@ public void shouldUseReasoner() throws OWLOntologyCreationException { OWLOntology ont = manager.loadOntologyFromOntologyDocument(docIRI); System.out.println("Loaded " + ont.getOntologyID()); // We need to create an instance of OWLReasoner. An OWLReasoner provides - // the basic query functionality that we need, for example the ability + // the basic query functionality that we need, for example the ability to // obtain the subclasses of a class etc. To do this we use a reasoner // factory. Create a reasoner factory. In this case, we will use HermiT, // but we could also use FaCT++ (http://code.google.com/p/factplusplus/) @@ -987,15 +987,15 @@ public void shouldUseReasoner() throws OWLOntologyCreationException { // Get a reference to the vegetarian class so that we can as the // reasoner about it. The full IRI of this class happens to be: // - OWLClass vegPizza = fac.getOWLClass(IRI + OWLClass veggy = fac.getOWLClass(IRI .create("http://owl.man.ac.uk/2005/07/sssw/people#vegetarian")); // Now use the reasoner to obtain the subclasses of vegetarian. We can // ask for the direct subclasses of vegetarian or all of the (proper) // subclasses of vegetarian. In this case we just want the direct ones // (which we specify by the "true" flag). - NodeSet subClses = reasoner.getSubClasses(vegPizza, true); + NodeSet subClses = reasoner.getSubClasses(veggy, true); // The reasoner returns a NodeSet, which represents a set of Nodes. Each - // node in the set represents a subclass of vegetarian pizza. A node of + // node in the set represents a subclass of vegetarian animal. A node of // classes contains classes, where each class in the node is equivalent. // For example, if we asked for the subclasses of some class A and got // back a NodeSet containing two nodes {B, C} and {D}, then A would have From 0f7c2a8fc6775cbc902e97f42c7db73feab67258 Mon Sep 17 00:00:00 2001 From: RadW2020 Date: Fri, 31 Mar 2017 19:41:56 +0200 Subject: [PATCH 7/9] Update Examples.java --- contract/src/test/java/org/coode/owlapi/examples/Examples.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contract/src/test/java/org/coode/owlapi/examples/Examples.java b/contract/src/test/java/org/coode/owlapi/examples/Examples.java index 6ce5a767..4e3ff67a 100644 --- a/contract/src/test/java/org/coode/owlapi/examples/Examples.java +++ b/contract/src/test/java/org/coode/owlapi/examples/Examples.java @@ -984,7 +984,7 @@ public void shouldUseReasoner() throws OWLOntologyCreationException { // Vegetarians are defined in the ontology to be animals that don't eat // animals or parts of animals. OWLDataFactory fac = manager.getOWLDataFactory(); - // Get a reference to the vegetarian class so that we can as the + // Get a reference to the vegetarian class so that we can ask the // reasoner about it. The full IRI of this class happens to be: // OWLClass veggy = fac.getOWLClass(IRI From f6460787d879474801ebb7e35b2a43a6dae5be50 Mon Sep 17 00:00:00 2001 From: RadW2020 Date: Fri, 31 Mar 2017 23:12:10 +0200 Subject: [PATCH 8/9] Update Examples.java --- contract/src/test/java/org/coode/owlapi/examples/Examples.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contract/src/test/java/org/coode/owlapi/examples/Examples.java b/contract/src/test/java/org/coode/owlapi/examples/Examples.java index 4e3ff67a..bf88ad52 100644 --- a/contract/src/test/java/org/coode/owlapi/examples/Examples.java +++ b/contract/src/test/java/org/coode/owlapi/examples/Examples.java @@ -909,7 +909,7 @@ public void shouldCreateRestrictions() throws OWLOntologyCreationException { * @throws OWLOntologyCreationException */ @Test public void shouldUseReasoner() throws OWLOntologyCreationException { - String DOCUMENT_IRI = "http://owl.cs.manchester.ac.uk/repository/download?ontology=file:/Users/seanb/Desktop/Cercedilla2005/hands-on/people.owl&format=RDF/XML"; + String DOCUMENT_IRI = "http://owl.man.ac.uk/2006/07/sssw/people.owl"; // Create our ontology manager in the usual way. OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); // Load a copy of the people+pets ontology. We'll load the ontology from From a4214d0cd3eead93225874e440e8c604a39a4a46 Mon Sep 17 00:00:00 2001 From: RadW2020 Date: Fri, 31 Mar 2017 23:16:23 +0200 Subject: [PATCH 9/9] Update Examples.java that was a hard one to find --- .../src/test/java/org/coode/owlapi/examples/Examples.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contract/src/test/java/org/coode/owlapi/examples/Examples.java b/contract/src/test/java/org/coode/owlapi/examples/Examples.java index bf88ad52..d7f9eb97 100644 --- a/contract/src/test/java/org/coode/owlapi/examples/Examples.java +++ b/contract/src/test/java/org/coode/owlapi/examples/Examples.java @@ -988,7 +988,7 @@ public void shouldUseReasoner() throws OWLOntologyCreationException { // reasoner about it. The full IRI of this class happens to be: // OWLClass veggy = fac.getOWLClass(IRI - .create("http://owl.man.ac.uk/2005/07/sssw/people#vegetarian")); + .create("http://owl.man.ac.uk/2006/07/sssw/people#vegetarian")); // Now use the reasoner to obtain the subclasses of vegetarian. We can // ask for the direct subclasses of vegetarian or all of the (proper) // subclasses of vegetarian. In this case we just want the direct ones @@ -1021,7 +1021,7 @@ public void shouldUseReasoner() throws OWLOntologyCreationException { // We need to obtain a // reference to this class so that we can ask the reasoner about it. OWLClass country = fac.getOWLClass(IRI - .create("http://owl.man.ac.uk/2005/07/sssw/people#pet")); + .create("http://owl.man.ac.uk/2006/07/sssw/people#pet")); // Ask the reasoner for the instances of pet NodeSet individualsNodeSet = reasoner.getInstances(country, true); @@ -1042,11 +1042,11 @@ public void shouldUseReasoner() throws OWLOntologyCreationException { // Get a reference to // the individual Mick OWLNamedIndividual mick = fac.getOWLNamedIndividual(IRI - .create("http://owl.man.ac.uk/2005/07/sssw/people#Mick")); + .create("http://owl.man.ac.uk/2006/07/sssw/people#Mick")); // Let's get the pets of Mick Get hold of the has_pet property which has // a full IRI of OWLObjectProperty hasPet = fac.getOWLObjectProperty(IRI - .create("http://owl.man.ac.uk/2005/07/sssw/people#has_pet")); + .create("http://owl.man.ac.uk/2006/07/sssw/people#has_pet")); // Now ask the reasoner for the has_pet property values for Mick NodeSet petValuesNodeSet = reasoner.getObjectPropertyValues( mick, hasPet);