|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.udo.cs.miningmart.m4.M4Interface
This is the main interface object. This is the starting point for using the M4Interface.
Nested Class Summary | |
class |
M4Interface.CaseLockedException
This exception is thrown when a Case is locked. |
Field Summary | |
static java.lang.String[] |
AVAILABLE_MATCHERS
A public string array that declares the types of schema matchers that are available. |
protected static Case |
currentCase
|
protected static CompilerAccess |
currentCompilerAccess
|
static java.lang.String |
MATCHER_EDITDISTANCE
|
static java.lang.String |
MATCHER_NGRAM
|
static java.lang.String |
MATCHER_SIMPLE
Public constants that represent different schema matching algorithms |
static java.lang.String |
MATCHER_SOUNDEX
|
static Print |
print
|
static java.lang.String |
SYSTEM_PROP_DB_CONFIG_PATH
Name of the system property specifying the path to the dbConfig file |
static java.lang.String |
SYSTEM_PROP_PRINT_VERBOSITY
Name of the system property setting the print verbosity of log outputs |
Constructor Summary | |
M4Interface()
|
Method Summary | |
abstract boolean |
canRemoveM4Access(java.lang.String caseName)
Check if the M4Access for the specified Case can be removed. |
abstract Case |
createCase(java.lang.String name,
boolean setAsCurrentCase)
Creates a new Case. |
abstract Operator |
createOperator(java.lang.String name)
Creates a new Operator. |
abstract boolean |
existsCase(java.lang.String name)
Checks wether a case with this name exists. |
abstract Case |
findCaseForReadOnlyAccess(java.lang.String name,
boolean setAsCurrent)
Returns a Case for read-only access. |
abstract Case |
findCaseForUpdate(java.lang.String name,
boolean setAsCurrent)
Returns a Case and locks it so it may be modified. |
abstract java.util.Collection |
findConnection(Concept theConcept,
java.util.Collection namesOfDbObjects,
java.lang.String matcher)
Connects the given concept with one of the Db Objects (tables or views) whose names are given in the second parameter. |
abstract Operator |
findOperator(java.lang.String name)
Returns an Operator that may be changed. |
abstract java.util.Collection |
getAllCaseNames()
Find all Case names. |
abstract java.util.Collection |
getAllOperatorNames()
Find all Operator names. |
static Case |
getCurrentCase()
Returns the Case that is used as the context for methods of the M4Interface that are Case dependent. |
static CompilerAccess |
getCurrentCompilerAccess()
Returns the CompilerAccess that is used as the context for methods of the M4Interface that are CompilerAccess dependent. |
static M4Interface |
getInstance()
Creates an instance of the M4Interface class. |
abstract DB |
getM4db()
|
abstract java.util.Collection |
getNamesOfBusinessTablesAndViews()
|
abstract OperatorGroup |
getOperatorGroup()
|
abstract boolean |
isBusinessTable(java.lang.String name)
Checks wether a table in the business schema with this name exists. |
abstract boolean |
isBusinessView(java.lang.String name)
Checks wether a view in the business schema with this name exists. |
abstract boolean |
isCaseLockedForReading(java.lang.String name)
Check if case can be locked for reading. |
abstract boolean |
isCaseLockedForWriting(java.lang.String name)
Check if case can be locked for writing. |
abstract void |
releaseCase(java.lang.String name)
Release a Case for access. |
abstract void |
releaseCaseWithoutStoring(java.lang.String name)
Release a Case from access lock, but do not store it to the DB even if it has been changed. |
static void |
removeCurrentCase()
Makes the M4Interface forget its current case. |
static void |
setCurrentCase(Case currentCase)
Some methods of the M4Interface are Case dependend. |
static void |
setCurrentCompilerAccess(CompilerAccess currentCompilerAccess)
Some methods of the M4Interface are CompilerAccess dependend. |
protected static void |
setInstance(M4Interface m4Instance)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static Case currentCase
protected static transient CompilerAccess currentCompilerAccess
public static transient Print print
public static final java.lang.String SYSTEM_PROP_PRINT_VERBOSITY
public static final java.lang.String SYSTEM_PROP_DB_CONFIG_PATH
public static final java.lang.String MATCHER_SIMPLE
public static final java.lang.String MATCHER_SOUNDEX
public static final java.lang.String MATCHER_EDITDISTANCE
public static final java.lang.String MATCHER_NGRAM
public static final java.lang.String[] AVAILABLE_MATCHERS
Constructor Detail |
public M4Interface()
Method Detail |
public static M4Interface getInstance()
protected static void setInstance(M4Interface m4Instance)
public abstract Case createCase(java.lang.String name, boolean setAsCurrentCase) throws M4Exception
name
- The name of the Case that should be created.setAsCurrentCase
- If this parameter is set to TRUE, the newly created
case is set as the current case, and can be retrieved using getCurrentCase().
Otherwise the only handle to the new case is the returned object.
M4Exception
public abstract Operator createOperator(java.lang.String name) throws M4Exception
name
- The name of the Operator that should be created.
CreateException
- when an error occurs during creation of the object.
NameExistsException
- when the provided name already exists.
M4Exception
public abstract java.util.Collection getAllCaseNames()
public abstract java.util.Collection getNamesOfBusinessTablesAndViews() throws M4Exception
M4Exception
public abstract boolean isBusinessTable(java.lang.String name) throws M4Exception
name
- the name of the table
M4Exception
public abstract boolean isBusinessView(java.lang.String name) throws M4Exception
name
- the name of the view
M4Exception
public abstract boolean existsCase(java.lang.String name)
public abstract DB getM4db()
public abstract OperatorGroup getOperatorGroup()
public abstract Operator findOperator(java.lang.String name)
name
- The name of the Operator that should be retrieved.
public abstract java.util.Collection getAllOperatorNames()
public abstract Case findCaseForReadOnlyAccess(java.lang.String name, boolean setAsCurrent) throws M4Interface.CaseLockedException
name
- The name of the Case that should be retrieved.setAsCurrent
- Boolean indicating retrieved case should be set as current.
The current Case is used as the context for M4Interface methods that depend
on the Case. Normally this value should be set to true. Note that the
current Case context can also be set using the setCurrentCase
method.
M4Interface.CaseLockedException
- when a Case is already locked for reading.public abstract Case findCaseForUpdate(java.lang.String name, boolean setAsCurrent) throws M4Interface.CaseLockedException
name
- The name of the Case that should be retrieved.setAsCurrent
- If the retrieved Case should be set as the current Case
context for M4Interface methods that depend on the Case. Normally this
value should be set to true. Note that the current Case context can also
be set using the setCurrentCase
method.
M4Interface.CaseLockedException
- when a Case is already locked for writing.public abstract boolean canRemoveM4Access(java.lang.String caseName)
Case
can be removed.
public abstract boolean isCaseLockedForReading(java.lang.String name)
public abstract boolean isCaseLockedForWriting(java.lang.String name)
public abstract void releaseCase(java.lang.String name)
name
- the name of the case to be releasedpublic abstract void releaseCaseWithoutStoring(java.lang.String name)
name
- the name of the case to be releasedpublic static Case getCurrentCase()
public static void setCurrentCase(Case currentCase)
getCaseForReadOnly
or
getCaseForUpdate
methods.
currentCase
- The Case to be set as the current one.public static void removeCurrentCase()
public static void setCurrentCompilerAccess(CompilerAccess currentCompilerAccess)
currentCompilerAccess
- The CompilerAccess to be set as the current one.public static CompilerAccess getCurrentCompilerAccess()
public abstract java.util.Collection findConnection(Concept theConcept, java.util.Collection namesOfDbObjects, java.lang.String matcher) throws M4Exception
theConcept
- Concept to be connectednamesOfDbObjects
- Names of business schema tables and views among which
to select the best-matching onematcher
- The type of schema matching algorithm to be used (must be one of
the corresponding public constants of this class)
M4Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |