public boolean contains(final K key, final V value) { final Set<V> values = get(key); if (null == values) return false; return values.contains(value); }
public boolean contains(final K key, final V value) { final Set<V> values = get(key); if (null == values) return false; return values.contains(value); }
public Set<ATermAppl> getAllSuperRoles(final ATermAppl r1, final ATermAppl r2) { final MultiValueMap<ATermAppl, ATermAppl> innerMap = _binaryRoleInclusions.get(r1); if (innerMap == null) return Collections.emptySet(); final Set<ATermAppl> superRoles = innerMap.get(r2); if (superRoles == null) return Collections.emptySet(); return superRoles; }
@Deprecated @Override public Set<OWLAxiom> getAxioms(final OWLEntity entity) { Set<OWLAxiom> axioms = _entityAxioms.get(entity); if (axioms == null) axioms = Collections.emptySet(); return axioms; }
@Deprecated @Override public Set<OWLAxiom> getAxioms(final OWLEntity entity) { Set<OWLAxiom> axioms = _entityAxioms.get(entity); if (axioms == null) axioms = Collections.emptySet(); return axioms; }
@Override public boolean remove(final Object key, final Object value) { boolean removed = false; final Set<V> values = get(key); if (values != null) { removed = values.remove(value); if (values.isEmpty()) super.remove(key); } return removed; }
public Set<ATermAppl> getABoxAssertions(final AssertionType assertionType) { if (null == assertionType) return Collections.emptySet(); final Set<ATermAppl> assertions = _aboxAssertions.get(assertionType); if (assertions == null) return Collections.emptySet(); else return Collections.unmodifiableSet(assertions); }
public Set<ATermAppl> getABoxAssertions(final AssertionType assertionType) { if (null == assertionType) return Collections.emptySet(); final Set<ATermAppl> assertions = _aboxAssertions.get(assertionType); if (assertions == null) return Collections.emptySet(); else return Collections.unmodifiableSet(assertions); }
public Set<ATermAppl> getAllSuperRoles(final ATermAppl r1, final ATermAppl r2) { final MultiValueMap<ATermAppl, ATermAppl> innerMap = _binaryRoleInclusions.get(r1); if (innerMap == null) return Collections.emptySet(); final Set<ATermAppl> superRoles = innerMap.get(r2); if (superRoles == null) return Collections.emptySet(); return superRoles; }
/** * Return the _axioms which references this entity * * @param entity * @return */ @Override public Stream<OWLAxiom> axioms(final OWLEntity entity) { final Set<OWLAxiom> axioms = _entityAxioms.get(entity); if (axioms == null) return Stream.empty(); return axioms.stream(); }
/** * Return the _axioms which references this entity * * @param entity * @return */ @Override public Stream<OWLAxiom> axioms(final OWLEntity entity) { final Set<OWLAxiom> axioms = _entityAxioms.get(entity); if (axioms == null) return Stream.empty(); return axioms.stream(); }
public boolean addAll(final K key, final Collection<? extends V> collection) { Set<V> values = get(key); if (null == values) { values = Collections.newSetFromMap(new ConcurrentHashMap<>()); super.put(key, values); } return values.addAll(collection); }
public boolean addAll(final K key, final Collection<? extends V> collection) { Set<V> values = get(key); if (null == values) { values = Collections.newSetFromMap(new ConcurrentHashMap<>()); super.put(key, values); } return values.addAll(collection); }
public boolean add(final K key, final V value) { Set<V> values = get(key); if (null == values) { values = Collections.newSetFromMap(new ConcurrentHashMap<>()); super.put(key, values); } return values.add(value); }
public boolean add(final K key, final V value) { Set<V> values = get(key); if (null == values) { values = Collections.newSetFromMap(new ConcurrentHashMap<>()); super.put(key, values); } return values.add(value); }
@Override public boolean remove(final Object key, final Object value) { boolean removed = false; final Set<V> values = get(key); if (values != null) { removed = values.remove(value); if (values.isEmpty()) super.remove(key); } return removed; }
@Override public OWLOntology getModule(final OWLEntity entity) { return getModuleFromSignature(_modules.get(entity)); }
@Override public OWLOntology getModule(final OWLEntity entity) { return getModuleFromSignature(_modules.get(entity)); }
/** * Tests if the computed module of the given entity is same as the _expected module. * * @param entity for which the module is being tested * @param expectedModule _expected elements in the module */ private void testModule(final OWLEntity entity, final OWLEntity... expectedModule) { final OWLEntity[] computedModule = _modules.get(entity).toArray(new OWLEntity[0]); final String msg = "Extractor " + _modExtractor.getClass().getSimpleName() + " failed for " + entity; TestUtils.assertToStringEquals(msg, expectedModule, computedModule); }
public Taxonomy<ATermAppl> build(final MultiValueMap<ATermAppl, ATermAppl> subsumers) { _subsumers = subsumers; _taxonomyImpl = new TaxonomyImpl<>(null, ATermUtils.TOP, ATermUtils.BOTTOM); for (final ATermAppl subsumer : subsumers.get(ATermUtils.TOP)) if (ATermUtils.isPrimitive(subsumer)) _taxonomyImpl.addEquivalentNode(subsumer, _taxonomyImpl.getTop()); for (final Entry<ATermAppl, Set<ATermAppl>> entry : subsumers.entrySet()) { final ATermAppl c = entry.getKey(); if (ATermUtils.isPrimitive(c)) if (entry.getValue().contains(ATermUtils.BOTTOM)) _taxonomyImpl.addEquivalentNode(c, _taxonomyImpl.getBottomNode()); else add(c); } return _taxonomyImpl; }