Package de.uni_trier.wi2.procake
Class CakeInstance
java.lang.Object
de.uni_trier.wi2.procake.CakeInstance
Main starter class for ProCAKE. It is used to initially load model, similarity model and case
data.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addSimilarityModel
(String path, String name) Initializes and builds the similarity model with the given name.static void
addSimModel
(String path) Add Similarity Measures in SimilarityModel to default SimilarityModel.static void
extendModel
(InputStream streamModel, String modelName) Adds an input stream containing a model definition (model.xml) to the existing loaded model.static void
extendModel
(String pathModel, String modelName) Adds a file containing a model definition (model.xml) to the existing loaded model.static void
extendSimilarityModel
(InputStream streamSimModel, String modelName) Adds an input stream containing a similarity model definition (sim.xml) to the existing loaded similarity model.static void
extendSimilarityModel
(String pathSimModel, String modelName) Adds a file containing a similarity model definition (sim.xml) to the existing loaded similarity model.static DependencyModel
Method, that returns the dependency model.static CakeInstance
Getter for the fieldinstance
.static DependencyModel
initDefaultDependencyModel
(String dependencyModelPath, WriteableObjectPool casebase) Method, that initializes the dependency model from an XML file.static boolean
Check whether an instance of ProCAKE has been started already.<T extends DataObject>
WriteableObjectPool<T>run()
run.static <T extends DataObject>
WriteableObjectPool<T>start()
start.static <T extends DataObject>
WriteableObjectPool<T>start
(InputStream inputStreamCompositon) start.static <T extends DataObject>
WriteableObjectPool<T>start
(InputStream inputStreamCompositon, InputStream inputStreamCasebase) start.static <T extends DataObject>
WriteableObjectPool<T>start
(InputStream composition, InputStream model, InputStream[] simModels, InputStream casebase, InputStream transformationConfig, boolean reuseDataClassReferencesAtRestart) start.static <T extends DataObject>
WriteableObjectPool<T>start
(InputStream inputStreamCompositon, InputStream inputStreamModel, InputStream inputStreamSimModel, InputStream inputStreamCasebase) start.static <T extends DataObject>
WriteableObjectPool<T>start
(InputStream inputStreamCompositon, InputStream inputStreamModel, InputStream inputStreamSimModel, InputStream inputStreamCasebase, InputStream transformationConfig) start.static <T extends DataObject>
WriteableObjectPool<T>start
(InputStream composition, InputStream model, InputStream simModel, InputStream casebase, InputStream transformationConfig, boolean reuseDataClassReferencesAtRestart) start.static <T extends DataObject>
WriteableObjectPool<T>start.static <T extends DataObject>
WriteableObjectPool<T>start.static <T extends DataObject>
WriteableObjectPool<T>start
(String composition, String model, String[] simModels, String caseBase, String transformationConfig, boolean reuseDataClassReferencesAtRestart) start.static <T extends DataObject>
WriteableObjectPool<T>start.static <T extends DataObject>
WriteableObjectPool<T>start
(String composition, String model, String simModel, String casebase, String transformationConfig) start.static <T extends DataObject>
WriteableObjectPool<T>start
(String composition, String model, String simModel, String casebase, String transformationConfig, boolean reuseDataClassReferencesAtRestart) start.static void
validateSimModel
(Model model, SimilarityModel simModel) Validates the similarity model by checking if a defined class from the data model has a respective measure in the similarity model.withCaseBase
(String path) withCaseBase.withComposition
(String path) withComposition.withModel.withReuseDataClassReferencesAtRestart
(boolean flag) withReuseDataClassReferencesAtRestart.withSimModel
(String path) withSimModel.
-
Method Details
-
getInstance
Getter for the field
instance
.- Returns:
- a
CakeInstance
object
-
isRunning
public static boolean isRunning()Check whether an instance of ProCAKE has been started already.- Returns:
- true if ProCAKE is already running
-
start
start.
- Type Parameters:
T
- a T class- Returns:
- a
WriteableObjectPool
object
-
start
start.
- Type Parameters:
T
- a T class- Parameters:
composition
- aString
object- Returns:
- a
WriteableObjectPool
object
-
start
public static <T extends DataObject> WriteableObjectPool<T> start(InputStream inputStreamCompositon) start.
- Type Parameters:
T
- a T class- Parameters:
inputStreamCompositon
- aInputStream
object- Returns:
- a
WriteableObjectPool
object
-
start
public static <T extends DataObject> WriteableObjectPool<T> start(String composition, String casebase) start.
- Type Parameters:
T
- a T class- Parameters:
composition
- aString
objectcasebase
- aString
object- Returns:
- a
WriteableObjectPool
object
-
start
public static <T extends DataObject> WriteableObjectPool<T> start(InputStream inputStreamCompositon, InputStream inputStreamCasebase) start.
- Type Parameters:
T
- a T class- Parameters:
inputStreamCompositon
- aInputStream
objectinputStreamCasebase
- aInputStream
object- Returns:
- a
WriteableObjectPool
object
-
start
public static <T extends DataObject> WriteableObjectPool<T> start(String composition, String model, String simModel, String casebase) start.
- Type Parameters:
T
- a T class- Parameters:
composition
- aString
objectmodel
- aString
objectsimModel
- aString
objectcasebase
- aString
object- Returns:
- a
WriteableObjectPool
object
-
start
public static <T extends DataObject> WriteableObjectPool<T> start(InputStream inputStreamCompositon, InputStream inputStreamModel, InputStream inputStreamSimModel, InputStream inputStreamCasebase) start.
- Type Parameters:
T
- a T class- Parameters:
inputStreamCompositon
- aInputStream
objectinputStreamModel
- aInputStream
objectinputStreamSimModel
- aInputStream
objectinputStreamCasebase
- aInputStream
object- Returns:
- a
WriteableObjectPool
object
-
start
public static <T extends DataObject> WriteableObjectPool<T> start(String composition, String model, String simModel, String casebase, String transformationConfig) start.
-
start
public static <T extends DataObject> WriteableObjectPool<T> start(InputStream inputStreamCompositon, InputStream inputStreamModel, InputStream inputStreamSimModel, InputStream inputStreamCasebase, InputStream transformationConfig) start.
- Type Parameters:
T
- a T class- Parameters:
inputStreamCompositon
- aInputStream
objectinputStreamModel
- aInputStream
objectinputStreamSimModel
- aInputStream
objectinputStreamCasebase
- aInputStream
objecttransformationConfig
- aInputStream
object- Returns:
- a
WriteableObjectPool
object
-
start
public static <T extends DataObject> WriteableObjectPool<T> start(String composition, String model, String simModel, String casebase, String transformationConfig, boolean reuseDataClassReferencesAtRestart) start.
-
start
public static <T extends DataObject> WriteableObjectPool<T> start(String composition, String model, String[] simModels, String caseBase, String transformationConfig, boolean reuseDataClassReferencesAtRestart) start.
-
start
public static <T extends DataObject> WriteableObjectPool<T> start(InputStream composition, InputStream model, InputStream[] simModels, InputStream casebase, InputStream transformationConfig, boolean reuseDataClassReferencesAtRestart) start.
- Type Parameters:
T
- a T class- Parameters:
composition
- aInputStream
objectmodel
- aInputStream
objectsimModels
- an array ofInputStream
objectscasebase
- aInputStream
objecttransformationConfig
- aInputStream
objectreuseDataClassReferencesAtRestart
- a boolean- Returns:
- a
WriteableObjectPool
object
-
start
public static <T extends DataObject> WriteableObjectPool<T> start(InputStream composition, InputStream model, InputStream simModel, InputStream casebase, InputStream transformationConfig, boolean reuseDataClassReferencesAtRestart) start.
- Type Parameters:
T
- a T class- Parameters:
composition
- aInputStream
objectmodel
- aInputStream
objectsimModel
- aInputStream
objectcasebase
- aInputStream
objecttransformationConfig
- aInputStream
objectreuseDataClassReferencesAtRestart
- a boolean- Returns:
- a
WriteableObjectPool
object
-
addSimModel
Add Similarity Measures in SimilarityModel to default SimilarityModel.- Parameters:
path
- the path to the file to add and validate.
-
extendModel
Adds a file containing a model definition (model.xml) to the existing loaded model. This method can be handy if the model information has to be complemented during runtime.- Parameters:
pathModel
- the path to the file to loadmodelName
- the name of the model to extend. null refers to the default model
-
extendModel
Adds an input stream containing a model definition (model.xml) to the existing loaded model. This method can be handy if the model information has to be complemented during runtime.- Parameters:
streamModel
- the stream containing the file to loadmodelName
- the name of the model to extend. null refers to the default model
-
extendSimilarityModel
Adds a file containing a similarity model definition (sim.xml) to the existing loaded similarity model. This method can be handy if the similarity model information has to be complemented during runtime.- Parameters:
pathSimModel
- the path to the file to loadmodelName
- the name of the model to extend. null refers to the default model
-
extendSimilarityModel
Adds an input stream containing a similarity model definition (sim.xml) to the existing loaded similarity model. This method can be handy if the similarity model information has to be complemented during runtime.- Parameters:
streamSimModel
- the path to the file to loadmodelName
- the name of the model to extend. null refers to the default model
-
addSimilarityModel
Initializes and builds the similarity model with the given name. The data is loaded from the file at the given path.- Parameters:
path
- the similarity model file to loadname
- the name of the similarity model
-
initDefaultDependencyModel
public static DependencyModel initDefaultDependencyModel(String dependencyModelPath, WriteableObjectPool casebase) Method, that initializes the dependency model from an XML file.- Parameters:
dependencyModelPath
- The path of the xml file of the dependency model.casebase
- The casebase, between whose cases the dependencies exists.- Returns:
- The initialized dependency model.
-
getDependencyModel
Method, that returns the dependency model. If the model wasn't initialized yet, null will be returned.- Returns:
- The dependency model.
-
validateSimModel
Validates the similarity model by checking if a defined class from the data model has a respective measure in the similarity model.- Parameters:
model
- the model to checksimModel
- the similarity model to check
-
withComposition
withComposition.
- Parameters:
path
- aString
object- Returns:
- a
CakeInstance
object
-
withModel
withModel.
- Parameters:
path
- aString
object- Returns:
- a
CakeInstance
object
-
withSimModel
withSimModel.
- Parameters:
path
- aString
object- Returns:
- a
CakeInstance
object
-
withCaseBase
withCaseBase.
- Parameters:
path
- aString
object- Returns:
- a
CakeInstance
object
-
withReuseDataClassReferencesAtRestart
withReuseDataClassReferencesAtRestart.
- Parameters:
flag
- a boolean- Returns:
- a
CakeInstance
object
-
run
run.
- Type Parameters:
T
- a T class- Returns:
- a
WriteableObjectPool
object
-