From: <lor...@us...> - 2013-10-29 14:43:28
|
Revision: 4135 http://sourceforge.net/p/dl-learner/code/4135 Author: lorenz_b Date: 2013-10-29 14:43:25 +0000 (Tue, 29 Oct 2013) Log Message: ----------- Add always entity itself to context. Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/isle/StructuralEntityContext.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/isle/StructuralEntityContext.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/isle/StructuralEntityContext.java 2013-10-29 14:20:38 UTC (rev 4134) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/isle/StructuralEntityContext.java 2013-10-29 14:43:25 UTC (rev 4135) @@ -81,15 +81,20 @@ */ public static Set<OWLEntity> getContext(OWLOntology ontology, OWLEntity entity){ + Set<OWLEntity> context; if(entity.isOWLClass()){ - return getContext(ontology, entity.asOWLClass()); + context = getContext(ontology, entity.asOWLClass()); } else if(entity.isOWLObjectProperty()){ - return getContext(ontology, entity.asOWLObjectProperty()); + context = getContext(ontology, entity.asOWLObjectProperty()); } else if(entity.isOWLDataProperty()){ - return getContext(ontology, entity.asOWLDataProperty()); + context = getContext(ontology, entity.asOWLDataProperty()); + } else { + throw new UnsupportedOperationException("Unsupported entity type: " + entity); } - throw new UnsupportedOperationException("Unsupported entity type: " + entity); + context.add(entity); + + return context; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |