public BinaryTBox() { _unfoldings = CollectionUtils.makeMap(); _conditionalUnfoldings = CollectionUtils.makeIdentityMap(); }
public BinaryTBox() { _unfoldings = CollectionUtils.makeMap(); _conditionalUnfoldings = CollectionUtils.makeIdentityMap(); }
protected Node(final Node node, final ABoxImpl abox) { _name = node.getName(); _abox = abox; _isRoot = node._isRoot; _isConceptRoot = node._isConceptRoot; _mergeDepends = node._mergeDepends; _mergedTo = node._mergedTo; _merged = node._merged; _pruned = node._pruned; // do not copy _differents right now because we need to // update _node references later anyway _differents = node._differents; _depends = CollectionUtils.makeMap(node._depends); _inEdges = node._inEdges; }
protected Node(final Node node, final ABoxImpl abox) { _name = node.getName(); _abox = abox; _isRoot = node._isRoot; _isConceptRoot = node._isConceptRoot; _mergeDepends = node._mergeDepends; _mergedTo = node._mergedTo; _merged = node._merged; _pruned = node._pruned; // do not copy _differents right now because we need to // update _node references later anyway _differents = node._differents; _depends = CollectionUtils.makeMap(node._depends); _inEdges = node._inEdges; }
@Override public boolean addRange(final ATermAppl a, final DependencySet ds) { if (_ranges.isEmpty()) _ranges = CollectionUtils.makeMap(); final DependencySet existing = _ranges.put(a, ds); if (existing != null && existing.getExplain().equals(ds.getExplain())) return false; return true; }
@Override public boolean addRange(final ATermAppl a, final DependencySet ds) { if (_ranges.isEmpty()) _ranges = CollectionUtils.makeMap(); final DependencySet existing = _ranges.put(a, ds); if (existing != null && existing.getExplain().equals(ds.getExplain())) return false; return true; }
@Override public boolean addDomain(final ATermAppl a, final DependencySet ds) { if (_domains.isEmpty()) _domains = CollectionUtils.makeMap(); final DependencySet existing = _domains.put(a, ds); return existing == null || !existing.getExplain().equals(ds.getExplain()); }
@Override public boolean addDomain(final ATermAppl a, final DependencySet ds) { if (_domains.isEmpty()) _domains = CollectionUtils.makeMap(); final DependencySet existing = _domains.put(a, ds); return existing == null || !existing.getExplain().equals(ds.getExplain()); }
public TaxonomyImpl(final Collection<T> elements, final T top, final T bottom) { _nodes = CollectionUtils.makeMap(); if (top == null) _topNode = new TaxonomyNode<>((T) null, /* hidden = */true); else { _topNode = new TaxonomyNode<>(top, /* hidden = */false); _nodes.put(top, _topNode); } if (bottom == null) _bottomNode = new TaxonomyNode<>((T) null, /* hidden = */true); else { _bottomNode = new TaxonomyNode<>(bottom, /* hidden = */false); _nodes.put(bottom, _bottomNode); } if (elements == null || elements.isEmpty()) _topNode.addSub(_bottomNode); else for (final T t : elements) addNode(t, /* hidden = */false); // precaution to avoid creating an invalid taxonomy is now done by // calling assertValid function because the taxonomy might be invalid // during the merge operation but it is guaranteed to be valid after // the merge is completed. so we check for validity at the very _end // TOP_NODE.setSupers( Collections.EMPTY_LIST ); // BOTTOM_NODE.setSubs( Collections.EMPTY_LIST ); }
public TaxonomyImpl(final Collection<T> elements, final T top, final T bottom) { _nodes = CollectionUtils.makeMap(); if (top == null) _topNode = new TaxonomyNode<>((T) null, /* hidden = */true); else { _topNode = new TaxonomyNode<>(top, /* hidden = */false); _nodes.put(top, _topNode); } if (bottom == null) _bottomNode = new TaxonomyNode<>((T) null, /* hidden = */true); else { _bottomNode = new TaxonomyNode<>(bottom, /* hidden = */false); _nodes.put(bottom, _bottomNode); } if (elements == null || elements.isEmpty()) _topNode.addSub(_bottomNode); else for (final T t : elements) addNode(t, /* hidden = */false); // precaution to avoid creating an invalid taxonomy is now done by // calling assertValid function because the taxonomy might be invalid // during the merge operation but it is guaranteed to be valid after // the merge is completed. so we check for validity at the very _end // TOP_NODE.setSupers( Collections.EMPTY_LIST ); // BOTTOM_NODE.setSubs( Collections.EMPTY_LIST ); }
public RoleChainCache(final KnowledgeBase kb) { _anonRoleCount = 0; _binaryRoleInclusions = CollectionUtils.makeMap(); for (final Role supRole : kb.getRBox().getRoles().values()) { if (supRole.isAnon()) continue; for (ATermList chain : supRole.getSubRoleChains()) { final int chainLength = chain.getLength(); if (chainLength <= 1) continue; ATermAppl r1 = (ATermAppl) chain.getFirst(); chain = chain.getNext(); ATermAppl r2 = (ATermAppl) chain.getFirst(); ATermAppl superRole = createSuperRoleFor(r1, r2); for (int i = 1; i < chainLength - 1; i++) { add(kb, r1, r2, superRole); r1 = superRole; chain = chain.getNext(); r2 = (ATermAppl) chain.getFirst(); superRole = createSuperRoleFor(r1, r2); } add(kb, r1, r2, supRole.getName()); } } }
public RoleChainCache(final KnowledgeBase kb) { _anonRoleCount = 0; _binaryRoleInclusions = CollectionUtils.makeMap(); for (final Role supRole : kb.getRBox().getRoles().values()) { if (supRole.isAnon()) continue; for (ATermList chain : supRole.getSubRoleChains()) { final int chainLength = chain.getLength(); if (chainLength <= 1) continue; ATermAppl r1 = (ATermAppl) chain.getFirst(); chain = chain.getNext(); ATermAppl r2 = (ATermAppl) chain.getFirst(); ATermAppl superRole = createSuperRoleFor(r1, r2); for (int i = 1; i < chainLength - 1; i++) { add(kb, r1, r2, superRole); r1 = superRole; chain = chain.getNext(); r2 = (ATermAppl) chain.getFirst(); superRole = createSuperRoleFor(r1, r2); } add(kb, r1, r2, supRole.getName()); } } }