Adding or changing a document's unique identifier

When metadata is published to an ArcIMS Metadata Service, a unique identifier is generated if the metadata doesn't already contain one. This identifier is added to both the original and published copies of the metadata. ArcIMS Metadata Services use a GUID identifier that is separate from other identifiers that may have already been provided in the metadata content.

Adding a unique identifier

You can add a unique identifier to an item's metadata before it is published by running the XSLT Transformation tool with the <ArcGIS Installation Location>\Metadata\Stylesheets\gpTools\add unique identifier.xslt file. If the metadata doesn't contain a unique identifier one will be added. If the metadata already contains a unique identifier it will be left untouched.

Adding a unique identifier to a document before it is published is particularly useful if you publish metadata using a geoprocessing model. For example, a publishing model might use the XSLT Transformation tool to remove private information before publishing the metadata to an ArcIMS Metadata Service with the Metadata Publisher tool as illustrated below.

Use a model to remove content you don't want public before publishing an item's metadata.

In this example, the file remove local storage info.xslt is used to remove any machine names from an item's metadata before it is published. This file is provided as an example with ArcGIS Desktop, and is available in the <ArcGIS Installation Location>\Metadata\Stylesheets\gpTools folder.

If the metadata doesn't have a unique identifier before running this model, the Metadata Publisher tool creates one and adds the identifier to the published copy of the metadata. The Metadata Publisher tool also tries to save the identifier to the original metadata, but in this case, it modifies the stand-alone metadata XML file that is intermediate data for the model. This problem can be corrected by changing the model to first add a unique identifier to the metadata before performing other processes.

Add an identifier before filtering content and publishing an item's metadata.

When running the XSLT Transformation tool with the add unique identifier.xslt file as illustrated above, an ArcIMS Metadata Service's unique identifier is only added to the source item's metadata if one doesn't already exist. You would not want to change an existing unique identifier in this situation because then you would end up with two different versions of the metadata in the Metadata Service describing the same ArcGIS item.

Changing a unique identifier

Sometimes you want to change the existing identifier in an item's metadata. For example, you might do this if you are preparing to release a new edition of an existing data product. In this case, you want all items in the first edition to have one set of identifiers and all items in the second edition to have a different set of identifiers. In this way, any metadata catalogs containing information about your data products will have separate information describing each edition.

You would also change an existing identifier if you copied metadata from one item to another without removing the unique identifier. Later, when you realize the identifiers are no longer unique, you can correct the problem by creating a new unique identifier for each affected item. Any published metadata documents must be updated to include the new identifier.

An existing unique identifier can be replaced by running the XSLT Transformation tool with the same add unique identifier.xslt file, but providing the string overwrite in the tool's XSLT Parameter argument.

LegacyLegacy:

In previous releases of ArcGIS Desktop, you might have performed this operation using the MetaIDChecker utility.

The easiest way to replace an existing unique identifier for many ArcGIS items is by creating and using a model like the one illustrated below. The XSLT Transformation tool copies the original ArcGIS item's metadata, but it replaces the existing Metadata Service identifier if the string overwrite is provided in the XSLT Parameter argument. Then the Metadata Importer tool copies the updated metadata back to the original ArcGIS item.

Change an existing unique identifier or add a new one

This model could be run in batch mode to update many ArcGIS items at once.

Related Topics


11/14/2011