edu.udo.cs.miningmart.compiler.utils
Class PivotizeWithoutAggregation

java.lang.Object
  extended byedu.udo.cs.miningmart.compiler.utils.AttributeCreationTool
      extended byedu.udo.cs.miningmart.compiler.utils.PivotizeWithoutAggregation

public class PivotizeWithoutAggregation
extends AttributeCreationTool

A tool similar to Binarify. It creates a Step that uses the GenericFeatureConstruction operator to pivotize one attribute. Pivotizing means that for each value that occurs in the column of an "index" attribute, a new attribute is created. This new attribute contains the value of the pivotized attribute iff the index attribute took the value that corresponds to the new attribute. Otherwise the new attribute contains NULL. Example (I = index attribute, P = pivotised attribute) Input Output ID | I | P ID | P_M | P_F ---------- -------------- 1 | M | 4 => 1 | 4 | NULL 2 | M | 2 2 | 2 | NULL 3 | F | 6 3 | NULL| 6

Version:
$Id: PivotizeWithoutAggregation.java,v 1.3 2006/04/11 14:10:18 euler Exp $
Author:
Timm Euler

Field Summary
 
Fields inherited from class edu.udo.cs.miningmart.compiler.utils.AttributeCreationTool
myCase, myChain, myDB, myIndexBA, myIndexColumn, myInputColumnset, myInputConcept, myOperator, myStep, numOfLoops
 
Constructor Summary
PivotizeWithoutAggregation(Concept inputConcept, BaseAttribute indexBA, BaseAttribute pivotBA, Chain chain)
          Constructor.
 
Method Summary
protected  java.lang.String getConceptualDatatypeNameOfNewAttributes()
           
protected  int getIdOfOperator()
           
protected  java.lang.String getNameOfNewStep()
           
protected  java.lang.String getNameOfOperator()
           
protected  void insertSpecificParameters(int loopNr, int parNr, java.lang.String targetValS)
          Create specific parameters for the new Step for the given loop number, starting with the given parameter number.
 
Methods inherited from class edu.udo.cs.miningmart.compiler.utils.AttributeCreationTool
createInputValueParameter, createLoopForBa, createOutputBAs, createParameterForNewStep, createStep, execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PivotizeWithoutAggregation

public PivotizeWithoutAggregation(Concept inputConcept,
                                  BaseAttribute indexBA,
                                  BaseAttribute pivotBA,
                                  Chain chain)
                           throws M4Exception
Constructor. We expect the input concept, the index attribute, the attribute to be pivotised and the chain to which the new step will belong.

Parameters:
inputConcept - The Input Concept for the Step to be created.
indexBA - The index attribute
pivotBA - The attribute to be pivotised
chain - The Chain to which to add the new Step
Method Detail

insertSpecificParameters

protected void insertSpecificParameters(int loopNr,
                                        int parNr,
                                        java.lang.String targetValS)
                                 throws M4Exception
Description copied from class: AttributeCreationTool
Create specific parameters for the new Step for the given loop number, starting with the given parameter number.

Specified by:
insertSpecificParameters in class AttributeCreationTool
Parameters:
loopNr - The loop number for which the specific parameters must be created
parNr - The first parameter number to be used; increment it for each additional parameter
targetValS - The value of the index attribute for the given loop
Throws:
M4Exception
See Also:
miningmart.compiler.utils.AttributeCreationTool#insertSpecificParameters(int, int, String)

getIdOfOperator

protected int getIdOfOperator()
Specified by:
getIdOfOperator in class AttributeCreationTool
Returns:
the M4 Id of the operator that the new step uses
See Also:
miningmart.compiler.utils.AttributeCreationTool#getIdOfOperator()

getNameOfOperator

protected java.lang.String getNameOfOperator()
Specified by:
getNameOfOperator in class AttributeCreationTool
Returns:
the Name of the operator that the new step uses
See Also:
miningmart.compiler.utils.AttributeCreationTool#getNameOfOperator()

getNameOfNewStep

protected java.lang.String getNameOfNewStep()
Specified by:
getNameOfNewStep in class AttributeCreationTool
Returns:
the name for the new Step; the Step number will be put before it
See Also:
miningmart.compiler.utils.AttributeCreationTool#getNameOfNewStep()

getConceptualDatatypeNameOfNewAttributes

protected java.lang.String getConceptualDatatypeNameOfNewAttributes()
                                                             throws M4Exception
Specified by:
getConceptualDatatypeNameOfNewAttributes in class AttributeCreationTool
Returns:
the name of the conceptual datatype that the new attributes will be given
Throws:
M4Exception
See Also:
miningmart.compiler.utils.AttributeCreationTool#getConceptualDatatypeNameOfNewAttributes()


Copyright © 2001-2005