Metadata Access (IOMI Interface) |
Gets all of the metadata types in a namespace.
Category: Management methods
Syntax |
rc=GetTypes(types,ns,flags,options);
Parameters |
Parameter | Type | Direction | Description |
---|---|---|---|
rc | N | out | Return code for the method. For more information, see Return Code. |
types | C | out | Returned XML list of metadata types. |
ns | C | in | Namespace to use as the context for the request. Valid values are REPOS or SAS. |
flags | L | in |
|
options | C | in |
Passed indicator for options.
|
Details |
The GetTypes method has two behaviors, depending on whether the OMI_SUCCINCT (2048) flag and its corresponding <REPOSID> element are specified.
Used without the flag, the method returns an XML string that lists all of the metadata types defined in the specified namespace.
Used with the flag in the SAS namespace, the method returns an XML string that lists only metadata types for which objects exist in the specified repository.
The XML string is returned in the TYPES parameter. Each metadata type listed has a HasSubtypes= attribute that indicates whether the metadata type has any subtypes. If this attribute has a value of 0, then the metadata type does not have any subtypes. If it has a value of 1, then the metadata type does have subtypes.
The <REPOSID> element specifies a repository identifier in the following form:
<Reposid>A0000001.RepositoryId</Reposid>
A0000001 is the SAS Repository Manager identifier. RepositoryId is the unique 8-character identifier of a SAS Metadata Repository. The <REPOSID> element must be specified with the OMI_SUCCINCT flag.
Example 1: Standard Interface |
The following is an example of how to issue the GetTypes method regardless of the programming environment. The request gets the metadata types defined in the SAS namespace. For an example of a GetTypes request that sets the OMI_SUCCINCT (2048) flag, see Using GetTypes to Get Actual Metadata Types in a Repository.
ns= "SAS"; flags= 0; options= ""; rc=GetTypes(types,ns,flags,options);
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 --> <GetTypes> <Types/> <NS>SAS</NS> <Flags>0</Flags> <Options/> </GetTypes>
Related Methods |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.