From: <sha...@us...> - 2010-11-15 18:43:41
|
Revision: 2440 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2440&view=rev Author: shadowtm Date: 2010-11-15 18:43:34 +0000 (Mon, 15 Nov 2010) Log Message: ----------- Upgraded hermit dependency to 1.3.1 as 1.2.3 was not compatible with OWL API 3.1 - also upgraded the protege dependencies as hermit 1.3.1 needed these to run as well. Modified Paths: -------------- trunk/components-core/pom.xml trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIConverter.java trunk/components-core/src/test/java/org/dllearner/test/PelletBug.java trunk/components-core/src/test/java/org/dllearner/test/PelletBug2.java trunk/components-core/src/test/java/org/dllearner/test/PelletPerformanceProblem.java trunk/pom.xml Modified: trunk/components-core/pom.xml =================================================================== --- trunk/components-core/pom.xml 2010-11-14 07:45:01 UTC (rev 2439) +++ trunk/components-core/pom.xml 2010-11-15 18:43:34 UTC (rev 2440) @@ -21,6 +21,10 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> + <!--Uncomment this when the junits are independent of a runtime directory--> + <!--<includes>--> + <!--<include>org/dllearner/test/junit/*</include>--> + <!--</includes>--> <excludes> <exclude>org/dllearner/test/*</exclude> <exclude>org/dllearner/test/junit/TestOntologies.java</exclude> Modified: trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIConverter.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIConverter.java 2010-11-14 07:45:01 UTC (rev 2439) +++ trunk/components-core/src/main/java/org/dllearner/utilities/owl/OWLAPIConverter.java 2010-11-15 18:43:34 UTC (rev 2440) @@ -36,7 +36,6 @@ import org.dllearner.core.owl.ObjectProperty; import org.dllearner.core.owl.Thing; import org.dllearner.core.owl.TypedConstant; -import org.dllearner.core.owl.UntypedConstant; import org.semanticweb.owlapi.apibinding.OWLManager; import org.semanticweb.owlapi.model.IRI; import org.semanticweb.owlapi.model.OWLAxiom; @@ -50,8 +49,6 @@ import org.semanticweb.owlapi.model.OWLLiteral; import org.semanticweb.owlapi.model.OWLNamedIndividual; import org.semanticweb.owlapi.model.OWLObjectProperty; -import org.semanticweb.owlapi.model.OWLStringLiteral; -import org.semanticweb.owlapi.model.OWLTypedLiteral; /** * A collection of methods for exchanging objects between OWL API and @@ -78,7 +75,7 @@ /** * Converts a DL-Learner description into an OWL API description. * - * @see OWLAPIDescriptionConvertVisitor#getOWLDescription(Description) + * @see OWLAPIDescriptionConvertVisitor#getOWLClassExpression(org.dllearner.core.owl.Description) * @param description DL-Learner description. * @return Corresponding OWL API description. */ @@ -154,18 +151,10 @@ Constant c; // for typed constants we have to figure out the correct // data type and value - if(constant instanceof OWLTypedLiteral) { - Datatype dt = OWLAPIConverter.convertDatatype(((OWLTypedLiteral)constant).getDatatype()); - c = new TypedConstant(constant.getLiteral(),dt); - // for untyped constants we have to figure out the value - // and language tag (if any) - } else { - OWLStringLiteral ouc = (OWLStringLiteral) constant; - if(ouc.getLang() != null && !ouc.getLang().isEmpty()) - c = new UntypedConstant(ouc.getLiteral(), ouc.getLang()); - else - c = new UntypedConstant(ouc.getLiteral()); - } + + /** New OWL API only has the OWLLiteral */ + Datatype dt = OWLAPIConverter.convertDatatype(constant.getDatatype()); + c = new TypedConstant(constant.getLiteral(),dt); return c; } Modified: trunk/components-core/src/test/java/org/dllearner/test/PelletBug.java =================================================================== --- trunk/components-core/src/test/java/org/dllearner/test/PelletBug.java 2010-11-14 07:45:01 UTC (rev 2439) +++ trunk/components-core/src/test/java/org/dllearner/test/PelletBug.java 2010-11-15 18:43:34 UTC (rev 2440) @@ -17,14 +17,13 @@ import org.semanticweb.owlapi.model.RemoveAxiom; import org.semanticweb.owlapi.model.UnknownOWLOntologyException; import org.semanticweb.owlapi.reasoner.OWLReasoner; -import org.semanticweb.owlapi.reasoner.OWLReasonerException; import com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory; public class PelletBug { public static void main(String[] args) throws OWLOntologyCreationException, - OWLReasonerException, UnknownOWLOntologyException, OWLOntologyStorageException { + UnknownOWLOntologyException, OWLOntologyStorageException { OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); File f = new File("examples/family/father_oe.owl"); Modified: trunk/components-core/src/test/java/org/dllearner/test/PelletBug2.java =================================================================== --- trunk/components-core/src/test/java/org/dllearner/test/PelletBug2.java 2010-11-14 07:45:01 UTC (rev 2439) +++ trunk/components-core/src/test/java/org/dllearner/test/PelletBug2.java 2010-11-15 18:43:34 UTC (rev 2440) @@ -17,15 +17,13 @@ import org.semanticweb.owlapi.model.OWLOntologyStorageException; import org.semanticweb.owlapi.model.RemoveAxiom; import org.semanticweb.owlapi.model.UnknownOWLOntologyException; -import org.semanticweb.owlapi.reasoner.OWLReasonerException; import com.clarkparsia.pellet.owlapiv3.PelletReasoner; import com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory; public class PelletBug2 { - public static void main(String[] args) throws OWLOntologyCreationException, - OWLReasonerException, UnknownOWLOntologyException, + public static void main(String[] args) throws OWLOntologyCreationException, UnknownOWLOntologyException, OWLOntologyStorageException { // Set flags for incremental consistency Modified: trunk/components-core/src/test/java/org/dllearner/test/PelletPerformanceProblem.java =================================================================== --- trunk/components-core/src/test/java/org/dllearner/test/PelletPerformanceProblem.java 2010-11-14 07:45:01 UTC (rev 2439) +++ trunk/components-core/src/test/java/org/dllearner/test/PelletPerformanceProblem.java 2010-11-15 18:43:34 UTC (rev 2440) @@ -29,7 +29,6 @@ import org.semanticweb.owlapi.model.OWLOntologyManager; import org.semanticweb.owlapi.reasoner.InferenceType; import org.semanticweb.owlapi.reasoner.OWLReasoner; -import org.semanticweb.owlapi.reasoner.OWLReasonerException; import org.semanticweb.owlapi.reasoner.SimpleConfiguration; import com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory; @@ -40,7 +39,7 @@ */ public class PelletPerformanceProblem { - public static void main(String[] args) throws OWLOntologyCreationException, OWLReasonerException { + public static void main(String[] args) throws OWLOntologyCreationException { Logger pelletLogger = Logger.getLogger("org.mindswap.pellet"); pelletLogger.setLevel(Level.WARN); OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-11-14 07:45:01 UTC (rev 2439) +++ trunk/pom.xml 2010-11-15 18:43:34 UTC (rev 2440) @@ -107,7 +107,7 @@ <dependency> <groupId>org.semanticweb.hermit</groupId> <artifactId>hermit</artifactId> - <version>1.2.3</version> + <version>1.3.1</version> </dependency> <dependency> @@ -211,13 +211,13 @@ <dependency> <groupId>org.protege.editor.core</groupId> <artifactId>org.protege.editor.core.application</artifactId> - <version>4.1.0.206</version> + <version>4.1</version> </dependency> <dependency> <groupId>org.protege.editor.owl</groupId> <artifactId>org.protege.editor.owl</artifactId> - <version>4.1.0.206</version> + <version>4.1</version> </dependency> <dependency> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |