com.esri.arcgis.catalogUI
Interface IMetadataEditor

All Superinterfaces:
Serializable
All Known Implementing Classes:
IMetadataEditorProxy

public interface IMetadataEditor
extends Serializable

Provides access to members that define a metadata editor.

Remarks

The IMetadataEditor interface is available to custom CoClasses that implement the MetadataExport abstract class. For example, a custom CoClass might be written to support editing an ArcGIS item’s metadata to by adding custom XML elements to it. Example custom metadata editors are available in the ArcGIS 9.3.1 Developer Help system.

Custom metadata editors must be called programmatically. This code must determine the selected ArcGIS item and extract its metadata, then pass the resulting XmlPropertySet object to the metadata editor. If the metadata editor’s Edit function reports that the metadata content was modified, the code must save the changes to the item’s Metadata property. The ArcGIS 9.3.1 Developer Help system includes an example button that performed these operations within ArcMap for a layer.

When To Use

The IMetadataEditor interface has only a Name property and an Edit function for which you need to provide code when creating a Custom Metadata Editor.

Product Availability

Available with ArcGIS Desktop.


Method Summary
 boolean edit(IPropertySet props, int hWnd)
          Shows the metadata editor and indicates if the metadata property set was modified.
 String getName()
          Name of the metadata editor.
 

Method Detail

getName

String getName()
               throws IOException,
                      AutomationException
Name of the metadata editor.

Description

Returns the name of the Metadata Editor as String

Remarks

You use the get_Name property when you create a class that implements the IMetadataEditor interface. The Name property is the name of the editor. Additional details are available in the ArcGIS 9.3.1 Developer Help documentation “How to create a custom metadata editor” available at ArcGIS online.

 

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

edit

boolean edit(IPropertySet props,
             int hWnd)
             throws IOException,
                    AutomationException
Shows the metadata editor and indicates if the metadata property set was modified.

Remarks

The Edit method is used to invoke the Metadata Editor, which is used to create and edit metadata.

The props parameter must be of data type IPropertySet, in the form of an XmlPropertySet object. The PropertySet variable is the selected item’s metadata. The calling program must get this object from the selected ArcGIS item using its IMetadata::Metadata property, if the object supports this interface and if the IMetadataEdit::CanEditMetadata property returns the Boolean value TRUE. The PropertySet variable contains multiple value pairs that contain the tags—XPaths identifying existing XML elements—and their corresponding values. For example, if the item contains an FGDC metadata, its title element in the property set would be (“idinfo/citation/citeinfo/title”, “The Title”).

The hWnd parameter must be of type Long. It is a handle on the Metadata Editor window.

The returns value is a Boolean value, indicating if the metadata was changed.

Additional details are available in the ArcGIS 9.3.1 Developer Help documentation “How to create a custom metadata editor” available at ArcGIS online.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
props - A reference to a com.esri.arcgis.system.IPropertySet (in)
hWnd - The hWnd (A COM typedef) (in)
Returns:
The pOk
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.