The following is an
example of a metadata property string that creates a SAS Metadata
Model object and an association to an existing SAS Metadata Model
object in another repository:
<MetadataType Name="Name-of-primary-object" Desc="New object created using AddMetadata">
<AssociationName>
<AssociatedMetadataType Objref="Reposid.Objectid"/>
</AssociationName>
</MetadataType>
Note the use of the
ObjRef attribute and the fact that no other attributes are specified.
When ObjRef is used, the SAS Metadata Server ignores any additional
attributes that might be specified. The object identifier in the ObjRef
attribute includes both the repository identifier and the object
instance identifier of the target object.
The following is an
example of a metadata property string that creates a SAS Metadata
Model object, an association, and a new associated SAS Metadata Model
object in another repository:
<MetadataType Name="Name-of-primary-object" Desc="New object created using AddMetadata">
<AssociationName>
<AssociatedMetadataType Id="Reposid.$SymbolicName" Name="Name-of-associated-object"
Desc="Associated object that is created by AddMetadata"/>
</AssociationName>
</MetadataType>
The portion of the property
string that identifies the associated object specifies the Id attribute
with the repository identifier and a symbolic name for the new object.
(You can determine the available repositories and their unique identifiers
by issuing the GetRepositories method.
For more information,
see Using GetRepositories to Get the Registered Repositories.) Because a new object is created, you must
specify at least a Name value for the associated object and you should
include values for other attributes.