Previous Page | Next Page

Filtering a GetMetadataObjects Request

Overview of Filtering a GetMetadataObjects Request

The GetMetadataObjects method enables you to filter both the initial set of objects and the associated objects that are selected in the GetMetadataObjects request. This topic describes how to filter the initial set of objects selected by GetMetadataObjects. For information to filter the associated objects, see Filtering the Associated Objects That Are Retrieved By a GetMetadataObjects Request.

The GetMetadataObjects method supports an OMI_XMLSELECT (128) flag to enable you to filter the initial set of objects that are retrieved by the SAS Metadata Server. The OMI_XMLSELECT flag instructs the server to check the <OPTIONS> element for search criteria specified in an <XMLSELECT> element. The <XMLSELECT> search syntax enables you to filter objects based on the following:

Attribute criteria enable you to select only objects that contain specified attribute values. For example:

By concatenating attribute criteria with the logical operators AND or OR, you can perform exclusive or inclusive filtering based on the attribute criteria. For example:

Association path criteria enables you to select objects that have a specific association and whose associated objects meet association and attribute criteria. For example:

In both examples, the Document objects that are retrieved are filtered by one association path criteria. In the first example, the filtering association path starts with the association Reports. Documents that do not have a Reports association are ignored. In the second example, the filtering association path starts with the association ResponsibleParties. Documents that do not have a ResponsibleParties association are ignored. In addition, the ResponsibleParty objects found through the ResponsibleParties association are filtered to include only objects that have a Persons association to a Person object that has the attribute value Name="John Doe".

When you concatenate association path criteria, the method filters the objects that are selected based on two or more associations that are directly defined for the specified metadata type. It joins the association paths using an implicit AND operator. As a result, the method selects only objects that meet all of the criteria specified in all of the association paths.

The method ignores any objects that do not have both a Reports association and a ResponsibleParties association and meet the criteria in both association paths.

The ability to concatenate association path criteria is new in SAS 9.2.

Previous Page | Next Page | Top of Page