Show TOC

Importing a Vocabulary FileLocate this document in the navigation structure

Instructions for importing a vocabulary file into the Service Builder.

Context

After a vocabulary file has been uploaded into the central Vocabulary Repository, you can import it into the Service Builder to annotate data model artifacts. Subsequently, to import a vocabulary file into the Service Builder and use this for working with annotations, proceed as follows:
  1. Start the Service Builder in transaction SEGW.
  2. In edit mode, right click the Data Model folder in the tree view and choose Start of the navigation path Import Next navigation step Vocabulary End of the navigation path.
    Note Vocabulary menu is available only for the projects of type Service with Vocabulary-Based Annotations and Annotation Model for Referenced Service.
  3. Select the required vocabulary(s) and click Continue (Continue).In the tree view a new folder with the name Vocabularies will be created under Data Model and the vocabularies are imported into this folder.
  4. Expand Start of the navigation path Vocabularies Next navigation step Import Next navigation step Import Vocabulary ID End of the navigation path and double click on Terms to see the details of the imported annotations in the mass maintenance view.
    Note If the selected vocabulary has a reference, then these references will be displayed in the folder named Implicit References in Vocabulary folder. End of the note.
If the imported vocabulary file contains terms of type Enum and Type definition, these will also be imported and a folder will be created for Enum type and Type Definition inside Imported vocabulary ID folder.
  • Enum Type: these are nominal scalar types that represent a series of related values. Enumeration (or Enum) types expose these related values as members of the enumeration.
  • Type Definition: a type definition defines a specialization of one of the primitive types. Type definitions can be used wherever a primitive type is used (other than as the underlying type in a new type definition), and are type-comparable with their underlying types and any type definitions defined using the same underlying type.

Results

Once the vocabulary definitions are added to the data model, the terms from the vocabulary definition can be used to annotate the vocabulary based services if the term applies to the respective OData artifacts.
Note Parsing will treat both V3 and higher terms as valid items and update appropriately. For example, both Value Term (V3) and Term (higher terms than V3) are valid and will be updated to Term node. Both Using and Reference -> Include elements are valid to reference a vocabulary definition. When adding vocabularies into the data model, if the referenced vocabulary is available in the Vocabulary Repository, then it will also be imported into the data model in the Implicit References folder.