edmiRemoteListModels

EdmiError edmiRemoteListModels (SdaiServerContext serverContextId,
                                 SdaiString        repositoryFilter, 
                                 SdaiString        nameFilter, 
                                 SdaiString        ownerFilter, 
                                 SdaiString        groupOwnerFilter, 
                                 SdaiString        schemaFilter, 
                                 SdaiOptions       options, 
                                 SdaiString        **foundNames,
                                 SdaiInvocationId  *edmiInvocationId);

Performs a query on the entity extent of the EDM_MODEL entity in the ExpressDataManager model and lists all models that match an Express-X conditional statement. The Express-X conditional statement will be constructed from five user specified filters. The five available filters are;

  • The Model Filter.

The model filter gives direct access to all the attributes of the EDM_MODEL instances. The following is the declaration of the EDM_MODEL entity:

ENTITY edm_model;
name : SIMPLEID; 
model_id : UNIQUE_INDEX; 
created : TIME_STAMP; 
owner : edm_user; 
group : edm_group; 
administrators : SET OF USER_OR_GROUP; 
protection : INTEGER; 
access_rights_for : SET OF access_rights; 
repository : edm_repository; 
schema : edm_schema; 
schema_map : OPTIONAL edm_schema_map; 
sdai_model : sdai_model;
packed : BOOLEAN;
string_encoding : OPTIONAL STRING; 
last_time_opened_for_read : PACKED_DATE; 
last_opened_for_read_by : edm_user; 
last_time_opened_for_write : PACKED_DATE; 
last_opened_for_write_by : edm_user; 
last_time_closed : PACKED_DATE; 
instances : INTEGER; 
data_size : INTEGER; 
step_id_model : OPTIONAL sdai_model; 
step_data_model : OPTIONAL sdai_model; 
description : OPTIONAL STRING; 
versions : OPTIONAL LIST OF edm_model_version; 
last_model_version_id : OPTIONAL INTEGER; 
END_ENTITY;
 
The model filter will be included in the resulting Express-X conditional statement as follows;
". . . AND (<nameFilter>) AND . . ."
Examples:
"name LIKE 'IFC*'"
lists all model with a name that starts with "IFC".  
"owner :<>: repository.owner"
lists all models that are not owned by the repository owner.
 

  • The Repository Filter

The repository filter gives access to the attributes of the EDM_REPOSITORY instance in the models repository attribute. The following is the declaration of the EDM_REPOSITORY entity:

ENTITY edm_repository;
name : SIMPLEID;
repository_id : UNIQUE_INDEX;
created : TIME_STAMP;
owner : edm_user;
group : edm_group;
administrators : SET OF USER_OR_GROUP;
protection : INTEGER;
access_rights_for : SET OF access_rights;
models : SET OF edm_model;
last_time_opened : PACKED_DATE;
last_opened_by : edm_user;
last_time_closed : PACKED_DATE;
sdai_repository : sdai_repository;
user_defined : BOOLEAN;
description : OPTIONAL STRING;
END_ENTITY;

The repository filter will be included in the resulting Express-X conditional statement as follows;
". . . AND (repository.<repositoryFilter>) AND . . ."
Examples:
"name = 'DataRepository'"
lists all models in the DataRepository.  
"user_defined"
lists all models in user defined repositories.
 

  • The Owner Filter

The owner filter gives access to the attributes of the EDM_USER instance in the models owner attribute. The following is the declaration of the EDM_USER entity:

ENTITY edm_user;
name : SIMPLEID; 
user_id : UNIQUE_INDEX; 
user_name : OPTIONAL STRING; 
created : TIME_STAMP; 
last_time_connected : PACKED_DATE; 
default_model_repositories_protection : INTEGER; 
default_dictionary_models_protection : INTEGER; 
default_data_models_protection : INTEGER; 
default_extra_schemata_protection : INTEGER; 
default_archived_models_protection : INTEGER; 
creating_repository_permission : OPTIONAL BOOLEAN; 
owning_system_instances : OPTIONAL SET OF entity_instance; 
password_defined : BOOLEAN; 
password : STRING; 
END_ENTITY;
 
The owner filter will be included in the resulting Express-X conditional statement as follows;
". . . AND (owner.<ownerFilter>) AND . . ."
Examples:
"user_id = 1"
lists all models owned by the superuser.  
"name = 'Johnny'"
lists all models owned by Johnny.

  • The Group Owner Filter

The group owner filter gives access to the attributes of the EDM_GROUP instance in the models group attribute. The following is the declaration of the EDM_GROUP entity:

ENTITY edm_group;
name : SIMPLEID;
group_id : UNIQUE_INDEX;
created : TIME_STAMP;
users : SET OF edm_user;
description : OPTIONAL STRING;
default_model_repositories_protection : INTEGER;
default_dictionary_models_protection : INTEGER;
default_data_models_protection : INTEGER;
default_extra_schemata_protection : INTEGER;
default_archived_models_protection : INTEGER;
creating_repository_permission : OPTIONAL BOOLEAN;
owning_system_instances : OPTIONAL SET OF entity_instance;
END_ENTITY;
 
The group owner filter will be included in the resulting Express-X conditional statement as follows;
". . . AND (group.<groupOwnerFilter>) AND . . ."
Examples:
"group_id = 1"
lists all models owned by the 'sdai-group' group.  
"name = 'Supervisor'"
lists all models owned by the 'Supervisor' group.
 

  • The Schema Filter

The schema filter gives access to the attributes of the EDM_SCHEMA instance in the models schema attribute. The following is the declaration of the EDM_SCHEMA entity:

ENTITY edm_schema;
name : SIMPLEID;
original_name : SIMPLEID;
schema_id : UNIQUE_INDEX;
sdai_schema : schema_definition;
dictionary_model : sdai_model;
models : SET OF edm_model;
schema_maps : SET OF edm_schema_map;
rule_schemata : SET OF edm_rule_schema;
query_schemata : SET OF edm_query_schema;
archived_models : OPTIONAL SET OF edm_archived_model;
xml_configuration : SET OF edm_xml_configuration;
description : OPTIONAL STRING;
source_stored : BOOLEAN;
source_file : OPTIONAL express_source_file;
line_number_offset : OPTIONAL INTEGER;
instantiable : BOOLEAN;
compilation_errors : OPTIONAL SET OF STRING;
compilation_warnings : OPTIONAL SET OF STRING;
compilation_sdai_errors : OPTIONAL SET OF STRING;
compilation_options : OPTIONAL INTEGER;
END_ENTITY;
 
The schema filter will be included in the resulting Express-X conditional statement as follows;
". . . AND (schema.<schemaFilter>) AND . . ."
Examples:
"sorce_stored"
lists all models with underlying Express Schemas that was compiled with the STORING_SOURCE option.
"original_name LIKE 'Ifc*'"
lists all models of schemas with names starting with "Ifc".

Arguments


TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiString

repositoryFilter

A filter that may refer to any attribute of the EDM_REPOSITORY instance in the repository attribute of a models EDM_MODEL instance in the ExpressDataManager model.
See example below and item 2 in the general description above.

SdaiString

nameFilter

A filter that may refer to any attribute of a models EDM_MODEL instance in the ExpressDataManager model.
See example below and item 1 in the general description above.

SdaiString

ownerFilter

A filter that may refer to any attribute of the EDM_USER instance in the owner attribute of a models EDM_MODEL instance in the ExpressDataManager model.
See example below and item 3 in the general description above.

SdaiString

groupOwnerFilter

A filter that may refer to any attribute of the EDM_GROUP instance in the group attribute of a models EDM_MODEL instance in the ExpressDataManager model.
See example below and item 4 in the general description above.

SdaiString

schemaFilter

A filter that may refer to any attribute of the EDM_SCHEMA instance in the schema attribute of a models EDM_MODEL instance in the ExpressDataManager model.
See example below and item 4 in the general description above.

SdaiOptions

options

Currently not used.

SdaiString

foundNames

A variable that will receive a pointer to a buffer of model names that match Express-X conditional statement generated from all the given filters.

SdaiInvocationId

edmiInvocationId

Currently not used.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

 

Options


  

OptionComment
Option nameComment

 

Example


 

/* List all models of an underlying Express
 Schema with a name that starts with 'IFC' 
 and that is defined in the repository 
 named 'GeneralHospital' */ 
 int i;
 EdmiError rstat;
 SdaiServerContext suContext;
 SdaiString *modNames;
  
 /* Define Remote Server Context
 for the superuser */ 
 rstat = edmiDefineServerContext("SuperUserContext",
 "superuser", NULL, "xfx56kl9",
 "TCP", "9090", "MyServerHost",
 NULL, NULL, NULL, NULL, NULL, &suContext); 
  
 /* List all models in the repository 'GeneralHospital'
 that have an underlying Express Schema with a name 
 that starts with 'IFC' */  
 rstat = edmiRemoteListModels(suContext, "NAME = 'GeneralHospital'",
 NULL, NULL, NULL, "NAME LIKE 'IFC*'", 0, 
 &modNames, NULL); 
 i = 0;
 while (modNames[i]) {
 printf("\nModel %s", modNames[i]); 
}edmiFree(modNames[i++]);



 

See also

Filter by label

There are no items with the selected labels at this time.