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.operator
Class Unsegment

    java.lang.Object
      edu.udo.cs.miningmart.operator.ExecutableOperator
          edu.udo.cs.miningmart.operator.ConceptOperator
              edu.udo.cs.miningmart.operator.MultipleCSOperator
                  edu.udo.cs.miningmart.operator.Unsegment

public class Unsegment
extends MultipleCSOperator

This class realizes an operator for grouping segments of a `Concept` together.Applications of the operator `SegmetationStratified` usually result in several `Columnset`s for a single `Concept`. The entry in the field CS_MSBRANCH of table COLUMNSET_T specifies how each of the `Columnset`s was generated. If a set of `Columnset`s was generated by a segmentation based on a `BaseAttribute` b1, then the `Unsegment` operator performs a union operation for all `Columnsets` with the same segmentation history stored in CS_MSBRANCH, ignoring the information given for b1. Therefore b1 needs to be specified as a `Parameter` of the `Step`. Other kinds of `Segmentation` are not based on a `BaseAttribute`. These may be reversed by using predefined pseudo-attributes, like `(Random)` and `(KMeans)`, instead.

Version:
  $Id: Unsegment.java,v 1.5 2006/04/11 14:10:11 euler Exp $
Author:
  Martin Scholz

Field Summary

Fields inherited from class edu.udo.cs.miningmart.operator.ExecutableOperator
`generatedSQLDefinitions`

Constructor Summary
`Unsegment()`

Method Summary
`void` | `execute(boolean lazy)` This method is overriden in order to switch off multiple runs of the operator due to multistep support in the compiler's control structure.
`protected java.lang.String` | `generateColumns(Columnset csForOutputConcept)` Needs to be overridden !!
`java.lang.String` | `generateSQLDefinition(java.lang.String selectPart, int index)` Generates an SQL-definition unifying all `Columnset`s which belong to the same segment after unsegmenting.
`java.lang.String` | `getNewCSName(int index)` Overrides the corresponding method in `ConceptOperator` in order to beautify the output name (omitting a common "_0").
`java.lang.String` | `getTypeOfNewColumnSet(int index)` The operator creates a view.
`BaseAttribute` | `getUnsegmentAttribute()` Gets the unsegmentAttribute.
`protected boolean` | `mustCopyFeature(java.lang.String nameOfFeature)` All attributes of a view realizing a `Feature` are copied, except for the one specified for Unsegmentation.
`int` | `numberOfColumnSets()` Must return the number of ColumnSets this operator will produce.
`protected void` | `setNewCSMultiStepBranch(Columnset newCS, int index)` Overrides the corresponding method of class `ConceptOperator`.

Methods inherited from class edu.udo.cs.miningmart.operator.MultipleCSOperator
`generateColumnSetsForOp`

Methods inherited from class edu.udo.cs.miningmart.operator.ConceptOperator
`compileStatement, createMetadata, createMetadataForOneBA, createSingleColumnSet, createStatement, estimateStatistics, getInputConcept, getOutputConcept, getStringForSelection`

Methods inherited from class edu.udo.cs.miningmart.operator.ExecutableOperator
`autoPrint, checkConditions, doPrint, doPrint, executeBusinessSingleValueSqlRead, executeBusinessSingleValueSqlReadL, executeBusinessSqlRead, executeBusinessSqlWrite, executeM4SingleValueSqlRead, executeM4SingleValueSqlReadL, executeM4SqlRead, executeM4SqlWrite, getArtificalColumnName, getBusinessDbms, getHighestLoopNr, getM4Db, getM4Dbms, getM4ObjectFromCache, getName, getNextM4SequenceValue, getNumberOfLoops, getOperator, getOpParamsIterator, getParameter, getParameter, getSingleParameter, getSingleParameter, getStep, handleAssertions, isDeselectedParameter, isLoopable, isManual, isStepable, load, print, putM4ObjectToCache, showCreateStatement, storedProceduresAvailable`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Unsegment

    public Unsegment()

Method Detail

### numberOfColumnSets

    public int numberOfColumnSets()
                           throws M4CompilerError

  Description copied from class: `MultipleCSOperator`
  Must return the number of ColumnSets this operator will produce.

  Specified by:
    `numberOfColumnSets` in class `MultipleCSOperator`
  Returns:
    the number of Columnsets this operator will produce
  Throws:
    `M4CompilerError`
  See Also:
    `edu.udo.cs.miningmart.m4.core.operator.MultipleCSOperator#numberOfColumnSets()`

### getTypeOfNewColumnSet

    public java.lang.String getTypeOfNewColumnSet(int index)

  The operator creates a view.

  Specified by:
    `getTypeOfNewColumnSet` in class `ConceptOperator`
  Parameters:
    `index` - An index for MulipleCSOperators.
  Returns:
    the `String` "V"
  See Also:
    `edu.udo.cs.miningmart.m4.core.operator.ConceptOperator#getTypeOfNewColumnSet(int)`

### mustCopyFeature

    protected boolean mustCopyFeature(java.lang.String nameOfFeature)
                               throws M4CompilerError

  All attributes of a view realizing a `Feature` are copied, except for the one specified for Unsegmentation.

  Specified by:
    `mustCopyFeature` in class `ConceptOperator`
  Parameters:
    `nameOfFeature` - Name of the feature in question.
  Returns:
    TRUE if this feature should be copied to the output concept, FALSE if not.
  Throws:
    `M4CompilerError`
  See Also:
    `edu.udo.cs.miningmart.m4.core.operator.ConceptOperator#mustCopyFeature(String)`

### generateSQLDefinition

    public java.lang.String generateSQLDefinition(java.lang.String selectPart,
                                                  int index)
                                           throws M4CompilerError

  Generates an SQL-definition unifying all `Columnset`s which belong to the same segment after unsegmenting. If the statement becomes too long, then intermediate views are created in the database and used by views of higher level.

  Specified by:
    `generateSQLDefinition` in class `ConceptOperator`
  Parameters:
    `selectPart` - The String for the SELECT-part of the SQL definition to be created.
    `index` - An index for MultipleCSOperators.
  Returns:
    The SQL definition for the new ColumnSet.
  Throws:
    `M4CompilerError`
  See Also:
    `edu.udo.cs.miningmart.m4.core.operator.ConceptOperator#generateSQLDefinition(String, int)`

### getUnsegmentAttribute

    public BaseAttribute getUnsegmentAttribute()
                                        throws M4CompilerError

  Gets the unsegmentAttribute.

  Returns:
    Returns a BaseAttribute
  Throws:
    `M4CompilerError`

### generateColumns

    protected java.lang.String generateColumns(Columnset csForOutputConcept)
                                        throws M4CompilerError

  Needs to be overridden !!

  Overrides:
    `generateColumns` in class `ConceptOperator`
  Parameters:
    `csForOutputConcept` - The ColumnSet for which Columns are to be produced.
  Returns:
    A String for the "SELECT"-part of the view definition for the given ColumnSet.
  Throws:
    `M4CompilerError`
  See Also:
    `miningmart.compiler.operator.ConceptOperator#generateColumns(Columnset)`

### execute

    public void execute(boolean lazy)
                 throws UserError,
                        M4CompilerWarning,
                        M4CompilerError,
                        M4Exception,
                        java.sql.SQLException

  This method is overriden in order to switch off multiple runs of the operator due to multistep support in the compiler's control structure. You should not change this part, unless you know what you are doing!

  Overrides:
    `execute` in class `ExecutableOperator`
  Parameters:
    `lazy` - If TRUE, run the operator in lazy mode
  Returns:
    errorCode
  Throws:
    `UserError`
    `M4CompilerError`
    `java.sql.SQLException`
    `M4Exception`
    `M4CompilerWarning`
  See Also:
    `edu.udo.cs.miningmart.m4.core.operator.Operator#execute(boolean)`

### setNewCSMultiStepBranch

    protected void setNewCSMultiStepBranch(Columnset newCS,
                                           int index)
                                    throws M4CompilerError

  Overrides the corresponding method of class `ConceptOperator`. This is done in order to replace the information on multi step branching, underlying the generation of each `Columnset`.

  Overrides:
    `setNewCSMultiStepBranch` in class `ConceptOperator`
  Parameters:
    `newCS` - the Columnset that is created by this operator
    `index` - An index for MulipleCSOperators.
  Throws:
    `M4CompilerError`
  See Also:
    `edu.udo.cs.miningmart.m4.core.operator.ConceptOperator#setNewCSMultiStepBranch(Columnset, int)`

### getNewCSName

    public java.lang.String getNewCSName(int index)

  Overrides the corresponding method in `ConceptOperator` in order to beautify the output name (omitting a common "_0").

  Overrides:
    `getNewCSName` in class `ConceptOperator`
  Returns:
    the name
  See Also:
    `edu.udo.cs.miningmart.m4.core.operator.ConceptOperator#getNewCSName(int)`

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