11 Working with Externally Created Data Schemas

This chapter describes how you work with data schemas that you create outside of Oracle Communications Service Catalog and Design - Design Studio. Design Studio uses XML data schemas for domain modeling. XML data schemas store data definitions and standardize data usage across domains and platforms.

About Design Studio Data Schemas

You create an XML data schema by either creating a Model project or by creating a schema in an application project. Design Studio saves the data schema entity to the root level of the project's dataDictionary directory by default. The Data Schema entity is represented by an XSD file and a companion file in the local file system.

You can also import any XML data schema file that was not created in Design Studio into a Design Studio project. If you create an XML data schema externally and edit it in Design Studio, you may lose data at the schema level and in the data model.

Modeling Data Using XML Data Schemas

Design Studio uses XML data schemas for data modeling. XML data schemas provide precise descriptions of data models that are bound by strict sets of rules, and they generate entities and associated features of a model. XML data schemas also support domain-specific requirements, such as inheritance and abstraction.

Design Studio simplifies using XML data schemas with the Data Dictionary. The Data Dictionary is a logical collection of data elements within the workspace and is presented within a set of views. These views enable you to visualize and manage the data elements configured in the workspace.

The Data Dictionary presents the data types available for use in the workspace. Various entities in the workspace contribute to the contents of the Data Dictionary. Common entities like Schema and Business Entity enable non-product-specific data type modeling. Product entities can also contribute data type information to the Data Dictionary.

The data schema is represented in Design Studio as two files: an XML schema file and a companion file. Design Studio uses the companion file to save payloads that are declared in a data schema. For example, a provisioning system may require that all root level elements have cardinality. However, the XML schema does not support cardinality for root level-type definitions. Design Studio saves this information in the data schema companion file. The companion file is hidden and is not visible in the Studio perspective.

About Supported XML Schema Features

Design Studio data schemas support a subset of the features of the XML Schema language. Some of the supported features are enhanced to optimize their use when modeling data.

Table 11-1 lists the XML Schema features that are supported.

Table 11-1 Supported XML Schema Features

Feature (Type) Description

Type Declaration

Supports the same definitions as the XML Schema specification.

Target Name Space

Supports the same definitions as the XML Schema specification.

Complex Content Type Definitions

Supports child structures and complex types.

Import Directives

Supports the same definitions as the XML Schema specification.

Cardinality/Occurrence

Supports the cardinality/occurrence of the elements (child simple element from the XML Schema perspective).

Also supports the cardinality on the type definitions on the root level, as well as child complex elements. Supports the various modeling needs of provisioning systems.

Max Length

Supports maximum length facets of XML Schema.

All rules of maximum length facets apply.

Min Length

Supports minimum length facets of XML Schema.

Enumeration

Supports the enumeration feature of the XML Schema specification, and enumerations for non-string elements.

Fulfills the requirements of the various modeling needs of provisioning and inventory systems.

Derived elements can extend the base enumerations, or exclude (restrict) them.

Annotations

Supports annotations on the elements and type definitions.

Deriving types by extension

Supports type definitions extended from other type definitions.

While you can model recursive structures in Design Studio, the system restricts the presentation of recursive structures. In Design Studio, a data schema is represented as a hierarchical tree. Design Studio does not allow infinite expansion of recursive tree nodes.

You can limit the number of levels to which nodes are expanded. See Design Studio Help for information about defining preferences.

Primitive Data Types

Supports the following primitive data types:

  • int

  • string

  • long

  • float

  • double

  • date

  • date and time

  • time

  • boolean

  • decimal

  • hexadecimal

About Unsupported Schema Directives and Elements

Design Studio data schemas support a subset of the features of the XML Schema language.

Table 11-2 lists the XML Schema features that are not supported.

Table 11-2 Unsupported Schema Directives and Elements

Schema Directives and Elements Description

Include Directives

Valid external schemas that are imported into Design Studio and have an include directive may cause unresolved type definitions and can be considered invalid by Design Studio validation framework.

No target namespace

Schemas that have no Target Name space defined are not supported.

Redefine

If an external schema is using the Redefine element, the validation may result in unresolved elements.

Abstract Element and Types

If an external schema contains an Abstract definition, Design Studio considers it a regular element and does force a substitution according to the XML Schema specification.

Attribute Declaration and Attributes Groups

If an external schema contains an Attribute Declaration, Design Studio considers it to be read-only element.

If an external schema contains an Attributes Group, Design Studio may not recognize it as a valid type.

Substitution groups

Design Studio ignores this attribute of an element.

Element Declarations

Design Studio considers any external schema containing element declarations as read-only type definition.

Unsupported Primitive Types

If an external schema has an element declaration with a primitive type that is not supported, Design Studio considers the type definition as undefined and shown as none.