Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »


 
Returns a numeric typeID that uniquely identifies a defined type instance in the EDMdatabase. The actual defined type is specified by the name of the defined type and a numeric modelID that uniquely identifies a data model in the EDMdatabase that has the Express schema that defines the actual defined type as the underlying schema.
The returned typeID can be used to identify the actual defined type in subsequent EDMinterface operations. The returned typeID will be a constant value throughout the lifetime of the actual defined type instance in the EDMdatabase.
If the actual defined type is not found in the actual dictionary model, then this operation will search for the specified defined type in the EDMmetaMetaModel named SDAI_DICTIONARY_MODEL_DICTIONARY_DATA.
The specified data model must be open before this function can be successfully performed.
Related functions: edmiGetDefinedTypeBN , edmiGetSchema , sdaiGetAttrDefinition , sdaiGetAttrDefinitionBN
Header:
#include "sdai.h"
Prototype:
SdaiInstance edmiGetDefinedType(SdaiModel  modelId,
                                 SdaiString typeName); 
Arguments:

modelId

A numeric modelID that uniquely identifies the data model of interest in the EDMdatabase.
The modelID is returned from the functions: sdaiCreateModel , sdaiCreateModelBN , sdaiOpenModelBN , edmiGetModel , edmiGetModelBN , sdaiGetInstanceModel

typeName

Specifies the name of the defined type of interest. A defined type name is unique within an Express schema, hence the combination of the arguments <modelId> and <typeName> uniquely identifies a defined type instance in an EDMdatabase. Names of defined types are case insensitive.

Returns:
A numeric typeID that uniquely identifies a defined type instance in an EDMdatabase will be returned. The typeID can have the following values:
typeID = 0 : Error in operation. Use sdaiErrorQuery to get error code and edmiGetErrorText to get the error message.
typeID != 0: Function successfully performed.
EXAMPLE
SdaiModel modelId;
SdaiInstance typeId;
. . .
typeId = edmiGetDefinedType(modelId,"Length_Measure");
if (! typeId) {
/* Error in operation */ 
printf("\nError: %s in edmiGetDefinedType\n", 
edmiGetErrorText(rstat)); 
goto error; 
}
printf("\ntypeId: %lu", typeId);
. . .

  • No labels