Previous Page | Next Page

Metadata Access (IOMI Interface)

GetMetadataObjects

Gets all metadata objects of the specified metadata type in the specified repository.

Category: Read methods


Syntax

rc=GetMetadataObjects(reposid,type,objects,ns,flags,options);


Parameters

Parameter Type Direction Description
rc N out Return code for the method. For more information, see Return Code.
reposid C in Target repository identifier.
type C in Metadata type name.
objects C out Returned list of metadata objects.
ns C in Namespace to use as the context for the request.
flags L in
OMI_DEPENDENCY_USED_BY=16384

Specifies to include objects from all project repositories in the method results.

OMI_DEPENDENCY_USES=8192

Specifies to include objects from all public repositories (the foundation repository and custom repositories) in the method results.

OMI_NO_DEPENDENCY_CHAIN=16777216

Obsolete in SAS 9.2.

OMI_GET_METADATA=256

Specifies to execute a GetMetadata call for each object that is returned by the GetMetadataObjects request.

OMI_INCLUDE_SUBTYPES=16

Specifies to get all of the metadata objects that are subtypes of the specified metadata type and metadata objects of the specified metadata type. If OMI_XMLSELECT is specified, it affects the subtypes that are retrieved.

OMI_MATCH_CASE=512

Specifies to perform a case-sensitive search that is based on criteria specified in the <XMLSELECT> element. The OMI_MATCH_CASE flag must be used with the OMI_XMLSELECT flag, or the flag is ignored.

OMI_XMLSELECT=128

Specifies to check the OPTIONS parameter for search criteria that filters the objects that are returned. The search criteria are passed as a search string in an <XMLSELECT> element.


options C in Passed indicator for options.

<DOAS Credential="credHandle"/>

Enables a client to make a metadata request for another user. For more information, see <DOAS> Option.

<XMLSELECT>

Specifies a search string to filter the objects that are retrieved. See Filtering a GetMetadataObjects Request for more information.


Details

The GetMetadataObjects method gets a list of all metadata objects of the metadata type specified in the TYPE parameter from the repository specified in the REPOSID parameter. The default behavior is to get Identifying Metadata for each metadata object.

Flags enable you to get additional properties and to expand or filter the objects that are retrieved:

For usage information, see Using GetMetadataObjects to Get All Metadata of a Specified Metadata Type, and Filtering a GetMetadataObjects Request.

The behavior of the OMI_DEPENDENCY_USED_BY and OMI_DEPENDENCY_USES flags is different in SAS 9.2 than in previous versions of SAS. In SAS 9.2, set OMI_DEPENDENCY_USES to get metadata objects from all public repositories (the foundation repository and all custom repositories) in the method results, and to get metadata objects from the specified repository. Set OMI_DEPENDENCY_USED_BY to get metadata objects of the specified metadata type from all project repositories in the method results, and to get metadata objects from the specified repository. Setting both flags will return metadata objects from all repositories that are registered in the SAS Metadata Server (foundation, custom, and project).

When the GetMetadataObjects method is issued in the SAS namespace, the REPOSID parameter is required, unless the OMI_DEPENDENCY_USED_BY flag or the OMI_DEPENDENCY_USES flag or both is specified. When you specify a REPOSID value in addition to one or both of the flags, GetMetadataObjects gets metadata objects first from the repository specified in the REPOSID parameter, and then gets metadata objects from the repositories specified by the flags. A request that specifies to get objects from all registered repositories returns a specified repository first, followed by the foundation repository, followed by custom repositories in the order they were registered, and then followed by project repositories in the order they were registered.

When the GetMetadataObjects method is issued in the REPOS namespace, it ignores the REPOSID parameter and searches the SAS Repository Manager.


Example 1: Standard Interface

The following is an example of how to issue a GetMetadataObjects method regardless of the programming environment. The request gets all objects defined for metadata type PhysicalTable in repository A0000001.A5345678, and does not set any flags.

<!-- set repository Id and type -->
reposid="A0000001.A5345678";
type="PhysicalTable";
ns="SAS";
flags=0;
options="";

rc=GetMetadataObjects(reposid,type,objects,ns,flags,options);

<!-- XML string returned in objects parameter -->

<Objects>
  <PhysicalTable Id="A5345678.A5000001" Name="New Table"/>
  <PhysicalTable Id="A5345678.A5000002" Name="New Table2"/>
</Objects>


Example 2: DoRequest Method

The following is an example of an XML string that shows how to format the request in example 1 for the INMETADATA parameter of the DoRequest method.

<!-- XML string for inMetadata= parameter of DoRequest method call -->
<GetMetadataObjects>
  <Reposid>A0000001.A5345678</Reposid>
  <Type>PhysicalTable</Type>
  <Objects/>
  <NS>SAS</NS>
  <Flags>0</Flags>
  <Options/>
</GetMetadataObjects>


Related Methods

Previous Page | Next Page | Top of Page