com.esri.arcgis.geoprocessing.tools.conversiontools
Class MDPublisher
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.conversiontools.MDPublisher
- All Implemented Interfaces:
- GPTool
public class MDPublisher
- extends AbstractGPTool
Publishes metadata to a metadata catalog such as an ArcIMS Metadata Service.
The Metadata Publisher tool is contained in the Conversion Tools tool box.
Usage tips:
- A publisher is provided with ArcGIS Desktop that supports publishing ArcGIS metadata to an ArcIMS Metadata Service. This publisher, named arcimsmd.xml, can be found in the \Metadata\Publisher folder.This publisher uses the contents of the metadata to construct an appropriate ArcXML PUBLISH_METADATA request. FGDC metadata content is checked first. If appropriate information isn't found, the publisher then checks ArcGIS metadata content. The metadata will be published even if it does not contain the information required by the ArcIMS Metadata Explorer application.
- Documents in an ArcIMS Metadata Service are uniqely identified using a GUID. When you publish a document to an ArcIMS Metadata Service, if the document doesn't already have a GUID in the /Esri/PublishedDocID element one will be generated and stored in that location if you have write access to the metadata. This identifier ensures that when the document is later updated and republished, the existing copy on the server is replaced.If you publish metadata using a custom model that removes private information before publishing and if the Source Metadata item did not previously have a unique identifier, the identifier created by this tool will be saved to the model's intermediate data but not to the original item.To avoid this problem, you can add a unique identifier to an item's metadata before it is published using the tool with the add unique identifier.xslt file provided in the \Metadata\Stylesheets\gpTools folder. This operation is safe—if the metadata already has a unique identifier the existing identifier will remain untouched. Be sure to save the version of the metadata containing the new identifier with the original ArcGIS item; otherwise, the next time its metadata is published the ArcIMS Metadata Service will have two documents describing the same item with two different identifiers.
- If you publish metadata to an ArcIMS Metadata Service you must provide credentials for a user who has been given permission to publish documents to that service. If you have trouble publishing, connect to ArcIMS server in the Catalog window with the same credentials. If you have permission to publish documents with those credentials the Metadata Service's icon will show a hand holding a pencil
.
- This tool will not publish metadata associated with some ArcGIS items such as map, globe, and scene documents; layer files; text files; Excel files; file types; ArcIMS services; and geoprocessing tools. Publishing these items will produce an Unsupported source error message.
- If the metadata document does not consist of well-formed XML and the metadata is published with this tool, the tool will produce an Unsupported source error message.
- The Source Metadata parameter has a complex data type. If you use this tool in a model, create a variable for the Source Metadata parameter in ModelBuilder by right-clicking the tool, pointing to Make VariableFrom ParameterSource Metadata.
- When using this tool in ModelBuilder, the Output Metadata parameter is derived from the Source Metadata parameter.
Constructor Summary |
MDPublisher()
Creates the Metadata Publisher tool with defaults. |
MDPublisher(Object source,
Object publisher)
Creates the Metadata Publisher tool with the required parameters. |
MDPublisher
public MDPublisher()
- Creates the Metadata Publisher tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
MDPublisher
public MDPublisher(Object source,
Object publisher)
- Creates the Metadata Publisher tool with the required parameters.
Initializes the array of tool parameters with the values as specified for the required parameters and with the default values for the other parameters.
- Parameters:
source
- the item whose metadata will be published, or a stand-alone XML file that will be published.publisher
- an XML file that defines how the metadata will be published.
getSource
public Object getSource()
- Returns the Source Metadata parameter of this tool .
This parameter is the item whose metadata will be published, or a stand-alone XML file that will be published.
This is a required parameter.
- Returns:
- the Source Metadata
setSource
public void setSource(Object source)
- Sets the Source Metadata parameter of this tool .
This parameter is the item whose metadata will be published, or a stand-alone XML file that will be published.
This is a required parameter.
- Parameters:
source
- the item whose metadata will be published, or a stand-alone XML file that will be published.
getPublisher
public Object getPublisher()
- Returns the Publisher parameter of this tool .
This parameter is an XML file that defines how the metadata will be published.
This is a required parameter.
- Returns:
- the Publisher
setPublisher
public void setPublisher(Object publisher)
- Sets the Publisher parameter of this tool .
This parameter is an XML file that defines how the metadata will be published.
This is a required parameter.
- Parameters:
publisher
- an XML file that defines how the metadata will be published.
getUrl
public String getUrl()
- Returns the Service URL parameter of this tool .
This parameter is 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.
This is an optional parameter.
- Returns:
- the Service URL
setUrl
public void setUrl(String url)
- Sets the Service URL parameter of this tool .
This parameter is 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.
This is an optional parameter.
- Parameters:
url
- 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.
getService
public String getService()
- Returns the Service Name parameter of this tool .
This parameter is 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.
This is an optional parameter.
- Returns:
- the Service Name
setService
public void setService(String service)
- Sets the Service Name parameter of this tool .
This parameter is 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.
This is an optional parameter.
- Parameters:
service
- 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.
getUser
public String getUser()
- Returns the User Name parameter of this tool .
This parameter is 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.
This is an optional parameter.
- Returns:
- the User Name
setUser
public void setUser(String user)
- Sets the User Name parameter of this tool .
This parameter is 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.
This is an optional parameter.
- Parameters:
user
- 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.
getPassword
public String getPassword()
- Returns the Password parameter of this tool .
This parameter is 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.
This is an optional parameter.
- Returns:
- the Password
setPassword
public void setPassword(String password)
- Sets the Password parameter of this tool .
This parameter is 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.
This is an optional parameter.
- Parameters:
password
- 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.
getOutput
public Object getOutput()
- Returns the Output Metadata parameter of this tool (Read only).
This is an derived parameter.
- Returns:
- the Output Metadata
getToolName
public String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias