Metadata Publisher (Conversion)

License Level:BasicStandardAdvanced

Summary

Publishes metadata to a metadata catalog such as an ArcIMS Metadata Service.

The Metadata Publisher tool retrieves the source item's metadata, then a copy of this metadata document is passed to the Publisher specified in the tool. If the source item is a stand-alone XML file, a copy of the file itself will be passed to the Publisher. The Publisher uses information from the tool parameters and from the metadata document to create a request to publish the document to the specified metadata catalog.

Usage

Syntax

MDPublisher_conversion (source, publisher, {url}, {service}, {user}, {password})
ParameterExplanationData Type
source

The item whose metadata will be published, or a stand-alone XML file that will be published.

Data Element; Layer
publisher

An XML file that defines how the metadata will be published.

File
url
(Optional)

The URL of a Web Service that hosts the metadata catalog, if appropriate.

For example, the URL of an ArcIMS Server that provides a Metadata Service.

String
service
(Optional)

The name of the service to which you want to publish, if appropriate.

For example, for an ArcIMS Metadata Service this is the case-sensitive name of the Metadata Service.

String
user
(Optional)

The name used to access the metadata catalog when publishing documents, if appropriate.

For example, when publishing documents to an ArcIMS Metadata Service you must log in to the service using a name that has been granted metadata_publisher privileges or a higher privilege.

String
password
(Optional)

The password you used to access the metadata catalog when publishing documents, if appropriate.

For example, when publishing documents to an ArcIMS Metadata Service, this is the password required to log in with the specified User Name.

String

Code Sample

Publish an ArcGIS item's metadata to an ArcIMS Metadata Service

An ArcGIS item's metadata is published to an ArcIMS Metadata Service. This sample won't complete successfully unless a valid ArcIMS Metadata Service is identified and a valid User Name and Password with sufficient privileges are provided.

import arcpy
from arcpy import env
env.workspace = "C:/data/data.gdb"
#set local variables
dir = arcpy.GetInstallInfo("desktop")["InstallDir"]
pub = dir + "Metadata/Publisher/arcimsmd.xml"
arcpy.MDPublisher_conversion("locations", pub, "http://myserver", "Metadata",
    "myUsername", "myPassword")

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
3/3/2014