Class EquiMap<K,V>

java.lang.Object
org.aksw.jena_sparql_api.views.EquiMap<K,V>
Type Parameters:
K -
V -

public class EquiMap<K,V> extends Object
A map where keys can be stated as equivalent. Provides methods for checking consistency (the map gets inconsistent as soon as a key maps to multiple non-equal values) TODO Not sure if a conflict resultion strategy for the case that values are not directly equal but not contradictory should go here. For instance if a key x maps to {A, B} and y maps to {A} one resolution stragtegy might be to map both to A. Essentially I have the ValueSets in mind to quickly reject inconsistent bindings.
Author:
raven
  • Constructor Details

    • EquiMap

      public EquiMap()
    • EquiMap

      public EquiMap(EquiMap<K,V> other)
  • Method Details

    • keySet

      public Set<K> keySet()
      Returns:
      A view of all keys
    • clear

      public void clear()
    • isEqual

      public boolean isEqual(K a, K b)
    • areAllEqual

      public boolean areAllEqual(Collection<K> set)
    • isConsistentInsertEquiv

      public boolean isConsistentInsertEquiv(K a, K b)
    • isConsistentSet

      public boolean isConsistentSet(Set<V> set)
    • isConsistentInsertValue

      public boolean isConsistentInsertValue(K a, V b)
    • isSelfConsistent

      public boolean isSelfConsistent()
    • getEquivalences

      public org.aksw.commons.collections.multimaps.IBiSetMultimap<K,K> getEquivalences()
    • getKeyToValue

      public Map<K,V> getKeyToValue()
    • put

      public void put(K key, V value)
    • getAll

      public Set<V> getAll(Set<?> keys)
    • getEquivalences

      public Set<K> getEquivalences(Object key, boolean reflexiv)
    • getAllEquivalences

      public Set<K> getAllEquivalences(Collection<?> keys, boolean reflexiv)
    • get

      public Set<V> get(Object key)
    • makeEqual

      public boolean makeEqual(K a, K b)
    • isCompatible

      public boolean isCompatible(EquiMap<K,V> other)
      Checks whether the union of two equimaps is again consistent.
      Parameters:
      other -
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object