Class AbstractConceptCache

  • All Implemented Interfaces:
    java.util.Map<openllet.aterm.ATermAppl,​CachedNode>, ConceptCache
    Direct Known Subclasses:
    ConceptCacheLRU

    public abstract class AbstractConceptCache
    extends java.lang.Object
    implements ConceptCache

    Copyright: Copyright (c) 2007

    Company: Clark & Parsia, LLC.

    Author:
    Evren Sirin
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.logging.Logger _logger  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractConceptCache​(int maxSize)
      Creates an empty _cache with at most _maxSize elements which are neither named or negations of names.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Bool checkNominalEdges​(KnowledgeBase kb, CachedNode pNode, CachedNode cNode)  
      int getMaxSize()  
      Bool getSat​(openllet.aterm.ATermAppl c)  
      Bool isMergable​(KnowledgeBase kb, CachedNode root1, CachedNode root2)  
      boolean putSat​(openllet.aterm.ATermAppl c, boolean isSatisfiable)
      Put an incomplete
      void setMaxSize​(int maxSize)
      Set the maximum number of non-primitive concepts allowed in the cache
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Map

        clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
    • Field Detail

      • _logger

        public static final java.util.logging.Logger _logger
    • Constructor Detail

      • AbstractConceptCache

        public AbstractConceptCache​(int maxSize)
        Creates an empty _cache with at most _maxSize elements which are neither named or negations of names.
        Parameters:
        maxSize -
    • Method Detail

      • getSat

        public Bool getSat​(openllet.aterm.ATermAppl c)
        Specified by:
        getSat in interface ConceptCache
        Parameters:
        c - is the concept
        Returns:
        the satisfiability status of a concept as a three-value boolean.
      • putSat

        public boolean putSat​(openllet.aterm.ATermAppl c,
                              boolean isSatisfiable)
        Description copied from interface: ConceptCache
        Put an incomplete
        Specified by:
        putSat in interface ConceptCache
        Returns:
        true if put is success
      • getMaxSize

        public int getMaxSize()
        Specified by:
        getMaxSize in interface ConceptCache
        Returns:
        the maximum number of non-primitive concepts allowed in the _cache
      • setMaxSize

        public void setMaxSize​(int maxSize)
        Description copied from interface: ConceptCache
        Set the maximum number of non-primitive concepts allowed in the cache
        Specified by:
        setMaxSize in interface ConceptCache