From: <ku...@us...> - 2008-04-03 11:57:38
|
Revision: 763 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=763&view=rev Author: kurzum Date: 2008-04-03 04:57:35 -0700 (Thu, 03 Apr 2008) Log Message: ----------- actually this is owl api partial fix for #1931147 the one before was a fix for #1932373 (manchester) Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIDescriptionConvertVisitor.java Modified: trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIDescriptionConvertVisitor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIDescriptionConvertVisitor.java 2008-04-03 11:55:26 UTC (rev 762) +++ trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIDescriptionConvertVisitor.java 2008-04-03 11:57:35 UTC (rev 763) @@ -184,8 +184,14 @@ * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.ObjectMinCardinalityRestriction) */ public void visit(ObjectMinCardinalityRestriction description) { - // TODO Auto-generated method stub - throw new Error("OWLAPIDescriptionConverter: not implemented"); + // TODO Taken from ObjectSomeRestriction above, hope its correct + //throw new Error("OWLAPIDescriptionConverter: not implemented"); + OWLObjectProperty role = factory.getOWLObjectProperty( + URI.create(description.getRole().getName())); + description.getChild(0).accept(this); + OWLDescription d = stack.pop(); + int minmax = description.getCardinality(); + stack.push(factory.getOWLObjectMinCardinalityRestriction(role, minmax, d)); } /* (non-Javadoc) @@ -207,8 +213,14 @@ * @see org.dllearner.core.owl.DescriptionVisitor#visit(org.dllearner.core.owl.ObjectMaxCardinalityRestriction) */ public void visit(ObjectMaxCardinalityRestriction description) { - // TODO Auto-generated method stub - throw new Error("OWLAPIDescriptionConverter: not implemented"); + // TODO Taken from ObjectSomeRestriction above, hope its correct + //throw new Error("OWLAPIDescriptionConverter: not implemented"); + OWLObjectProperty role = factory.getOWLObjectProperty( + URI.create(description.getRole().getName())); + description.getChild(0).accept(this); + OWLDescription d = stack.pop(); + int minmax = description.getCardinality(); + stack.push(factory.getOWLObjectMaxCardinalityRestriction(role, minmax, d)); } /* (non-Javadoc) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |