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:
- Start the Service Builder in transaction
SEGW.
- In edit mode, right click the Data Model folder in the
tree view and choose .
Note Vocabulary menu is available only for the projects of type
Service with Vocabulary-Based Annotations and
Annotation Model for Referenced
Service.
- Select the required vocabulary(s) and click
(Continue).In the tree view a new folder with the name
Vocabularies is created under Data Model and the
vocabularies are imported into this folder.
- Expand 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 are displayed in the
folder Implicit References in Vocabulary
folder.
If the imported vocabulary file contains terms of type Enum and Type definition,
these are also imported and a folder is 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 treats 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 are
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 is also
imported into the data model in Implicit References
folder.