Functions | |
TDAEXTERN void TDACALL | TDA_Close (void *tdaKernel) |
TDAEXTERN bool TDACALL | TDA_Exists (void *tdaKernel, const char *location) |
TDAEXTERN bool TDACALL | TDA_Open (void *tdaKernel, const char *location) |
TDAEXTERN bool TDACALL | TDA_StartSave (void *tdaKernel) |
TDAEXTERN bool TDACALL | TDA_CancelSave (void *tdaKernel) |
TDAEXTERN bool TDACALL | TDA_FinishSave (void *tdaKernel) |
TDAEXTERN bool TDACALL | TDA_Drop (void *tdaKernel, const char *location) |
TDAEXTERN __int64 TDACALL | TDA_FindClass (void *tdaKernel, const char *name) |
TDAEXTERN const char *TDACALL | TDA_GetClassName (void *tdaKernel, __int64 rClass) |
TDAEXTERN __int64 TDACALL | TDA_CreateObject (void *tdaKernel, __int64 rClass) |
TDAEXTERN __int64 TDACALL | TDA_CreateClass (void *tdaKernel, const char *name) |
TDAEXTERN bool TDACALL | TDA_DeleteClass (void *tdaKernel, __int64 rClass) |
TDAEXTERN bool TDACALL | TDA_IsClass (void *tdaKernel, __int64 r) |
TDAEXTERN bool TDACALL | TDA_IsDirectSubClass (void *tdaKernel, __int64 rSubClass, __int64 rSuperClass) |
TDAEXTERN bool TDACALL | TDA_DeleteObject (void *tdaKernel, __int64 rObject) |
TDAEXTERN bool TDACALL | TDA_MoveObject (void *tdaKernel, __int64 rObject, __int64 rToClass) |
TDAEXTERN bool TDACALL | TDA_IsTypeOf (void *tdaKernel, __int64 rObject, __int64 rClass) |
TDAEXTERN bool TDACALL | TDA_IsKindOf (void *tdaKernel, __int64 rObject, __int64 rClass) |
TDAEXTERN __int64 TDACALL | TDA_CreateAttribute (void *tdaKernel, __int64 rClass, const char *name, __int64 rPrimitiveType) |
TDAEXTERN bool TDACALL | TDA_IsDerivedClass (void *tdaKernel, __int64 rDirectlyOrIndirectlyDerivedClass, __int64 rSuperClass) |
TDAEXTERN __int64 TDACALL | TDA_FindAttribute (void *tdaKernel, __int64 rClass, const char *name) |
TDAEXTERN bool TDACALL | TDA_DeleteAttribute (void *tdaKernel, __int64 rAttribute) |
TDAEXTERN const char *TDACALL | TDA_GetAttributeName (void *tdaKernel, __int64 rAttribute) |
TDAEXTERN const char *TDACALL | TDA_GetPrimitiveDataTypeName (void *tdaKernel, __int64 rDataType) |
TDAEXTERN __int64 TDACALL | TDA_FindPrimitiveDataType (void *tdaKernel, const char *name) |
TDAEXTERN bool TDACALL | TDA_IsPrimitiveDataType (void *tdaKernel, __int64 r) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForClasses (void *tdaKernel) |
TDAEXTERN const char *TDACALL | TDA_GetAttributeValue (void *tdaKernel, __int64 rObject, __int64 rAttribute) |
TDAEXTERN __int64 TDACALL | TDA_CreateAssociation (void *tdaKernel, __int64 rSourceClass, __int64 rTargetClass, const char *sourceRoleName, const char *targetRoleName, bool isComposition) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForDirectSubClasses (void *tdaKernel, __int64 rSuperClass) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForAllClassObjects (void *tdaKernel, __int64 rClassOrAdvancedAssociation) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForDirectAttributes (void *tdaKernel, __int64 rClass) |
TDAEXTERN __int64 TDACALL | TDA_GetAttributeDomain (void *tdaKernel, __int64 rAttribute) |
TDAEXTERN bool TDACALL | TDA_DeleteGeneralization (void *tdaKernel, __int64 rSubClass, __int64 rSuperClass) |
TDAEXTERN bool TDACALL | TDA_CreateGeneralization (void *tdaKernel, __int64 rSubClass, __int64 rSuperClass) |
TDAEXTERN bool TDACALL | TDA_ExcludeObjectFromClass (void *tdaKernel, __int64 rObject, __int64 rClass) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForAllAttributes (void *tdaKernel, __int64 rClass) |
TDAEXTERN bool TDACALL | TDA_IncludeObjectInClass (void *tdaKernel, __int64 rObject, __int64 rClass) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForDirectSuperClasses (void *tdaKernel, __int64 rSubClass) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForDirectClassObjects (void *tdaKernel, __int64 rClassOrAdvancedAssociation) |
TDAEXTERN bool TDACALL | TDA_SetAttributeValue (void *tdaKernel, __int64 rObject, __int64 rAttribute, const char *value) |
TDAEXTERN bool TDACALL | TDA_DeleteAttributeValue (void *tdaKernel, __int64 rObject, __int64 rAttribute) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForDirectLinguisticInstances (void *tdaKernel, __int64 rClass) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForDirectObjectClasses (void *tdaKernel, __int64 rObjectOrAdvancedLink) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForObjectsByAttributeValue (void *tdaKernel, __int64 rAttribute, const char *value) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForAllOutgoingAssociationEnds (void *tdaKernel, __int64 rClass) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForDirectIngoingAssociationEnds (void *tdaKernel, __int64 rClass) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForAllLinguisticInstances (void *tdaKernel, __int64 rClass) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForDirectOutgoingAssociationEnds (void *tdaKernel, __int64 rClass) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForAllIngoingAssociationEnds (void *tdaKernel, __int64 rClass) |
TDAEXTERN __int64 TDACALL | TDA_ResolveIterator (void *tdaKernel, __int64 it, int position) |
TDAEXTERN const char *TDACALL | TDA_GetRoleName (void *tdaKernel, __int64 rAssociationEnd) |
TDAEXTERN bool TDACALL | TDA_DeleteLink (void *tdaKernel, __int64 rSourceObject, __int64 rTargetObject, __int64 rAssociationEnd) |
TDAEXTERN bool TDACALL | TDA_CreateLink (void *tdaKernel, __int64 rSourceObject, __int64 rTargetObject, __int64 rAssociationEnd) |
TDAEXTERN bool TDACALL | TDA_IsLinguistic (void *tdaKernel, __int64 r) |
TDAEXTERN __int64 TDACALL | TDA_GetAttributeType (void *tdaKernel, __int64 rAttribute) |
TDAEXTERN __int64 TDACALL | TDA_GetTargetClass (void *tdaKernel, __int64 rTargetAssociationEnd) |
TDAEXTERN bool TDACALL | TDA_IsAssociationEnd (void *tdaKernel, __int64 r) |
TDAEXTERN void TDACALL | TDA_FreeReference (void *tdaKernel, __int64 r) |
TDAEXTERN bool TDACALL | TDA_IsAttribute (void *tdaKernel, __int64 r) |
TDAEXTERN __int64 TDACALL | TDA_GetSourceClass (void *tdaKernel, __int64 rTargetAssociationEnd) |
TDAEXTERN bool TDACALL | TDA_LinkExists (void *tdaKernel, __int64 rSourceObject, __int64 rTargetObject, __int64 rAssociationEnd) |
TDAEXTERN bool TDACALL | TDA_IsComposition (void *tdaKernel, __int64 rTargetAssociationEnd) |
TDAEXTERN void TDACALL | TDA_FreeIterator (void *tdaKernel, __int64 it) |
TDAEXTERN __int64 TDACALL | TDA_GetLinguisticClassFor (void *tdaKernel, __int64 r) |
TDAEXTERN bool TDACALL | TDA_DeleteAssociation (void *tdaKernel, __int64 rAssociationEndOrAdvancedAssociation) |
TDAEXTERN bool TDACALL | TDA_CreateOrderedLink (void *tdaKernel, __int64 rSourceObject, __int64 rTargetObject, __int64 rAssociationEnd, int targetPosition) |
TDAEXTERN __int64 TDACALL | TDA_DeserializeReference (void *tdaKernel, const char *r) |
TDAEXTERN __int64 TDACALL | TDA_CreateDirectedAssociation (void *tdaKernel, __int64 rSourceClass, __int64 rTargetClass, const char *targetRoleName, bool isComposition) |
TDAEXTERN bool TDACALL | TDA_IsAdvancedAssociation (void *tdaKernel, __int64 r) |
TDAEXTERN __int64 TDACALL | TDA_ResolveIteratorFirst (void *tdaKernel, __int64 it) |
TDAEXTERN const char *TDACALL | TDA_CallSpecificOperation (void *tdaKernel, const char *operationName, const char *arguments) |
TDAEXTERN __int64 TDACALL | TDA_GetInverseAssociationEnd (void *tdaKernel, __int64 rAssociationEnd) |
TDAEXTERN int TDACALL | TDA_GetLinkedObjectPosition (void *tdaKernel, __int64 rSourceObject, __int64 rTargetObject, __int64 rAssociationEnd) |
TDAEXTERN int TDACALL | TDA_GetIteratorLength (void *tdaKernel, __int64 it) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForLinkedObjects (void *tdaKernel, __int64 rObject, __int64 rAssociationEnd) |
TDAEXTERN __int64 TDACALL | TDA_CreateAdvancedAssociation (void *tdaKernel, const char *name, bool nAry, bool associationClass) |
TDAEXTERN __int64 TDACALL | TDA_GetIteratorForLinguisticClasses (void *tdaKernel) |
TDAEXTERN __int64 TDACALL | TDA_FindAssociationEnd (void *tdaKernel, __int64 rSourceClass, const char *targetRoleName) |
TDAEXTERN const char *TDACALL | TDA_SerializeReference (void *tdaKernel, __int64 r) |
TDAEXTERN __int64 TDACALL | TDA_ResolveIteratorNext (void *tdaKernel, __int64 it) |
TDA Kernel DLL RAAPI/IRepository Functions
TDAEXTERN void TDACALL TDA_Close | ( | void * | tdaKernel | ) |
Closes the repository without save.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
TDAEXTERN bool TDACALL TDA_Exists | ( | void * | tdaKernel, |
const char * | location | ||
) |
Checks whether the given location is already occupied by some repository of the same type. This can be used to ask for the user confirmation to drop an existing repository, when creating a new one at the same location.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
location | a string denoting the location to check. The location string is is specific to the type of the repository, e.g., for ECore this is the .xmi file name, for JR this is the folder name, etc. TDA Kernel requires a URI, containing the repository name followed by a colon followed by a repository-specific location, e.g., "jr:/path/to/repository". |
TDAEXTERN bool TDACALL TDA_Open | ( | void * | tdaKernel, |
const char * | location | ||
) |
Opens or creates (if the repository does not exist yet) the repository at the given location. This can be used to ask for the user confirmation to drop an existing repository, when creating a new one at the same location.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
location | a string denoting the location of the repository. The location string is is specific to the type of the repository, e.g., for ECore this is the .xmi file name, for JR this is the folder name, etc. TDA Kernel requires a URI, containing the repository name followed by a colon followed by a repository-specific location, e.g., "jr:/path/to/repository". |
TDAEXTERN bool TDACALL TDA_StartSave | ( | void * | tdaKernel | ) |
Starts the two-phase save process of the repository. The save process can be rolled back by calling cancelSave
or commited by calling finishSave
.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
false
is returned, neither cancelSave
, nor finishSave
must be called. TDAEXTERN bool TDACALL TDA_CancelSave | ( | void * | tdaKernel | ) |
Rolls back the started save process. The repository content on the disk (or other media) is returned to the previous state. The repository content currently loaded in memory is not changed.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
TDAEXTERN bool TDACALL TDA_FinishSave | ( | void * | tdaKernel | ) |
Finishes the two-phase save process of the repository. After finishing, the save process cannot be rolled back anymore.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
TDAEXTERN bool TDACALL TDA_Drop | ( | void * | tdaKernel, |
const char * | location | ||
) |
Deletes the repository at the given location. The repository must be closed.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
location | a string denoting the location of the repository. The location string is specific to the type of the repository, e.g., for ECore this is the .xmi file name, for JR this is the folder name, etc. TDA Kernel requires a URI, containing the repository name followed by a colon followed by a repository-specific location, e.g., "jr:/path/to/repository". |
TDAEXTERN __int64 TDACALL TDA_FindClass | ( | void * | tdaKernel, |
const char * | name | ||
) |
Obtains a reference to an existing class with the given fully qualified name.
Note (M3): If the underlying repository provides access to its quasi-linguistic meta-metamodel, quasi-linguistic classes can be accessed by using the prefix "M3::", e.g., SomePath::MountPoint::M3::SomeMetaType
Note (adapters): This function is optional for repository adapters. If not implemented in an adapter, TDA Kernel implements it through getIteratorForClasses
[TODO] and getIteratorForLinguisticClasses
.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
name | the fully qualified name of the class (for quasi-linguistic classes, use prefix "M3::") |
TDAEXTERN const char* TDACALL TDA_GetClassName | ( | void * | tdaKernel, |
__int64 | rClass | ||
) |
Returns the fully qualified name of the given class.
[TODO] Note (M3): If the reference points to a quasi-linguistic class, then the prefix "M3::" is also included in the return value, e.g., MountPointForTheCorrespondingRepository::M3::ClassName
.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rClass | a reference to the class, for which the class name has to be obtained |
null
on error. TDAEXTERN __int64 TDACALL TDA_CreateObject | ( | void * | tdaKernel, |
__int64 | rClass | ||
) |
Creates an instance of the given class.
Note (M3): If the given class is a quasi-linguistic class, then its quasi-linguistic instance at Level M_Omega is being created.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rClass | a reference to a class (either quasi-ontological, or quasi-linguistic) |
TDAEXTERN __int64 TDACALL TDA_CreateClass | ( | void * | tdaKernel, |
const char * | name | ||
) |
Creates a class with the given fully qualified name.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
name | the fully qualified name of the class (packages are delimited by double colon "::"); this fully qualified name must be unique |
TDAEXTERN bool TDACALL TDA_DeleteClass | ( | void * | tdaKernel, |
__int64 | rClass | ||
) |
Deletes the class and frees the reference.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rClass | a reference to the class to be deleted |
TDAEXTERN bool TDACALL TDA_IsClass | ( | void * | tdaKernel, |
__int64 | r | ||
) |
Checks whether the given reference is associated with a class.
Note (M3): A reference at Level M3 can also be passed.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
r | a reference in question |
false
is returned. TDAEXTERN bool TDACALL TDA_IsDirectSubClass | ( | void * | tdaKernel, |
__int64 | rSubClass, | ||
__int64 | rSuperClass | ||
) |
Checks whether the generalization relation between the two given classes holds.
Note (M3): Both classes may be either quasi-ontological, or quasi-linguistic.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rSubClass | a reference to a potential subclass |
rSuperClass | a reference to a potential superclass |
false
is returned. TDAEXTERN bool TDACALL TDA_DeleteObject | ( | void * | tdaKernel, |
__int64 | rObject | ||
) |
Creates the given object.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rObject | a reference to the object to be deleted |
TDAEXTERN bool TDACALL TDA_MoveObject | ( | void * | tdaKernel, |
__int64 | rObject, | ||
__int64 | rToClass | ||
) |
Moves (reclassifies) the given object into the given (quasi-ontological) class, removing it from its current class (classes).
The function is similar to calling
includeObjectInClass(rObject, rToClass);
followed by calling
excludeObjectInClass(rObject, c)
for all other current classifiers c of the given object.
The distinction is that it may be possible to implement this function even when multiple classification is not supported.
Note (adapters): This function is optional for repository adapters. If not implemented in an adapter, TDA Kernel implements it by [TODO] recreating the object (with the new type), while also recreating all attributes and links.
Note (M3): It is assumed that an element from a quasi-ontological level cannot dynamically change its quasi-linguistic type (quasi-linguistic class), thus, moveObject
is meaningless in this case.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rObject | a reference to the object to be reclassified |
rToClass | a reference to the class, to which the object will belong |
TDAEXTERN bool TDACALL TDA_IsTypeOf | ( | void * | tdaKernel, |
__int64 | rObject, | ||
__int64 | rClass | ||
) |
Checks whether the given object is a direct (quasi-ontological or quasi-linguistic) instance of the given class.
Note (M3): The function works also when one or both of rObject
and rClass
is/are quasi-linguistic. If the object is at a quasi-ontological meta-level, but the class is quasi-linguistic, then the function checks whether the object is a direct quasi-linguistic instance of the given class.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rObject | a reference to an object |
rClass | a reference to a class |
false
is returned. TDAEXTERN bool TDACALL TDA_IsKindOf | ( | void * | tdaKernel, |
__int64 | rObject, | ||
__int64 | rClass | ||
) |
Checks whether the given object is a direct or indirect, quasi-ontological or quasi-linguistic, instance of the given class.
Note (M3): The function works also when one or both of rObject
and rClass
is/are quasi-linguistic. If the object is at a quasi-ontological meta-level, but the class is quasi-linguistic, then the function checks whether the object is a quasi-linguistic instance of the given class or one of its subclasses.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rObject | a reference to an object |
rClass | a reference to a class |
false
is returned. TDAEXTERN __int64 TDACALL TDA_CreateAttribute | ( | void * | tdaKernel, |
__int64 | rClass, | ||
const char * | name, | ||
__int64 | rPrimitiveType | ||
) |
Creates (defines) a new attribute for the given class. The default cardinality is the widest cardinality supported by the repository (e.g., "0..*", if multi-valued attributes are supported; or "0..1", otherwise). The cardinality can be looked up and changed by using the quasi-linguistic meta-metalevel.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rClass | a reference to an existing class, for which to define the attribute |
name | the name of the attribute being created; it must be unique within all the attributes defined for this class, including derived ones |
rPrimitiveType | a reference to a primitive data type for attribute values |
TDAEXTERN bool TDACALL TDA_IsDerivedClass | ( | void * | tdaKernel, |
__int64 | rDirectlyOrIndirectlyDerivedClass, | ||
__int64 | rSuperClass | ||
) |
Checks whether one class is a direct or indirect subclass of another.
Note (M3): Both classes may be either quasi-ontological, or quasi-linguistic.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rDirectlyOrIndirectlyDerivedClass | a reference to a potential subclass or derived class |
rSuperClass | a reference to a potential (direct or indirect) superclass |
false
is returned. TDAEXTERN __int64 TDACALL TDA_FindAttribute | ( | void * | tdaKernel, |
__int64 | rClass, | ||
const char * | name | ||
) |
Obtains a reference to an existing attribute with the given name of the given class.
Note (M3): The class reference may point also to a quasi-linguistic class.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rClass | a reference to a class, where the attribute in question belongs; rClass may be also one of its subclasses, since the attribute is available for subclasses, too |
name | the name of the attribute |
TDAEXTERN bool TDACALL TDA_DeleteAttribute | ( | void * | tdaKernel, |
__int64 | rAttribute | ||
) |
Deletes the given attribute.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rAttribute | a reference to the attribute to be deleted |
TDAEXTERN const char* TDACALL TDA_GetAttributeName | ( | void * | tdaKernel, |
__int64 | rAttribute | ||
) |
Returns the name of the given attribute.
Note (M3): The function works also for attributes of quasi-linguistic classes.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rAttribute | a reference to the attribute in question |
null
on error. TDAEXTERN const char* TDACALL TDA_GetPrimitiveDataTypeName | ( | void * | tdaKernel, |
__int64 | rDataType | ||
) |
Returns the name of the given primitive data type.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rDataType | a reference to a primitive data type, for which the name has to be obtained |
null
on error. TDAEXTERN __int64 TDACALL TDA_FindPrimitiveDataType | ( | void * | tdaKernel, |
const char * | name | ||
) |
Obtains a reference to a primitive data type with the given name.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
name | the type name. Each repository must support at least four standard primitive data types: "Integer", "Real", "Boolean", and "String". [TODO] Certain repositories may introduce additional primitive types. To denote a repository-specific additional primitive data type, prepend the mount point of that repository, e.g., MountPoint::PeculiarDataType . |
TDAEXTERN bool TDACALL TDA_IsPrimitiveDataType | ( | void * | tdaKernel, |
__int64 | r | ||
) |
Checks whether the given reference is associated with a primitive data type.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
r | a reference in question |
false
is returned. TDAEXTERN __int64 TDACALL TDA_GetIteratorForClasses | ( | void * | tdaKernel | ) |
Obtains an iterator for all classes (all quasi-ontological classes at all quasi-ontological meta-levels).
Note (M3): Linguistic classes are not traversed by this iterator. Use getIteratorForLinguisticClasses
instead.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
TDAEXTERN const char* TDACALL TDA_GetAttributeValue | ( | void * | tdaKernel, |
__int64 | rObject, | ||
__int64 | rAttribute | ||
) |
Gets the value or the ordered collection of values (encoded as a string) of the given attribute for the given object.
Note (M3): The attribute reference can be a reference at the M3 level.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rObject | the object, for which to get the attribute value (values) |
rAttribute | the attribute, for which to obtain the value; this attribute must be associated either with a quasi-ontological class or the quasi-linguistic class of the given object |
null
on error. TDAEXTERN __int64 TDACALL TDA_CreateAssociation | ( | void * | tdaKernel, |
__int64 | rSourceClass, | ||
__int64 | rTargetClass, | ||
const char * | sourceRoleName, | ||
const char * | targetRoleName, | ||
bool | isComposition | ||
) |
Creates a bidirectional association (or two directed associations, where each is an inverse of the other). The default value for the source and target cardinalities should be "*".
Note (M3): The M3 level can be used to get/set the cardinality, if the repository supports constraints and the M3 level operations. Cardinality constraints must be accessible via M3 for that.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rSourceClass | the class, where the association starts |
rTargetClass | the class, where the association ends |
sourceRoleName | the name of the association end near the source class |
targetRoleName | the name of the association end near the target class |
isComposition | whether the association is a composition, i.e., the source class objects are containers for the target class objects |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForDirectSubClasses | ( | void * | tdaKernel, |
__int64 | rSuperClass | ||
) |
Obtains an iterator for all direct subclasses of the given superclass.
Note (M3): If the given superclass is a quasi-linguistic class, then an iterator for direct quasi-linguistic subclasses is returned.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rSuperClass | a superclass for which to obtain direct subclasses |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForAllClassObjects | ( | void * | tdaKernel, |
__int64 | rClassOrAdvancedAssociation | ||
) |
Obtains an iterator for all quasi-ontological instances of the given class or advanced association.
Note (adapters): A repository adapter may implement only one of the functions getIteratorForAllClassObjects
and getIteratorForDirectClassObjects
. The unimplemented function will be implemented via another by TDA Kernel.
Note (M3): If the given class or advanced association is quasi-linguistic, then an iterator for the quasi-linguistic elements it describes is returned, e.g., for the EMOF class "Class", an iterator for all classes found in EMOF is returned; for the EMOF class "Property", an iterator for all properties found in EMOF is returned, etc.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rClassOrAdvancedAssociation | a reference to a class or an advanced association |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForDirectAttributes | ( | void * | tdaKernel, |
__int64 | rClass | ||
) |
Obtains an iterator for direct (without inherited) attributes of the given class.
Note (adapters): A repository adapter may implement only one of the functions getIteratorForAllAttributes
and getIteratorForDirectAttributes
. The unimplemented function will be implemented via another by TDA Kernel.
Note (M3): The function works also for quasi-linguistic classes.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rClass | a reference to a class, whose attributes we are interested in |
TDAEXTERN __int64 TDACALL TDA_GetAttributeDomain | ( | void * | tdaKernel, |
__int64 | rAttribute | ||
) |
Obtains a class, for which the given attribute was defined.
Note (M3): The function works also for attributes of quasi-linguistic classes.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rAttribute | a reference to the attribute in question |
TDAEXTERN bool TDACALL TDA_DeleteGeneralization | ( | void * | tdaKernel, |
__int64 | rSubClass, | ||
__int64 | rSuperClass | ||
) |
Deletes the generalization between the given two classes.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rSubClass | a class that was a subclass |
rSuperClass | a class that was a superclass |
TDAEXTERN bool TDACALL TDA_CreateGeneralization | ( | void * | tdaKernel, |
__int64 | rSubClass, | ||
__int64 | rSuperClass | ||
) |
Creates a generalization between the two given classes.
The given subclass can be a derived class of the given superclass, but the direct generalization between them must not exist.
The generalization relation being created must not introduce inheritance loops.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rSubClass | a class that becomes a subclass |
rSuperClass | a class that becomes a superclass |
TDAEXTERN bool TDACALL TDA_ExcludeObjectFromClass | ( | void * | tdaKernel, |
__int64 | rObject, | ||
__int64 | rClass | ||
) |
Takes out the given object from the given (quasi-ontological) class.
The function works, if the underlying repository supports multiple classification and dynamic reclassification. If the object currently is only in one class, then the operation fails (it is assumed that each object must be at least in one class).
Note (M3): It is assumed that an element from a quasi-ontological level can be associated with only one quasi-linguistic type (quasi-linguistic class), thus, excludeObjectInClass
as well as includeObjectInClass
are meaningless in this case.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rObject | a reference to the object to be excluded from the given class |
rClass | a reference to the class, which to exclude from the classifiers of the given object |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForAllAttributes | ( | void * | tdaKernel, |
__int64 | rClass | ||
) |
Obtains an iterator for all (including inherited) attributes of the given class.
Note (adapters): A repository adapter may implement only one of the functions getIteratorForAllAttributes
and getIteratorForDirectAttributes
. The unimplemented function will be implemented via another by TDA Kernel.
Note (M3): The function works also for quasi-linguistic classes.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rClass | a reference to a class, whose attributes we are interested in |
TDAEXTERN bool TDACALL TDA_IncludeObjectInClass | ( | void * | tdaKernel, |
__int64 | rObject, | ||
__int64 | rClass | ||
) |
Adds the given object to the given (quasi-ontological) class. The function works, if the underlying repository supports multiple classification and dynamic reclassification.
Note (M3): It is assumed that an element from a quasi-ontological level can be associated with only one quasi-linguistic type (quasi-linguistic class), thus, includeObjectInClass
is meaningless in this case.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rObject | a reference to the object to be included in the given class |
rClass | a reference to the class, where to put the object (in addition to classes, where the object already belongs) |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForDirectSuperClasses | ( | void * | tdaKernel, |
__int64 | rSubClass | ||
) |
Obtains an iterator for all direct superclasses of the given subclass.
Note (M3): If the given subclass is a quasi-linguistic class, then an iterator for its direct quasi-linguistic superclasses is returned.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rSubClass | a subclass for which to obtain direct superclasses |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForDirectClassObjects | ( | void * | tdaKernel, |
__int64 | rClassOrAdvancedAssociation | ||
) |
Obtains an iterator for direct quasi-ontological instances of the given class or advanced association.
Note (adapters): A repository adapter may implement only one of the functions getIteratorForAllClassObjects
and getIteratorForDirectClassObjects
. The unimplemented function will be implemented via another by TDA Kernel.
Note (M3): If the given class or advanced association is quasi-linguistic, then an iterator for the quasi-linguistic elements it describes is returned, e.g., for the EMOF class "Class", an iterator for all classes found in EMOF is returned; for the EMOF class "Property", an iterator for all properties found in EMOF is returned, etc.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rClassOrAdvancedAssociation | a reference to a class or an advanced association |
TDAEXTERN bool TDACALL TDA_SetAttributeValue | ( | void * | tdaKernel, |
__int64 | rObject, | ||
__int64 | rAttribute, | ||
const char * | value | ||
) |
Sets the value or the ordered collection of values (encoded as a string) of the given attribute for the given object.
Note (adapters): Repository adapters may assume that the value is not null
and not a string encoding null
, since for those cases TDA Kernel forwards the call to deleteAttributeValue
.
Note (M3): The attribute reference can be a reference at the M3 level. In this case the object can be any element at the M_Omega level.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rObject | the object, for which to set the attribute value (values) |
rAttribute | the attribute, for which to set the value; this attribute must be associated either with a quasi-ontological class or the quasi-linguistic class of the given object |
value | the attribute value (values) encoded as a string (use "." for the decimal point) |
false
is returned. TDAEXTERN bool TDACALL TDA_DeleteAttributeValue | ( | void * | tdaKernel, |
__int64 | rObject, | ||
__int64 | rAttribute | ||
) |
Deletes the value (all the values) of the given attribute for the given object.
Note (M3): The attribute reference can be a reference at the M3 level. In this case the object can be any element at the M_Omega level.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rObject | the object, for which to get the attribute value (values) |
rAttribute | the attribute, for which to obtain the value; this attribute must be associated either with a quasi-ontological class or the quasi-linguistic class of the given object |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForDirectLinguisticInstances | ( | void * | tdaKernel, |
__int64 | rClass | ||
) |
Returns an iterator for direct quasi-linguistic instances (not including instances of subclasses) at Level M_Omega of the given class at Level M3.
Note (M3): This function takes a class at Level M3 and returns an iterator for elements at Level M_Omega.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rClass | a Level M3 class |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForDirectObjectClasses | ( | void * | tdaKernel, |
__int64 | rObjectOrAdvancedLink | ||
) |
Obtains an iterator for direct quasi-ontological classes of the given object or advanced link.
Note (M3): The function works also if the given object or advanced link is quasi-linguistic and the underlying repository provides access to quasi-linguistic elements. To get the quasi-linguistic class for the given element at some quasi-ontological level, use getLinguisticClassFor
.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rObjectOrAdvancedLink | a reference to an object or advanced link |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForObjectsByAttributeValue | ( | void * | tdaKernel, |
__int64 | rAttribute, | ||
const char * | value | ||
) |
Obtains an iterator for objects, for whose the value of the given attribute equals to the given value. The value has to be encoded as a string (it may encode an ordered collection of multiple values).
Note (M3): The attribute reference can be a reference at the M3 level. In this case the objects traversed by the returned iterator are elements at the M_Omega level.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rAttribute | the attribute to check |
value | the value to check |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForAllOutgoingAssociationEnds | ( | void * | tdaKernel, |
__int64 | rClass | ||
) |
Obtains an iterator for all (including inherited) outgoing association ends of the given class.
Note (adapters): A repository adapter may implement only one of the functions getIteratorForAllOutgoingAssociationEnds
and getIteratorForDirectOutgoingAssociationEnds
. The unimplemented function will be implemented via another by TDA Kernel.
Note (M3): The function works also for associations at Level M3.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rClass | a reference to a class, whose outgoing associations (including inherited) have to be traversed |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForDirectIngoingAssociationEnds | ( | void * | tdaKernel, |
__int64 | rClass | ||
) |
Obtains an iterator for direct (without inherited) ingoing association ends of the given class.
Note (adapters): A repository adapter may implement only one of the functions getIteratorForAllIngoingAssociationEnds
and getIteratorForDirectIngoingAssociationEnds
. The unimplemented function will be implemented via another by TDA Kernel.
Note (M3): The function works also for associations at Level M3.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rClass | a reference to a class, whose direct ingoing associations have to be traversed |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForAllLinguisticInstances | ( | void * | tdaKernel, |
__int64 | rClass | ||
) |
Returns an iterator for all quasi-linguistic instances (including instances of subclasses) at Level M_Omega of the given class at Level M3.
Note (M3): This function takes a class at Level M3 and returns an iterator for elements at Level M_Omega.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rClass | a Level M3 class |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForDirectOutgoingAssociationEnds | ( | void * | tdaKernel, |
__int64 | rClass | ||
) |
Obtains an iterator for direct (without inherited) outgoing association ends of the given class.
Note (adapters): A repository adapter may implement only one of the functions getIteratorForAllOutgoingAssociationEnds
and getIteratorForDirectOutgoingAssociationEnds
. The unimplemented function will be implemented via another by TDA Kernel.
Note (M3): The function works also for associations at Level M3.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rClass | a reference to a class, whose direct outgoing associations have to be traversed |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForAllIngoingAssociationEnds | ( | void * | tdaKernel, |
__int64 | rClass | ||
) |
Obtains an iterator for all (including inherited) ingoing association ends of the given class.
Note (adapters): A repository adapter may implement only one of the functions getIteratorForAllIngoingAssociationEnds
and getIteratorForDirectIngoingAssociationEnds
. The unimplemented function will be implemented via another by TDA Kernel.
Note (M3): The function works also for associations at Level M3.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rClass | a reference to a class, whose ingoing associations (including inherited) have to be traversed |
TDAEXTERN __int64 TDACALL TDA_ResolveIterator | ( | void * | tdaKernel, |
__int64 | it, | ||
int | position | ||
) |
Returns a reference to the element at the given position
(numeration starts from 0) and forwards the iterator to position+1
.
Note (adapters): If not implemented in a repository adapter, TDA Kernel traverses all the elements and stores them in a temporary list. Thus, the first call will take the linear execution time, while all subsequent calls will take the constant time. The same refers to the getIteratorLength
function. If both getIteratorLength
and resolveIterator
are used, the temporary list is created only once.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
it | an iterator reference |
position | the position in the iterable list, where the interested element is located |
TDAEXTERN const char* TDACALL TDA_GetRoleName | ( | void * | tdaKernel, |
__int64 | rAssociationEnd | ||
) |
Returns the role name of the given association end.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rAssociationEnd | an association end of some directed, bidirectional, or advanced association |
null
on error. TDAEXTERN bool TDACALL TDA_DeleteLink | ( | void * | tdaKernel, |
__int64 | rSourceObject, | ||
__int64 | rTargetObject, | ||
__int64 | rAssociationEnd | ||
) |
Deletes a link of the given type (specified by rTargetAssociationEnd
) between the given two objects.
Note (M3): An association end at Level M3 can also be passed. In this case, at least one of the source and target objects must be an element at the M_Omega level. The semantics of such link then depends on a particular quasi-linguistic metamodel at Level M3.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rSourceObject | a start object of the link; this object must be an instance of the source class for the given association end |
rTargetObject | an end object of the link; this object must be an instance of the target class for the given association end |
rAssociationEnd | a target association end that specifies the link type |
TDAEXTERN bool TDACALL TDA_CreateLink | ( | void * | tdaKernel, |
__int64 | rSourceObject, | ||
__int64 | rTargetObject, | ||
__int64 | rAssociationEnd | ||
) |
Creates a link of the given type (specified by rAssociationEnd
) between two objects.
Note (M3): An association end at Level M3 can also be passed. In this case, at least one of the source and target objects must be an element at the M_Omega level. The semantics of such link then depends on a particular quasi-linguistic metamodel at Level M3.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rSourceObject | a start object of the link; this object must be an instance of the source class for the given association end |
rTargetObject | an end object of the link; this object must be an instance of the target class for the given association end |
rAssociationEnd | a target association end that specifies the link type |
TDAEXTERN bool TDACALL TDA_IsLinguistic | ( | void * | tdaKernel, |
__int64 | r | ||
) |
Checks, whether the given reference is associated with a Level M3 element. Can be used together with isClass
, isAssociationEnd
, etc. to get more details about the element.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
r | a reference in question |
false
is returned. TDAEXTERN __int64 TDACALL TDA_GetAttributeType | ( | void * | tdaKernel, |
__int64 | rAttribute | ||
) |
Returns the (primitive) type for values of the given attribute.
Note (M3): The function works also for attributes of quasi-linguistic classes.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rAttribute | a reference to the attribute in question |
TDAEXTERN __int64 TDACALL TDA_GetTargetClass | ( | void * | tdaKernel, |
__int64 | rTargetAssociationEnd | ||
) |
Obtains a reference to the class corresponding to the given association end of some directed, bidirectional, or advanced association. For bidirectional and advanced associations, any of the two association ends can be considered a target end, when calling this function.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rTargetAssociationEnd | an association end of some association; this association end will be considered a target end |
TDAEXTERN bool TDACALL TDA_IsAssociationEnd | ( | void * | tdaKernel, |
__int64 | r | ||
) |
Checks, whether the given reference corresponds to an association end.
Note (adapters): If not implemented in a repository adapter, TDA Kernel will implement it by means of getSourceClass
, getRoleName
and findAssociationEnd
.
Note (M3): A reference at Level M3 can also be passed.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
r | a reference in question |
false
is returned. TDAEXTERN void TDACALL TDA_FreeReference | ( | void * | tdaKernel, |
__int64 | r | ||
) |
Frees the memory associated with the given reference (if necessary).
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
TDAEXTERN bool TDACALL TDA_IsAttribute | ( | void * | tdaKernel, |
__int64 | r | ||
) |
Checks whether the given reference is associated with an attribute.
Note (adapters): If a repository adapter does not implement this function, TDA Kernel will implement it by means of getAttributeDomain
, getAttributeName
and findAttribute
.
Note (M3): A reference at Level M3 can also be passed.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
r | a reference in question |
false
is returned. TDAEXTERN __int64 TDACALL TDA_GetSourceClass | ( | void * | tdaKernel, |
__int64 | rTargetAssociationEnd | ||
) |
Obtains a reference to the source class of the given directed or bidirectional association (or part of an advanced association) specified by its target end. Any of the association ends can be considered a target end, when calling this function.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rTargetAssociationEnd | an association end of some association; this association end will be considered a target end |
TDAEXTERN bool TDACALL TDA_LinkExists | ( | void * | tdaKernel, |
__int64 | rSourceObject, | ||
__int64 | rTargetObject, | ||
__int64 | rAssociationEnd | ||
) |
Checks whether the link of the given type (specified by rTargetAssociationEnd
) between the given two objects exists.
Note (adapters): If not implemented in a repository adapter, TDA Kernel will implement this function through getIteratorForLinkedObjects
.
Note (M3): An association end at Level M3 can also be passed. In this case, at least one of the source and target objects must be an element at the M_Omega level. The semantics of such link then depends on a particular quasi-linguistic metamodel at Level M3.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rSourceObject | a start object of the link; this object must be an instance of the source class for the given association end |
rTargetObject | an end object of the link; this object must be an instance of the target class for the given association end |
rAssociationEnd | a target association end that specifies the link type |
false
is returned. TDAEXTERN bool TDACALL TDA_IsComposition | ( | void * | tdaKernel, |
__int64 | rTargetAssociationEnd | ||
) |
Returns, whether the directed or bidirectional association (or a part of an advanced association) specified by its target association end is a composition (i.e., whether the source class objects are containers for the target class objects).
Note (M3): A reference at Level M3 can also be passed.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rTargetAssociationEnd | an association end of some association; this association end will be considered a target end |
TDAEXTERN void TDACALL TDA_FreeIterator | ( | void * | tdaKernel, |
__int64 | it | ||
) |
Frees the memory associated with the given iterator reference.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
it | an iterator reference |
TDAEXTERN __int64 TDACALL TDA_GetLinguisticClassFor | ( | void * | tdaKernel, |
__int64 | r | ||
) |
Returns a reference to the Level M3 class of the given quasi-ontological (Level M_Omega) element. It is assumed that there may be at most one quasi-linguistic class at M3 for each quasi-ontological element at M_Omega.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
r | a quasi-ontological (Level M_Omega) element |
TDAEXTERN bool TDACALL TDA_DeleteAssociation | ( | void * | tdaKernel, |
__int64 | rAssociationEndOrAdvancedAssociation | ||
) |
Deletes the given association. Directed and bidirectional associations are specified by (one of) their ends. Advanced associations have their own references. If the association is bidirectional, the inverse association end is deleted as well. For advanced associations, all association parts are deleted.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rAssociationEndOrAdvancedAssociation | a reference to an association end (if the association is directed or bidirectional) or a reference to an advanced association |
TDAEXTERN bool TDACALL TDA_CreateOrderedLink | ( | void * | tdaKernel, |
__int64 | rSourceObject, | ||
__int64 | rTargetObject, | ||
__int64 | rAssociationEnd, | ||
int | targetPosition | ||
) |
Creates a link of the given type (specified by rAssociationEnd
) between two objects at the given position. The target position normally should be from 0 to n, where n is the number of currently linked objects at positions from 0 to n-1. If the target position is outside [0..n], then the link is appended to the end.
Note (M3): An association end at Level M3 can also be passed. In this case, at least one of the source and target objects must be an element at the M_Omega level. The semantics of such link then depends on a particular quasi-linguistic metamodel at Level M3.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rSourceObject | a start object of the link; this object must be an instance of the source class for the given association end |
rTargetObject | an end object of the link; this object must be an instance of the target class for the given association end |
rAssociationEnd | a target association end that specifies the link type |
targetPosition | the position (starting from 0) of the target object in the list of linked objects of the source object; |
TDAEXTERN __int64 TDACALL TDA_DeserializeReference | ( | void * | tdaKernel, |
const char * | r | ||
) |
Obtains a reference to a serialized element from the given serialization. This is essential for loading inter-repository relations.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
r | the serialization of an element, for which to obtain a reference |
TDAEXTERN __int64 TDACALL TDA_CreateDirectedAssociation | ( | void * | tdaKernel, |
__int64 | rSourceClass, | ||
__int64 | rTargetClass, | ||
const char * | targetRoleName, | ||
bool | isComposition | ||
) |
Creates a directed association. The default value for the source and target cardinalities should be "*".
Note (adapters): If a repository adapter does not implement this function, TDA kernel will simulate it by means of createAssociation
(a stub inverse role will be generated).
Note (M3): The M3 level can be used to get/set the cardinality, if the repository supports constraints and the M3 level operations. Cardinality constraints must be accessible via M3 for that.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rSourceClass | the class, where the association starts |
rTargetClass | the class, where the association ends |
targetRoleName | the name of the association end near the target class |
isComposition | whether the association is a composition, i.e., the source class objects are containers for the target class objects |
TDAEXTERN bool TDACALL TDA_IsAdvancedAssociation | ( | void * | tdaKernel, |
__int64 | r | ||
) |
Checks, whether the given reference corresponds to an advanced association.
Note (M3): A reference at Level M3 can also be passed.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
r | a reference in question |
false
is returned. TDAEXTERN __int64 TDACALL TDA_ResolveIteratorFirst | ( | void * | tdaKernel, |
__int64 | it | ||
) |
Places the iterator to the position 0 and gets the element there.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
it | an iterator reference |
TDAEXTERN const char* TDACALL TDA_CallSpecificOperation | ( | void * | tdaKernel, |
const char * | operationName, | ||
const char * | arguments | ||
) |
Calls a repository-specific operation (e.g., or MOF/ECore-like operation, an SQL statement, or a SPARQL statement). Arguments (if any) are encoded as a string delimited by means of the Unicode character U+001E (INFORMATION SEPARATOR TWO). For no-argument methods arguments
must be null
.
For instance, a repository may accept the following calls:
callSpecificOperation("SQL", "SELECT * FROM MY TABLE");
callSpecificOperation("myMethod", "[object-reference][u001E][argument1]...");
callSpecificOperation("", null);
For static MOF/ECore-like operations, the first argument should point to a class. For non-static operations the first argument should point to an object (that resembles this
pointer in Java).
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
operationName | a repository-specific operation name |
arguments | operation-specific arguments encoded as a string |
null
on error. TDAEXTERN __int64 TDACALL TDA_GetInverseAssociationEnd | ( | void * | tdaKernel, |
__int64 | rAssociationEnd | ||
) |
Obtains a reference to the inverse association end of the given association end (if association is bidirectional or a bidirectional part of an advanced association).
Note (M3): The function works also for association ends at Level M3.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rAssociationEnd | a reference to a known association end, for which the inverse end has to be obtained |
TDAEXTERN int TDACALL TDA_GetLinkedObjectPosition | ( | void * | tdaKernel, |
__int64 | rSourceObject, | ||
__int64 | rTargetObject, | ||
__int64 | rAssociationEnd | ||
) |
Returns the index (numeration starts from 0) of the target object in the list of objects linked to the source object by links of the given type.
Note (M3): The type of links may also be an association end at Level M3.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rSourceObject | a source object; this object must be an instance of the source class for the given association end |
rTargetObject | a target object; this object must be an instance of the target class for the given association end |
rAssociationEnd | a target association end that specifies the type of links |
TDAEXTERN int TDACALL TDA_GetIteratorLength | ( | void * | tdaKernel, |
__int64 | it | ||
) |
Places the iterator to the position 0 and returns the total number of elements to iterate through. Call resolveIteratorFirst
or resolveIterator
to move the iterator.
Note (adapters): If not implemented in a repository adapter, TDA Kernel traverses all the elements and stores them in a temporary list. Thus, the first call will take the linear execution time, while all subsequent calls will take the constant time. The same refers to the resolveIterator
function. If both getIteratorLength
and resolveIterator
are used, the temporary list is created only once.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
it | an iterator reference |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForLinkedObjects | ( | void * | tdaKernel, |
__int64 | rObject, | ||
__int64 | rAssociationEnd | ||
) |
Returns an iterator for objects linked to the given start object by links of the given type.
Note (M3): The type of links may also be an association end at Level M3.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rObject | a start object, for which the iterable objects are linked this object must be an instance of the source class for the given association end |
rAssociationEnd | a target association end that specifies the type of links |
TDAEXTERN __int64 TDACALL TDA_CreateAdvancedAssociation | ( | void * | tdaKernel, |
const char * | name, | ||
bool | nAry, | ||
bool | associationClass | ||
) |
Creates an n-ary association, an association class, or an n-ary association class.
An advanced association behaves likes a class (although it might not be a class internally) with n bidirectional associations attached to it. To specify all n association ends, call createAssociation
n times, where a reference to the n-ary association has to be passed instead of one of the class references. N-ary association links can be created by means of createObject
, and n-ary link ends can be created by calling createLink
n times and passing a reference to the n-ary link instead of one of the object references.
Note (adapters): The underlying repository is allowed to create an n-ary association class, even when nAry or associationClass is false
.
Note (adapters): If a repository adapter does not implement this function, TDA kernel will implement this function by introducing an additional class.
Note (M3): The M3 level can be used to get/set the cardinality, if the repository supports constraints and the M3 level operations. Cardinality constraints must be accessible via M3 for that.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
name | the name of the advanced association (the class name in case of an association class) |
nAry | whether the association is an n-ary association |
associationClass | whether the association is an association class |
TDAEXTERN __int64 TDACALL TDA_GetIteratorForLinguisticClasses | ( | void * | tdaKernel | ) |
Returns an iterator for all quasi-linguistic classes at Level M3.
Note (M3): This function works only at Level M3.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
TDAEXTERN __int64 TDACALL TDA_FindAssociationEnd | ( | void * | tdaKernel, |
__int64 | rSourceClass, | ||
const char * | targetRoleName | ||
) |
Obtains a reference to an association end (by its role name) starting at the given class.
Note (adapters): If not implemented in the adapter, TDA kernel will implement it by means of getIteratorForAllOutgoingAssociationEnds
.
Note (M3): The function works also, when searching for association ends at Level M3.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
rSourceClass | a class that is a source class for the association, or one of its subclasses |
targetRoleName | a role name associated with the target association end |
TDAEXTERN const char* TDACALL TDA_SerializeReference | ( | void * | tdaKernel, |
__int64 | r | ||
) |
Creates a string representation of the given reference, which survives the current session. For the next session, TDA kernel will use this string to get another reference to the same element by means of deserializeReference
. This is essential for storing inter-repository relations.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
r | the reference to serialize |
null
on error. TDAEXTERN __int64 TDACALL TDA_ResolveIteratorNext | ( | void * | tdaKernel, |
__int64 | it | ||
) |
Moves the iterator forward and gets the element at that position.
tdaKernel | a pointer to TDA Kernel returned by TDA_GetTDAKernelReference |
it | an iterator reference |