public List<Set<OWLClass>> getAssociatedClasses(OWLClass cls) { List<Set<OWLClass>> alternativeDefinitions = new ArrayList<>(); for (OWLSubClassOfAxiom axiom : ontology.getSubClassAxiomsForSubClass(cls)) { Set<OWLClass> associatedTerms = new HashSet<>(); OWLClassExpression expression = axiom.getSuperClass(); if (expression.isAnonymous()) { for (OWLObjectProperty property : expression.getObjectPropertiesInSignature()) { if (owlObjectProperties.contains(property.getIRI().toString())) { associatedTerms.addAll(expression.getClassesInSignature()); } } } alternativeDefinitions.add(associatedTerms); } return alternativeDefinitions; }
+ expr.getObjectPropertiesInSignature()); for (OWLObjectProperty prop : expr.getObjectPropertiesInSignature()) { Logger.getLogger(OwlUtility.class).debug(indent + " prop = " + prop);
public List<Set<OWLClass>> getAssociatedClasses(OWLClass cls) { List<Set<OWLClass>> alternativeDefinitions = new ArrayList<Set<OWLClass>>(); for (OWLSubClassOfAxiom axiom : ontology.getSubClassAxiomsForSubClass(cls)) { Set<OWLClass> associatedTerms = new HashSet<OWLClass>(); OWLClassExpression expression = axiom.getSuperClass(); if (expression.isAnonymous()) { for (OWLObjectProperty property : expression.getObjectPropertiesInSignature()) { if (owlObjectProperties.contains(property.getIRI().toString())) { for (OWLClass associatedClass : expression.getClassesInSignature()) { associatedTerms.add(associatedClass); } } } } alternativeDefinitions.add(associatedTerms); } return alternativeDefinitions; }
for (OWLObjectProperty p : sce.getObjectPropertiesInSignature()) { if (!newAxiomsByProperty.containsKey(p)) { newAxiomsByProperty.put(p, new HashSet<>());
!getReasoner().getObjectProperties().containsAll(classExpressionToDescribe.getObjectPropertiesInSignature()) || !getReasoner().getDatatypeProperties().containsAll(classExpressionToDescribe.getDataPropertiesInSignature())) { throw new ComponentInitException("Some entities in \"" + classExpressionToDescribe + "\" do not exist. Make sure you spelled it correctly.");