@Override protected Integer recomputeMetric() { return Integer.valueOf(reasoner.getUnsatisfiableClasses().getSize()); }
protected Integer recomputeMetric() { return reasoner.getUnsatisfiableClasses().getSize(); }
@Override protected Integer recomputeMetric() { return Integer.valueOf(reasoner.getUnsatisfiableClasses().getSize()); }
@Override protected Integer recomputeMetric() { return Integer.valueOf(reasoner.getUnsatisfiableClasses().getSize()); }
@Override protected Integer recomputeMetric() { return Integer.valueOf(reasoner.getUnsatisfiableClasses().getSize()); }
private TreeSet<OWLClassExpression> getFirstClasses(NodeSet<OWLClass> nodeSet) { TreeSet<OWLClassExpression> concepts = new TreeSet<>(); for (Node<OWLClass> node : nodeSet) { // take one element from the set and ignore the rest // (TODO: we need to make sure we always ignore the same concepts) if(node.getSize() != 0) { OWLClass concept = node.getRepresentativeElement(); concepts.add(concept); } else { logger.warn("Reasoner returned empty node. Seems to be a bug."); } } return concepts; }
protected NodeSet<OWLClass> atomicConceptHierarchyNodesToNodeSet(Collection<HierarchyNode<AtomicConcept>> hierarchyNodes) { Set<Node<OWLClass>> result=new HashSet<>(); for (HierarchyNode<AtomicConcept> hierarchyNode : hierarchyNodes) { Node<OWLClass> node=atomicConceptHierarchyNodeToNode(hierarchyNode); if (node.getSize()!=0) result.add(node); } return new OWLClassNodeSet(result); } protected Node<OWLObjectPropertyExpression> objectPropertyHierarchyNodeToNode(HierarchyNode<Role> hierarchyNode) {
protected NodeSet<OWLClass> atomicConceptHierarchyNodesToNodeSet(Collection<HierarchyNode<AtomicConcept>> hierarchyNodes) { Set<Node<OWLClass>> result=new HashSet<Node<OWLClass>>(); for (HierarchyNode<AtomicConcept> hierarchyNode : hierarchyNodes) { Node<OWLClass> node=atomicConceptHierarchyNodeToNode(hierarchyNode); if (node.getSize()!=0) result.add(node); } return new OWLClassNodeSet(result); } protected Node<OWLObjectPropertyExpression> objectPropertyHierarchyNodeToNode(HierarchyNode<Role> hierarchyNode) {
private TreeSet<OWLDataProperty> getFirstDatatypeProperties(NodeSet<OWLDataProperty> nodeSet) { TreeSet<OWLDataProperty> roles = new TreeSet<>(); for (Node<OWLDataProperty> node : nodeSet) { if (node.isBottomNode() || node.isTopNode()) { continue; } if(node.getSize() == 0){ logger.warn("Reasoner returned empty property node. Could be a bug."); continue; } OWLDataProperty property = node.getRepresentativeElement(); roles.add(property); } // we ignore top and bottom properties roles.remove(df.getOWLTopDataProperty()); roles.remove(df.getOWLBottomDataProperty()); return roles; }
private TreeSet<OWLObjectProperty> getFirstObjectProperties(NodeSet<OWLObjectPropertyExpression> nodeSet) { TreeSet<OWLObjectProperty> roles = new TreeSet<>(); for (Node<OWLObjectPropertyExpression> node : nodeSet) { if (node.isBottomNode() || node.isTopNode()) { continue; } if(node.getSize() == 0){ logger.warn("Reasoner returned empty property node. Could be a bug."); continue; } // take one element from the set and ignore the rest // (TODO: we need to make sure we always ignore the same concepts) OWLObjectPropertyExpression property = node.getRepresentativeElement(); if (!property.isAnonymous()) { roles.add(property.asOWLObjectProperty()); } } // we ignore top and bottom properties roles.remove(df.getOWLTopObjectProperty()); roles.remove(df.getOWLBottomObjectProperty()); return roles; }
NodeSet<OWLClass> subsDisjoint=getSubClasses(classExpression.getObjectComplementOf(),false); Set<Node<OWLClass>> result=new HashSet<Node<OWLClass>>(); if (equivalentToComplement.getSize()>0) result.add(equivalentToComplement); result.addAll(subsDisjoint.getNodes());
NodeSet<OWLClass> subsDisjoint=getSubClasses(classExpression.getObjectComplementOf(),false); Set<Node<OWLClass>> result=new HashSet<>(); if (equivalentToComplement.getSize()>0) result.add(equivalentToComplement); add(result, subsDisjoint.nodes());