Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.udo.cs.miningmart.m4.core
Class Step

    java.lang.Object
      edu.udo.cs.miningmart.m4.core.M4Object
          edu.udo.cs.miningmart.m4.core.M4Data
              edu.udo.cs.miningmart.m4.core.GraphicalM4Object
                  edu.udo.cs.miningmart.m4.core.Step

All Implemented Interfaces:
  GraphicalM4Object, M4Data, M4Object, Step, HasCrossReferences, M4Table, XmlInfo, java.io.Serializable, java.lang.Comparable

    public class Step

extends GraphicalM4Object
implements Step, XmlInfo, HasCrossReferences

This class represents an M4 Step. Apart from the tuple-based load mechanism there is a second one, loading and aggregating tuples as specified by the entries in the `OP_PARAM_T` table. The first mechanism uses the methods `getParameters()`, `addParameterTuple(Parameter)`, and `removeParameterTuple(Parameter)`. The latter uses the methods `getParameterDictionary()`, `getParameterFromDict(String, int)`, `getSingleParameter(String)`, `getSingleParameter(String, int)`, `getTheParameter(String)`, and `getTheParameter(String, int)`. Adding or removing parameters is not possible with the second mechanism, for it is a support for compiler access to aggregated parameter arrays only.

Version:
  $Id: Step.java,v 1.71 2006/10/01 19:14:22 euler Exp $
Author:
  Timm Euler
See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `ATTRIB_CASE_ID` db level reference to the embedding case by this attribute
`static java.lang.String` | `ATTRIB_CHAIN_ID` db level reference to the embedding chain by this attribute
`static java.lang.String` | `ATTRIB_DBT_OBJNAME`
`static java.lang.String` | `ATTRIB_DBT_OBJTYPE`
`static java.lang.String` | `ATTRIB_DBT_SCHEMA`
`static java.lang.String` | `ATTRIB_DBT_STEPID`
`static java.lang.String` | `ATTRIB_MULTISTEP_COND` db level: operator name attribute
`static java.lang.String` | `ATTRIB_NUM_OF_LOOPS` db level: number of loops attribute
`static java.lang.String` | `ATTRIB_OPERATOR_ID` db level reference to the step's operator
`static java.lang.String` | `ATTRIB_REV_ID`
`static java.lang.String` | `ATTRIB_REV_ORIGSTEP`
`static java.lang.String` | `ATTRIB_REV_REVSTEP`
`static java.lang.String` | `ATTRIB_STEP_ID` db level id of this object is realized by this attribute
`static java.lang.String` | `ATTRIB_STEP_NAME` db level name of this object is realized by this attribute
`static java.lang.String` | `ATTRIB_STEP_NR` db level: step number attribute
`static java.lang.String` | `ATTRIB_STEPSEQ_DEPENDENCY_ID` db level: name of the attribute holding the step dependency's id
`static java.lang.String` | `ATTRIB_STEPSEQ_FROM_STEP` db level: name of the attribute holding the from step's id
`static java.lang.String` | `ATTRIB_STEPSEQ_TO_STEP` db level: name of the attribute holding the dependent step's id
`static java.lang.String` | `DB_TRASH_TABLENAME`
`static java.lang.String` | `DBT_TYPE_FOREIGN_KEY`
`static java.lang.String` | `DBT_TYPE_FUNCTION`
`static java.lang.String` | `DBT_TYPE_INDEX`
`static java.lang.String` | `DBT_TYPE_PRIMARY_KEY`
`static java.lang.String` | `DBT_TYPE_TABLE`
`static java.lang.String` | `DBT_TYPE_VIEW`
`static java.lang.String` | `M4_TABLE_NAME` name of the corresponding m4 table
`static java.lang.String` | `M4_TABLE_NAME_STEPSEQ` The name of the corresponding M4 table.
`static java.lang.String` | `M4_TRASH_ID` The M4 trash table's primary key attribute name.
`static java.lang.String` | `M4_TRASH_OBJ_TABLE` The M4 trash table's attribute holding the referenced object's M4 table name.
`static java.lang.String` | `M4_TRASH_STEP_ID` The M4 trash table's attribute holding the object's creating Step ID.
`static java.lang.String` | `M4_TRASH_TABLE` The name of the M4 table holding the compiler's garbage collection information of M4 objects.
`static M4Info` | `m4Info` Cache for getM4Info()
`static java.lang.String` | `REVSTEP_TABLENAME`
`static InterM4Communicator` | `step2par` Helper classes instance for inter M4 communication

Fields inherited from class edu.udo.cs.miningmart.m4.core.GraphicalM4Object
`graph2coord`

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.utils.M4Table
`NOT_NULL`

Constructor Summary
`Step(DB m4Db)`

Method Summary
`boolean` | `adaptOutputToChangedInput()` This method ensures that the output parameters of this Step reflect the specification of the operator and the current instances of the input parameters.
`void` | `addDatabaseObjectToTrash(java.lang.String objectName, java.lang.String schemaName, java.lang.String objectType)` Helper method to store the information about a database object in the trash index
`void` | `addParameterTuple(Parameter par)` Adds a parameter to this step's parameter list on tuple level.
`void` | `addPredecessor(Step step)`
`void` | `addReversingStep(Step st)` The given step is linked as reversing step to this one.
`void` | `addSuccessor(Step step)` This method should only be called from the method `Case.addStepDependency(Step, Step)`!
`void` | `addToTrash(M4Data m4data)` This method should only be called by the compiler after a new M4 object has been created by calling a constructor.
`boolean` | `belongsToChainOrSubChain(Chain theChain)` This method returns TRUE if this Step belongs to the given Chain, or to a direct or indirect subchain of the given Chain.
`void` | `changeInputConcept(Concept oldConcept, Concept newConcept)` One of the input concepts of this step is given, and is set to be the other given concept.
`java.lang.String` | `checkFeatureRemoval(Concept theInputConcept, Feature theFeature)` This method checks if any problems with the validity of this step would occur if the given feature were removed from the given input concept of this step.
`boolean` | `checkInputParameterEntries()` This method checks, for the current set of values of input parameters in this step, whether they fulfill all parameter contraints.
`boolean` | `checkOutputParameterEntries()` This method checks, for the current set of values of output parameters in this step, whether they fulfill all parameter contraints.
`Step` | `copy(Case newCase, Chain newChain)` Make and return a copy of this Step that is attached to the given Chain in the given Case.
`void` | `createOutput(OpParam theOpParam, java.util.Collection theNames)` This method must only be called if no output objects existed for this Step before!
`Parameter` | `createParameterTuple(java.lang.String name, ParameterObject object, long number, int loopNumber, java.lang.String ioType)` Creates a Parameter that will be connected to this Step.
`boolean` | `createsConceptualOutput()` Some steps, like those using evaluation operators, do not produce any output concept or attribute.
`Parameter` | `createValueParameterTuple(java.lang.String value, java.lang.String datatype, java.lang.String name, long number, int loopNumber, java.lang.String type)` Creates a Parameter and a Value that will be connected to this Step.
`void` | `deleteDbTrash()` This method takes care of deleting trash objects from the business data schema.
`protected void` | `deleteLocal()` Overwrites the superclass method to ensure that the cross table entries are deleted first
`void` | `deleteM4Trash()` This method realizes the M4Compiler's garbage collection on the objects created during compilation of this `Step`.
`void` | `deleteSoon()` Overwrites the superclass method because the output that this step creates must be deleted, too.
`boolean` | `dependencyExists(Chain toChain)` Checks if this step has a successor among any of the steps in the given chain, including steps in any direct or indirect subchain of the given chain.
`void` | `estimateStatisticsForOutputAttrib(EstimatedStatistics currentOutputEstimations, BaseAttribute outputAttribute)`
`EstimatedStatistics` | `estimateStatisticsForOutputConcept()`
`java.util.Collection` | `exportLocal(java.io.Writer out, java.util.Collection dependent)` Steps must additionally export the links to the steps that reverse them, if any reversing steps exist.
`java.util.Collection` | `getAllInputConcepts()` This method returns all concepts that are input concept to this step's operator, even those that are attached to an input relation but not modelled by an input parameter.
`java.util.Collection` | `getAllInputRelations()` Returns all relations that are a parameter object of an input parameter of this Step.
`java.util.Collection` | `getAllPredecessors()` Returns only the DIRECT predecessors!
`long` | `getCaseId()` Getter method.
`java.util.Collection` | `getCorrespondingOutputFeatures(Concept theInputConcept, Feature theFeature)` This method finds all features in the output concept of this step that correspond to the given feature in the given input concept of this step.
`java.util.Collection` | `getCrossReferences()`
`java.util.Collection` | `getDependentObjects()` This method is part of the XML-serialization and needs to be implemented by all `M4Data` sub-classes that need to be serialized.
`java.util.Collection` | `getDependentReversingSteps()` This method returns all steps that have been created automatically to reverse the attribute creation done by this step's operator.
`java.lang.String` | `getIdAttributeName()`
`java.util.Collection` | `getInputConceptsThatAreParameters()` This method returns all concepts that are input concept to this step's operator.
`BaseAttribute[][]` | `getKeysOfRelationshipAssertion()` This method checks if this Step creates a relationship from or to its output concept.
`int` | `getLoopCount()` Getter method.
`M4Info` | `getM4Info()`
`java.lang.String` | `getM4TableName()`
`java.util.Collection` | `getM4Trash()` Active getter for the compiler's M4 Trash information.
`int` | `getMaximumNumberOfStepsSinceLastMaterialisation()` Returns the greatest number of steps between this step and the last of its predecessors that materialises its output.
`java.lang.String` | `getMultiStepCondition()` Getter method.
`long` | `getNumber()` Getter method.
`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.
`java.util.Collection` | `getOpParamsToSelectFeatureParamObjectsFrom(OpParam opParam)` Whenever an input of type BaseAttribute or MultiColumnFeature is expected the possible Concepts the Features may come from are explicitly given by constraints.
`Concept` | `getOutputConcept()` Returns the output concept of this step, if it exists, and NULL otherwise.
`java.util.Collection` | `getParameter(OpParam theOpParam, int loopNr)` Returns the instance of the given `OpParam` that is currently set in this Step.
`ParamDict` | `getParameterDictionary(boolean expectingAllParamsToExist)` Active getter for the parameters of this `Step` in aggregated form.
`Parameter` | `getParameterTuple(java.lang.String name, int loopNr)` Return the parameter (tuple) of this step with the given name and loop number.
`java.util.Collection` | `getParameterTuples()` Active getter for the parameters of this `Step` in tuple-wise form (not aggregated by `OpParam` arrays!).
`java.util.Collection` | `getPossibleConceptsForParam(OpParam opParam)` This method returns a Collection of Concepts from which the feature denoted by the given OpParam must be selected.
`java.util.Collection` | `getPossibleInputConcepts()` This method finds all Concepts that are either of type DB or are created as an output concept by a Step that precedes this Step in the chain.
`Step` | `getPredecessor()` Returns the direct predecessor.
`java.util.Collection` | `getResultingDataModel()` Returns a collection of concepts; these concepts represent the data model that the current Case produced up to this Step.
`Step` | `getReversedStep()` Returns the step whose feature construction is reversed by this step, or null if no such step exists.
`ParameterObject` | `getSingleParameterObject(java.lang.String parameterName)` Returns the parameter object of the first parameter tuple with the given name and loop number 0.
`java.util.Collection` | `getSuccessors()` Active getter for this `Step`'s successors.
`java.util.Collection` | `getSuccessorsUntilOutputConceptIsCreated()` This method only works for steps that do not create an output concept.
`Case` | `getTheCase()` Getter method.
`Chain` | `getTheChain()` Getter method.
`Operator` | `getTheOperator()` Active getter method.
`M4Info` | `getXmlInfo()`
`void` | `handleOldInput()` To be called after changing the input of this step; ensures that old output attributes are removed from a replaced input concept.
`protected boolean` | `hasCoordinates()` `Step`s have coordinates.
`boolean` | `hasOnlyInputConceptsOfTypeDB()` Returns true iff all input concepts of this step are of type DB.
`boolean` | `hasPredecessorOutsideChain()` This method returns TRUE if this Step has a direct predecessor that does not belong to the same chain, nor one of its subchains.
`boolean` | `hasSuccessorOutsideChain()` This method returns TRUE if this Step has a direct successor that does not belong to the same chain, nor one of its subchains.
`void` | `importLocal(java.lang.String tag, java.lang.String embedded)` Steps may have to import the steps they reverse.
`boolean` | `inputChangeCanAffectOutput(OpParam theOpParam)` Returns TRUE iff a change to the given input OpParam can have any effect on the output parameters of this Step.
`boolean` | `isAttribToTakeFromFromConcept(OpParam theAttribOpParam, OpParam theRelationOpParam)` Returns TRUE iff there is a constraint indicating that the feature parameter indicated by theAttribOpParam is to be taken from the FromConcept of the relation given by theRelationOpParam.
`boolean` | `isAttribToTakeFromToConcept(OpParam theAttribOpParam, OpParam theRelationOpParam)` Returns TRUE iff there is a constraint indicating that the feature parameter indicated by theAttribOpParam is to be taken from the ToConcept of the relation given by theRelationOpParam.
`boolean` | `isCompiled()` After a `Step` has been successfully compiled a flag in the M4 database is set, which is removed by the next garbage collection.
`boolean` | `isContainedInInputConcept(OpParam outputFeature)` This method must only be called for an output feature.
`boolean` | `isLastStepProducingConceptualOutput()` Returns TRUE iff this step has no successors or if it has only successors that do not produce conceptual output.
`boolean` | `isRelationallyValid()`
`boolean` | `isSuccessorOf(Step previousStep)` Returns TRUE if this Step is a direct or indirect successor of the given Step, according to the step transitions (step dependencies).
`boolean` | `isVisible(Feature theFeature)` This method returns TRUE iff the given Feature may be displayed in the input concept, or in a list of Features to choose from for a parameter.
`boolean` | `materialisesOutput()` Returns true iff this step's operator creates a columnset for the output concept that represents a table, not a view.
`void` | `primitiveAddSuccessor(Step step)` Same as `addSuccessor(Step) but without setting any of the dirty flags.`
`void` | `primitiveSetCase(Case myCase)` Primitive setter method.
`void` | `primitiveSetChain(Chain chain)` Primitive setter method.
`void` | `print()` Print this M4 object's parameters.
`void` | `propagateOutputChanges()` This method should be called after changing some outputs of this Step.
`ParamDict` | `readParametersFromDB(boolean paramsMustExist)` Reads all of this step's parameters specified in table OP_PARAM_T for the current `Step` and stores them in a parameter dictionary.
`protected void` | `removeAllM4References()` This method is to be written in a way that it can still be called during updateDatabase()!
`void` | `removeAllParameterTuples()`
`void` | `removeParameter(java.lang.String parName)`
`boolean` | `removeParameterTuple(Parameter par)` Removes a parameter from this step's parameter list on tuple level.
`void` | `removePredecessor()` Removes the link to the specified Predecessor.
`boolean` | `removeSuccessor(Step step)` Removes a `Step` from this `Step`'s `Collection` of dependent `Step`s.
`boolean` | `removeSuccessor(java.lang.String name)` Removes a `Step` from this `Step`'s `Collection` of dependent `Step`s.
`void` | `renameOutput(OpParam theOpParam, java.util.Collection theNames)` This method changes the names of the output parameter objects; the latter are assumed to exist.
`void` | `setCompiled()` This method may only be called by the control structure!
`void` | `setLoopCount(int lc)` Setter method.
`void` | `setMultiStepCondition(java.lang.String msc)` Setter method.
`void` | `setNumber(long nr)` Setter method.
`java.util.Map` | `setParameter(OpParam theOpParam, java.util.Collection theParameterObjects, int loopNr)` An empty `Collection` for `theParameterObjects` makes this method remove the parameter (as otherwise the type would be unclear, anyway).
`void` | `setReversedStep(Step reversedStep)`
`protected void` | `setSuccessors(java.util.Collection newSuccessors)` This method is mainly to be used by the XML deserialization mechanism, but it robust enough not to crash if the Case is not yet set, and it maintains the Steps' order within the Case by using the Case's `addStepDependency(Step, Step)` method.
`void` | `setTheCase(Case myCase)` Setter method.
`void` | `setTheChain(Chain chain)` Setter method.
`void` | `setTheOperator(Operator theOp)` Setter method.
`protected void` | `storeLocal()` This method stores the `Collection` of dependent `Step`s to the database (table STEPSEQUENCE_T) if there were any updates to that `Collection`.
`void` | `updateOutput(OpParam theOpParam)` This method must only be called if any input parameter of this Step was changed.
`boolean` | `usesAggregation()` Returns true iff this step aggregates rows of its input concept
`boolean` | `usesLoopsForCoordination()` This method returns TRUE if the coordinated parameters in this step (ab)use the loop mechanism for their coordination.

Methods inherited from class edu.udo.cs.miningmart.m4.core.GraphicalM4Object
`getCoordinates, getPoint, primitiveSetCoordinates, setCoordinatesDirty, setName, setPoint`

Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Data
`genericGetter, genericSetter, getDocumentation, getObjectsReferencingMe, getObjectsReferencingMe, getObjectTag, getUniqueName, getValidName, getValidName, getXmlIdTag, getXmlVersion, hasDeleteStatus, isDirty, isWaitingForDelete, primitiveGetDocObject, primitiveSetDocObject, readFromDb, readFromDbLocal, removeDocObject, removeFromDb, removeSetFromDb, setDirty, setDocumentation, setId, 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.GraphicalM4Object
`getPoint, setPoint`

Methods inherited from interface edu.udo.cs.miningmart.m4.M4Data
`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`

Methods inherited from interface edu.udo.cs.miningmart.m4.utils.XmlInfo
`doPrint, doPrint, genericGetter, genericSetter, getObjectTag, getXmlIdTag, getXmlVersion`

Field Detail

### M4_TABLE_NAME

    public static final java.lang.String M4_TABLE_NAME

  name of the corresponding m4 table

  See Also:
    Constant Field Values

### ATTRIB_STEP_ID

    public static final java.lang.String ATTRIB_STEP_ID

  db level id of this object is realized by this attribute

  See Also:
    Constant Field Values

### ATTRIB_STEP_NAME

    public static final java.lang.String ATTRIB_STEP_NAME

  db level name of this object is realized by this attribute

  See Also:
    Constant Field Values

### ATTRIB_CHAIN_ID

    public static final java.lang.String ATTRIB_CHAIN_ID

  db level reference to the embedding chain by this attribute

  See Also:
    Constant Field Values

### ATTRIB_CASE_ID

    public static final java.lang.String ATTRIB_CASE_ID

  db level reference to the embedding case by this attribute

  See Also:
    Constant Field Values

### ATTRIB_OPERATOR_ID

    public static final java.lang.String ATTRIB_OPERATOR_ID

  db level reference to the step's operator

  See Also:
    Constant Field Values

### ATTRIB_NUM_OF_LOOPS

    public static final java.lang.String ATTRIB_NUM_OF_LOOPS

  db level: number of loops attribute

  See Also:
    Constant Field Values

### ATTRIB_STEP_NR

    public static final java.lang.String ATTRIB_STEP_NR

  db level: step number attribute

  See Also:
    Constant Field Values

### ATTRIB_MULTISTEP_COND

    public static final java.lang.String ATTRIB_MULTISTEP_COND

  db level: operator name attribute

  See Also:
    Constant Field Values

### step2par

    public static InterM4Communicator step2par

  Helper classes instance for inter M4 communication

### m4Info

    public static M4Info m4Info

  Cache for getM4Info()

### M4_TABLE_NAME_STEPSEQ

    public static final java.lang.String M4_TABLE_NAME_STEPSEQ

  The name of the corresponding M4 table.

  See Also:
    Constant Field Values

### ATTRIB_STEPSEQ_DEPENDENCY_ID

    public static final java.lang.String ATTRIB_STEPSEQ_DEPENDENCY_ID

  db level: name of the attribute holding the step dependency's id

  See Also:
    Constant Field Values

### ATTRIB_STEPSEQ_FROM_STEP

    public static final java.lang.String ATTRIB_STEPSEQ_FROM_STEP

  db level: name of the attribute holding the from step's id

  See Also:
    Constant Field Values

### ATTRIB_STEPSEQ_TO_STEP

    public static final java.lang.String ATTRIB_STEPSEQ_TO_STEP

  db level: name of the attribute holding the dependent step's id

  See Also:
    Constant Field Values

### DB_TRASH_TABLENAME

    public static final java.lang.String DB_TRASH_TABLENAME

See Also:
  Constant Field Values

### ATTRIB_DBT_OBJTYPE

    public static final java.lang.String ATTRIB_DBT_OBJTYPE

See Also:
  Constant Field Values

### ATTRIB_DBT_OBJNAME

    public static final java.lang.String ATTRIB_DBT_OBJNAME

See Also:
  Constant Field Values

### ATTRIB_DBT_SCHEMA

    public static final java.lang.String ATTRIB_DBT_SCHEMA

See Also:
  Constant Field Values

### ATTRIB_DBT_STEPID

    public static final java.lang.String ATTRIB_DBT_STEPID

See Also:
  Constant Field Values

### DBT_TYPE_FUNCTION

    public static final java.lang.String DBT_TYPE_FUNCTION

See Also:
  Constant Field Values

### DBT_TYPE_VIEW

    public static final java.lang.String DBT_TYPE_VIEW

See Also:
  Constant Field Values

### DBT_TYPE_TABLE

    public static final java.lang.String DBT_TYPE_TABLE

See Also:
  Constant Field Values

### DBT_TYPE_INDEX

    public static final java.lang.String DBT_TYPE_INDEX

See Also:
  Constant Field Values

### DBT_TYPE_PRIMARY_KEY

    public static final java.lang.String DBT_TYPE_PRIMARY_KEY

See Also:
  Constant Field Values

### DBT_TYPE_FOREIGN_KEY

    public static final java.lang.String DBT_TYPE_FOREIGN_KEY

See Also:
  Constant Field Values

### REVSTEP_TABLENAME

    public static final java.lang.String REVSTEP_TABLENAME

See Also:
  Constant Field Values

### ATTRIB_REV_ID

    public static final java.lang.String ATTRIB_REV_ID

See Also:
  Constant Field Values

### ATTRIB_REV_ORIGSTEP

    public static final java.lang.String ATTRIB_REV_ORIGSTEP

See Also:
  Constant Field Values

### ATTRIB_REV_REVSTEP

    public static final java.lang.String ATTRIB_REV_REVSTEP

See Also:
  Constant Field Values

### M4_TRASH_TABLE

    public static final java.lang.String M4_TRASH_TABLE

  The name of the M4 table holding the compiler's garbage collection information of M4 objects.

  See Also:
    Constant Field Values

### M4_TRASH_ID

    public static final java.lang.String M4_TRASH_ID

  The M4 trash table's primary key attribute name.

  See Also:
    Constant Field Values

### M4_TRASH_OBJ_TABLE

    public static final java.lang.String M4_TRASH_OBJ_TABLE

  The M4 trash table's attribute holding the referenced object's M4 table name.

  See Also:
    Constant Field Values

### M4_TRASH_STEP_ID

    public static final java.lang.String M4_TRASH_STEP_ID

  The M4 trash table's attribute holding the object's creating Step ID.

  See Also:
    Constant Field Values

Constructor Detail

### Step

    public Step(DB m4Db)

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:
    `XmlInfo.getXmlInfo()`

### 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`
  Overrides:
    `print` in class `GraphicalM4Object`
  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)`

### getTheOperator

    public Operator getTheOperator()

  Active getter method.

  Specified by:
    `getTheOperator` in interface `Step`
  Returns:
    the M4 operator object related to this `Step`

### setTheOperator

    public void setTheOperator(Operator theOp)

  Setter method. There is no back-reference from `Operator`, so we do not need another primitive setter.

  Specified by:
    `setTheOperator` in interface `Step`
  Parameters:
    `theOp` - The new operator

### getTheChain

    public Chain getTheChain()

  Getter method.

  Specified by:
    `getTheChain` in interface `Step`
  Returns:
    the `Chain` of this `Step`

### setTheChain

    public void setTheChain(Chain chain)
                     throws M4Exception

  Setter method.

  Specified by:
    `setTheChain` in interface `Step`
  Parameters:
    `chain` - The new chain
  Throws:
    `M4Exception`

### primitiveSetChain

    public void primitiveSetChain(Chain chain)

  Primitive setter method. Do not use it!

  Parameters:
    `the` - `Chain` to be set.

### getCaseId

    public long getCaseId()

  Getter method.

  Specified by:
    `getCaseId` in interface `Step`
  Returns:
    the id

### getNumber

    public long getNumber()

  Getter method.

  Specified by:
    `getNumber` in interface `Step`
  Returns:
    the number

### setTheCase

    public void setTheCase(Case myCase)
                    throws M4Exception

  Setter method.

  Specified by:
    `setTheCase` in interface `Step`
  Parameters:
    `myCase` - The new case
  Throws:
    `M4Exception`

### primitiveSetCase

    public void primitiveSetCase(Case myCase)

  Primitive setter method. Do not uise it!

  Parameters:
    `myCase` - The `Case` to be set.

### setNumber

    public void setNumber(long nr)

  Setter method.

  Specified by:
    `setNumber` in interface `Step`
  Parameters:
    `nr` - the new step number

### getLoopCount

    public int getLoopCount()

  Getter method.

  Specified by:
    `getLoopCount` in interface `Step`
  Returns:
    the loop count

### getMultiStepCondition

    public java.lang.String getMultiStepCondition()

  Getter method.

  Specified by:
    `getMultiStepCondition` in interface `Step`
  Returns:
    the multistep condition

### addParameterTuple

    public void addParameterTuple(Parameter par)
                           throws M4Exception

  Adds a parameter to this step's parameter list on tuple level.

  Specified by:
    `addParameterTuple` in interface `Step`
  Parameters:
    `par` - the `Parameter` object representing the parameter tuple
  Throws:
    `M4Exception`

### removeParameterTuple

    public boolean removeParameterTuple(Parameter par)
                                 throws M4Exception

  Removes a parameter from this step's parameter list on tuple level.

  Specified by:
    `removeParameterTuple` in interface `Step`
  Parameters:
    `par` - the `Parameter` object representing the parameter tuple
  Returns:
    `true` iff the object was part of the parameter list and could be removed
  Throws:
    `M4Exception`

### removeAllParameterTuples

    public void removeAllParameterTuples()
                                  throws M4Exception

  Specified by:
    `removeAllParameterTuples` in interface `Step`
  Throws:
    `M4Exception`

### removeParameter

    public void removeParameter(java.lang.String parName)
                         throws M4Exception

  Specified by:
    `removeParameter` in interface `Step`
  Throws:
    `M4Exception`

### setLoopCount

    public void setLoopCount(int lc)
                      throws M4Exception

  Setter method.

  Specified by:
    `setLoopCount` in interface `Step`
  Parameters:
    `lc` - the new loop count
  Throws:
    `M4Exception`

### setMultiStepCondition

    public void setMultiStepCondition(java.lang.String msc)

  Setter method.

  Specified by:
    `setMultiStepCondition` in interface `Step`
  Parameters:
    `msc` - The new multistep condition

### getTheCase

    public Case getTheCase()

  Getter method.

  Specified by:
    `getTheCase` in interface `Step`
  Returns:
    this step's case

### getReversedStep

    public Step getReversedStep()
                         throws M4Exception

  Returns the step whose feature construction is reversed by this step, or null if no such step exists.

  Specified by:
    `getReversedStep` in interface `Step`
  Returns:
  Throws:
    `M4Exception`

### getParameterTuples

    public java.util.Collection getParameterTuples()
                                            throws M4Exception

  Active getter for the parameters of this `Step` in tuple-wise form (not aggregated by `OpParam` arrays!).

  Specified by:
    `getParameterTuples` in interface `Step`
  Returns:
    Returns a Collection of `Parameter` objects
  Throws:
    `M4Exception`

### getSuccessors

    public java.util.Collection getSuccessors()
                                       throws M4Exception

  Active getter for this `Step`'s successors.

  Specified by:
    `getSuccessors` in interface `Step`
  Returns:
    `Collection` of dependent `Step` objects
  Throws:
    `M4Exception`

### addSuccessor

    public void addSuccessor(Step step)
                      throws M4Exception

  This method should only be called from the method `Case.addStepDependency(Step, Step)`! Please use that method instead of this one, because it also efficiently reorders the steps! Adds a `Step` to this `Step`'s `Collection` of dependent `Step`s.

  Specified by:
    `addSuccessor` in interface `Step`
  Parameters:
    `step` - the `Step` to add
  Throws:
    `M4Exception`

### primitiveAddSuccessor

    public void primitiveAddSuccessor(Step step)
                               throws M4Exception

  Same as `addSuccessor(Step) but without setting any of the dirty flags. This method should only be used while loading or if you know what you are doing!

  `
  Throws:
    `M4Exception`

### removeSuccessor

    public boolean removeSuccessor(Step step)
                            throws M4Exception

  Removes a `Step` from this `Step`'s `Collection` of dependent `Step`s.

  Specified by:
    `removeSuccessor` in interface `Step`
  Parameters:
    `step` - the `Step` to remove
  Returns:
    `true` iff the `Step` was found in the `Collection` and could be successfully removed
  Throws:
    `M4Exception`

### removeSuccessor

    public boolean removeSuccessor(java.lang.String name)
                            throws M4Exception

  Removes a `Step` from this `Step`'s `Collection` of dependent `Step`s.

  Specified by:
    `removeSuccessor` in interface `Step`
  Parameters:
    `name` - the name of the step to remove
  Returns:
    `true` iff the `Step` was found in the `Collection` and could be successfully removed
  Throws:
    `M4Exception`

### dependencyExists

    public boolean dependencyExists(Chain toChain)
                             throws M4Exception

  Description copied from interface: `Step`
  Checks if this step has a successor among any of the steps in the given chain, including steps in any direct or indirect subchain of the given chain.

  Specified by:
    `dependencyExists` in interface `Step`
  Parameters:
    `toChain` - the given chain
  Returns:
    TRUE iff this step has a successor among any of the steps in the given chain.
  Throws:
    `M4Exception`
  See Also:
    `Step.dependencyExists(Chain)`

### isRelationallyValid

    public boolean isRelationallyValid()

  Specified by:
    `isRelationallyValid` in interface `Step`

### isSuccessorOf

    public boolean isSuccessorOf(Step previousStep)
                          throws M4Exception

  Description copied from interface: `Step`
  Returns TRUE if this Step is a direct or indirect successor of the given Step, according to the step transitions (step dependencies).

  Specified by:
    `isSuccessorOf` in interface `Step`
  Parameters:
    `previousStep` - Possibly a predecessor of this step
  Returns:
    TRUE if this step is a direct or indirect successor of the given step
  Throws:
    `M4Exception`
  See Also:
    `Step.isSuccessorOf(Step)`

### addPredecessor

    public void addPredecessor(Step step)
                        throws M4Exception

  Specified by:
    `addPredecessor` in interface `Step`
  Throws:
    `M4Exception`
  See Also:
    `addPredecessor(Step)`

### addReversingStep

    public void addReversingStep(Step st)
                          throws M4Exception

  Description copied from interface: `Step`
  The given step is linked as reversing step to this one.

  Specified by:
    `addReversingStep` in interface `Step`
  Throws:
    `M4Exception`

### setReversedStep

    public void setReversedStep(Step reversedStep)

### materialisesOutput

    public boolean materialisesOutput()
                               throws M4Exception

  Description copied from interface: `Step`
  Returns true iff this step's operator creates a columnset for the output concept that represents a table, not a view.

  Specified by:
    `materialisesOutput` in interface `Step`
  Returns:
  Throws:
    `M4Exception`

### hasOnlyInputConceptsOfTypeDB

    public boolean hasOnlyInputConceptsOfTypeDB()
                                         throws M4Exception

  Returns true iff all input concepts of this step are of type DB.

  Specified by:
    `hasOnlyInputConceptsOfTypeDB` in interface `Step`
  Returns:
  Throws:
    `M4Exception`

### getMaximumNumberOfStepsSinceLastMaterialisation

    public int getMaximumNumberOfStepsSinceLastMaterialisation()
                                                        throws M4Exception

  Returns the greatest number of steps between this step and the last of its predecessors that materialises its output. If all direct predecessors materialise their output, or if this step uses only DB Concepts as inputs, 0 is returned. Otherwise the maximum of these results for the predecessors is increased by 1 and returned.

  Specified by:
    `getMaximumNumberOfStepsSinceLastMaterialisation` in interface `Step`
  Throws:
    `M4Exception`

### createsConceptualOutput

    public boolean createsConceptualOutput()
                                    throws M4Exception

  Some steps, like those using evaluation operators, do not produce any output concept or attribute. These steps return FALSE, all others return TRUE.

  Specified by:
    `createsConceptualOutput` in interface `Step`
  Throws:
    `M4Exception`

### isLastStepProducingConceptualOutput

    public boolean isLastStepProducingConceptualOutput()
                                                throws M4Exception

  Returns TRUE iff this step has no successors or if it has only successors that do not produce conceptual output.

  Specified by:
    `isLastStepProducingConceptualOutput` in interface `Step`
  Throws:
    `M4Exception`

### getSuccessorsUntilOutputConceptIsCreated

    public java.util.Collection getSuccessorsUntilOutputConceptIsCreated()
                                                                  throws M4Exception

  This method only works for steps that do not create an output concept. It returns an iterator of all successors of this step that use one of its input concepts as input concept, up to and including the first step that creates an output concept (on every path that starts from this step).

  Returns:
    an iterator of steps
  Throws:
    `M4Exception`

### usesAggregation

    public boolean usesAggregation()
                            throws M4Exception

  Returns true iff this step aggregates rows of its input concept

  Specified by:
    `usesAggregation` in interface `Step`
  Returns:
  Throws:
    `M4Exception`

### deleteSoon

    public void deleteSoon()
                    throws M4Exception

  Overwrites the superclass method because the output that this step creates must be deleted, too.

  Specified by:
    `deleteSoon` in interface `M4Data`
  Overrides:
    `deleteSoon` in class `GraphicalM4Object`
  Throws:
    `M4Exception`

### deleteLocal

    protected void deleteLocal()
                        throws M4Exception

  Overwrites the superclass method to ensure that the cross table entries are deleted first

  Overrides:
    `deleteLocal` in class `GraphicalM4Object`
  Throws:
    `M4Exception`

### readParametersFromDB

    public ParamDict readParametersFromDB(boolean paramsMustExist)
                                   throws M4Exception

  Reads all of this step's parameters specified in table OP_PARAM_T for the current `Step` and stores them in a parameter dictionary. This is a service method for the compiler, aggregating all parameters to arrays as specified by the corresponding `OpParam` objects!

  Parameters:
    `paramsMustExist` - If TRUE, it means that an exception ought to be thrown if not all parameters are set. This parameter serves to enable the new GUI to set the parameters initially.
  Throws:
    `M4Exception`

### getCrossReferences

    public java.util.Collection getCrossReferences()
                                            throws M4Exception

  Specified by:
    `getCrossReferences` in interface `Step`
  Specified by:
    `getCrossReferences` in interface `HasCrossReferences`
  Returns:
    a `Collection` of `Step` to `Step` dependencies for sequentializing all `Step`s before writing updates to the database.
  Throws:
    `M4Exception`

### hasCoordinates

    protected boolean hasCoordinates()

  `Step`s have coordinates.

  Specified by:
    `hasCoordinates` in class `GraphicalM4Object`

### storeLocal

    protected void storeLocal()
                       throws M4Exception

  This method stores the `Collection` of dependent `Step`s to the database (table STEPSEQUENCE_T) if there were any updates to that `Collection`.

  Overrides:
    `storeLocal` in class `GraphicalM4Object`
  Throws:
    `M4Exception`

### setSuccessors

    protected void setSuccessors(java.util.Collection newSuccessors)
                          throws M4Exception

  This method is mainly to be used by the XML deserialization mechanism, but it robust enough not to crash if the Case is not yet set, and it maintains the Steps' order within the Case by using the Case's `addStepDependency(Step, Step)` method.

  Parameters:
    `newSuccessors` - a `Collection` of successors `Step`s
  Throws:
    `M4Exception`

### removeAllM4References

    protected void removeAllM4References()
                                  throws M4Exception

  This method is to be written in a way that it can still be called during updateDatabase()! You may only set objects dirty, which are updated after and deleted before `Step`s.

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

### getDependentObjects

    public java.util.Collection getDependentObjects()
                                             throws M4Exception

  Description copied from class: `M4Data`
  This method is part of the XML-serialization and needs to be implemented by all `M4Data` sub-classes that need to be serialized.

  Specified by:
    `getDependentObjects` in interface `XmlInfo`
  Overrides:
    `getDependentObjects` in class `GraphicalM4Object`
  Returns:
    a `Collection` of all `M4Data` Java objects holding a foreign key reference to `this` object. This method must never return `null`.
  Throws:
    `M4Exception`
  See Also:
    `M4Data.getDependentObjects()`

### getM4Trash

    public java.util.Collection getM4Trash()
                                    throws M4Exception

  Active getter for the compiler's M4 Trash information.

  Specified by:
    `getM4Trash` in interface `Step`
  Returns:
    a `Collection` of `M4Data` objects created by the M4 compiler that have to be removed before this `Step` can be compiled anew.
  Throws:
    `M4Exception`

### addToTrash

    public void addToTrash(M4Data m4data)
                    throws M4Exception

  This method should only be called by the compiler after a new M4 object has been created by calling a constructor.

  Specified by:
    `addToTrash` in interface `Step`
  Parameters:
    `m4data` - the `M4Data` object to be added to the table `M4TRASH_T` for being garbage collected before compiling this `Step` or any of its predecessors.
  Throws:
    `M4Exception`

### deleteM4Trash

    public void deleteM4Trash()
                       throws M4Exception

  This method realizes the M4Compiler's garbage collection on the objects created during compilation of this `Step`.

  Specified by:
    `deleteM4Trash` in interface `Step`
  Throws:
    `M4Exception`

### addDatabaseObjectToTrash

    public void addDatabaseObjectToTrash(java.lang.String objectName,
                                         java.lang.String schemaName,
                                         java.lang.String objectType)
                                  throws M4Exception

  Helper method to store the information about a database object in the trash index

  Specified by:
    `addDatabaseObjectToTrash` in interface `Step`
  Throws:
    `M4Exception`

### deleteDbTrash

    public void deleteDbTrash()
                       throws M4Exception

  This method takes care of deleting trash objects from the business data schema.

  Specified by:
    `deleteDbTrash` in interface `Step`
  Throws:
    `M4Exception`

### isCompiled

    public boolean isCompiled()
                       throws M4Exception

  After a `Step` has been successfully compiled a flag in the M4 database is set, which is removed by the next garbage collection. This method checks, if this flag is set.

  Specified by:
    `isCompiled` in interface `Step`
  Returns:
    `true` iff this `Step` has been successfully compiled and no garbage collection involving this `Step` has been run afterwards.
  Throws:
    `M4Exception`

### setCompiled

    public void setCompiled()
                     throws M4Exception

  This method may only be called by the control structure! It marks this `Step` as successfully compiled. This information is used when it is checked for succeeding `Step`s, if all of the dependent resources are already available.

  Specified by:
    `setCompiled` in interface `Step`
  Throws:
    `M4Exception`

### getPredecessor

    public Step getPredecessor()
                        throws M4Exception

  Returns the direct predecessor.

  Throws:
    `M4Exception`
  See Also:
    `edu.udo.cs.miningmart.m4.Step#getPredecessor()`

### getAllPredecessors

    public java.util.Collection getAllPredecessors()
                                            throws M4Exception

  Returns only the DIRECT predecessors!

  Specified by:
    `getAllPredecessors` in interface `Step`
  Throws:
    `M4Exception`
  See Also:
    `getAllPredecessors()`

### getDependentReversingSteps

    public java.util.Collection getDependentReversingSteps()
                                                    throws M4Exception

  This method returns all steps that have been created automatically to reverse the attribute creation done by this step's operator. Such reversing steps are needed for deployment if the target attribute for mining has been changed.

  Specified by:
    `getDependentReversingSteps` in interface `Step`
  Returns:
    a collection of steps
  Throws:
    `M4Exception`

### exportLocal

    public java.util.Collection exportLocal(java.io.Writer out,
                                            java.util.Collection dependent)
                                     throws M4Exception,
                                            java.io.IOException

  Steps must additionally export the links to the steps that reverse them, if any reversing steps exist.

  Specified by:
    `exportLocal` in interface `XmlInfo`
  Overrides:
    `exportLocal` in class `M4Data`
  Parameters:
    `out` - a `Writer` to be passed to `export` methods of embedded objects
    `dependent` - a `Collection` to be passed to `export` methods of embedded objects
  Returns:
    a `Collection` of XML-`String`s specifying the additional attributes of this object
  Throws:
    `M4Exception`
    `java.io.IOException`

### importLocal

    public void importLocal(java.lang.String tag,
                            java.lang.String embedded)
                     throws XmlException,
                            M4Exception

  Steps may have to import the steps they reverse.

  Specified by:
    `importLocal` in interface `XmlInfo`
  Overrides:
    `importLocal` in class `M4Data`
  Parameters:
    `tag` - the tag indicating the local field to be imported
    `embedded` - the `String` between the opening and closing tag
  Throws:
    `XmlException`
    `M4Exception`

### belongsToChainOrSubChain

    public boolean belongsToChainOrSubChain(Chain theChain)
                                     throws M4Exception

  Description copied from interface: `Step`
  This method returns TRUE if this Step belongs to the given Chain, or to a direct or indirect subchain of the given Chain.

  Specified by:
    `belongsToChainOrSubChain` in interface `Step`
  Parameters:
    `theChain` - the given Chain
  Returns:
    TRUE iff this Step belongs to the given Chain or one of its (direct or indirect) subchains.
  Throws:
    `M4Exception`
  See Also:
    `Step.belongsToChainOrSubChain(Chain)`

### hasPredecessorOutsideChain

    public boolean hasPredecessorOutsideChain()
                                       throws M4Exception

  Description copied from interface: `Step`
  This method returns TRUE if this Step has a direct predecessor that does not belong to the same chain, nor one of its subchains.

  Specified by:
    `hasPredecessorOutsideChain` in interface `Step`
  Returns:
    TRUE if a predecessor of this Step exists outside this Step's Chain
  Throws:
    `M4Exception`
  See Also:
    `Step.hasPredecessorOutsideChain()`

### hasSuccessorOutsideChain

    public boolean hasSuccessorOutsideChain()
                                     throws M4Exception

  Description copied from interface: `Step`
  This method returns TRUE if this Step has a direct successor that does not belong to the same chain, nor one of its subchains.

  Specified by:
    `hasSuccessorOutsideChain` in interface `Step`
  Returns:
    TRUE if a successor of this Step exists outside this Step's Chain
  Throws:
    `M4Exception`
  See Also:
    `Step.hasSuccessorOutsideChain()`

### removePredecessor

    public void removePredecessor()
                           throws M4Exception

  Description copied from interface: `Step`
  Removes the link to the specified Predecessor.

  Specified by:
    `removePredecessor` in interface `Step`
  Throws:
    `M4Exception`
  See Also:
    `edu.udo.cs.miningmart.m4.Step#removePredecessor(String)`

### getParameterTuple

    public Parameter getParameterTuple(java.lang.String name,
                                       int loopNr)
                                throws M4Exception

  Description copied from interface: `Step`
  Return the parameter (tuple) of this step with the given name and loop number.

  Specified by:
    `getParameterTuple` in interface `Step`
  Parameters:
    `name` - the Name
    `loopNr` - the loop number as in M4
  Throws:
    `M4Exception`

### getSingleParameterObject

    public ParameterObject getSingleParameterObject(java.lang.String parameterName)

  Description copied from interface: `Step`
  Returns the parameter object of the first parameter tuple with the given name and loop number 0. NULL may be returned.

  Specified by:
    `getSingleParameterObject` in interface `Step`
  Parameters:
    `parameterName` - the name of the parameter whose parameter object is to be retrieved
  Returns:
    a ParameterObject

### createParameterTuple

    public Parameter createParameterTuple(java.lang.String name,
                                          ParameterObject object,
                                          long number,
                                          int loopNumber,
                                          java.lang.String ioType)
                                   throws M4Exception

  Description copied from interface: `Step`
  Creates a Parameter that will be connected to this Step. The name of the Parameter must be unique for this Step.

  Specified by:
    `createParameterTuple` in interface `Step`
  Parameters:
    `name` - The name for the new Parameter.
    `object` - The parameter object. It must be a Concept, Relationship , BaseAttribute, MultiColumnFeature or Value
    `number` - the parameter number
    `loopNumber` - the loop number
    `ioType` - the parameter type. Possible values are Parameter.TYPE_INPUT or Parameter.TYPE_OUTPUT
  Returns:
    The new Parameter object.
  Throws:
    `M4Exception`
  See Also:
    `Step#createParameter(String, M4Object, Operator, int, String)`

### createValueParameterTuple

    public Parameter createValueParameterTuple(java.lang.String value,
                                               java.lang.String datatype,
                                               java.lang.String name,
                                               long number,
                                               int loopNumber,
                                               java.lang.String type)
                                        throws M4Exception

  Description copied from interface: `Step`
  Creates a Parameter and a Value that will be connected to this Step. The name of the Parameter must be unique for this Step. A Value object will be created that will be connected to the created Parameter.

  Specified by:
    `createValueParameterTuple` in interface `Step`
  Parameters:
    `value` - The value for the Value Object.
    `datatype` - The datatype for the value. Use one of the predefined types available for @link DomainDatatype
    `name` - The name for the new Parameter.
    `number` - the parameter number
    `loopNumber` - the loop number
    `type` - the parameter type. Possible values are Parameter.TYPE_INPUT or Parameter.TYPE_OUTPUT
  Returns:
    The new Parameter object.
  Throws:
    `M4Exception`
  See Also:
    `Step#createValueParameter(String, String, String, Operator, int, String)`

### copy

    public Step copy(Case newCase,
                     Chain newChain)
              throws M4Exception

  Make and return a copy of this Step that is attached to the given Chain in the given Case.

  Specified by:
    `copy` in interface `Step`
  Throws:
    `M4Exception`
  See Also:
    `copy(Case, Chain)`

### getParameter

    public java.util.Collection getParameter(OpParam theOpParam,
                                             int loopNr)
                                      throws M4Exception

  Description copied from interface: `Step`
  Returns the instance of the given `OpParam` that is currently set in this Step. The returned `Collection` contains instances of `ParameterObject`s. For single parameters, only one object is contained in the collection; for array parameters, there can be more; for optional parameters, the collection can be empty.

  Specified by:
    `getParameter` in interface `Step`
  Parameters:
    `theOpParam` - an OpParam object specifying the parameter to be returned
    `loopNr` - the loop index for this parameter (ignored for non-loopable parameters)
  Returns:
    a Collection of ParameterObjects
  Throws:
    `M4Exception`
  See Also:
    `edu.udo.cs.miningmart.m4.Step#getParameter(OpParam)`

### setParameter

    public java.util.Map setParameter(OpParam theOpParam,
                                      java.util.Collection theParameterObjects,
                                      int loopNr)
                               throws M4Exception

  An empty `Collection` for `theParameterObjects` makes this method remove the parameter (as otherwise the type would be unclear, anyway). For output feature parameters the old names of the parameter objects are returned in a map from the parameters to strings.

  Specified by:
    `setParameter` in interface `Step`
  Parameters:
    `theOpParam` - an OpParam object specifying the parameter to be set
    `theParameterObjects` - a Collection of ParameterObjects
    `loopNr` - the loop index for this parameter (ignored for non-loopable parameters)
  Returns:
    a Map that may be null or empty; it maps output feature parameters to the previous names of their parameter objects (so the map is null or empty if the given OpParam is not for output feature parameters, or if no parameter objects existed previously)
  Throws:
    `M4Exception`
  See Also:
    `edu.udo.cs.miningmart.m4.Step#setParameter(OpParam, Collection)`

### handleOldInput

    public void handleOldInput()
                        throws M4Exception

  To be called after changing the input of this step; ensures that old output attributes are removed from a replaced input concept.

  Specified by:
    `handleOldInput` in interface `Step`
  Throws:
    `M4Exception`

### checkInputParameterEntries

    public boolean checkInputParameterEntries()
                                       throws M4Exception

  Description copied from interface: `Step`
  This method checks, for the current set of values of input parameters in this step, whether they fulfill all parameter contraints. If not, an exception is thrown whose message can be used by the GUI as an error message for the user. The user can then correct the corresponding parameter entry, then this method should be called again, until it returns TRUE and does not throw an exception. The method can be called before the output is created, as it will only check the validity of the input parameter values.

  Specified by:
    `checkInputParameterEntries` in interface `Step`
  Returns:
    TRUE iff the current set of input parameters is valid for this step, in terms of all constraints holding for the parameters.
  Throws:
    `M4Exception` - An exception carrying a meaningful error message, intended to direct the user to improve the parameter settings.
  See Also:
    `Step.checkInputParameterEntries()`

### checkOutputParameterEntries

    public boolean checkOutputParameterEntries()
                                        throws M4Exception,
                                               UserError

  Description copied from interface: `Step`
  This method checks, for the current set of values of output parameters in this step, whether they fulfill all parameter contraints. If not, an exception is thrown whose message can be used by the GUI as an error message for the user. The user can then correct the corresponding parameter entry, then this method should be called again, until it returns TRUE and does not throw an exception.

  Specified by:
    `checkOutputParameterEntries` in interface `Step`
  Returns:
    TRUE iff the current set of output parameters is valid for this step, in terms of all constraints holding for the parameters.
  Throws:
    `M4Exception` - An exception carrying a meaningful error message, intended to direct the user to improve the parameter settings.
    `UserError`
  See Also:
    `Step.checkOutputParameterEntries()`

### getPossibleConceptsForParam

    public java.util.Collection getPossibleConceptsForParam(OpParam opParam)
                                                     throws M4Exception

  Description copied from interface: `Step`
  This method returns a Collection of Concepts from which the feature denoted by the given OpParam must be selected. NULL is returned if no constraint specifies where to select the feature from. An empty collection is returned when there is such a specifying constraint, but the corresponding concept parameter has not been instantiated yet. For example, a feature given by 'TheTargetAttribute' is usually selected from 'TheInputConcept' but if the latter has not been chosen by the user yet, an empty collection is returned.

  Specified by:
    `getPossibleConceptsForParam` in interface `Step`
  Parameters:
    `opParam` - the `OpParam` parameter referring to an input feature.
  Returns:
    a `Collection` of the `Concept`s this feature is allowed to be selected from (due to an 'IN' constraint).
  Throws:
    `M4Exception`

### isAttribToTakeFromFromConcept

    public boolean isAttribToTakeFromFromConcept(OpParam theAttribOpParam,
                                                 OpParam theRelationOpParam)
                                          throws M4Exception

  Returns TRUE iff there is a constraint indicating that the feature parameter indicated by theAttribOpParam is to be taken from the FromConcept of the relation given by theRelationOpParam.

  Specified by:
    `isAttribToTakeFromFromConcept` in interface `Step`
  Parameters:
    `theAttribOpParam` -
    `theRelationOpParam` -
  Returns:
  Throws:
    `M4Exception`

### isAttribToTakeFromToConcept

    public boolean isAttribToTakeFromToConcept(OpParam theAttribOpParam,
                                               OpParam theRelationOpParam)
                                        throws M4Exception

  Returns TRUE iff there is a constraint indicating that the feature parameter indicated by theAttribOpParam is to be taken from the ToConcept of the relation given by theRelationOpParam.

  Specified by:
    `isAttribToTakeFromToConcept` in interface `Step`
  Parameters:
    `theAttribOpParam` -
    `theRelationOpParam` -
  Returns:
  Throws:
    `M4Exception`

### getOpParamsToSelectFeatureParamObjectsFrom

    public java.util.Collection getOpParamsToSelectFeatureParamObjectsFrom(OpParam opParam)
                                                                    throws M4Exception

  Description copied from interface: `Step`
  Whenever an input of type BaseAttribute or MultiColumnFeature is expected the possible Concepts the Features may come from are explicitly given by constraints. These constraints refer to the parameter names as used for the OpParam objects. This method returns a Collection of such OpParam names for input Concept parameters, e.g. "TheInputConcept".

  Specified by:
    `getOpParamsToSelectFeatureParamObjectsFrom` in interface `Step`
  Parameters:
    `opParam` - the `OpParam` parameter referring to an input feature.
  Returns:
    a `Collection` consisting of the `OpParam` names (Strings) of the `Concept`s this feature is allowed to be selected from (due to an 'IN' constraint).
  Throws:
    `M4Exception`

### getPossibleInputConcepts

    public java.util.Collection getPossibleInputConcepts()
                                                  throws M4Exception

  Description copied from interface: `Step`
  This method finds all Concepts that are either of type DB or are created as an output concept by a Step that precedes this Step in the chain.

  Specified by:
    `getPossibleInputConcepts` in interface `Step`
  Returns:
    a Collection of Concepts
  Throws:
    `M4Exception`

### isContainedInInputConcept

    public boolean isContainedInInputConcept(OpParam outputFeature)
                                      throws M4Exception

  This method must only be called for an output feature. It is checked whether the output feature is constrained to be IN the input concept.

  Specified by:
    `isContainedInInputConcept` in interface `Step`
  Parameters:
    `outputFeature` - the OpParam representing the output feature
  Returns:
    TRUE iff the outputFeature's name should be selected from the names of the features of the input concept; FALSE if any new name can be given to the outputFeature.
  Throws:
    `M4Exception`

### getParameterDictionary

    public ParamDict getParameterDictionary(boolean expectingAllParamsToExist)
                                     throws M4Exception

  Active getter for the parameters of this `Step` in aggregated form.

  Specified by:
    `getParameterDictionary` in interface `Step`
  Parameters:
    `expectingAllParamsToExist` - If true, the caller expects the step to be fully parameterised.
  Returns:
    Returns a ParamDict
  Throws:
    `M4Exception`

### isVisible

    public boolean isVisible(Feature theFeature)
                      throws M4Exception

  Description copied from interface: `Step`
  This method returns TRUE iff the given Feature may be displayed in the input concept, or in a list of Features to choose from for a parameter. If FALSE is returned, it means that the given Feature is constructed by a FeatureConstruction operator in a different branch of the chain of steps, thus the Feature has no meaning for this step.

  Specified by:
    `isVisible` in interface `Step`
  Parameters:
    `theFeature` - The feature for which visibility is tested
  Returns:
    TRUE iff the feature can be used in this Step
  Throws:
    `M4Exception`
  See Also:
    `Step.isVisible(Feature)`

### getCorrespondingOutputFeatures

    public java.util.Collection getCorrespondingOutputFeatures(Concept theInputConcept,
                                                               Feature theFeature)
                                                        throws M4Exception

  This method finds all features in the output concept of this step that correspond to the given feature in the given input concept of this step. If the step has no output concept, the given feature is returned in a collection.

  Specified by:
    `getCorrespondingOutputFeatures` in interface `Step`
  Parameters:
    `theInputConcept` -
    `theFeature` -
  Returns:
    all corresponding features
  Throws:
    `M4Exception`

### checkFeatureRemoval

    public java.lang.String checkFeatureRemoval(Concept theInputConcept,
                                                Feature theFeature)
                                         throws M4Exception

  This method checks if any problems with the validity of this step would occur if the given feature were removed from the given input concept of this step. A String describing the problem is returned, or NULL if no problem would occur.

  Specified by:
    `checkFeatureRemoval` in interface `Step`
  Parameters:
    `theInputConcept` - input concept in which the feature would be deleted
    `nameOfFeature` -
  Returns:
    a hypothetical error message, or NULL if no error would occur
  Throws:
    `M4Exception`

### usesLoopsForCoordination

    public boolean usesLoopsForCoordination()
                                     throws M4Exception

  Description copied from interface: `Step`
  This method returns TRUE if the coordinated parameters in this step (ab)use the loop mechanism for their coordination.

  Specified by:
    `usesLoopsForCoordination` in interface `Step`
  Returns:
    TRUE iff parameters of the coordinated parameter groups should be read and set using positive loop numbers.
  Throws:
    `M4Exception`
  See Also:
    `Step.usesLoopsForCoordination()`

### createOutput

    public void createOutput(OpParam theOpParam,
                             java.util.Collection theNames)
                      throws M4Exception

  This method must only be called if no output objects existed for this Step before! This method creates the output concept or output feature(s) for this step. What is to be created is specified by the given OpParam object. The name(s) for the new object(s) are given in the collection theNames. If there are both output concept AND output feature(s), please call this method FIRST with the concept!

  Specified by:
    `createOutput` in interface `Step`
  Parameters:
    `theOpParam` - the OpParam object specifying which output parameter is meant
    `theNames` - a Collection of Strings giving the name(s) for the new object(s)
  Throws:
    `M4Exception`

### propagateOutputChanges

    public void propagateOutputChanges()
                                throws M4Exception

  Description copied from interface: `Step`
  This method should be called after changing some outputs of this Step. It ensures that the following (depending) steps adjust their output, too.

  Specified by:
    `propagateOutputChanges` in interface `Step`
  Throws:
    `M4Exception`
  See Also:
    `Step.propagateOutputChanges()`

### adaptOutputToChangedInput

    public boolean adaptOutputToChangedInput()
                                      throws M4Exception

  This method ensures that the output parameters of this Step reflect the specification of the operator and the current instances of the input parameters. TRUE is returned iff anything in the output has changed

  Specified by:
    `adaptOutputToChangedInput` in interface `Step`
  Returns:
    TRUE iff the output has changed at all (on the conceptual level)
  Throws:
    `M4Exception`

### getKeysOfRelationshipAssertion

    public BaseAttribute[][] getKeysOfRelationshipAssertion()
                                                     throws M4Exception

  This method checks if this Step creates a relationship from or to its output concept. If no, null is returned. If yes, it checks whether the output concept and its features have been created yet. If yes, it returns the BaseAttributes that form the keys of the relationship in a two-dimensional array.

  Specified by:
    `getKeysOfRelationshipAssertion` in interface `Step`
  Returns:
    a two-dimensional array of the BaseAttributes that are the keys of the relationship created by this Step, or null
  Throws:
    `M4Exception`

### renameOutput

    public void renameOutput(OpParam theOpParam,
                             java.util.Collection theNames)
                      throws M4Exception

  This method changes the names of the output parameter objects; the latter are assumed to exist. If the input parameters of the step have also changed, call the method `updateOutput` before this one.

  Specified by:
    `renameOutput` in interface `Step`
  Parameters:
    `theOpParam` - the OpParam object specifying which output parameter is meant
    `theNames` - a Collection of Strings giving the new name(s)
  Throws:
    `M4Exception`

### getInputConceptsThatAreParameters

    public java.util.Collection getInputConceptsThatAreParameters()
                                                           throws M4Exception

  This method returns all concepts that are input concept to this step's operator. (For Join and other operators, there can be more than one input concept.) Note that concepts attached to an input relation are not returned!

  Specified by:
    `getInputConceptsThatAreParameters` in interface `Step`
  Throws:
    `M4Exception`

### getAllInputConcepts

    public java.util.Collection getAllInputConcepts()
                                             throws M4Exception

  Description copied from interface: `Step`
  This method returns all concepts that are input concept to this step's operator, even those that are attached to an input relation but not modelled by an input parameter.

  Specified by:
    `getAllInputConcepts` in interface `Step`
  Throws:
    `M4Exception`

### getAllInputRelations

    public java.util.Collection getAllInputRelations()
                                              throws M4Exception

  Returns all relations that are a parameter object of an input parameter of this Step.

  Specified by:
    `getAllInputRelations` in interface `Step`
  Returns:
    a collection of relations
  Throws:
    `M4Exception`

### getOutputConcept

    public Concept getOutputConcept()
                             throws M4Exception

  Description copied from interface: `Step`
  Returns the output concept of this step, if it exists, and NULL otherwise.

  Specified by:
    `getOutputConcept` in interface `Step`
  Returns:
    a concept or NULL
  Throws:
    `M4Exception`
  See Also:
    `Step.getOutputConcept()`

### changeInputConcept

    public void changeInputConcept(Concept oldConcept,
                                   Concept newConcept)
                            throws M4Exception

  One of the input concepts of this step is given, and is set to be the other given concept. All parameters that depend on it are changed too, if possible. For example, if this step has a parameter 'TheTargetAttribute', and the new concept has an attribute whose name equals the old target attribute, the target attribute is changed to be the attribute of the new concept.

  Parameters:
    `oldConcept` - existing input concept, to be replaced
    `newConcept` - replacing input concept
  Throws:
    `M4Exception`

### getResultingDataModel

    public java.util.Collection getResultingDataModel()
                                               throws M4Exception

  Returns a collection of concepts; these concepts represent the data model that the current Case produced up to this Step.

  Specified by:
    `getResultingDataModel` in interface `Step`
  Returns:
    a collection of concepts
  Throws:
    `M4Exception`

### updateOutput

    public void updateOutput(OpParam theOpParam)
                      throws M4Exception

  This method must only be called if any input parameter of this Step was changed. It ensures consistency of the output parameter objects with the input parameter objects. If the name of the output parameter has also changed, call the method `renameOutput` afterwards.

  Specified by:
    `updateOutput` in interface `Step`
  Parameters:
    `theOpParam` - the OpParam object specifying which output parameter is meant
  Throws:
    `M4Exception`

### inputChangeCanAffectOutput

    public boolean inputChangeCanAffectOutput(OpParam theOpParam)
                                       throws M4Exception

  Returns TRUE iff a change to the given input OpParam can have any effect on the output parameters of this Step. For example, if the NewRangeMin-parameter of a Scaling-Step is changed then the output parameters are not affected. In contrast, if the number of features selected in a manual FeatureSelection step changes, then the output concept must be updated.

  Specified by:
    `inputChangeCanAffectOutput` in interface `Step`
  Parameters:
    `theOpParam` - an input OpParam of the operator of this step
  Returns:
    TRUE if the output may have to be updated if the input was updated
  Throws:
    `M4Exception`

### estimateStatisticsForOutputConcept

    public EstimatedStatistics estimateStatisticsForOutputConcept()
                                                           throws M4Exception

  Throws:
    `M4Exception`

### estimateStatisticsForOutputAttrib

    public void estimateStatisticsForOutputAttrib(EstimatedStatistics currentOutputEstimations,
                                                  BaseAttribute outputAttribute)
                                           throws M4Exception

  Throws:
    `M4Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005