edu.udo.cs.miningmart.m4.core
Class Assertion

java.lang.Object
  extended by edu.udo.cs.miningmart.m4.core.M4Object
      extended by edu.udo.cs.miningmart.m4.core.M4Data
          extended by edu.udo.cs.miningmart.m4.core.Assertion
All Implemented Interfaces:
Assertion, M4Data, M4Object, M4Table, XmlInfo, java.io.Serializable, java.lang.Comparable

public class Assertion
extends M4Data
implements XmlInfo, Assertion

Objects of this class represent M4 assertions. These assertions are tuples stored in the table OP_ASSERT_T.

Version:
$Id: Assertion.java,v 1.15 2006/09/27 14:59:59 euler Exp $
Author:
Martin Scholz
See Also:
Serialized Form

Field Summary
static java.lang.String ASSERTION_NOT_NULL
           
static java.lang.String ASSERTION_UNIQUE
           
static java.lang.String ATTRIB_ASSERT_ID
          db level: name of the assertion's id attribute
static java.lang.String ATTRIB_ASSERT_OBJ1
          db level: name of the attribute for first argument
static java.lang.String ATTRIB_ASSERT_OBJ2
          db level: name of the attribute for second argument
static java.lang.String ATTRIB_ASSERT_TYPE
          db level: name of the attribute specifying the assertion type
static java.lang.String ATTRIB_OPERATOR_ID
          db level: name of the operator id attribute
static java.lang.String ESTIMATE_MAXIMUM_FROM_PARAM
           
static java.lang.String ESTIMATE_MINIMUM_FROM_PARAM
           
static java.lang.String ESTIMATE_MINMAX_COMBINE
           
static java.lang.String ESTIMATE_MINMAX_TAKE_FROM
           
static java.lang.String ESTIMATE_MINMAX_UNCHANGED
           
static java.lang.String ESTIMATE_MV_ADD_INPUTS
           
static java.lang.String ESTIMATE_MV_BY_SELECTIVITY
           
static java.lang.String ESTIMATE_MV_TAKE_FROM
           
static java.lang.String ESTIMATE_NO_CHANGE
           
static java.lang.String ESTIMATE_ROW_SELECTION
           
static java.lang.String ESTIMATE_SIZE_ADD_INPUTS
           
static java.lang.String ESTIMATE_SIZE_BY_DIVISION
           
static java.lang.String ESTIMATE_SIZE_BY_RELATIONS
           
static java.lang.String ESTIMATE_SIZE_BY_VALLIST
           
static java.lang.String ESTIMATE_SIZE_BY_VALUE
           
static java.lang.String ESTIMATE_SIZE_MULTIPLY_BY
           
static java.lang.String ESTIMATE_SIZE_REDUCE_MV
           
static java.lang.String ESTIMATE_VALFREQ_ADD_INPUTS
           
static java.lang.String ESTIMATE_VALFREQ_AGGREGATE
           
static java.lang.String ESTIMATE_VALFREQ_BY_SELECTIVITY
           
static java.lang.String ESTIMATE_VALFREQ_MULT_BY
           
static java.lang.String ESTIMATE_VALFREQ_REPL_MV
           
static java.lang.String ESTIMATE_VALFREQ_TAKE_FROM
           
static java.lang.String ESTIMATE_VALLIST_ADD_VALUE
           
static java.lang.String ESTIMATE_VALLIST_BY_SYMBOL
           
static java.lang.String ESTIMATE_VALLIST_COMBINE
           
static java.lang.String ESTIMATE_VALLIST_FROM_LIST
           
static java.lang.String ESTIMATE_VALLIST_FROM_PARAM
           
static java.lang.String ESTIMATE_VALLIST_TAKE_FROM
           
static java.lang.String ESTIMATE_VALLIST_UNCHANGED
           
static java.lang.String M4_TABLE_NAME
          The name of the corresponding M4 table.
 
Fields inherited from class edu.udo.cs.miningmart.m4.core.M4Data
myDocumentation
 
Fields inherited from class edu.udo.cs.miningmart.m4.core.M4Object
myId, myName
 
Fields inherited from interface edu.udo.cs.miningmart.m4.utils.XmlInfo
M4_XML_VERSION, TAG_COLLECTION, TAG_DOUBLE, TAG_INTEGER, TAG_LONG, TAG_M4_ID, TAG_SHORT, TAG_STRING, TAG_XML_ID
 
Fields inherited from interface edu.udo.cs.miningmart.m4.Assertion
TYPE_GREATER_OR_EQUAL, TYPE_GREATER_THAN, TYPE_KNOWN_TYPE, TYPE_LESS_OR_EQUAL, TYPE_LESS_THAN, TYPE_NO_NULLS, TYPE_ORDERED, TYPE_PROJ_REL_FROM, TYPE_PROJ_REL_TO, TYPE_PROJECTION, TYPE_REL_MANY_KEY, TYPE_REL_MANY_TO_ONE, TYPE_REL_ONE_KEY, TYPE_REL_ONE_TO_MANY, TYPE_SUBCONCEPT, TYPE_UNIQUE
 
Fields inherited from interface edu.udo.cs.miningmart.m4.utils.M4Table
NOT_NULL
 
Constructor Summary
Assertion(DB db)
           
 
Method Summary
 void applyEstimationOneInput(Step whichStep, EstimatedStatistics inputEstimation, EstimatedStatistics outputEstimation)
           
 void applyEstimationSeveralInputs(Step whichStep, EstimatedStatistics[] inputEstimations, EstimatedStatistics outputEstimation)
           
 java.lang.String getAssertionType()
          Gets the myType.
 java.lang.String getIdAttributeName()
           
 M4Info getM4Info()
           
 java.lang.String getM4TableName()
           
 java.lang.String getObj1()
          Gets the myObj1.
 java.lang.String getObj2()
          Gets the myObj2.
protected  java.util.Collection getObjectsInNamespace(java.lang.Class typeOfObjects)
          This method returns the objects of the specified type that form a namespace in the scope of this M4Data object.
 Operator getTheOperator()
          Gets the Operator
 M4Info getXmlInfo()
           
 boolean isValueFrequencyAssertion()
           
 boolean isValueListAssertion()
           
 void primitiveSetOperator(Operator operator)
          Primitive setter method.
 void print()
          Print this M4 object's parameters.
protected  void removeAllM4References()
          This method needs to be implemented by all M4Data objects.
 void setAssertionType(java.lang.String myType)
          Sets the myType.
 void setObj1(java.lang.String myObj1)
          Sets the myObj1.
 void setObj2(java.lang.String myObj2)
          Sets the myObj2.
 void setTheOperator(Operator operator)
          Sets the Operator.
 void writeAssertion(ExecutableOperator op)
          This method remembers the operator assertions for subsequent operations.
 
Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Data
deleteLocal, deleteSoon, exportLocal, genericGetter, genericSetter, getDependentObjects, getDocumentation, getObjectsReferencingMe, getObjectsReferencingMe, getObjectTag, getUniqueName, getValidName, getValidName, getXmlIdTag, getXmlVersion, hasDeleteStatus, importLocal, isDirty, isWaitingForDelete, primitiveGetDocObject, primitiveSetDocObject, readFromDb, readFromDbLocal, removeDocObject, removeFromDb, removeSetFromDb, setDirty, setDocumentation, setId, setName, storeLocal, updateObjectsFromTable
 
Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Object
compareTo, doPrint, doPrint, equals, executeBusinessSingleValueSqlRead, executeBusinessSingleValueSqlReadL, executeBusinessSqlRead, executeBusinessSqlWrite, executeM4SingleValueSqlRead, executeM4SingleValueSqlReadL, executeM4SqlRead, executeM4SqlWrite, getCasePrintObject, getId, getM4Db, getM4ObjectFromCache, getName, getNextM4SequenceValue, isNew, load, putM4ObjectToCache, replaceSpacesInName, setNotNew
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.udo.cs.miningmart.m4.utils.XmlInfo
doPrint, doPrint, exportLocal, genericGetter, genericSetter, getDependentObjects, getObjectTag, getXmlIdTag, getXmlVersion, importLocal
 
Methods inherited from interface edu.udo.cs.miningmart.m4.M4Data
deleteSoon, getDocumentation, getValidName, isDirty, isWaitingForDelete, setDocumentation
 
Methods inherited from interface edu.udo.cs.miningmart.m4.M4Object
doPrint, doPrint, equals, executeBusinessSingleValueSqlRead, executeBusinessSingleValueSqlReadL, executeBusinessSqlRead, executeBusinessSqlWrite, executeM4SingleValueSqlRead, executeM4SingleValueSqlReadL, executeM4SqlRead, executeM4SqlWrite, getCasePrintObject, getId, getM4Db, getM4ObjectFromCache, getName, getNextM4SequenceValue, isNew, load, putM4ObjectToCache, replaceSpacesInName, setId, setName, setNotNew
 

Field Detail

M4_TABLE_NAME

public static final java.lang.String M4_TABLE_NAME
The name of the corresponding M4 table.

See Also:
Constant Field Values

ATTRIB_ASSERT_ID

public static final java.lang.String ATTRIB_ASSERT_ID
db level: name of the assertion's id attribute

See Also:
Constant Field Values

ATTRIB_OPERATOR_ID

public static final java.lang.String ATTRIB_OPERATOR_ID
db level: name of the operator id attribute

See Also:
Constant Field Values

ATTRIB_ASSERT_TYPE

public static final java.lang.String ATTRIB_ASSERT_TYPE
db level: name of the attribute specifying the assertion type

See Also:
Constant Field Values

ATTRIB_ASSERT_OBJ1

public static final java.lang.String ATTRIB_ASSERT_OBJ1
db level: name of the attribute for first argument

See Also:
Constant Field Values

ATTRIB_ASSERT_OBJ2

public static final java.lang.String ATTRIB_ASSERT_OBJ2
db level: name of the attribute for second argument

See Also:
Constant Field Values

ASSERTION_NOT_NULL

public static final java.lang.String ASSERTION_NOT_NULL
See Also:
Constant Field Values

ASSERTION_UNIQUE

public static final java.lang.String ASSERTION_UNIQUE
See Also:
Constant Field Values

ESTIMATE_SIZE_BY_RELATIONS

public static final java.lang.String ESTIMATE_SIZE_BY_RELATIONS
See Also:
Constant Field Values

ESTIMATE_SIZE_BY_VALUE

public static final java.lang.String ESTIMATE_SIZE_BY_VALUE
See Also:
Constant Field Values

ESTIMATE_SIZE_REDUCE_MV

public static final java.lang.String ESTIMATE_SIZE_REDUCE_MV
See Also:
Constant Field Values

ESTIMATE_SIZE_BY_DIVISION

public static final java.lang.String ESTIMATE_SIZE_BY_DIVISION
See Also:
Constant Field Values

ESTIMATE_SIZE_BY_VALLIST

public static final java.lang.String ESTIMATE_SIZE_BY_VALLIST
See Also:
Constant Field Values

ESTIMATE_SIZE_ADD_INPUTS

public static final java.lang.String ESTIMATE_SIZE_ADD_INPUTS
See Also:
Constant Field Values

ESTIMATE_SIZE_MULTIPLY_BY

public static final java.lang.String ESTIMATE_SIZE_MULTIPLY_BY
See Also:
Constant Field Values

ESTIMATE_VALLIST_TAKE_FROM

public static final java.lang.String ESTIMATE_VALLIST_TAKE_FROM
See Also:
Constant Field Values

ESTIMATE_VALLIST_UNCHANGED

public static final java.lang.String ESTIMATE_VALLIST_UNCHANGED
See Also:
Constant Field Values

ESTIMATE_VALLIST_ADD_VALUE

public static final java.lang.String ESTIMATE_VALLIST_ADD_VALUE
See Also:
Constant Field Values

ESTIMATE_VALLIST_FROM_PARAM

public static final java.lang.String ESTIMATE_VALLIST_FROM_PARAM
See Also:
Constant Field Values

ESTIMATE_VALLIST_BY_SYMBOL

public static final java.lang.String ESTIMATE_VALLIST_BY_SYMBOL
See Also:
Constant Field Values

ESTIMATE_VALLIST_COMBINE

public static final java.lang.String ESTIMATE_VALLIST_COMBINE
See Also:
Constant Field Values

ESTIMATE_VALLIST_FROM_LIST

public static final java.lang.String ESTIMATE_VALLIST_FROM_LIST
See Also:
Constant Field Values

ESTIMATE_MINMAX_TAKE_FROM

public static final java.lang.String ESTIMATE_MINMAX_TAKE_FROM
See Also:
Constant Field Values

ESTIMATE_MINMAX_UNCHANGED

public static final java.lang.String ESTIMATE_MINMAX_UNCHANGED
See Also:
Constant Field Values

ESTIMATE_MINIMUM_FROM_PARAM

public static final java.lang.String ESTIMATE_MINIMUM_FROM_PARAM
See Also:
Constant Field Values

ESTIMATE_MAXIMUM_FROM_PARAM

public static final java.lang.String ESTIMATE_MAXIMUM_FROM_PARAM
See Also:
Constant Field Values

ESTIMATE_MINMAX_COMBINE

public static final java.lang.String ESTIMATE_MINMAX_COMBINE
See Also:
Constant Field Values

ESTIMATE_VALFREQ_REPL_MV

public static final java.lang.String ESTIMATE_VALFREQ_REPL_MV
See Also:
Constant Field Values

ESTIMATE_VALFREQ_BY_SELECTIVITY

public static final java.lang.String ESTIMATE_VALFREQ_BY_SELECTIVITY
See Also:
Constant Field Values

ESTIMATE_VALFREQ_AGGREGATE

public static final java.lang.String ESTIMATE_VALFREQ_AGGREGATE
See Also:
Constant Field Values

ESTIMATE_VALFREQ_ADD_INPUTS

public static final java.lang.String ESTIMATE_VALFREQ_ADD_INPUTS
See Also:
Constant Field Values

ESTIMATE_VALFREQ_TAKE_FROM

public static final java.lang.String ESTIMATE_VALFREQ_TAKE_FROM
See Also:
Constant Field Values

ESTIMATE_VALFREQ_MULT_BY

public static final java.lang.String ESTIMATE_VALFREQ_MULT_BY
See Also:
Constant Field Values

ESTIMATE_MV_BY_SELECTIVITY

public static final java.lang.String ESTIMATE_MV_BY_SELECTIVITY
See Also:
Constant Field Values

ESTIMATE_MV_TAKE_FROM

public static final java.lang.String ESTIMATE_MV_TAKE_FROM
See Also:
Constant Field Values

ESTIMATE_MV_ADD_INPUTS

public static final java.lang.String ESTIMATE_MV_ADD_INPUTS
See Also:
Constant Field Values

ESTIMATE_NO_CHANGE

public static final java.lang.String ESTIMATE_NO_CHANGE
See Also:
Constant Field Values

ESTIMATE_ROW_SELECTION

public static final java.lang.String ESTIMATE_ROW_SELECTION
See Also:
Constant Field Values
Constructor Detail

Assertion

public Assertion(DB db)
See Also:
edu.udo.cs.miningmart.m4.core.M4Data#Constructor
Method Detail

getM4TableName

public java.lang.String getM4TableName()
Specified by:
getM4TableName in interface M4Table
See Also:
M4Table.getM4TableName()

getIdAttributeName

public java.lang.String getIdAttributeName()
Specified by:
getIdAttributeName in interface M4Table
See Also:
M4Table.getIdAttributeName()

getM4Info

public M4Info getM4Info()
Specified by:
getM4Info in interface M4Table
See Also:
M4Table.getM4Info()

getXmlInfo

public M4Info getXmlInfo()
Specified by:
getXmlInfo in interface XmlInfo
Returns:
a M4Info object with the information of all XML fields of this object.
See Also:
M4Table.getM4Info()

print

public void print()
Description copied from class: M4Object
Print this M4 object's parameters. Must be implemented by all subclasses.

Specified by:
print in interface M4Object
Specified by:
print in class M4Object
See Also:
M4Object.print()

getObjectsInNamespace

protected java.util.Collection getObjectsInNamespace(java.lang.Class typeOfObjects)
                                              throws M4Exception
Description copied from class: M4Data
This method returns the objects of the specified type that form a namespace in the scope of this M4Data object. For example, a Concept's namespace for the type BaseAttribute is the Collection of all BaseAttributes for this Concept. Many M4Data objects never have a namespace, they return null. If a namespace could exist but doesn't, an empty Collection is returned.

Specified by:
getObjectsInNamespace in class M4Data
Parameters:
typeOfObjects - the type of objects that form the namespace
Returns:
a Collection of objects of type typeOfObjects, or null.
Throws:
M4Exception
See Also:
M4Data.getObjectsInNamespace(Class)

getObj1

public java.lang.String getObj1()
Gets the myObj1.

Specified by:
getObj1 in interface Assertion
Returns:
Returns a String

getObj2

public java.lang.String getObj2()
Gets the myObj2.

Specified by:
getObj2 in interface Assertion
Returns:
Returns a String

getTheOperator

public Operator getTheOperator()
Gets the Operator

Specified by:
getTheOperator in interface Assertion
Returns:
Returns an Operator

getAssertionType

public java.lang.String getAssertionType()
Gets the myType.

Specified by:
getAssertionType in interface Assertion
Returns:
Returns a String

setObj1

public void setObj1(java.lang.String myObj1)
Sets the myObj1.

Specified by:
setObj1 in interface Assertion
Parameters:
myObj1 - The myObj1 to set

setObj2

public void setObj2(java.lang.String myObj2)
Sets the myObj2.

Specified by:
setObj2 in interface Assertion
Parameters:
myObj2 - The myObj2 to set

setTheOperator

public void setTheOperator(Operator operator)
                    throws M4Exception
Sets the Operator.

Specified by:
setTheOperator in interface Assertion
Parameters:
operator - The Operator to set
Throws:
M4Exception

primitiveSetOperator

public void primitiveSetOperator(Operator operator)
Primitive setter method. Do not use it!


setAssertionType

public void setAssertionType(java.lang.String myType)
Sets the myType.

Specified by:
setAssertionType in interface Assertion
Parameters:
myType - The myType to set

removeAllM4References

protected void removeAllM4References()
                              throws M4Exception
Description copied from class: M4Data
This method needs to be implemented by all M4Data objects. It has to remove all references to other M4Objects.

Specified by:
removeAllM4References in class M4Data
Throws:
M4Exception
See Also:
M4Data.removeAllM4References()

writeAssertion

public void writeAssertion(ExecutableOperator op)
                    throws M4CompilerError
Description copied from interface: Assertion
This method remembers the operator assertions for subsequent operations.

Specified by:
writeAssertion in interface Assertion
Throws:
M4CompilerError

applyEstimationOneInput

public void applyEstimationOneInput(Step whichStep,
                                    EstimatedStatistics inputEstimation,
                                    EstimatedStatistics outputEstimation)
                             throws M4Exception
Throws:
M4Exception

applyEstimationSeveralInputs

public void applyEstimationSeveralInputs(Step whichStep,
                                         EstimatedStatistics[] inputEstimations,
                                         EstimatedStatistics outputEstimation)
                                  throws M4Exception
Throws:
M4Exception

isValueListAssertion

public boolean isValueListAssertion()

isValueFrequencyAssertion

public boolean isValueFrequencyAssertion()


Copyright © 2001-2005