space
Previous Page | Next Page

Model Usage

Usage Scenario: Creating Metadata for Business Information


Purpose

Business information is defined as information about people, documents, and other objects. This usage scenario describes the metadata types that represent people, documents, and descriptive information about other objects, and how to associate this business information with other metadata objects. Descriptive information can be associated with any metadata object.


Requirements

This usage scenario assumes that the user has a general understanding of the Business Information Submodel of the SAS Metadata Model.


Creating Metadata Objects for Business Objects

The following metadata types represent business information:

Person with Identifying Information

Figure 1 shows the metadata types that represent a person in a SAS Metadata Repository.

[Figure 1. The metadata objects that represent a person.]

Figure 1. The metadata objects that represent a person.

The Person object has a Locations association (numbered 1 in Figure 1) to the Location object, it has an EmailAddresses association (numbered 2) to the Email object, and it has a PhoneNumbers association (numbered 3) to the Phone object. These associations are created by including XML elements that refer to the Locations, EmailAddresses, and PhoneNumbers association names in the XML request. See XML Examples to view the XML request that was used to create the metadata objects shown in Figure 1. In the XML request, the person's user ID is defined as the Person object's Name= value, and the person's name is defined as the DisplayName= value (that is, Name="jdoe" and DisplayName="Jane Doe"). Person, IdentityGroup, and Role objects must have a unique Name= value on the SAS Metadata Server.  Person objects have their own namespace.  IdentityGroup and Role objects share a namespace.  The DisplayName= value is the name shown for the person in client user interfaces. 

ResponsibleParty and Document

This example adds information about an administrator and the location of documentation to an existing metadata definition of a SAS/SHARE server in a SAS Metadata Repository. Figure 2 shows the metadata types that are involved in the request. The SAS/SHARE server is represented by the DeployedComponent metadata type, the administrator is represented by the ResponsibleParty metadata type, the actual person who will be the administrator is represented by the Person metadata type, and the documentation is represented by the Document metadata type.

[Figure 2. The metadata objects that represent a SAS/SHARE server, a document, a person, and an object that identifies the person as the server administrator.]

Figure 2. The metadata objects that represent a SAS/SHARE server, a document, a person, and an object that identifies the person as the server administrator.

The first step in creating the metadata is to get an appropriate ResponsibleParty object from the SAS Metadata Server.  The ResponsibleParty object is used to associate an identity with a role.  Beginning in SAS 9.2, a new method, GetResponsibleParty, enables clients to get a ResponsibleParty object by specifying identity and role names.  The identity name is the Name= value (user ID) of a Person or IdentityGroup object that is defined in metadata. The role name can be Administrator, Owner, User, or any other term that is used to describe the relationship between a person and a resource. In this example, the role is Administrator. See XML for Creating a ResponsibleParty Object to view the GetResponsibleParty request for creating the ResponsibleParty object in Figure 2.  The example is formatted for submission to the SAS Metadata Server using PROC METADATA. The SAS Java Metadata Interface provides the GetResponsibleParty method for getting ResponsibleParty objects. If a ResponsibleParty object does not exist that matches the identity and role that is requested, the GetResponsibleParty method will create an object and associate it with the specified identity and role. A ResponsibleParty object has a Persons association (numbered 1 in Figure 2) to a Person object.

Once the ResponsibleParty object is created, the next step is to associate the returned object with the SAS/SHARE server.  In addition, you should associate a Document object with the SAS/SHARE server. See XML for Adding a ResponsibleParties Association and Document Object to a DeployedComponent to view an XML request that creates the association and Document object. A DeployedComponent object has a ResponsibleParties association (numbered 3) to a ResponsibleParty object. A DeployedComponent object has a Documents association (numbered 2) to a Document object.

If you look at the reference documentation for the DeployedComponent metadata type, you see that there are two ways to create an association to a Document object. You can define a DataPackages/DeployedComponents association, or define a Documents/Objects association. The DataPackages/DeployedComponents association is a unique association of DeployedComponent. It is provided to associate documents that might be located using the DeployedComponent. The Documents/Objects association is an inherited association that models information about an object that is stored outside of the SAS Metadata Repository. It can be shared with other objects. In this scenario, we are modeling shared, descriptive information that is stored outside of the SAS Metadata Repository. The Document object's URI= and URIType= attributes specify the location of the documentation.

Public Notes

The Documents association can also be used to store public notes in the SAS Metadata Repository.  A public note is information that is stored in a TextStore object that can be shared with other objects.  In this example, a public note is added to the metadata for the existing SAS/SHARE server. Figure 3 shows the metadata objects that create the public note.

 

[Figure 3. The metadata objects that represent a public note that is assigned to a SAS/SHARE server.]

Figure 3. The metadata objects that represent a public note that is assigned to a SAS/SHARE server.

See XML for Adding a Public Note to a DeployedComponent to view an XML request that creates the metadata objects in Figure 3. The request creates a Documents association (numbered 1 in Figure 3) between the DeployedComponent object and a Document object. Then, it defines a Notes association (numbered 2 in Figure 3) from the Document object to a TextStore object, which contains the text of the public note in the StoredText= attribute. In the XML, the Document object has its PublicType= and TextRole= attributes set to Note.  Setting these attributes to Note instructs the SAS Metadata Server to look in the Notes association to find the documentation, instead of looking in the Document object's URI= and URIType= attributes.


XML Examples

The following XML requests create the metadata objects in the figures.

XML for Creating Person, Location, Email, and Phone Objects

<AddMetadata>
    <Metadata>
          <Person Name="jdoe" DisplayName="Jane Doe" PublicType="User" 
          UsageVersion="1000000"/>
              <Locations>
                <Location Address="Bldg Y" LocationType="Work" Name="Work"/>
              </Locations>
              <EmailAddresses>
                <Email Address="Jane.Doe@any.com" Name="Work"/>
              </EmailAddresses>
              <PhoneNumbers>
                <Phone  Number="999-9999" PhoneType="office" Name=Work"/>
              </PhoneNumbers>
          </Person>
    </Metadata>
    <Reposid>A0000001.ABCDEFGH</Reposid>
    <NS>SAS</NS>
    <Flags>268435456</Flags>
    <Options/>
</AddMetadata>

XML for Creating a ResponsibleParty Object

<DoRequest>
   <GetResponsibleParty>
      <ResponsibleParty IdentityName="jdoe" Responsibility="Administrator" />
    </GetResponsibleParty>
</DoRequest>

XML for Adding a ResponsibleParties Association and Document Object to a DeployedComponent

<UpdateMetadata>
    <Metadata>
      <DeployedComponent Id="ABCDEFGH.A9000001">
        <ResponsibleParties>
          <ResponsibleParty ObjRef="ABCDEFGH.A2000001"/>
        </ResponsibleParties>
        <Documents> 
          <Document Name="Server Administration" URI="http://myserver/admin.html" 
          URIType="URL"/>
        </Documents> 
      </DeployedComponent>
    </Metadata>
    <Reposid>A0000001.ABCDEFGH</Reposid>
    <NS>SAS</NS>
    <Flags>268435456</Flags>
    <Options/>
</UpdateMetadata>

XML for Adding a Public Note to a DeployedComponent

<UpdateMetadata>
    <Metadata>
      <DeployedComponent Id="ABCDEFGH.A9000001">
        <Documents>
          <Document Name="SAS/SHARE Note" PublicType="Note" TextRole="Note">
            <Notes>
              <TextStore 
                  Name="SAS/SHARE Note" 
                  StoredText="The text of the shared note."/>
            </Notes>
          </Document>
        </Documents>
      </DeployedComponent>
    </Metadata>
    <Reposid>A0000001.ABCDEFGH</Reposid>
    <NS>SAS</NS>
    <Flags>268435456</Flags>
    <Options/>
</UpdateMetadata>

space
Previous Page | Next Page | Top of Page