Working with the MdOMIUtil Interface

Overview of the Tasks That Can Be Performed with the MdOMIUtil Interface

The MdOMIUtil interface provides wrapper methods for methods in the SAS Open Metadata Interface IOMI server interface. Many of the methods in the MdOMIUtil interface enable you to retrieve existing metadata objects from the SAS Metadata Server.
The MdOMIUtil interface also includes AddMetadata, UpdateMetadata, and DoRequest methods. The AddMetadata and UpdateMetadata methods enable you to pass XML metadata property strings that define SAS Metadata Model objects to add and update metadata objects directly on the SAS Metadata Server, instead of having to create Java objects. The DoRequest method enables you to pass XML-formatted IOMI method calls to the server. Use of these methods is not recommended. They duplicate functionality provided by Java object interfaces provided by the SAS Java Metadata Interface.
The following table summarizes the basic methods in the MdOMIUtil interface.
Basic MdOMIUtil Methods
Method Name
Description
getRepositories
Gets the ID and name of all repositories registered on the SAS Metadata Server.
getFoundationRepository
Returns the foundation repository for the connected SAS Metadata Server.
getFoundationReposID
Returns the ID of the foundation repository.
getMetadataAllDepths
Gets the properties (attributes and associations) of a specified metadata object.
getMetadataNoCache
Issues a GetMetadata request on the specified object, and then parses the output returned by the SAS Metadata Server so that it is stored in a HashMap. The HashMap contains attribute and association values in key=value pairs.
getMetadataObjectsNoCache
Issues a GetMetadataObjects request on a specified metadata type, and parses the output returned by the SAS Metadata Server so that each returned object's properties are stored in a HashMap.
getMetadataObjectsSubset
Gets metadata objects of the requested metadata type.
getObjectPath
Returns the path of an object that resides in the SAS folder tree.
getUserHomeFolder
Gets the user home folder for the specified user.
DoRequest
Passes an XML-formatted IOMI method call to the SAS Metadata Server.
For reference information about each method, see the SAS Java Metadata Interface documentation at support.sas.com/93api.

Using the Get Methods

The get methods enable you to query metadata.
Most of the get methods require you to specify SAS Open Metadata Interface flags and options to identify the information that you want to retrieve. For example, the getMetadataObjects methods support the OMI_XMLSELECT flag and the <XMLSELECT> element to pass a search string. All of the getMetadata* and getMetadataObjects methods support the OMI_TEMPLATE flag and the <TEMPLATES> element to enable you to specify the attributes and associations to retrieve in a template.
The SAS Java Metadata Interface Get methods support all of the flags and options that are defined for the SAS Open Metadata Interface IOMI GetMetadataObjects and GetMetadata methods. For reference information about the IOMI methods, flags, and options, see Metadata Access (IOMI Interface). For usage information, see:
To make the flags easier to use, the MdOMIUtil interface defines constant values for each of the flags. These constant values are in the documentation at support.sas.com/93api. Specify these constant values in your SAS Java Metadata Interface method calls instead of the numeric values that are documented for the IOMI server interface methods.