public class TDAKernel
extends DelegatorToRepositoryBase
Constructor and Description |
---|
TDAKernel() |
Modifier and Type | Method and Description |
---|---|
RAAPI_WR |
attachSynchronizer(RAAPI_Synchronizer _synchronizer,
boolean syncExistingContentNow)
Sets the synchronization object, which will be used to sync this repository actions with some other module (e.g., web client).
|
void |
clearCache(java.lang.String id) |
void |
close() |
long |
createAdvancedAssociation(java.lang.String name,
boolean nAry,
boolean associationClass) |
long |
createAssociation(long rSourceClass,
long rTargetClass,
java.lang.String sourceRoleName,
java.lang.String targetRoleName,
boolean isComposition) |
long |
createAttribute(long rClass,
java.lang.String name,
long type) |
long |
createClass(java.lang.String name) |
long |
createDirectedAssociation(long rSourceClass,
long rTargetClass,
java.lang.String targetRoleName,
boolean isComposition) |
boolean |
createGeneralization(long rSubClass,
long rSuperClass) |
boolean |
createLink(long rSourceObject,
long rTargetObject,
long rAssociationEnd) |
long |
createObject(long rClass) |
boolean |
createOrderedLink(long rSourceObject,
long rTargetObject,
long rAssociationEnd,
int position) |
boolean |
creatingSubmitLink(long rSourceObject,
long rTargetObject,
long rAssociationEnd) |
boolean |
deleteAssociation(long r) |
boolean |
deleteAttribute(long r) |
boolean |
deleteAttributeValue(long rObject,
long rAttribute) |
boolean |
deleteClass(long r) |
boolean |
deleteGeneralization(long rSubClass,
long rSuperClass) |
boolean |
deleteLink(long rSourceObject,
long rTargetObject,
long rAssociationEnd) |
boolean |
deleteObject(long r) |
boolean |
drop(java.lang.String locationWithAdapterType) |
boolean |
excludeObjectFromClass(long rObject,
long rClass) |
boolean |
exists(java.lang.String locationWithAdapterType)
Checks whether the repository (using the repository adapter specified in the location prefix) exists.
|
void |
finalize() |
long |
findClass(java.lang.String name) |
static TDAKernel |
findTDAKernelByUUID(java.lang.String uuidString) |
static java.lang.String |
getAdapterTypeFromURI(java.lang.String locationWithAdapterType) |
IRepository |
getDelegate() |
IEngineAdapter |
getEngineAdapter(java.lang.String engineName)
Creates new or returns an existing engine adapter for the given engine name.
|
java.lang.String |
getEngineForEventOrCommand(java.lang.String eventOrCommandName) |
java.lang.String[] |
getEventHandlers(long rEvent) |
IEventsCommandsHook |
getEventsCommandsHook() |
static java.lang.String |
getLocationFromURI(java.lang.String locationWithAdapterType) |
RAAPI_Synchronizer |
getSynchronizer() |
ITransformationAdapter |
getTransformationAdapter(java.lang.String transformationType)
Creates new or returns an existing transformation adapter for the given transformation type (transformation language).
|
java.lang.String |
getUUID() |
boolean |
includeObjectInClass(long rObject,
long rClass) |
boolean |
launchMainTransformation(long rArgument) |
boolean |
moveObject(long rObject,
long rToClass) |
static IEngineAdapter |
newEngineAdapter(java.lang.String adapterType)
Creates an instance of the given engine adapter type.
|
static IRepository |
newRepositoryAdapter(java.lang.String adapterType) |
static IRepository |
newRepositoryAdapter(java.lang.String adapterType,
TDAKernel callerKernel)
Creates an instance of the given adapter type.
|
static ITransformationAdapter |
newTransformationAdapter(java.lang.String adapterType)
Creates an instance of the given transformation adapter type.
|
boolean |
open(java.lang.String locationWithAdapterType)
Opens the repository (using the repository adapter specified in the location prefix), but
does not initialize TDA.
|
long |
replicateEventOrCommand(long rEvent) |
java.lang.Object |
retrieveCache(java.lang.String id) |
boolean |
setAttributeValue(long rObject,
long rAttribute,
java.lang.String value) |
void |
setEventsCommandsHook(IEventsCommandsHook _hook) |
void |
setMainTransformation(java.lang.String name) |
void |
storeCache(java.lang.String id,
java.lang.Object cache) |
RAAPI_WR |
sync(RAAPI_Synchronizer s) |
int |
tryToExecuteKernelCommand(long rCommand) |
int |
tryToHandleKernelEvent(long rEvent) |
boolean |
upgradeToTDA(java.util.Properties properties,
boolean bootstrap,
java.lang.String login)
Switches the currently open repository to TDA mode (TDAKernel metamodel is being added, events and commands are processed).
|
public long findClass(java.lang.String name)
public void setMainTransformation(java.lang.String name)
public java.lang.String getUUID()
public static TDAKernel findTDAKernelByUUID(java.lang.String uuidString)
public void finalize()
public static java.lang.String getAdapterTypeFromURI(java.lang.String locationWithAdapterType)
public static java.lang.String getLocationFromURI(java.lang.String locationWithAdapterType)
public static IRepository newRepositoryAdapter(java.lang.String adapterType, TDAKernel callerKernel)
adapterType
- The name of some existing class implementing
IRepository interface, or the short name of the adapter
such as "jr", "mii_rep", or "ecore".
In the latter case, the fully qualified adapter class
name is assumed to be lv.lumii.adapters.repository.public static IRepository newRepositoryAdapter(java.lang.String adapterType)
public static ITransformationAdapter newTransformationAdapter(java.lang.String adapterType)
adapterType
- The name of some existing class implementing
ITransformationAdapter interface, or the short name of the adapter
such as "lquery", "atl", or "mola".
In the latter case, the fully qualified adapter class
name is assumed to be lv.lumii.adapters.transformation.public static IEngineAdapter newEngineAdapter(java.lang.String adapterType)
adapterType
- The name of some existing class implementing
IEngineAdapter interface, or the short name of the adapter
such as "dll", "dll32", or "net".
In the latter case, the fully qualified adapter class
name is assumed to be lv.lumii.adapters.engine.public IEngineAdapter getEngineAdapter(java.lang.String engineName)
engineName
- the name of the engine (without adapter type)public ITransformationAdapter getTransformationAdapter(java.lang.String transformationType)
transformationType
- the transformation adapter type (corresponding to a transformation language), e.g., "lquery", "atl", "mola"public void storeCache(java.lang.String id, java.lang.Object cache)
public void clearCache(java.lang.String id)
public java.lang.Object retrieveCache(java.lang.String id)
public IRepository getDelegate()
public boolean open(java.lang.String locationWithAdapterType)
locationWithAdapterType
- repository location, e.g., ecore:c:\\my_project\\myrepo.xmipublic boolean exists(java.lang.String locationWithAdapterType)
locationWithAdapterType
- repository location, e.g., ecore:c:\\my_project\\myrepo.xmipublic boolean upgradeToTDA(java.util.Properties properties, boolean bootstrap, java.lang.String login)
properties
- properties such as specificBinDirectory, projectDirectory, defaultSaveDirectory, cloudLocation, clientSessionId, clientActionIndexpublic RAAPI_WR attachSynchronizer(RAAPI_Synchronizer _synchronizer, boolean syncExistingContentNow)
_synchronizer
- an object that listens for repository modificating actions and synchronizes themsyncExistingContentNow
- if the repository is being open for the first time (i.e., not re-open), set this parameter to truepublic RAAPI_WR sync(RAAPI_Synchronizer s)
public RAAPI_Synchronizer getSynchronizer()
public void close()
public boolean drop(java.lang.String locationWithAdapterType)
public long createClass(java.lang.String name)
public boolean deleteClass(long r)
public boolean createGeneralization(long rSubClass, long rSuperClass)
public boolean deleteGeneralization(long rSubClass, long rSuperClass)
public long createObject(long rClass)
public boolean deleteObject(long r)
public boolean includeObjectInClass(long rObject, long rClass)
public boolean excludeObjectFromClass(long rObject, long rClass)
public boolean moveObject(long rObject, long rToClass)
public long createAttribute(long rClass, java.lang.String name, long type)
public boolean deleteAttribute(long r)
public boolean setAttributeValue(long rObject, long rAttribute, java.lang.String value)
public boolean deleteAttributeValue(long rObject, long rAttribute)
public long createAssociation(long rSourceClass, long rTargetClass, java.lang.String sourceRoleName, java.lang.String targetRoleName, boolean isComposition)
public long createDirectedAssociation(long rSourceClass, long rTargetClass, java.lang.String targetRoleName, boolean isComposition)
public long createAdvancedAssociation(java.lang.String name, boolean nAry, boolean associationClass)
public boolean deleteAssociation(long r)
public boolean creatingSubmitLink(long rSourceObject, long rTargetObject, long rAssociationEnd)
public boolean createLink(long rSourceObject, long rTargetObject, long rAssociationEnd)
public boolean createOrderedLink(long rSourceObject, long rTargetObject, long rAssociationEnd, int position)
public boolean deleteLink(long rSourceObject, long rTargetObject, long rAssociationEnd)
public boolean launchMainTransformation(long rArgument)
public int tryToExecuteKernelCommand(long rCommand)
public int tryToHandleKernelEvent(long rEvent)
public java.lang.String getEngineForEventOrCommand(java.lang.String eventOrCommandName)
public java.lang.String[] getEventHandlers(long rEvent)
public long replicateEventOrCommand(long rEvent)
public void setEventsCommandsHook(IEventsCommandsHook _hook)
public IEventsCommandsHook getEventsCommandsHook()