Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

 

Code Block
languagecpp
themeConfluence
EdmiError edmiRemoteCopyModel(SdaiServerContext serverContextId,
                                SdaiModel         modelId,
                                SdaiRepository    targetModelRepositoryId,
                                SdaiString        remoteTargetModelName,
                                SdaiModel         *newModelId,
                                SdaiInvocationId  *edmiInvocationId);


Creates a copy of a model with all its contents within a remote EDMdatabase

...

.

...

This function is only applicable to data models. The executing EDMuser must have read access to the source model. The source model will not be affected by this operation and may be open or closed. The source and target models will be two independent populations of the same underlying Express Schema.

...

Arguments

...

1TypeNameComment
2 SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

3 SdaiModel

modelId

The modelId that uniquely identifies the source model in the EDMdatabase

4 SdaiRepository

targetModelRepositoryId

The repositoryId that uniquely identifies the repository in which to create a copy of the model.

5 SdaiString

remoteTargetModelName

The name to assign to the new copy of the model.

6 SdaiModel

newModelId

A variable that will receive the modelId that uniquely identifies the new copy of the model in the EDMdatabase

7 SdaiInvocationId

edmiInvocationId

Currently not used.

...

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

OptionComment
Option nameComment

 

Example

...

 

Code Block
languagecpp
 EdmiError rstat;
 SdaiServerContext myContext;
 SdaiModel modId, copyModId;
 SdaiRepository repositoryId;
 /* Create Server Context */
 rstat = edmiDefineServerContext("MyContext",

...


 "Johnny", "Supervisor", "cf37ftr",

...

 
 "TCP", "9090", "MyServerHost",

...

 
 NULL, NULL, NULL, NULL, NULL, &myContext);

...

 
  
 /* Get the modelId of MyModel */

...


 rstat = edmiRemoteGetModelBN(myContext, "DataRepository",

...


 "MyModel", &modId, NULL);

...

 
  
 /* Create a repository for

...


 containing my copy of MyModel */

...

  
 rstat = edmiRemoteCreateRepository(myContext,

...


 "MyCopyRepository", NULL);

...

 
  
 /* Get the repositoryId */

...


 rstat = edmiRemoteGetRepository(myContext,

...


 "MyCopyRepository", &repositoryId, NULL);

...

 
  
 /* Copy MyModel to MyCopy in MyCopyRepository */

...


 rstat = edmiRemoteCopyModel(myContext, modId,

...


 repositoryId, "MyCopy", &copyModId, NULL);

...

 
 . . .

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"