com.esri.arcgis.geoprocessing.tools.conversiontools
Class USGSMPTranslator
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.conversiontools.USGSMPTranslator
- All Implemented Interfaces:
- GPTool
public class USGSMPTranslator
- extends AbstractGPTool
Uses the USGS metadata parser utility, known as mp, to export or validate FGDC metadata content. The mp utility is created and maintained by the USGS for managing metadata that follows the FGDC
The USGS MP Metadata Translator tool is contained in the Conversion Tools tool box.
Usage tips:
- Documentation for the mp utility can be found on the .
- FGDC metadata elements, if they exist in ArcGIS metadata, will not be in the correct order as specified by the FGDC CSDGM rules. If the mp utility is used independently to validate or export ArcGIS metadata, mp will record warnings in the log file indicating the elements are out of order. This tool internally processes ArcGIS metadata using the _MPXML2.xsl stylesheet in the \Metadata\Stylesheets folder
to select only FGDC metadata elements and order them correctly before using mp to export or validate the resulting XML file.
- When using the tool dialog, the default Output File name will have a file extension that is appropriate for the conversion type that is selected at the time that the source metadata is defined. If you change the conversion type after specifying the source, delete the default output file name and a new file name will be generated with an appropriate file extension. Or, you can change the output file extension manually.
- For all conversion types, the source metadata will be validated according to the FGDC CSDGM rules and any warnings or errors regarding the metadata content will be reported in the tool's messages. If a Log File is specified, the same warnings or errors will be saved to the specified file. If the "none" conversion is specified, only the Log File will be created. A conversion won't be performed and an output file won't be generated.
- The output files produced by this tool can't be stored in a geodatabase. If the environment is set to a geodatabase the output files will be stored in a different location, as described below.
- 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.
Constructor Summary |
USGSMPTranslator()
Creates the USGS MP Metadata Translator tool with defaults. |
USGSMPTranslator(java.lang.Object source)
Creates the USGS MP Metadata Translator tool with the required parameters. |
Method Summary |
java.lang.Object |
getConfig()
Returns the Configuration File parameter of this tool . |
java.lang.String |
getConversion()
Returns the Conversion Type parameter of this tool . |
java.lang.Object |
getErrors()
Returns the Log File parameter of this tool . |
java.lang.Object |
getOutput()
Returns the Output File parameter of this tool . |
java.lang.Object |
getSource()
Returns the Source Metadata parameter of this tool . |
java.lang.String |
getToolboxAlias()
Returns the alias of the tool box containing this tool. |
java.lang.String |
getToolboxName()
Returns the name of the tool box containing this tool. |
java.lang.String |
getToolName()
Returns the name of this tool. |
void |
setConfig(java.lang.Object config)
Sets the Configuration File parameter of this tool . |
void |
setConversion(java.lang.String conversion)
Sets the Conversion Type parameter of this tool . |
void |
setErrors(java.lang.Object errors)
Sets the Log File parameter of this tool . |
void |
setOutput(java.lang.Object output)
Sets the Output File parameter of this tool . |
void |
setSource(java.lang.Object source)
Sets the Source Metadata parameter of this tool . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
USGSMPTranslator
public USGSMPTranslator()
- Creates the USGS MP Metadata Translator tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
USGSMPTranslator
public USGSMPTranslator(java.lang.Object source)
- Creates the USGS MP Metadata Translator 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 converted, or a stand-alone XML file that will be converted.
getSource
public java.lang.Object getSource()
- Returns the Source Metadata parameter of this tool .
This parameter is the item whose metadata will be converted, or a stand-alone XML file that will be converted.
This is a required parameter.
- Returns:
- the Source Metadata
setSource
public void setSource(java.lang.Object source)
- Sets the Source Metadata parameter of this tool .
This parameter is the item whose metadata will be converted, or a stand-alone XML file that will be converted.
This is a required parameter.
- Parameters:
source
- the item whose metadata will be converted, or a stand-alone XML file that will be converted.
getConfig
public java.lang.Object getConfig()
- Returns the Configuration File parameter of this tool .
This parameter is a file that defines custom parameters that mp will consider when processing the metadata. to export metadata without using a configuration file, provide # instead of a file name.
This is an optional parameter.
- Returns:
- the Configuration File
setConfig
public void setConfig(java.lang.Object config)
- Sets the Configuration File parameter of this tool .
This parameter is a file that defines custom parameters that mp will consider when processing the metadata. to export metadata without using a configuration file, provide # instead of a file name.
This is an optional parameter.
- Parameters:
config
- a file that defines custom parameters that mp will consider when processing the metadata. to export metadata without using a configuration file, provide # instead of a file name.
getConversion
public java.lang.String getConversion()
- Returns the Conversion Type parameter of this tool .
This parameter is the type of conversion that will take place. by default, the "XML" conversion will be performed.
This is an optional parameter.
- Returns:
- the Conversion Type
setConversion
public void setConversion(java.lang.String conversion)
- Sets the Conversion Type parameter of this tool .
This parameter is the type of conversion that will take place. by default, the "XML" conversion will be performed.
This is an optional parameter.
- Parameters:
conversion
- the type of conversion that will take place. by default, the "XML" conversion will be performed.
getOutput
public java.lang.Object getOutput()
- Returns the Output File parameter of this tool .
This parameter is a file that will be created containing the converted metadata. the type of file created is defined by the conversion type. to check for problems in the FGDC metadata using mp and not produce a output file, provide # instead of a file name.
This is an optional parameter.
- Returns:
- the Output File
setOutput
public void setOutput(java.lang.Object output)
- Sets the Output File parameter of this tool .
This parameter is a file that will be created containing the converted metadata. the type of file created is defined by the conversion type. to check for problems in the FGDC metadata using mp and not produce a output file, provide # instead of a file name.
This is an optional parameter.
- Parameters:
output
- a file that will be created containing the converted metadata. the type of file created is defined by the conversion type. to check for problems in the FGDC metadata using mp and not produce a output file, provide # instead of a file name.
getErrors
public java.lang.Object getErrors()
- Returns the Log File parameter of this tool .
This parameter is a text file that will be created listing the warnings and errors that occurred during the conversion process. to export metadata without producing a log file, provide # instead of a file name.
This is an optional parameter.
- Returns:
- the Log File
setErrors
public void setErrors(java.lang.Object errors)
- Sets the Log File parameter of this tool .
This parameter is a text file that will be created listing the warnings and errors that occurred during the conversion process. to export metadata without producing a log file, provide # instead of a file name.
This is an optional parameter.
- Parameters:
errors
- a text file that will be created listing the warnings and errors that occurred during the conversion process. to export metadata without producing a log file, provide # instead of a file name.
getToolName
public java.lang.String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public java.lang.String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public java.lang.String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias