Hide Comments

The import element is used to import RAPID Model child elements from other RAPID Models for usage in the scope of this RAPID Model.

Syntax

import [<namespace-name>.]<rapid-model-name>.(<data-model-name> | <resource-api-name> | <definition-library-name>) from "<import-uri>" [as <alias>]

Examples

import taxmasters.data.Taxation.GeneralTypes from "DataModels.rapid"

import taxmasters.data.Taxation.GeneralTypes from "http://data.taxmasters.com/DataModels.rapid" as data

import taxmasters.api.Taxation.GeneralTypes from "http://data.taxmasters.com/InterfaceModels.rapid" as api

Parameters

Name

Type

Description

<namespace-name>

SName(Namespace)

The Namespace identifier of the model to be imported.  The <namespace-name> MUST be specified and must match the namespace declared in the imported RAPID Model.  If the imported RAPID Model does not declare a namespace, the Import statement MUST NOT specify a namespace.

<rapid-model-name>

SName(RAPID Model)

The name of the RAPID Model from which a child element will be imported.

<data-model-name>

SName(Data Model)

The name of the Data Model to be imported.

<resource-api-name>

SName(Resource API)

The name of the Resource API model to be imported.

<definition-library-name>

SName(Definition Library)

The name of the definition library to be imported.

<import-uri>

Filepath or URI

The URI of the RAPID Model from which a child element will be imported. May be a file path (absolute, or relative to this RAPID Model file) or a URI.

<alias>

Name

Arbitrary short alias for this Import. May be used to disambiguate references to imported or locally defined model elements. MUST be unique in the context of this file.

Child Elements

None.

Parent Elements

None.

Discussion

References to Imported Definitions

Once a Data Model, Resource API, or Definition Library has been imported, its contained definitions may be referenced in qualified or scoped forms, depending on whether the referenced model element is uniquely named within the addressable scope of the referrer, and depending on whether the Import statement specifies an alias.

The rules for allowed reference forms are described in Model Element References.

Imported File Specification

Conformant implementations MUST allow imports using URLs with an HTTP or HTTPS scheme.  URLs with these schemes are expected to be portable across implementations and environments.
Conformant implementations MUST allow imports using URLs with a FILE scheme.  URLs with these schemes are expected to be portable across implementations.  FILE URLs are portable across environments only in cases where the referenced models are accessible through the same file structure specified in the URL.
Implementations MAY allow imports using URLs with schemes other than FILE, HTTP or HTTPS.  URLs with these schemes are not expected to be portable across implementations and environments.
Conformant implementations MUST allow imports using relative and absolute file paths in place of the <import-uri>.  The allowable file path is defined by the filesystem in use, and therefore some forms of file paths may not be portable across environments. Relative file paths SHOULD be interpreted as relative to the importing model.

 

 

 

Created with Help & Manual 6 and styled with Premium Pack Version 2.51 © by EC Software