Using the OMI_FULL_OBJECT Flag

The following is an example of a GetMetadata method call that sets the OMI_FULL_OBJECT (2) flag. The OMI_FULL_OBJECT flag instructs the metadata server to use a type definition from the SAS type dictionary to identify the association names to expand when getting the specified object. The flag is effective only if the specified object is a PrimaryType subtype in the SAS Metadata Model and stores the name of a type definition in the PublicType attribute. If the specified object is not a PrimaryType subtype or does not store a PublicType value, the flag has no effect.
<GetMetadata>
 <Metadata>
   <Column Id="A5TJRDIT.B700002E"/>
 </Metadata>
 <NS>SAS</NS>
<!-- OMI_FULL_OBJECT -->
<Flags>2</Flags>
 <Options/>
</GetMetadata>
Here is an example output from the request:
<!-- Using the GETMETADATA method -->
<Column Id="A5TJRDIT.B700002E">
	<AccessControls/>
	<Table>
		<PhysicalTable ObjRef="A5TJRDIT.B200000J" Name="EMPINFO" Desc="" 
PublicType="Table" UsageVersion="1000000"/>
</Table>
	<Notes/>
	<Extensions/>
	<Documents/>
	<Properties/>
	<PropertySets/>
	<ForeignKeyAssociations/>
	<Keys>
		<UniqueKey ObjRef="A5TJRDIT.BH000003" Name="EMPINFO.ic_id" Desc=""/>
</Keys>
	<Keywords/>
</Column>
Although a Column object cannot stand alone in a SAS Metadata Repository, it is categorized as a PrimaryType subtype in the model, because Column objects can have different security defined on them than the security defined on their owning table (for example, to make some columns available to some users and not others).
When OMI_FULL_OBJECT is set with no other GetMetadata flags, the method retrieves the Id, Name, and Desc values for all secondary objects retrieved by the type definition, unless an associated object is designated as a connection point. A connection point is an association to another common or shared object that is external to this object definition. When a connection point is encountered, the ObjRef attribute is used to identify the associated object in the output XML instead of the Id attribute, and the object’s PublicType and UsageVersion values are returned in addition to Name and Desc.
Any attributes that are explicitly specified in the GetMetadata request’s INMETADATA parameter are returned only for the object specified in the INMETADATA parameter.
OMI_FULL_OBJECT interacts with other GetMetadata flags as follows:
  • OMI_ALL_SIMPLE: Returns all simple attributes for all objects returned by the type definition, unless they are connection points. For connection points, only ObjRef, Name, Desc, PublicType, and UsageVersion are returned.
  • OMI_ALL: Behaves the same as OMI_ALL_SIMPLE, unless OMI_TEMPLATE is also set.
  • OMI_TEMPLATE: When OMI_TEMPLATE and OMI_FULL_OBJECT are set together, the SAS Metadata Server behaves as if OMI_FULL_OBJECT were not set, and looks for a template in the <TEMPLATES> element of the OPTIONS parameter for information to process the request. Because OMI_FULL_OBJECT is set, however, any embedded or nested objects in the override template are expanded as well. These nested definitions can be overridden by a named template. For more information, see SAS 9.3 Template Changes.
    An embedded object is an object that can stand alone in the SAS Metadata Repository or be part of another object. A nested object is an object that is part of another object and cannot exist in the SAS Metadata Repository without an association to the owning object. Prompt is an example of an embedded object. Column is an example of a nested object.
  • OMI_LOCK: Locks all of the objects returned by the object's type definition, including embedded or nested objects.
  • OMI_UNLOCK and OMI_UNLOCK_FORCE: Unlock all of the objects returned by the object's type definition, including embedded or nested objects.
  • OMI_INCLUDE_SUBTYPES: Has no affect on the information returned by the type definition.
  • OMI_SUCCINCT, OMI_NOEXPAND_DUPS, OMI_NOFORMAT, and OMI_DEPENDENCY_USEDBY: Behave normally on all objects (embedded or nested) that are returned by the type definition.