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 Concept

    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.ParameterObject
                      edu.udo.cs.miningmart.m4.core.Concept

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

public class Concept
extends ParameterObject
implements XmlInfo, Concept

This class represents an M4 Concept.

Version:
  $Id: Concept.java,v 1.10 2006/04/11 14:10:14 euler Exp $
Author:
  Martin Scholz
See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `ATTRIB_CASE_ID` DB level: The attribute storing the concepts' case IDs.
`static java.lang.String` | `ATTRIB_CONCEPT_ID` DB level: The attribute storing the concept IDs.
`static java.lang.String` | `ATTRIB_CONCEPT_NAME` DB level: The attribute storing the concept names.
`static java.lang.String` | `ATTRIB_CONCEPT_TYPE` DB level: The attribute storing the concept type.
`static java.lang.String` | `M4_TABLE_NAME` The M4 table name storing concept information.
`static M4Info` | `m4Info` Cache for getM4Info()

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.Concept
`TYPE_BASE, TYPE_DB, TYPE_MINING`

Fields inherited from interface edu.udo.cs.miningmart.m4.utils.M4Table
`NOT_NULL`

Constructor Summary
`Concept(DB m4Db)`

Method Summary
`void` | `addColumnSet(Columnset cs)` Add a columnset to this concept's columnsets.
`void` | `addFeature(Feature f)` Add a Feature (a BaseAttribute or a MultiColumnFeature) to this concept.
`void` | `addFromProjection(Projection projection)` Adds a From-Projection.
`protected void` | `addFromRelationship(Relation newRel)` Adds the given Relation to the fromRelationships of this concept.
`void` | `addSubConcept(Concept newSubConcept)` Adds a Sub Concept.
`void` | `addSuperConcept(Concept newSuperConcept)` Adds a Super Concept and check for cycles in the inheritance graph.
`void` | `addToProjection(Projection projection)` Adds a To-Projection.
`protected void` | `addToRelationship(Relation newRel)` Adds the given Relation to the toRelationships of this concept.
`void` | `connect(java.lang.String nameOfDbObject, boolean isTable, java.util.Map columnNamesForAttribs)` This method connects this Concept to a DB object, either a table or view, by creating a Columnset and Columns for the DB object and connecting this Concept's BaseAttributes to the Columns according to the information in the given Map.
`Concept` | `copy(Case newCase)` Make a copy of this Concept that is attached to the given Case.
`BaseAttribute` | `createBaseAttribute(java.lang.String name, java.lang.String datatype, java.lang.String attributeType)` Creates a BaseAttribute that is connected to this Concept.
`Columnset` | `createColumnset(java.lang.String name, java.lang.String schema, java.lang.String type)` Creates a new ColumnSet that is connected to this Concept.
`Relation` | `createFromConceptRelation(java.lang.String name, Concept toConcept)` Creates a new Relationship to which this Concept is connected as FromConcept.
`MultiColumnFeature` | `createMultiColumnFeature(java.lang.String name)` Creates a new MultiColumnFeature that is connected to this Concept.
`PrimaryKey` | `createPrimaryKey(java.util.Collection keyAttribs)` Creates a PrimaryKey for the Columnset of this Concept.
`Projection` | `createProjectionToConcept(Concept toConcept, java.lang.String nameOfProjection)` Create a new Projection from this concept to the given concept.
`void` | `deleteSoon()` Overwrites the superclass method because the columnsets and Features that belong to this concept must be deleted, too.
`java.util.Collection` | `getAllBaseAttributes()` Returns ALL BaseAttributes of this Concept, including those that directly belong to a MultiColumnFeature that belongs to this Concept, but do not belong directly to this concept.
`java.util.Collection` | `getAllMultiColumnFeatures()`
`java.util.Collection` | `getBaseAttribsNotInMcf()` Returns ONLY those BaseAttributes of this Concept that do not belong to a MultiColumnFeature.
`BaseAttribute` | `getBaseAttribute(Column theColumn)` Returns the BaseAttribute of this Concept that is connected to the given Column, if it exists.
`BaseAttribute` | `getBaseAttribute(java.lang.String name)`
`Columnset` | `getColumnset(java.lang.String name)`
`Columnset` | `getColumnSetByBranch(java.lang.String multiStepBranch)`
`java.util.Collection` | `getColumnSets()`
`java.util.Collection` | `getConceptInheritanceAsSubConcept()` Returns the Collection of ConceptInheritance objects with this Concept as a Sub-Concept
`java.util.Collection` | `getConceptInheritanceAsSuperConcept()` Returns the Collection of ConceptInheritance objects with this Concept as a Super-Concept
`Columnset` | `getCurrentColumnSet()` This method returns a specific columnset: in a compilation where multistep operators have occured, there can be more than one columnset for an input concept.
`java.lang.String` | `getCurrentSuffix()` This method returns a suffix for the current Columnset.
`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.
`EstimatedStatistics` | `getEstimatedStatistics()`
`Feature` | `getFeature(int index)` Get a specific Feature by number.
`Feature` | `getFeature(java.lang.String name)` Get a specific Feature by name
`java.lang.String` | `getFeatureNames()` Returns a String with comma-separated names of the Features of this Concept.
`java.util.Collection` | `getFeatures()`
`protected java.util.Collection` | `getGraphicallyEmbeddedObjects()`
`java.lang.String` | `getIdAttributeName()`
`M4Info` | `getM4Info()`
`java.lang.String` | `getM4TableName()`
`MultiColumnFeature` | `getMultiColumnFeature(java.lang.String name)`
`Columnset` | `getNextColumnSet()` In case of multi step support this method returns the next column set after the current one and increases the internal pointer accordingly.
`int` | `getNumberOfFeatures()` Returns the number of features that this Concept has.
`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.
`Parameter` | `getParameterWhereThisIsOutputConcept()` Return the Parameter object that represents this concept as an output concept parameter (of a certain step).
`PrimaryKey` | `getPrimaryKey()` Returns the PrimaryKey of the Columnset of this Concept.
`java.util.Collection` | `getProjectionsAsFromConcept()` Returns the From-Projections.
`java.util.Collection` | `getProjectionsAsToConcept()` Returns the To-Projections.
`Relation` | `getRelationshipFromConcept(Concept fromConcept)` Returns a Relation with this concept as the ToConcept and the given concept as the FromConcept, if such a Relation exists, and NULL otherwise.
`Relation` | `getRelationshipToConcept(Concept toConcept)` Returns a Relation with this concept as the FromConcept and the given concept as the ToConcept, if such a Relation exists, and NULL otherwise.
`java.util.Collection` | `getStepsWhereThisIsInputConcept()` Returns all Steps in the Case that use this Concept as an input concept.
`Step` | `getStepWhereThisIsOutputConcept()` Returns the Step in the Case where this Concept is created as the output concept.
`java.util.Collection` | `getSubConcepts()` This method gets the set of all sub concepts
`java.util.Collection` | `getSuperConcepts()` This method gets the set of all super concepts
`Case` | `getTheCase()` Getter method.
`Concept` | `getTheFromProjection()`
`java.util.Collection` | `getTheFromRelationships()` Returns a Collection of Relations in which this concept is the FromConcept.
`Concept` | `getTheSuperConcept()` Usually there is only one Super Concept.
`java.util.Collection` | `getTheToRelationships()` Returns a Collection of Relations in which this concept is the ToConcept.
`java.lang.String` | `getType()` Getter method.
`M4Info` | `getXmlInfo()`
`boolean` | `hasColumnset(Columnset cs)`
`protected boolean` | `hasCoordinates()` `Concept`s have coordinates.
`boolean` | `hasFeature(Feature f)`
`boolean` | `hasNextColumnSet()` In case of multi step support this method answers the question if getNextColumnSet() will succeed.
`void` | `initMultiStepSupport(java.util.Collection columnsets)` This method is invoked to initialize the support for concepts referring to multiple column sets (multi steps).
`boolean` | `isRelationallyValid()` This method returns information about the relational validity of the object.
`boolean` | `isValidSubconcept(Concept potentialSubConcept)` Checks wether the given concept has the same features as this one (correspondence of features is by name).
`void` | `primitiveSetCase(Case ca)` Primitive setter method.
`void` | `print()` Method to print data about this M4Object.
`void` | `propagateChangesToDependingConcepts()` When this Concept has changed its Features, depending concepts of later steps can be adapted with this method.
`void` | `removeAllBaseAttributes()` Removes all BaseAttributes from this Concept.
`void` | `removeAllColumnsets()` Removes all ColumnSets of this Concept.
`void` | `removeAllFeatures()` Remove all features from this concept.
`protected void` | `removeAllM4References()` This method needs to be implemented by all `M4Data` objects.
`void` | `removeAllMultiColumnFeatures()` Removes all MultiColumnFeatures from this Concept.
`void` | `removeBaseAttribute(java.lang.String name)` Removes the specified BaseAttribute from this Concept.
`boolean` | `removeColumnset(Columnset cs)` Remove a Columnset from this concept.
`void` | `removeConnection()` Removes the connection of this Concept to its current Columnset, but ONLY if this Concept is of type 'DB'.
`boolean` | `removeFeature(Feature feature)` Remove a Feature (a BaseAttribute or a MultiColumnFeature) from this concept.
`boolean` | `removeFeatureByName(java.lang.String name)` Remove a Feature (a BaseAttribute or a MultiColumnFeature) with the given name from this concept.
`boolean` | `removeFromProjection(Projection projection)` Removes a From-Projection.
`void` | `removeMultiColumnFeature(java.lang.String name)` Removes the specified MultiColumnFeature from this Concept.
`void` | `removeSubConcept(Concept theSubConcept)` Removes a Sub Concept.
`void` | `removeSuperConcept(Concept theSuperConcept)` Removes a Super Concept.
`boolean` | `removeToProjection(Projection projection)` Removes a To-Projection.
`void` | `resetColumnSets()` In case of multi step support this method resets the internal pointer to the current column set to the first one.
`void` | `setColumnSets(java.util.Collection theColumnsets)` Set the columnsets of this concept.
`void` | `setFeatures(java.util.Collection theFeatures)` Set all Features into this concept.
`void` | `setName(java.lang.String name)` Do not use spaces in Concept names, because these names are also used at the DB level for Columnset names.
`void` | `setTheCase(Case ca)` Sets the case for this concept
`void` | `setTheFromProjection(Concept newFromProjection)` Sets the From-Projection as the only From-Projection of this `Concept`
`void` | `setTheSuperConcept(Concept newSuperConcept)` Sets the Super Concept to be the only Super Concept of this Concept
`void` | `setType(java.lang.String t)` Setter method for the type of this concept.

Methods inherited from class edu.udo.cs.miningmart.m4.core.ParameterObject
`addParameterReference, getParameterReferences, removeParameterReference`

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

Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Data
`exportLocal, genericGetter, genericSetter, getDocumentation, getObjectsReferencingMe, getObjectsReferencingMe, getObjectTag, getValidName, getXmlIdTag, getXmlVersion, hasDeleteStatus, importLocal, 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`

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, getObjectTag, getXmlIdTag, getXmlVersion, importLocal`

Methods inherited from interface edu.udo.cs.miningmart.m4.ParameterObject
`addParameterReference, getParameterReferences, removeParameterReference`

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`

Field Detail

### M4_TABLE_NAME

    public static final java.lang.String M4_TABLE_NAME

  The M4 table name storing concept information.

  See Also:
    Constant Field Values

### ATTRIB_CONCEPT_ID

    public static final java.lang.String ATTRIB_CONCEPT_ID

  DB level: The attribute storing the concept IDs.

  See Also:
    Constant Field Values

### ATTRIB_CASE_ID

    public static final java.lang.String ATTRIB_CASE_ID

  DB level: The attribute storing the concepts' case IDs.

  See Also:
    Constant Field Values

### ATTRIB_CONCEPT_NAME

    public static final java.lang.String ATTRIB_CONCEPT_NAME

  DB level: The attribute storing the concept names.

  See Also:
    Constant Field Values

### ATTRIB_CONCEPT_TYPE

    public static final java.lang.String ATTRIB_CONCEPT_TYPE

  DB level: The attribute storing the concept type.

  See Also:
    Constant Field Values

### m4Info

    public static M4Info m4Info

  Cache for getM4Info()

Constructor Detail

### Concept

    public Concept(DB m4Db)

See Also:
  `edu.udo.cs.miningmart.m4.core.M4Object#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 interface: `M4Object`
  Method to print data about this M4Object.

  Specified by:
    `print` in interface `M4Object`
  Overrides:
    `print` in class `GraphicalM4Object`
  See Also:
    `Parameter.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)`

### setName

    public void setName(java.lang.String name)

  Do not use spaces in Concept names, because these names are also used at the DB level for Columnset names.

  Specified by:
    `setName` in interface `M4Object`
  Overrides:
    `setName` in class `GraphicalM4Object`
  Parameters:
    `name` - the new name to be set
  See Also:
    `M4Object.setName(String)`

### setType

    public void setType(java.lang.String t)
                 throws M4Exception

  Setter method for the type of this concept.

  Specified by:
    `setType` in interface `Concept`
  Parameters:
    `t` - the new type (one of "DB", "Base", "Mining")
  Throws:
    `M4Exception`

### deleteSoon

    public void deleteSoon()
                    throws M4Exception

  Overwrites the superclass method because the columnsets and Features that belong to this concept must be deleted, too.

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

### getType

    public java.lang.String getType()

  Getter method.

  Specified by:
    `getType` in interface `Concept`
  Returns:
    the type of this concept

### getParameterWhereThisIsOutputConcept

    public Parameter getParameterWhereThisIsOutputConcept()
                                                   throws M4Exception

  Description copied from interface: `Concept`
  Return the Parameter object that represents this concept as an output concept parameter (of a certain step).

  Specified by:
    `getParameterWhereThisIsOutputConcept` in interface `Concept`
  Returns:
    a Parameter object
  Throws:
    `M4Exception`

### getStepsWhereThisIsInputConcept

    public java.util.Collection getStepsWhereThisIsInputConcept()
                                                         throws M4Exception

  Returns all Steps in the Case that use this Concept as an input concept.

  Specified by:
    `getStepsWhereThisIsInputConcept` in interface `Concept`
  Returns:
    a Collection of Steps
  Throws:
    `M4Exception`

### getStepWhereThisIsOutputConcept

    public Step getStepWhereThisIsOutputConcept()
                                         throws M4Exception

  Returns the Step in the Case where this Concept is created as the output concept.

  Specified by:
    `getStepWhereThisIsOutputConcept` in interface `Concept`
  Returns:
    a Step
  Throws:
    `M4Exception`

### addColumnSet

    public void addColumnSet(Columnset cs)
                      throws M4Exception

  Add a columnset to this concept's columnsets.

  Specified by:
    `addColumnSet` in interface `Concept`
  Parameters:
    `cs` - the additional columnset
  Throws:
    `M4Exception`

### removeColumnset

    public boolean removeColumnset(Columnset cs)
                            throws M4Exception

  Remove a Columnset from this concept.

  Specified by:
    `removeColumnset` in interface `Concept`
  Parameters:
    `cs` - the Columnset
  Throws:
    `M4Exception`

### hasColumnset

    public boolean hasColumnset(Columnset cs)
                         throws M4Exception

  Specified by:
    `hasColumnset` in interface `Concept`
  Parameters:
    `cs` - a `Columnset`
  Returns:
    `true` if a `Columnset` with the same ID is already linked to this `Concept`
  Throws:
    `M4Exception`

### setColumnSets

    public void setColumnSets(java.util.Collection theColumnsets)
                       throws M4Exception

  Set the columnsets of this concept.

  Specified by:
    `setColumnSets` in interface `Concept`
  Parameters:
    `theColumnsets` - An array with the new columnsets.
  Throws:
    `M4Exception`

### getColumnSets

    public java.util.Collection getColumnSets()
                                       throws M4Exception

  Specified by:
    `getColumnSets` in interface `Concept`
  Returns:
    the columnsets that belong to this concept
  Throws:
    `M4Exception`

### getCurrentSuffix

    public java.lang.String getCurrentSuffix()

  This method returns a suffix for the current Columnset. See the method "getCurrentColumnset()". It is ment as a helper method for generating distinct table names, when having an input concept with multiple column sets.

  Specified by:
    `getCurrentSuffix` in interface `Concept`
  Returns:
    the index of the current Columnset as a String or the empty String if the concept has only one Columnset

### initMultiStepSupport

    public void initMultiStepSupport(java.util.Collection columnsets)

  This method is invoked to initialize the support for concepts referring to multiple column sets (multi steps). The set of column sets is stored internally and a pointer to a "current" column set is maintained, in order to ease the handling by operators.

  Specified by:
    `initMultiStepSupport` in interface `Concept`
  Parameters:
    `columnsets` - An array of column sets this concept refers to.

### getCurrentColumnSet

    public Columnset getCurrentColumnSet()
                                  throws M4Exception

  This method returns a specific columnset: in a compilation where multistep operators have occured, there can be more than one columnset for an input concept. The compiler then chooses one columnset for the step, compiles the step with that columnset, then chooses another one, compiles again and so on. This method returns the currently chosen columnset.

  Specified by:
    `getCurrentColumnSet` in interface `Concept`
  Returns:
    the current columnset as selected by the compiler
  Throws:
    `M4Exception`

### resetColumnSets

    public void resetColumnSets()

  In case of multi step support this method resets the internal pointer to the current column set to the first one.

  Specified by:
    `resetColumnSets` in interface `Concept`

### hasNextColumnSet

    public boolean hasNextColumnSet()
                             throws M4Exception

  In case of multi step support this method answers the question if getNextColumnSet() will succeed.

  Specified by:
    `hasNextColumnSet` in interface `Concept`
  Returns:
    true if and only if there is at least one more column set after the current one.
  Throws:
    `M4Exception`

### getNextColumnSet

    public Columnset getNextColumnSet()
                               throws M4Exception

  In case of multi step support this method returns the next column set after the current one and increases the internal pointer accordingly. If this method is called when hasNextColumnSet() returns false then an exception is thrown.

  Specified by:
    `getNextColumnSet` in interface `Concept`
  Returns:
    the next columnset
  Throws:
    `M4Exception`

### getTheCase

    public Case getTheCase()
                    throws M4Exception

  Getter method.

  Specified by:
    `getTheCase` in interface `Concept`
  Returns:
    the `Case` this `Concept` belongs to
  Throws:
    `M4Exception`

### setTheCase

    public void setTheCase(Case ca)
                    throws M4Exception

  Sets the case for this concept

  Specified by:
    `setTheCase` in interface `Concept`
  Parameters:
    `ca` - the `Case` this `Concept` belongs to
  Throws:
    `M4Exception`

### primitiveSetCase

    public void primitiveSetCase(Case ca)

  Primitive setter method. Do not use it!

  Parameters:
    `ca` - the `Case` object to be set

### addFeature

    public void addFeature(Feature f)
                    throws M4Exception

  Add a Feature (a BaseAttribute or a MultiColumnFeature) to this concept.

  Specified by:
    `addFeature` in interface `Concept`
  Parameters:
    `f` - the new Feature
  Throws:
    `M4Exception`

### getFeature

    public Feature getFeature(int index)
                       throws M4Exception

  Get a specific Feature by number.

  Specified by:
    `getFeature` in interface `Concept`
  Parameters:
    `index` - the number of the Feature
  Returns:
    the Feature with that index
  Throws:
    `M4Exception`

### getFeature

    public Feature getFeature(java.lang.String name)
                       throws M4Exception

  Get a specific Feature by name

  Specified by:
    `getFeature` in interface `Concept`
  Parameters:
    `name` -
  Returns:
    the Feature with that name
  Throws:
    `M4Exception`

### removeFeature

    public boolean removeFeature(Feature feature)
                          throws M4Exception

  Remove a Feature (a BaseAttribute or a MultiColumnFeature) from this concept.

  Specified by:
    `removeFeature` in interface `Concept`
  Throws:
    `M4Exception`

### removeFeatureByName

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

  Description copied from interface: `Concept`
  Remove a Feature (a BaseAttribute or a MultiColumnFeature) with the given name from this concept.

  Specified by:
    `removeFeatureByName` in interface `Concept`
  Parameters:
    `name` - the Name
  Throws:
    `M4Exception`

### setFeatures

    public void setFeatures(java.util.Collection theFeatures)
                     throws M4Exception

  Set all Features into this concept.

  Specified by:
    `setFeatures` in interface `Concept`
  Throws:
    `M4Exception`

### removeAllFeatures

    public void removeAllFeatures()
                           throws M4Exception

  Remove all features from this concept.

  Specified by:
    `removeAllFeatures` in interface `Concept`
  Throws:
    `M4Exception`

### getFeatures

    public java.util.Collection getFeatures()
                                     throws M4Exception

  Specified by:
    `getFeatures` in interface `Concept`
  Returns:
    All Features of this concept.
  Throws:
    `M4Exception`

### getFeatureNames

    public java.lang.String getFeatureNames()
                                     throws M4Exception

  Returns a String with comma-separated names of the Features of this Concept.

  Specified by:
    `getFeatureNames` in interface `Concept`
  Returns:
    a String
  Throws:
    `M4Exception`

### getNumberOfFeatures

    public int getNumberOfFeatures()
                            throws M4Exception

  Returns the number of features that this Concept has.

  Specified by:
    `getNumberOfFeatures` in interface `Concept`
  Returns:
    the number of features as an int
  Throws:
    `M4Exception`

### hasFeature

    public boolean hasFeature(Feature f)
                       throws M4Exception

  Specified by:
    `hasFeature` in interface `Concept`
  Parameters:
    `f` - a `Feature`
  Returns:
    `true` if a `Feature` with the same ID is already linked to this `Concept`
  Throws:
    `M4Exception`

### propagateChangesToDependingConcepts

    public void propagateChangesToDependingConcepts()
                                             throws M4Exception

  When this Concept has changed its Features, depending concepts of later steps can be adapted with this method. The method is not called automatically from methods addFeature or removeFeature because those methods are used too frequently during normal M4 Java administration.

  Specified by:
    `propagateChangesToDependingConcepts` in interface `Concept`
  Throws:
    `M4Exception`

### getTheFromRelationships

    public java.util.Collection getTheFromRelationships()
                                                 throws M4Exception

  Returns a Collection of Relations in which this concept is the FromConcept.

  Specified by:
    `getTheFromRelationships` in interface `Concept`
  Returns:
    Collection
  Throws:
    `M4Exception`

### getRelationshipToConcept

    public Relation getRelationshipToConcept(Concept toConcept)
                                      throws M4Exception

  Returns a Relation with this concept as the FromConcept and the given concept as the ToConcept, if such a Relation exists, and NULL otherwise.

  Specified by:
    `getRelationshipToConcept` in interface `Concept`
  Parameters:
    `toConcept` - the given ToConcept
  Returns:
    a Relation between this concept and the ToConcept or NULL
  Throws:
    `M4Exception`

### getRelationshipFromConcept

    public Relation getRelationshipFromConcept(Concept fromConcept)
                                        throws M4Exception

  Returns a Relation with this concept as the ToConcept and the given concept as the FromConcept, if such a Relation exists, and NULL otherwise.

  Specified by:
    `getRelationshipFromConcept` in interface `Concept`
  Parameters:
    `fromConcept` - the given FromConcept
  Returns:
    a Relation between this concept and the FromConcept or NULL
  Throws:
    `M4Exception`

### addFromRelationship

    protected void addFromRelationship(Relation newRel)
                                throws M4Exception

  Adds the given Relation to the fromRelationships of this concept.

  Throws:
    `M4Exception`

### addToRelationship

    protected void addToRelationship(Relation newRel)
                              throws M4Exception

  Adds the given Relation to the toRelationships of this concept.

  Throws:
    `M4Exception`

### getTheToRelationships

    public java.util.Collection getTheToRelationships()
                                               throws M4Exception

  Returns a Collection of Relations in which this concept is the ToConcept.

  Specified by:
    `getTheToRelationships` in interface `Concept`
  Returns:
    Collection
  Throws:
    `M4Exception`

### getConceptInheritanceAsSuperConcept

    public java.util.Collection getConceptInheritanceAsSuperConcept()
                                                             throws M4Exception

  Returns the Collection of ConceptInheritance objects with this Concept as a Super-Concept

  Specified by:
    `getConceptInheritanceAsSuperConcept` in interface `Concept`
  Returns:
    `Collection` of `ConceptInheritance`
  Throws:
    `M4Exception`

### getConceptInheritanceAsSubConcept

    public java.util.Collection getConceptInheritanceAsSubConcept()
                                                           throws M4Exception

  Returns the Collection of ConceptInheritance objects with this Concept as a Sub-Concept

  Specified by:
    `getConceptInheritanceAsSubConcept` in interface `Concept`
  Returns:
    `Collection` of `ConceptInheritance`
  Throws:
    `M4Exception`

### getSuperConcepts

    public java.util.Collection getSuperConcepts()
                                          throws M4Exception

  This method gets the set of all super concepts

  Specified by:
    `getSuperConcepts` in interface `Concept`
  Returns:
    a `Collection` of `Concept`s
  Throws:
    `M4Exception`

### getSubConcepts

    public java.util.Collection getSubConcepts()
                                        throws M4Exception

  This method gets the set of all sub concepts

  Specified by:
    `getSubConcepts` in interface `Concept`
  Returns:
    a `Collection` of `Concept`s
  Throws:
    `M4Exception`

### getTheSuperConcept

    public Concept getTheSuperConcept()
                               throws M4Exception

  Usually there is only one Super Concept.

  Specified by:
    `getTheSuperConcept` in interface `Concept`
  Returns:
    the first Super Concept or `null`
  Throws:
    `M4Exception`

### addSubConcept

    public void addSubConcept(Concept newSubConcept)
                       throws M4Exception

  Adds a Sub Concept.

  Specified by:
    `addSubConcept` in interface `Concept`
  Parameters:
    `newSubConcept` - The Sub Concept to add
  Throws:
    `M4Exception`

### addSuperConcept

    public void addSuperConcept(Concept newSuperConcept)
                         throws M4Exception

  Adds a Super Concept and check for cycles in the inheritance graph.

  Specified by:
    `addSuperConcept` in interface `Concept`
  Parameters:
    `newSuperConcept` - The Super Concept to add
  Throws:
    `M4Exception`

### removeSubConcept

    public void removeSubConcept(Concept theSubConcept)
                          throws M4Exception

  Description copied from interface: `Concept`
  Removes a Sub Concept.

  Specified by:
    `removeSubConcept` in interface `Concept`
  Throws:
    `M4Exception`

### removeSuperConcept

    public void removeSuperConcept(Concept theSuperConcept)
                            throws M4Exception

  Description copied from interface: `Concept`
  Removes a Super Concept.

  Specified by:
    `removeSuperConcept` in interface `Concept`
  Throws:
    `M4Exception`

### isValidSubconcept

    public boolean isValidSubconcept(Concept potentialSubConcept)
                              throws M4Exception

  Checks wether the given concept has the same features as this one (correspondence of features is by name).

  Specified by:
    `isValidSubconcept` in interface `Concept`
  Throws:
    `M4Exception`

### setTheSuperConcept

    public void setTheSuperConcept(Concept newSuperConcept)
                            throws M4Exception

  Sets the Super Concept to be the only Super Concept of this Concept

  Specified by:
    `setTheSuperConcept` in interface `Concept`
  Parameters:
    `newSuperConcept` - The Super Concept to set
  Throws:
    `M4Exception`

### createProjectionToConcept

    public Projection createProjectionToConcept(Concept toConcept,
                                                java.lang.String nameOfProjection)
                                         throws M4Exception

  Create a new Projection from this concept to the given concept. The new Projection is returned; in it, this concept is the from concept and the given concept is the to concept.

  Specified by:
    `createProjectionToConcept` in interface `Concept`
  Throws:
    `M4Exception`

### addToProjection

    public void addToProjection(Projection projection)
                         throws M4Exception

  Adds a To-Projection.

  Specified by:
    `addToProjection` in interface `Concept`
  Parameters:
    `projection` - The Projection to add with this Concept as the To-Concept
  Throws:
    `M4Exception`

### removeToProjection

    public boolean removeToProjection(Projection projection)
                               throws M4Exception

  Removes a To-Projection.

  Specified by:
    `removeToProjection` in interface `Concept`
  Parameters:
    `projection` - The Projection (with this Concept as the To-Concept) to be removed
  Returns:
    `true` if the object was found and removed from the `Collection`
  Throws:
    `M4Exception`

### addFromProjection

    public void addFromProjection(Projection projection)
                           throws M4Exception

  Adds a From-Projection.

  Specified by:
    `addFromProjection` in interface `Concept`
  Parameters:
    `projection` - The Projection to add with this Concept as the From-Concept
  Returns:
    `true` if the object was found and removed from the `Collection`
  Throws:
    `M4Exception`

### removeFromProjection

    public boolean removeFromProjection(Projection projection)
                                 throws M4Exception

  Removes a From-Projection.

  Specified by:
    `removeFromProjection` in interface `Concept`
  Parameters:
    `projection` - The Projection (with this Concept as the From-Concept) to be removed
  Throws:
    `M4Exception`

### setTheFromProjection

    public void setTheFromProjection(Concept newFromProjection)
                              throws M4Exception

  Sets the From-Projection as the only From-Projection of this `Concept`

  Specified by:
    `setTheFromProjection` in interface `Concept`
  Parameters:
    `newFromProjection` - The From-Projection to set
  Throws:
    `M4Exception`

### getTheFromProjection

    public Concept getTheFromProjection()
                                 throws M4Exception

  Specified by:
    `getTheFromProjection` in interface `Concept`
  Returns:
    the (first) `Concept` which this `Concept` is a `Projection` from.
  Throws:
    `M4Exception`

### getProjectionsAsFromConcept

    public java.util.Collection getProjectionsAsFromConcept()
                                                     throws M4Exception

  Returns the From-Projections.

  Specified by:
    `getProjectionsAsFromConcept` in interface `Concept`
  Returns:
    `Collection` of `Projection` objects
  Throws:
    `M4Exception`

### getProjectionsAsToConcept

    public java.util.Collection getProjectionsAsToConcept()
                                                   throws M4Exception

  Returns the To-Projections.

  Specified by:
    `getProjectionsAsToConcept` in interface `Concept`
  Returns:
    `Collection` of `Projection` objects
  Throws:
    `M4Exception`

### 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 `M4Object`s.

  Overrides:
    `removeAllM4References` in class `ParameterObject`
  Throws:
    `M4Exception`
  See Also:
    `M4Data.removeAllM4References()`

### hasCoordinates

    protected boolean hasCoordinates()

  `Concept`s have coordinates.

  Specified by:
    `hasCoordinates` in class `GraphicalM4Object`

### getGraphicallyEmbeddedObjects

    protected java.util.Collection getGraphicallyEmbeddedObjects()
                                                          throws M4Exception

  Throws:
    `M4Exception`
  See Also:
    `GraphicalM4Object#getGraphicallyEbeddedObjects()`

### 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 `ParameterObject`
  Throws:
    `M4Exception`
  See Also:
    `M4Data.getDependentObjects()`

### isRelationallyValid

    public boolean isRelationallyValid()
                                throws M4Exception

  This method returns information about the relational validity of the object. A concept is valid if it has at least one BA, and - for type DB: it has a Columnset - for type MINING: it is an output concept somewhere

  Specified by:
    `isRelationallyValid` in interface `Concept`
  Throws:
    `M4Exception`

### copy

    public Concept copy(Case newCase)
                 throws M4Exception

  Make a copy of this Concept that is attached to the given Case.

  Specified by:
    `copy` in interface `Concept`
  Throws:
    `M4Exception`

### createBaseAttribute

    public BaseAttribute createBaseAttribute(java.lang.String name,
                                             java.lang.String datatype,
                                             java.lang.String attributeType)
                                      throws M4Exception

  Creates a BaseAttribute that is connected to this Concept. The name of the BaseAttribute must be unique within the Concept. The attributeType should also be provided or will be set to BASE if omitted. Use the predefined constants to set the datatype.

  Specified by:
    `createBaseAttribute` in interface `Concept`
  Throws:
    `M4Exception` - when an error occurs during creation of the object

### createColumnset

    public Columnset createColumnset(java.lang.String name,
                                     java.lang.String schema,
                                     java.lang.String type)
                              throws M4Exception

  Creates a new ColumnSet that is connected to this Concept. The name must be unique within this Concept. The schema and type are also required. Use the predefined types for the type parameter.

  Specified by:
    `createColumnset` in interface `Concept`
  Throws:
    `M4Exception` - when an error occurs during creation of the object.

### createPrimaryKey

    public PrimaryKey createPrimaryKey(java.util.Collection keyAttribs)
                                throws M4Exception

  Description copied from interface: `Concept`
  Creates a PrimaryKey for the Columnset of this Concept.

  Specified by:
    `createPrimaryKey` in interface `Concept`
  Parameters:
    `keyAttribs` - a Collection of BaseAttributes, each of which is part of the PrimaryKey
  Returns:
    the new PrimaryKey
  Throws:
    `M4Exception`

### getPrimaryKey

    public PrimaryKey getPrimaryKey()
                             throws M4Exception

  Description copied from interface: `Concept`
  Returns the PrimaryKey of the Columnset of this Concept.

  Specified by:
    `getPrimaryKey` in interface `Concept`
  Returns:
  Throws:
    `M4Exception`

### connect

    public void connect(java.lang.String nameOfDbObject,
                        boolean isTable,
                        java.util.Map columnNamesForAttribs)
                 throws M4Exception

  Description copied from interface: `Concept`
  This method connects this Concept to a DB object, either a table or view, by creating a Columnset and Columns for the DB object and connecting this Concept's BaseAttributes to the Columns according to the information in the given Map. If this Concept is not of type 'DB', the method will do nothing.

  Specified by:
    `connect` in interface `Concept`
  Parameters:
    `nameOfDbObject` - name of a table or view in the business data schema
    `isTable` - TRUE iff 'nameOfDbObject' refers to a table (otherwise a view is assumed)
    `columnNamesForAttribs` - a Map that maps every BaseAttribute of this Concept to a String. The String is the name of the Column that this BaseAttribute will be connected to.
  Throws:
    `M4Exception`
  See Also:
    `Concept.connect(String, boolean, Map)`

### removeConnection

    public void removeConnection()
                          throws M4Exception

  Description copied from interface: `Concept`
  Removes the connection of this Concept to its current Columnset, but ONLY if this Concept is of type 'DB'.

  Specified by:
    `removeConnection` in interface `Concept`
  Throws:
    `M4Exception`
  See Also:
    `Concept.removeConnection()`

### createFromConceptRelation

    public Relation createFromConceptRelation(java.lang.String name,
                                              Concept toConcept)
                                       throws M4Exception

  Creates a new Relationship to which this Concept is connected as FromConcept. The name of the Relationship in combination with the name of the ToConcept must be unique for the Concept. This allows a Concept to have Relationships to other Concepts with the same name. NOTE: Only the conceptual level is created, but no keys! A new Relationship should always be created as a FromConceptRelationship; no method is provided to create a ToConceptRelationship.

  Specified by:
    `createFromConceptRelation` in interface `Concept`
  Parameters:
    `name` - the name for the relationship
    `toConcept` - the Concept the relationship should point to
  Throws:
    `M4Exception` - when an error occurs during creation of the object.

### createMultiColumnFeature

    public MultiColumnFeature createMultiColumnFeature(java.lang.String name)
                                                throws M4Exception

  Creates a new MultiColumnFeature that is connected to this Concept. The name must be unique within this Concept.

  Specified by:
    `createMultiColumnFeature` in interface `Concept`
  Throws:
    `M4Exception` - when an error occurs during creation of the object.

### getBaseAttribute

    public BaseAttribute getBaseAttribute(java.lang.String name)
                                   throws M4Exception

  Specified by:
    `getBaseAttribute` in interface `Concept`
  Throws:
    `M4Exception`

### getBaseAttribute

    public BaseAttribute getBaseAttribute(Column theColumn)
                                   throws M4Exception

  Description copied from interface: `Concept`
  Returns the BaseAttribute of this Concept that is connected to the given Column, if it exists. Otherwise null is returned.

  Specified by:
    `getBaseAttribute` in interface `Concept`
  Parameters:
    `theColumn` - the Column
  Returns:
    a BaseAttribute of this Concept, or null
  Throws:
    `M4Exception`

### getAllBaseAttributes

    public java.util.Collection getAllBaseAttributes()
                                              throws M4Exception

  Description copied from interface: `Concept`
  Returns ALL BaseAttributes of this Concept, including those that directly belong to a MultiColumnFeature that belongs to this Concept, but do not belong directly to this concept.

  Specified by:
    `getAllBaseAttributes` in interface `Concept`
  Throws:
    `M4Exception`

### getBaseAttribsNotInMcf

    public java.util.Collection getBaseAttribsNotInMcf()
                                                throws M4Exception

  Description copied from interface: `Concept`
  Returns ONLY those BaseAttributes of this Concept that do not belong to a MultiColumnFeature.

  Specified by:
    `getBaseAttribsNotInMcf` in interface `Concept`
  Throws:
    `M4Exception`

### removeBaseAttribute

    public void removeBaseAttribute(java.lang.String name)
                             throws M4Exception

  Removes the specified BaseAttribute from this Concept. The BaseAttribute is also removed from the M4 Schema if this Concept is the last Concept it belongs to.

  Throws:
    `M4Exception`

### removeAllBaseAttributes

    public void removeAllBaseAttributes()
                                 throws M4Exception

  Removes all BaseAttributes from this Concept. The BaseAttributes will be deleted from the M4 Schema if this is the last Concept they are part of.

  Throws:
    `M4Exception`

### getAllMultiColumnFeatures

    public java.util.Collection getAllMultiColumnFeatures()
                                                   throws M4Exception

  Specified by:
    `getAllMultiColumnFeatures` in interface `Concept`
  Throws:
    `M4Exception`

### removeMultiColumnFeature

    public void removeMultiColumnFeature(java.lang.String name)
                                  throws M4Exception

  Removes the specified MultiColumnFeature from this Concept. The MultiColumnFeature is also removed from the M4 Schema.

  Throws:
    `M4Exception`

### removeAllMultiColumnFeatures

    public void removeAllMultiColumnFeatures()
                                      throws M4Exception

  Removes all MultiColumnFeatures from this Concept. The MultiColumnFeatures will be deleted from the M4 Schema.

  Throws:
    `M4Exception`

### getMultiColumnFeature

    public MultiColumnFeature getMultiColumnFeature(java.lang.String name)
                                             throws M4Exception

  Throws:
    `M4Exception`

### removeAllColumnsets

    public void removeAllColumnsets()
                             throws M4Exception

  Removes all ColumnSets of this Concept. The objects are removed from the M4 Schema.

  Specified by:
    `removeAllColumnsets` in interface `Concept`
  Throws:
    `M4Exception`

### getColumnset

    public Columnset getColumnset(java.lang.String name)
                           throws M4Exception

  Specified by:
    `getColumnset` in interface `Concept`
  Returns:
    a ColumnSet specified by the given name or null if not found.
  Throws:
    `M4Exception`

### getColumnSetByBranch

    public Columnset getColumnSetByBranch(java.lang.String multiStepBranch)
                                   throws M4Exception

  Returns:
    a ColumnSet specified by the given multiStepBranch or null if not found.
  Throws:
    `M4Exception`

### getEstimatedStatistics

    public EstimatedStatistics getEstimatedStatistics()
                                               throws M4Exception

  Specified by:
    `getEstimatedStatistics` in interface `Concept`
  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