net.sourceforge.toscanaj.controller.fca
Class AbstractConceptInterpreter

java.lang.Object
  extended bynet.sourceforge.toscanaj.controller.fca.AbstractConceptInterpreter
All Implemented Interfaces:
ConceptInterpreter, org.tockit.events.EventBrokerListener
Direct Known Subclasses:
DatabaseConnectedConceptInterpreter, DirectConceptInterpreter, TupleConceptInterpreter

public abstract class AbstractConceptInterpreter
extends java.lang.Object
implements ConceptInterpreter, org.tockit.events.EventBrokerListener


Nested Class Summary
 
Nested classes inherited from class net.sourceforge.toscanaj.controller.fca.ConceptInterpreter
ConceptInterpreter.IntervalType
 
Field Summary
static double[] CHI_SQUARE_CRITICAL_VALUES
          Chi square values come from http://www.ncat.edu/~warrack/chisquaretable.pdf
static double[] SIGNIFICANCE_LEVELS
           
 
Fields inherited from interface net.sourceforge.toscanaj.controller.fca.ConceptInterpreter
CONCEPT_INTERPRETER_CLASS_ATTRIBUTE, CONCEPT_INTERPRETER_ELEMENT_NAME, INTERVAL_TYPE_CONTINGENT, INTERVAL_TYPE_EXTENT, INTERVAL_TYPE_FIXED, INTERVAL_TYPE_ORTHOGONALTIY
 
Constructor Summary
AbstractConceptInterpreter()
           
 
Method Summary
protected abstract  int calculateContingentSize(Concept concept, ConceptInterpretationContext context)
           
protected  int calculateExtentSize(Concept concept, ConceptInterpretationContext context)
           
 void clearCache()
           
 FCAElement[] executeQuery(Query query, Concept concept, ConceptInterpretationContext context)
           
 java.util.Iterator getAttributeContingentIterator(Concept concept, ConceptInterpretationContext context)
          independent of displayMode and filterMode
 int getAttributeCount(Concept concept, ConceptInterpretationContext context)
          Deprecated.  
 int getExtentSize(Concept concept, ConceptInterpretationContext context)
          these are independent of displayMode and dependent on filterMode
 java.util.Iterator getIntentIterator(Concept concept, ConceptInterpretationContext context)
          independent of displayMode and filterMode
 NormedIntervalSource getIntervalSource(ConceptInterpreter.IntervalType type)
           
protected  int getMaximalContingentSize()
          This returns the maximal contingent found up to now.
protected abstract  FCAElement getObject(java.lang.String value, Concept concept, ConceptInterpretationContext context)
           
 int getObjectContingentSize(Concept concept, ConceptInterpretationContext context)
          these are independent of displayMode and dependent on filterMode
 int getObjectCount(Concept concept, ConceptInterpretationContext context)
          is dependent on displayMode and filterMode
abstract  java.util.Iterator getObjectSetIterator(Concept concept, ConceptInterpretationContext context)
          is dependent on displayMode and filterMode
protected abstract  FCAElement[] handleNonDefaultQuery(Query query, Concept concept, ConceptInterpretationContext context)
           
 boolean isRealized(Concept concept, ConceptInterpretationContext context)
           
 boolean isVisible(Concept concept, ConceptInterpretationContext context)
           
 void processEvent(org.tockit.events.Event e)
           
 void showDeviation(boolean show)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIGNIFICANCE_LEVELS

public static final double[] SIGNIFICANCE_LEVELS

CHI_SQUARE_CRITICAL_VALUES

public static final double[] CHI_SQUARE_CRITICAL_VALUES
Chi square values come from http://www.ncat.edu/~warrack/chisquaretable.pdf

Constructor Detail

AbstractConceptInterpreter

public AbstractConceptInterpreter()
Method Detail

getObjectSetIterator

public abstract java.util.Iterator getObjectSetIterator(Concept concept,
                                                        ConceptInterpretationContext context)
Description copied from interface: ConceptInterpreter
is dependent on displayMode and filterMode

Specified by:
getObjectSetIterator in interface ConceptInterpreter

getObject

protected abstract FCAElement getObject(java.lang.String value,
                                        Concept concept,
                                        ConceptInterpretationContext context)

handleNonDefaultQuery

protected abstract FCAElement[] handleNonDefaultQuery(Query query,
                                                      Concept concept,
                                                      ConceptInterpretationContext context)

calculateContingentSize

protected abstract int calculateContingentSize(Concept concept,
                                               ConceptInterpretationContext context)

calculateExtentSize

protected int calculateExtentSize(Concept concept,
                                  ConceptInterpretationContext context)

getAttributeContingentIterator

public java.util.Iterator getAttributeContingentIterator(Concept concept,
                                                         ConceptInterpretationContext context)
Description copied from interface: ConceptInterpreter
independent of displayMode and filterMode

Specified by:
getAttributeContingentIterator in interface ConceptInterpreter
To do:
this method and the intent one could probably be merged, including their helpers: just iterate through all concepts and join the attribute sets

getIntentIterator

public java.util.Iterator getIntentIterator(Concept concept,
                                            ConceptInterpretationContext context)
Description copied from interface: ConceptInterpreter
independent of displayMode and filterMode

Specified by:
getIntentIterator in interface ConceptInterpreter

getObjectCount

public int getObjectCount(Concept concept,
                          ConceptInterpretationContext context)
Description copied from interface: ConceptInterpreter
is dependent on displayMode and filterMode

Specified by:
getObjectCount in interface ConceptInterpreter

getAttributeCount

public int getAttributeCount(Concept concept,
                             ConceptInterpretationContext context)
Deprecated.  

BROKEN !!!

Specified by:
getAttributeCount in interface ConceptInterpreter
To do:
this won't work for nested diagrams and returns only the contingent

getObjectContingentSize

public int getObjectContingentSize(Concept concept,
                                   ConceptInterpretationContext context)
Description copied from interface: ConceptInterpreter
these are independent of displayMode and dependent on filterMode

Specified by:
getObjectContingentSize in interface ConceptInterpreter

getExtentSize

public int getExtentSize(Concept concept,
                         ConceptInterpretationContext context)
Description copied from interface: ConceptInterpreter
these are independent of displayMode and dependent on filterMode

Specified by:
getExtentSize in interface ConceptInterpreter

getIntervalSource

public NormedIntervalSource getIntervalSource(ConceptInterpreter.IntervalType type)
Specified by:
getIntervalSource in interface ConceptInterpreter

executeQuery

public FCAElement[] executeQuery(Query query,
                                 Concept concept,
                                 ConceptInterpretationContext context)
Specified by:
executeQuery in interface ConceptInterpreter

getMaximalContingentSize

protected int getMaximalContingentSize()
This returns the maximal contingent found up to now.


isRealized

public boolean isRealized(Concept concept,
                          ConceptInterpretationContext context)
Specified by:
isRealized in interface ConceptInterpreter

processEvent

public void processEvent(org.tockit.events.Event e)
Specified by:
processEvent in interface org.tockit.events.EventBrokerListener

clearCache

public void clearCache()

showDeviation

public void showDeviation(boolean show)
Specified by:
showDeviation in interface ConceptInterpreter

isVisible

public boolean isVisible(Concept concept,
                         ConceptInterpretationContext context)
Specified by:
isVisible in interface ConceptInterpreter


The ToscanaJ project