lv.lumii.tda.kernel

## Class TDAKernel

- java.lang.Object
- - DelegatorToRepositoryBase
  - - lv.lumii.tda.kernel.TDAKernel

-     public class TDAKernel
      extends DelegatorToRepositoryBase

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TDAKernel()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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).

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TDAKernel

          public TDAKernel()

  - ### Method Detail

    - #### findClass

          public long findClass(java.lang.String name)

    - #### setMainTransformation

          public void setMainTransformation(java.lang.String name)

    - #### getUUID

          public java.lang.String getUUID()

    - #### findTDAKernelByUUID

          public static TDAKernel findTDAKernelByUUID(java.lang.String uuidString)

    - #### finalize

          public void finalize()

    - #### getAdapterTypeFromURI

          public static java.lang.String getAdapterTypeFromURI(java.lang.String locationWithAdapterType)

    - #### getLocationFromURI

          public static java.lang.String getLocationFromURI(java.lang.String locationWithAdapterType)

    - #### newRepositoryAdapter

          public static IRepository newRepositoryAdapter(java.lang.String adapterType,
                                                         TDAKernel callerKernel)

      Creates an instance of the given adapter type.
      Parameters:
        `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..RepositoryAdapter.
      Returns:
        a newly created instance of the repository adapter, or null on error.

    - #### newRepositoryAdapter

          public static IRepository newRepositoryAdapter(java.lang.String adapterType)

    - #### newTransformationAdapter

          public static ITransformationAdapter newTransformationAdapter(java.lang.String adapterType)

      Creates an instance of the given transformation adapter type.
      Parameters:
        `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..TransformationAdapter.
      Returns:
        a newly created instance of the transformation adapter, or null on error.

    - #### newEngineAdapter

          public static IEngineAdapter newEngineAdapter(java.lang.String adapterType)

      Creates an instance of the given engine adapter type.
      Parameters:
        `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..EngineAdapter.
      Returns:
        a newly created instance of the engine adapter, or null on error.

    - #### getEngineAdapter

          public IEngineAdapter getEngineAdapter(java.lang.String engineName)

      Creates new or returns an existing engine adapter for the given engine name.
      Parameters:
        `engineName` - the name of the engine (without adapter type)
      Returns:
        the engine adapter for the engine with the given name.

    - #### getTransformationAdapter

          public ITransformationAdapter getTransformationAdapter(java.lang.String transformationType)

      Creates new or returns an existing transformation adapter for the given transformation type (transformation language).
      Parameters:
        `transformationType` - the transformation adapter type (corresponding to a transformation language), e.g., "lquery", "atl", "mola"
      Returns:
        a transformation adapter for the given transformation type (transformation language).

    - #### storeCache

          public void storeCache(java.lang.String id,
                                 java.lang.Object cache)

    - #### clearCache

          public void clearCache(java.lang.String id)

    - #### retrieveCache

          public java.lang.Object retrieveCache(java.lang.String id)

    - #### getDelegate

          public IRepository getDelegate()

    - #### open

          public boolean open(java.lang.String locationWithAdapterType)

      Opens the repository (using the repository adapter specified in the location prefix), but does not initialize TDA.
      Parameters:
        `locationWithAdapterType` - repository location, e.g., ecore:c:\\my_project\\myrepo.xmi
      Returns:
        whether the operation succeeded

    - #### exists

          public boolean exists(java.lang.String locationWithAdapterType)

      Checks whether the repository (using the repository adapter specified in the location prefix) exists.
      Parameters:
        `locationWithAdapterType` - repository location, e.g., ecore:c:\\my_project\\myrepo.xmi
      Returns:
        whether the repository exists

    - #### upgradeToTDA

          public 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).
      Parameters:
        `properties` - properties such as specificBinDirectory, projectDirectory, defaultSaveDirectory, cloudLocation, clientSessionId, clientActionIndex
      Returns:
        whether the operation succeeded

    - #### attachSynchronizer

          public 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).
      Parameters:
        `_synchronizer` - an object that listens for repository modificating actions and synchronizes them
        `syncExistingContentNow` - if the repository is being open for the first time (i.e., not re-open), set this parameter to true
      Returns:
        a RAAPI_WR pointer that can be used to sync other module's actions with this repository

    - #### sync

          public RAAPI_WR sync(RAAPI_Synchronizer s)

    - #### getSynchronizer

          public RAAPI_Synchronizer getSynchronizer()

    - #### close

          public void close()

    - #### drop

          public boolean drop(java.lang.String locationWithAdapterType)

    - #### createClass

          public long createClass(java.lang.String name)

    - #### deleteClass

          public boolean deleteClass(long r)

    - #### createGeneralization

          public boolean createGeneralization(long rSubClass,
                                              long rSuperClass)

    - #### deleteGeneralization

          public boolean deleteGeneralization(long rSubClass,
                                              long rSuperClass)

    - #### createObject

          public long createObject(long rClass)

    - #### deleteObject

          public boolean deleteObject(long r)

    - #### includeObjectInClass

          public boolean includeObjectInClass(long rObject,
                                              long rClass)

    - #### excludeObjectFromClass

          public boolean excludeObjectFromClass(long rObject,
                                                long rClass)

    - #### moveObject

          public boolean moveObject(long rObject,
                                    long rToClass)

    - #### createAttribute

          public long createAttribute(long rClass,
                                      java.lang.String name,
                                      long type)

    - #### deleteAttribute

          public boolean deleteAttribute(long r)

    - #### setAttributeValue

          public boolean setAttributeValue(long rObject,
                                           long rAttribute,
                                           java.lang.String value)

    - #### deleteAttributeValue

          public boolean deleteAttributeValue(long rObject,
                                              long rAttribute)

    - #### createAssociation

          public long createAssociation(long rSourceClass,
                                        long rTargetClass,
                                        java.lang.String sourceRoleName,
                                        java.lang.String targetRoleName,
                                        boolean isComposition)

    - #### createDirectedAssociation

          public long createDirectedAssociation(long rSourceClass,
                                                long rTargetClass,
                                                java.lang.String targetRoleName,
                                                boolean isComposition)

    - #### createAdvancedAssociation

          public long createAdvancedAssociation(java.lang.String name,
                                                boolean nAry,
                                                boolean associationClass)

    - #### deleteAssociation

          public boolean deleteAssociation(long r)

    - #### creatingSubmitLink

          public boolean creatingSubmitLink(long rSourceObject,
                                            long rTargetObject,
                                            long rAssociationEnd)

    - #### createLink

          public boolean createLink(long rSourceObject,
                                    long rTargetObject,
                                    long rAssociationEnd)

    - #### createOrderedLink

          public boolean createOrderedLink(long rSourceObject,
                                           long rTargetObject,
                                           long rAssociationEnd,
                                           int position)

    - #### deleteLink

          public boolean deleteLink(long rSourceObject,
                                    long rTargetObject,
                                    long rAssociationEnd)

    - #### launchMainTransformation

          public boolean launchMainTransformation(long rArgument)

    - #### tryToExecuteKernelCommand

          public int tryToExecuteKernelCommand(long rCommand)

    - #### tryToHandleKernelEvent

          public int tryToHandleKernelEvent(long rEvent)

    - #### getEngineForEventOrCommand

          public java.lang.String getEngineForEventOrCommand(java.lang.String eventOrCommandName)

    - #### getEventHandlers

          public java.lang.String[] getEventHandlers(long rEvent)

    - #### replicateEventOrCommand

          public long replicateEventOrCommand(long rEvent)

    - #### setEventsCommandsHook

          public void setEventsCommandsHook(IEventsCommandsHook _hook)

    - #### getEventsCommandsHook

          public IEventsCommandsHook getEventsCommandsHook()