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 »


 
Writes the original source code of a specified schema to a file on the local file system. This function is only applicable on schemata that has been compiled with the option STORING_SOURCE.
Header:
#include "sdai.h"
Prototype:
EdmiError edmiRemoteGetSchemaSource(SdaiServerContext serverContextId,
                                     SdaiInteger       schemaType,
                                     SdaiString        schemaName,
                                     SdaiString        extraSchemaName,
SdaiOptions options,
SdaiString schemaFileName,
SdaiInvocationId *edmiInvocationId);
 
Arguments:

serverContextId

Context identification, from edmiDefineServerContext

schemaType

The type of schema for which to retrieve the source code. Supported schema types are EXPRESS_SCHEMA_TYPE, RULE_SCHEMA_TYPE, QUERY_SCHEMA_TYPE and EXPRESS_X_SCHEMA_TYPE.

schemaName

The name of the schema for which to retrieve the source code. If the <schemaType> is RULE_SCHEMA_TYPE or QUERY_SCHEMA_TYPE, this argument shall be the name of the parent Express Schema.

extraSchemaName

If the <schemaType> is RULE_SCHEMA_TYPE or QUERY_SCHEMA_TYPE, this argument shall be the name of the Rule Schema or Query Schema.

options

See description of available options below.
Options may be joined by using the bitwise OR operator. Default behaviour is that no subtypes be included in the returned entity extent.

schemaFileName

The name of the file on the local file system that will receive the schema source code.

edmiInvocationId

Currently not used.

Options: Descriptions:

MAKE_LINE_NUMBERS

A line sequence number will be written on the beginning of each line when the schema(ta) is displayed in textual format.

MAKE_LOG_LINE_NUMBERS

A line sequence number will be written on the beginning of each line when the log is displayed in textual format.

SHOW_HTML

The configured Internet Browser will be invoked and browse the produced HTML representation of the specified Express schema(ta).

Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an _EDMinterface_ error code. Use edmiGetErrorText to get the error text corresponding to the error code.
Example:
EdmiError rstat;
SdaiInteger nWrn, nErr;
SdaiServerContext myContext;
SdaiSchema schemaId;
 
/* Define Remote Server Context */
rstat = edmiDefineServerContext("MyRemoteServerContext",
"Johnny", "Supervisor", "cf37ftr", 
"TCP", "9090", "MyServerHost", 
NULL, NULL, NULL, NULL, NULL, &myContext); 
 
/* Compile schema */
rstat = edmiRemoteDefineSchema(myContext, EXPRESS_SCHEMA_TYPE,
"c:/data/MyFile.exp", "c:/tmp/MyFile.dia", "MySchema", 
DELETING_EXISTING_SCHEMAS | STORING_SOURCE, 
&nWrn, &nErr, NULL); 
 
/* Get the id of schema MySchema */
rstat = edmiRemoteGetSchema(myContext, "MySchema",
&schemaId, NULL); 
 
/* Get the HTML source
of schema MySchema */ 
rstat = edmiRemoteGetSchemaSource(myContext, EXPRESS_SCHEMA_TYPE,
"MySchema", NULL, SHOW_HTML,  
"c:/out/MySchema.html", NULL); 
. . .

  • No labels