|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.udo.cs.miningmart.m4.core.M4Object
edu.udo.cs.miningmart.m4.core.M4Data
edu.udo.cs.miningmart.m4.core.Case
Class to represent a case. Currently only the name and the related step sequence are stored!
| Field Summary | |
static java.lang.String |
ATTRIB_CASE_ID
DB level: The database attribute storing the case IDs |
static java.lang.String |
ATTRIB_CASE_MODE
DB level: The database attribute storing the mode (state) of the case |
static java.lang.String |
ATTRIB_CASE_NAME
DB level: The database attribute storing the case names |
static java.lang.String |
FINALMODE
The field value for the FINAL case mode. |
static java.lang.String |
M4_TABLE_NAME
The M4 table name storing case information. |
static M4Info |
m4Info
Cache for getM4Info() |
static java.lang.String |
TESTMODE
The field value for the TEST case mode. |
| 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.Case |
DESIGN_MODE, FINAL_MODE, TEST_MODE |
| Fields inherited from interface edu.udo.cs.miningmart.m4.utils.M4Table |
NOT_NULL |
| Constructor Summary | |
Case(DB m4Db)
|
|
| Method Summary | |
void |
addChain(Chain chain)
Adds a new Chain to this case. |
void |
addConcept(Concept con)
Adds a new Concept to this case. |
void |
addStep(Step step)
Adds a Step to this Case. |
void |
addStepDependency(Step before,
Step after)
This method adds dependencies between Steps and brings the
Steps in a sequential order again, if necessary and if they
have been in sequential order before adding the dependency. |
int |
compareTo(java.lang.Object o)
|
boolean |
containsDependency(Step before,
Step after)
Checks for a direct (explicitly added) dependency between the two Steps. |
Case |
copy()
|
Chain |
createChain(java.lang.String name)
Creates an empty Chain belonging to this Case. |
Chain |
createChain(java.lang.String name,
java.util.Collection stepsAndChains)
Creates a Chain that belongs to this Case. |
Concept |
createConcept(java.lang.String name,
java.lang.String type)
Creates an empty Concept belonging to this Case. |
Concept |
createConceptAndRelationsFromTables(java.lang.String tableName)
This method creates a Columnset and Concept for the given table/view name, and also creates a Columnset and Concept for EVERY table that is referenced from the first one by a foreign key reference, and also creates an M4 Relation for those references. |
Concept |
createConceptFromColumnset(Columnset cs)
Creates a Concept that belongs to this Case and is connected to the given Columnset. |
Concept |
createConceptFromTable(java.lang.String tableName)
Creates a Concept that belongs to this Case and that directly models a database table or view with the given name. |
Relation |
createManyToManyRelation(java.lang.String relName,
java.util.Collection fromConceptKeyAttribs,
java.util.Collection toConceptKeyAttribs,
java.lang.String crossTableName,
java.util.Collection crossLinkToFromConceptNames,
java.util.Collection crossLinkToToConceptNames)
Creates a many-to-many relation. |
java.util.Collection |
createManyToManyRelationsFromCrossTable(java.lang.String crossTableName)
Creates many-to-many relations with the given table name as cross table. |
Relation |
createOneToManyRelation(java.lang.String relName,
java.util.Collection fromConceptKeyAttribs,
java.util.Collection toConceptKeyAttribs)
Creates a one-to-many relation. |
Step |
createStep(java.lang.String name)
Creates an empty Step belonging to this Case. |
java.util.Collection |
getAllChains()
Active getter of the Chains of this Case. |
java.util.Collection |
getAllConceptNames()
Gets the names of all concepts. |
java.util.Collection |
getAllProjections()
Returns all Projections that this Case has. |
java.util.Collection |
getAllRelations()
Returns all Relations that this Case has. |
java.util.Collection |
getAllStepNames()
Returns a Collection with all Step names in the current Case. |
Chain |
getChainByName(java.lang.String name)
Retrieve a Chain by its name. |
Concept |
getConcept(java.lang.String conceptName)
|
java.util.Collection |
getConcepts()
Active getter of the Concepts of this Case. |
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 |
getDependentStepsFor(Step step)
Gets a Collection of the stepIds that are dependent on
the given step, ie must be compiled after the given step. |
java.util.Collection |
getDirectlyDependentSteps(Step step)
Gets a Collection of the steps that are directly
dependent on the given step. |
java.lang.String |
getIdAttributeName()
|
java.util.Collection |
getInputDataModel()
Returns a collection of all concepts that are used as input in some step, but not created as an output concept in this Case. |
M4Info |
getM4Info()
|
java.lang.String |
getM4TableName()
|
int |
getNumberOfSteps()
|
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.Map |
getOperatorToStepMap()
Returns a map that maps operators that occur in this case to a collection of the steps in which they occur. |
Step |
getPredecessorIdOf(Step step)
Gets the predecessor step, given the calculated sequential order. |
java.util.Iterator |
getReverseIterator()
|
Step |
getStepByName(java.lang.String name)
This method finds a Step related to this Case
by the Step's M4 name |
Step |
getStepIdNo(int i)
Gets the step i in sequential order. |
java.util.Iterator |
getStepIterator()
|
java.util.Collection |
getStepsToCompileBefore(Step step,
boolean ignoreCompiledStatusOfSteps)
This method returns a Collection of all Steps on which the given Step is dependent. |
Step |
getSuccessorOf(Step step)
Gets the successor step, given the calculated sequential order. |
java.lang.String |
getTheMode()
Get the Case mode. |
java.util.Vector |
getTheSteps()
Active getter |
java.util.Collection |
getTopLevelChains()
Active getter of the Chains of this Case. |
M4Info |
getXmlInfo()
|
int |
indexOfStep(Step step)
|
void |
print()
Method to print data about this M4Object. |
protected void |
removeAllM4References()
This method needs to be implemented by all M4Data
objects. |
void |
removeAllSteps()
All Steps of a Case will be removed including their Parameters. |
boolean |
removeChain(Chain chain)
Removes a Chain from this case. |
void |
removeChain(java.lang.String name)
Remove a Chain by its name. |
boolean |
removeConcept(Concept con)
Removes a Concept from this case. |
boolean |
removeStep(Step step)
Removes a Step and all of its dependencies from this
Case. |
void |
removeStep(java.lang.String name)
The specified Step will be removed including its Parameters. |
boolean |
removeStepDependency(Step before,
Step after)
A dependency (or edge in graph terminology) between the two Steps
is removed. |
void |
resolveChain(Chain toBeResolved)
The given chain will be resolved if it is a top level chain and if it does not have any Steps, only subchains. |
void |
setTheMode(java.lang.String newMode)
Set the Case mode. |
void |
store()
Write all M4 data pertaining to this case through to the database. |
| Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Data |
deleteLocal, deleteSoon, exportLocal, genericGetter, genericSetter, getDocumentation, getObjectsReferencingMe, getObjectsReferencingMe, getObjectTag, getValidName, getXmlIdTag, getXmlVersion, hasDeleteStatus, importLocal, isDirty, isWaitingForDelete, primitiveGetDocObject, primitiveSetDocObject, readFromDb, readFromDbLocal, removeDocObject, removeFromDb, removeSetFromDb, setDirty, setDocumentation, setId, setName, storeLocal, updateObjectsFromTable |
| Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Object |
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.M4Data |
deleteSoon, getDocumentation, getValidName, isDirty, isWaitingForDelete, setDocumentation |
| Methods inherited from interface edu.udo.cs.miningmart.m4.M4Object |
doPrint, doPrint, equals, executeBusinessSingleValueSqlRead, executeBusinessSingleValueSqlReadL, executeBusinessSqlRead, executeBusinessSqlWrite, executeM4SingleValueSqlRead, executeM4SingleValueSqlReadL, executeM4SqlRead, executeM4SqlWrite, getCasePrintObject, getId, getM4Db, getM4ObjectFromCache, getName, getNextM4SequenceValue, isNew, load, putM4ObjectToCache, replaceSpacesInName, setId, setName |
| Field Detail |
public static final java.lang.String M4_TABLE_NAME
public static final java.lang.String ATTRIB_CASE_ID
public static final java.lang.String ATTRIB_CASE_NAME
public static final java.lang.String ATTRIB_CASE_MODE
public static final java.lang.String TESTMODE
public static final java.lang.String FINALMODE
public static M4Info m4Info
| Constructor Detail |
public Case(DB m4Db)
edu.udo.cs.miningmart.m4.core.M4Data#Constructor| Method Detail |
public java.lang.String getM4TableName()
getM4TableName in interface M4TableM4Table.getM4TableName()public java.lang.String getIdAttributeName()
getIdAttributeName in interface M4TableM4Table.getIdAttributeName()public M4Info getM4Info()
getM4Info in interface M4TableM4Table.getM4Info()public M4Info getXmlInfo()
getXmlInfo in interface XmlInfoM4Info object with the information
of all XML fields of this object.XmlInfo.getXmlInfo()
public void addStepDependency(Step before,
Step after)
throws M4Exception
Steps and brings the
Steps in a sequential order again, if necessary and if they
have been in sequential order before adding the dependency.
addStepDependency in interface Casebefore - a Step part of this Caseafter - a Step part of this Case and depending
on Step before.
M4Exception
public boolean containsDependency(Step before,
Step after)
throws M4Exception
Steps.
containsDependency in interface Casetrue if the second Step directly depends on
the first one. If one of the Steps is not part of the
Case then false is returned.
M4Exception
public boolean removeStepDependency(Step before,
Step after)
throws M4Exception
Steps
is removed.
removeStepDependency in interface Casebefore - a Step part of this Caseafter - a Step part of this Case,
and depending on Step before
true iff the dependency was found and could be removed
M4Exception
protected java.util.Collection getObjectsInNamespace(java.lang.Class typeOfObjects)
throws M4Exception
M4Datanull. If a namespace could
exist but doesn't, an empty Collection is returned.
getObjectsInNamespace in class M4DatatypeOfObjects - the type of objects that form the namespace
typeOfObjects,
or null.
M4ExceptionM4Data.getObjectsInNamespace(Class)
public java.util.Collection getAllRelations()
throws M4Exception
getAllRelations in interface CaseM4Exception
public java.util.Collection getAllProjections()
throws M4Exception
M4Exception
public java.util.Map getOperatorToStepMap()
throws M4Exception
Case
getOperatorToStepMap in interface CaseM4Exception
public void setTheMode(java.lang.String newMode)
throws M4Exception
setTheMode in interface CasenewMode - The new case mode. Use the public static variables
TESTMODE and FINALMODE of this class.
M4Exceptionpublic java.lang.String getTheMode()
getTheMode in interface Casepublic void print()
M4Object
print in interface M4Objectprint in class M4ObjectM4Object.print()
public Step getStepIdNo(int i)
throws M4Exception
getStepIdNo in interface CaseM4Exception
public int getNumberOfSteps()
throws M4Exception
getNumberOfSteps in interface CaseM4Exception
public Step getPredecessorIdOf(Step step)
throws M4Exception
getPredecessorIdOf in interface Casestep - The step for which the predecessor is wanted.
M4Exception
public Step getSuccessorOf(Step step)
throws M4Exception
getSuccessorOf in interface Casestep - The step for which the successor is wanted.
M4Exception
public int indexOfStep(Step step)
throws M4Exception
indexOfStep in interface CaseSequentializer!
M4Exception
public java.util.Iterator getStepIterator()
throws M4Exception
getStepIterator in interface CaseSequentializer.
M4Exception
public java.util.Iterator getReverseIterator()
throws M4Exception
getReverseIterator in interface CaseSequentializer!
M4Exception
public java.util.Collection getDependentStepsFor(Step step)
throws M4Exception
Collection of the stepIds that are dependent on
the given step, ie must be compiled after the given step.
getDependentStepsFor in interface CaseM4Exception
public java.util.Collection getStepsToCompileBefore(Step step,
boolean ignoreCompiledStatusOfSteps)
throws M4Exception
getStepsToCompileBefore in interface Casestep - the Step whose preceding graph is returnedignoreCompiledStatusOfSteps - if TRUE, *all* Steps that lead
to the given Step are returned; if FALSE, only those starting
at the last compiled Step on each path that leads to the given Step
are returned.
M4Exception
public java.util.Collection getDirectlyDependentSteps(Step step)
throws M4Exception
Collection of the steps that are directly
dependent on the given step. This is useful for the HCI to just
visualize the explicitly stored dependencies.
getDirectlyDependentSteps in interface Casestep - The step for which the dependent steps are wanted.
null,
if the specified Step is not found.
M4Exception
public java.util.Collection getConcepts()
throws M4Exception
getConcepts in interface CaseCollection of Concepts
M4Exception
public java.util.Collection getInputDataModel()
throws M4Exception
getInputDataModel in interface CaseCollection of Concepts
M4Exception
public void addConcept(Concept con)
throws M4Exception
addConcept in interface Casecon - the new Concept
M4Exception
public boolean removeConcept(Concept con)
throws M4Exception
removeConcept in interface Casecon - the Concept to be removed
true if Concept was found and could
be removed
M4Exception
public java.util.Collection getAllChains()
throws M4Exception
getAllChains in interface CaseCollection of Chains
M4Exception
public java.util.Collection getTopLevelChains()
throws M4Exception
CasegetAllChains.
getTopLevelChains in interface CaseCollection of Chains
M4Exception
public Chain getChainByName(java.lang.String name)
throws M4Exception
Case
getChainByName in interface Casename - the Name
M4Exception
public void addChain(Chain chain)
throws M4Exception
addChain in interface Casechain - the new Chain
M4Exception
public boolean removeChain(Chain chain)
throws M4Exception
removeChain in interface Casechain - the Chain to be removed
true if Chain was found and could
be removed
M4Exception
public void removeChain(java.lang.String name)
throws M4Exception
Case
removeChain in interface Casename - the Name
M4Exception
public Step getStepByName(java.lang.String name)
throws M4Exception
Step related to this Case
by the Step's M4 name
getStepByName in interface Casename - the name of the Step object
Step or null
M4Exception
public java.util.Vector getTheSteps()
throws M4Exception
getTheSteps in interface CaseCollection of all Steps of this Case
M4Exception
public void addStep(Step step)
throws M4Exception
Step to this Case.
addStep in interface Casestep - the Step to be added
M4Exception
public boolean removeStep(Step step)
throws M4Exception
Step and all of its dependencies from this
Case.
removeStep in interface Casestep - the Step to be added
M4Exception
protected void removeAllM4References()
throws M4Exception
M4DataM4Data
objects. It has to remove all references to other
M4Objects.
removeAllM4References in class M4DataM4ExceptionM4Data.removeAllM4References()
public java.util.Collection getDependentObjects()
throws M4Exception
M4DataM4Data sub-classes that need to be serialized.
getDependentObjects in interface XmlInfogetDependentObjects in class M4DataCollection of all M4Data Java objects
holding a foreign key reference to this object.
This method must never return null.
M4ExceptionM4Data.getDependentObjects()
public void store()
throws M4Exception
Case
store in interface CaseM4ExceptionM4Object#store()
public Case copy()
throws M4Exception
copy in interface CaseM4Exception
public Step createStep(java.lang.String name)
throws M4Exception
createStep in interface CaseCreateException - when an error occurs during creation of the object.
NameExistsException - when the provided name already exists.
M4Exception
public java.util.Collection getAllStepNames()
throws M4Exception
getAllStepNames in interface CaseM4Exception
public void removeStep(java.lang.String name)
throws M4Exception
removeStep in interface CaseM4Exception
public void removeAllSteps()
throws M4Exception
removeAllSteps in interface CaseM4Exception
public Chain createChain(java.lang.String name)
throws M4Exception
createChain in interface Casename - the name to be given to the new chain
CreateException - when an error occurs during creation of the object.
NameExistsException - when the provided name already exists.
M4Exception
public Chain createChain(java.lang.String name,
java.util.Collection stepsAndChains)
throws M4Exception
createChain in interface Casename - the name to be given to the new chainstepsAndChains - a Collection of Steps
and/or Chains.
M4ExceptionCase.createChain(String, Collection)
public void resolveChain(Chain toBeResolved)
throws M4Exception
Case
resolveChain in interface CaseM4ExceptionCase.resolveChain(Chain)
public Concept createConcept(java.lang.String name,
java.lang.String type)
throws M4Exception
Case
createConcept in interface Casename - the name for the concept to be createdtype - the type of the concept (see Concept.TYPE_...)
M4ExceptionCase.createConcept(String, String)
public Concept createConceptFromTable(java.lang.String tableName)
throws M4Exception
Case
createConceptFromTable in interface CasetableName - the name of a table or view in the business schema
M4ExceptionCase.createConceptFromTable(String)
public Concept createConceptFromColumnset(Columnset cs)
throws M4Exception
Case
createConceptFromColumnset in interface Casecs - the given Columnset
M4Exception
public Concept createConceptAndRelationsFromTables(java.lang.String tableName)
throws M4Exception
createConceptAndRelationsFromTables in interface CasetableName - the given table name
M4Exception
public java.util.Collection createManyToManyRelationsFromCrossTable(java.lang.String crossTableName)
throws M4Exception
Case
createManyToManyRelationsFromCrossTable in interface CasecrossTableName -
M4Exception
public Relation createOneToManyRelation(java.lang.String relName,
java.util.Collection fromConceptKeyAttribs,
java.util.Collection toConceptKeyAttribs)
throws M4Exception
Case
createOneToManyRelation in interface CaserelName - a valid name for a new Relation in this CasefromConceptKeyAttribs - a Collection of the Features that make up the key
attributes in the FromConcepttoConceptKeyAttribs - a Collection of the Features that make up the key
attributes in the ToConcept
M4Exception
public Relation createManyToManyRelation(java.lang.String relName,
java.util.Collection fromConceptKeyAttribs,
java.util.Collection toConceptKeyAttribs,
java.lang.String crossTableName,
java.util.Collection crossLinkToFromConceptNames,
java.util.Collection crossLinkToToConceptNames)
throws M4Exception
Case
createManyToManyRelation in interface CaserelName - a valid name for a new Relation in this CasefromConceptKeyAttribs - a Collection of the Features that make up the key
attributes in the FromConcepttoConceptKeyAttribs - a Collection of the Features that make up the key
attributes in the ToConceptcrossTableName - the name of the table in the business data schema that
serves as the cross tablecrossLinkToFromConceptNames - a Collection with the names of the cross table
columns that provide the foreign key to the primary key of the FromConceptcrossLinkToToConceptNames - a Collection with the names of the cross table
columns that provide the foreign key to the primary key of the ToConcept
M4Exception
public Concept getConcept(java.lang.String conceptName)
throws M4Exception
getConcept in interface CaseM4Exception
public java.util.Collection getAllConceptNames()
throws M4Exception
Case
getAllConceptNames in interface CaseM4ExceptiongetAllConceptNames()public int compareTo(java.lang.Object o)
compareTo in interface java.lang.ComparablecompareTo in class M4ObjectComparable.compareTo(Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||