Requirements for Using the Type Dictionary

Creating Metadata

SAS provides wizards and procedures to create metadata for the resources and information assets that are most commonly used and shared among SAS applications. We recommend that you use these wizards and procedures to create metadata, instead of coding metadata definitions directly.
If a wizard or procedure does not exist for the metadata that you want to create, and you have to create a logical metadata definition, the definition must meet the following requirements:
  • Use the metadata type indicated in the appropriate type definition’s MetadataType attribute for its primary object.
  • The primary object should specify the following:
    • the type definition’s TypeName value in the PublicType attribute.
    • a valid usage version value in the UsageVersion attribute. In SAS 9.3, most objects are versioned as 1000000.
    • an association to a valid container object, if it is specified in the type definition.
    • associations to appropriate secondary objects.
A goal of the SAS type dictionary is to save customers from having to know the details of an object type’s logical metadata definition. As a result, the type definition internalizes information that is necessary to retrieve the logical metadata definition. (For example, the metadata template is not shown in a type definition’s Properties window.) To determine the association names and secondary metadata types used in an object type’s logical metadata definition, issue a GetMetadata request on an existing object of the object type in which you are interested. Set the OMI_FULL_OBJECT (2) flag. OMI_FULL_OBJECT is a new flag that instructs the SAS Metadata Server to use the metadata template from an object’s type definition to process the request. The metadata server will return the full logical metadata definition.
A logical metadata definition that is created with the SAS Open Metadata Interface or SAS Java Metadata Interface is considered a custom logical metadata definition. SAS does not guarantee that custom logical metadata definitions will take advantage of the full functionality of SAS. To ensure that full functionality is available, use SAS wizards and procedures to create metadata.
SAS does not support custom type definitions.

Querying Metadata

A GetMetadata request retrieves specified attributes and associations of a SAS Metadata Model metadata object. If you want to get an object’s full logical metadata definition, specify the appropriate PrimaryType subtype in the INMETADATA parameter, and set the OMI_FULL_OBJECT (2) flag. The SAS Metadata Server reads the value in the object’s PublicType attribute to fulfill the request. If the object does not store a value in the PublicType attribute, then GetMetadata returns specified information for the SAS Metadata Model metadata object only. For more information about the OMI_FULL_OBJECT flag, see Using the OMI_FULL_OBJECT Flag.
To list all instances of an object type that is in the type dictionary with a GetMetadataObjects request, perform the following steps.
  1. Specify the MetadataType value from the type definition in the TYPE parameter.
  2. Set the OMI_XMLSELECT (128) flag.
  3. Submit an <XMLSELECT> element that specifies the object’s TypeName value in the OPTIONS parameter, as follows:
    <XMLSELECT search="@PublicType='TypeName'"/>
    Using the TypeName value ensures that the correct type definition is used to process the GetMetadataObjects request.
For more information about querying objects with the SAS Java Metadata Interface, see Getting and Updating Existing Objects.
For more information about querying objects with the SAS Open Metadata Interface, see Getting the Properties of a Specified Metadata Object and Getting All Metadata of a Specified Metadata Type.

Deleting Objects

A DeleteMetadata request that specifies a PrimaryType subtype always uses the type dictionary to process the request unless you specify a user-defined template.
For more information about deleting objects with the SAS Java Metadata Interface, see Deleting Objects.
For more information about deleting objects with the SAS Open Metadata Interface, see Deleting Metadata Objects.