Previous Page | Next Page

Using the SAS Java Metadata Interface

Getting Started

This section provides the steps to construct and execute a SAS Java Metadata Interface client that reads and writes metadata.

The first step in developing and running a client program is to make sure that you have access to a properly configured SAS Metadata Server. You should have a properly configured SAS Metadata Server if your site performed a SAS 9.2 planned installation.

After the SAS Metadata Server has been configured, you can begin developing a SAS Java Metadata Interface client that uses it. All SAS Java Metadata Interface clients access a SAS Metadata Server using the following steps:

  1. Instantiate an object factory.

  2. Connect to the SAS Metadata Server.

  3. Create Java object instances that represent SAS Metadata Model metadata objects and modify attributes and associations as needed.

  4. Persist changes to the SAS Metadata Server.

Read the following topics for instructions about how to implement the preceding steps:

Example code fragments are given to illustrate each step. To see how the code examples are submitted in an actual program, see Sample Program.

The examples use the remote version of the SAS Java Metadata Interface. If you recall, the remote version supports single or multiple users and enables clients to persist objects in a remote environment, such as the SAS middle tier. The static version of the SAS Java Metadata Interface supports a single user and does not support objects in the SAS middle tier.

An object factory is needed for each user who will use an application; therefore, typically, each user will have their own factory instance.

The examples given do not attempt to show how to create multiple object factories. Their goal is to show how a typical user connects to the SAS Metadata Server and issues SAS Java Metadata Interface method calls that create, read, and persist metadata objects on the SAS Metadata Server.

The remote version of the SAS Java Metadata Interface provides the MdFactory interface for instantiating an object factory. The static version provides an MdObjectFactory class for that purpose.

Previous Page | Next Page | Top of Page