public AbstractHierarchy(SortedMap<T, SortedSet<T>> hierarchyUp, SortedMap<T, SortedSet<T>> hierarchyDown) { this.hierarchyUp = hierarchyUp; this.hierarchyDown = hierarchyDown; // find most general and most special entities for (T entity : Sets.union(hierarchyUp.keySet(), hierarchyDown.keySet())) { SortedSet<T> moreGen = getParents(entity); SortedSet<T> moreSpec = getChildren(entity); if (moreGen.size() == 0 || (moreGen.size() == 1 && moreGen.first().isTopEntity())) rootEntities.add(entity); if (moreSpec.size() == 0 || (moreSpec.size() == 1 && moreSpec.first().isBottomEntity())) leafEntities.add(entity); } }
public void addNode(Node<T> node) { node.entities().forEach(e -> { map.put(e, node); if (e.isTopEntity()) { topNode = node; } else if (e.isBottomEntity()) { bottomNode = node; } }); }
public void addNode(Node<T> node) { node.entities().forEach(e -> { map.put(e, node); if (e.isTopEntity()) { topNode = node; } else if (e.isBottomEntity()) { bottomNode = node; } }); }
public void addNode(Node<T> node) { for (T element : node.getEntities()) { map.put(element, node); if (element.isTopEntity()) { topNode = node; } else if (element.isBottomEntity()) { bottomNode = node; } } }
public void addNode(Node<T> node) { node.entities().forEach(e -> { map.put(e, node); if (e.isTopEntity()) { topNode = node; } else if (e.isBottomEntity()) { bottomNode = node; } }); }
public void addNode(Node<T> node) { node.entities().forEach(e -> { map.put(e, node); if (e.isTopEntity()) { topNode = node; } else if (e.isBottomEntity()) { bottomNode = node; } }); }
public void addNode(Node<T> node) { for (T element : node.getEntities()) { map.put(element, node); if (element.isTopEntity()) { topNode = node; } else if (element.isBottomEntity()) { bottomNode = node; } } }
public void addNode(Node<T> node) { for (T element : node.getEntities()) { map.put(element, node); if (element.isTopEntity()) { topNode = node; } else if (element.isBottomEntity()) { bottomNode = node; } } }
/** * @param expr expression * @return true iff an EXPRession is equivalent to bottom wrt defined policy */ boolean isBotEquivalent(OWLObject expr) { // XXX check if (expr.isBottomEntity()) { return true; } if (expr.isTopEntity()) { return false; } expr.accept(this); return isBotEq; }
/** * @param expr expression * @return true iff an EXPRession is equivalent to bottom wrt defined policy */ boolean isBotEquivalent(OWLObject expr) { if (expr.isBottomEntity()) { return true; } if (expr.isTopEntity()) { return false; } expr.accept(this); return isBotEq; }
/** * @param expr expression to check * @return true iff an EXPRession is equivalent to top wrt defined policy */ public boolean isTopEquivalent(OWLObject expr) { if (expr.isTopEntity()) { return true; } if (expr.isBottomEntity()) { return false; } expr.accept(this); return isTopEq; }
/** * @param expr expression * @return true iff an EXPRession is equivalent to bottom wrt defined policy */ boolean isBotEquivalent(OWLObject expr) { if (expr.isBottomEntity()) { return true; } if (expr.isTopEntity()) { return false; } expr.accept(this); return isBotEq; }
/** * @param expr expression * @return true iff an EXPRession is equivalent to bottom wrt defined policy */ boolean isBotEquivalent(OWLObject expr) { // XXX check if (expr.isBottomEntity()) { return true; } if (expr.isTopEntity()) { return false; } expr.accept(this); return isBotEq; }
/** * @param expr expression to check * @return true iff an EXPRession is equivalent to top wrt defined policy */ public boolean isTopEquivalent(OWLObject expr) { // XXX check if (expr.isTopEntity()) { return true; } if (expr.isBottomEntity()) { return false; } expr.accept(this); return isTopEq; }
/** * @param expr expression to check * @return true iff an EXPRession is equivalent to top wrt defined policy */ public boolean isTopEquivalent(OWLObject expr) { if (expr.isTopEntity()) { return true; } if (expr.isBottomEntity()) { return false; } expr.accept(this); return isTopEq; }
/** * @param expr expression to check * @return true iff an EXPRession is equivalent to top wrt defined policy */ public boolean isTopEquivalent(OWLObject expr) { if (expr.isTopEntity()) { return true; } if (expr.isBottomEntity()) { return false; } expr.accept(this); return isTopEq; }
/** * @param expr expression * @return true iff an EXPRession is equivalent to bottom wrt defined policy */ boolean isBotEquivalent(OWLObject expr) { if (expr.isBottomEntity()) { return true; } if (expr.isTopEntity()) { return false; } expr.accept(this); return isBotEq; }
/** * @param expr expression * @return true iff an EXPRession is equivalent to bottom wrt defined policy */ boolean isBotEquivalent(OWLObject expr) { if (expr.isBottomEntity()) { return true; } if (expr.isTopEntity()) { return false; } expr.accept(this); return isBotEq; }
/** * @param expr expression to check * @return true iff an EXPRession is equivalent to top wrt defined policy */ public boolean isTopEquivalent(OWLObject expr) { if (expr.isTopEntity()) { return true; } if (expr.isBottomEntity()) { return false; } expr.accept(this); return isTopEq; }
/** * @param expr expression to check * @return true iff an EXPRession is equivalent to top wrt defined policy */ public boolean isTopEquivalent(OWLObject expr) { // XXX check if (expr.isTopEntity()) { return true; } if (expr.isBottomEntity()) { return false; } expr.accept(this); return isTopEq; }