com.esri.arcgis.catalogUI
Class MetadataExtension

java.lang.Object
  extended by com.esri.arcgis.catalogUI.MetadataExtension
All Implemented Interfaces:
IMetadataHelper, IConnectionPointContainer, com.esri.arcgis.interop.RemoteObjRef, IExtension, IPersist, IPersistStream, Externalizable, Serializable

public class MetadataExtension
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IExtension, IMetadataHelper, IPersistStream, IConnectionPointContainer, Externalizable

Provides access to metadata extension.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.arcgis.system.IExtension
IID, IID7f657ec9_dbf1_11d2_9f2f_00c04f6bc69e, xxDummy
 
Constructor Summary
MetadataExtension(Object obj)
          Construct a MetadataExtension using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 void addIMetadataEventsListener(IMetadataEvents theListener)
          addIMetadataEventsListener.
 void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
          enumConnectionPoints
 boolean equals(Object o)
          Compare this object with another
 void findConnectionPoint(GUID riid, IConnectionPoint[] ppCP)
          findConnectionPoint
 void getClassID(GUID[] pClassID)
          getClassID
 String getDefaultStylesheet()
          Name of the default stylesheet.
 IUID getEditor()
          CLSID of the currently selected editor.
 String getName()
          The name of the extension.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 String getStylesheet()
          Name of the currently selected stylesheet.
 String getStylesheetPath()
          Path to the Stylesheets directory.
 int getSynchronizationInterval()
          The interval in seconds from the last update which must elapse before the Catalog will again update the metadata.
 int getSynchronizationOption()
          When the Catalog creates and updates metadata automatically.
 String getWebPagePath()
          Path to the HTML directory.
 int hashCode()
          the hashcode for this object
 void isDirty()
          isDirty
 void load(IStream pstm)
          load
 void readExternal(ObjectInput in)
           
 void refresh(IGxObject ipObject)
          Refreshes the currently selected object in the Catalog.
 void removeIMetadataEventsListener(IMetadataEvents theListener)
          removeIMetadataEventsListener.
 void save(IStream pstm, int fClearDirty)
          save
 void setDefaultStylesheet(String name)
          Name of the default stylesheet.
 void setEditor(IUID editor)
          CLSID of the currently selected editor.
 void setStylesheet(String name)
          Name of the currently selected stylesheet.
 void setSynchronizationInterval(int interval)
          The interval in seconds from the last update which must elapse before the Catalog will again update the metadata.
 void setSynchronizationOption(int option)
          When the Catalog creates and updates metadata automatically.
 void shutdown()
          Shuts down the extension.
 void startup(Object initializationData)
          Starts up the extension with the given initialization data.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

MetadataExtension

public MetadataExtension(Object obj)
                  throws IOException
Construct a MetadataExtension using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to MetadataExtension.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
MetadataExtension o = (MetadataExtension)obj; // will not work

MetadataExtension o = new MetadataExtension(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems MetadataExtension theMetadataExtension = (MetadataExtension) obj;
Method Detail

equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

addIMetadataEventsListener

public void addIMetadataEventsListener(IMetadataEvents theListener)
                                throws IOException
addIMetadataEventsListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.catalogUI.IMetadataEvents interface.
Throws:
IOException - If there are communications problems.

removeIMetadataEventsListener

public void removeIMetadataEventsListener(IMetadataEvents theListener)
                                   throws IOException
removeIMetadataEventsListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.catalogUI.IMetadataEvents interface.
Throws:
IOException - If there are communications problems.

getName

public String getName()
               throws IOException,
                      AutomationException
The name of the extension.

Specified by:
getName in interface IExtension
Returns:
The extensionName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startup

public void startup(Object initializationData)
             throws IOException,
                    AutomationException
Starts up the extension with the given initialization data.

Specified by:
startup in interface IExtension
Parameters:
initializationData - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

shutdown

public void shutdown()
              throws IOException,
                     AutomationException
Shuts down the extension.

Specified by:
shutdown in interface IExtension
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

refresh

public void refresh(IGxObject ipObject)
             throws IOException,
                    AutomationException
Refreshes the currently selected object in the Catalog.

Description

The ipObject parameter must be of data type IGxObject.

Remarks

Refreshes the currently selected object in the Catalog.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
refresh in interface IMetadataHelper
Parameters:
ipObject - A reference to a com.esri.arcgis.catalog.IGxObject (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setEditor

public void setEditor(IUID editor)
               throws IOException,
                      AutomationException
CLSID of the currently selected editor.

Remarks

The Editor property is no longer used in ArcGIS 10. The pages that are included when you edit an item’s metadata in ArcGIS are determined by the current ArcGIS metadata style.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setEditor in interface IMetadataHelper
Parameters:
editor - A reference to a com.esri.arcgis.system.IUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
UID, IUID

getEditor

public IUID getEditor()
               throws IOException,
                      AutomationException
CLSID of the currently selected editor.

Description

This property is used to check and/or change the Metadata Editor used in ArcCatalog.

The value to get or set the property must be of data type IUID.

Remarks

The Editor property is no longer used in ArcGIS 10. The pages that are included when you edit an item’s metadata in ArcGIS are determined by the current ArcGIS metadata style.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getEditor in interface IMetadataHelper
Returns:
A reference to a com.esri.arcgis.system.IUID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
UID, IUID

setStylesheet

public void setStylesheet(String name)
                   throws IOException,
                          AutomationException
Name of the currently selected stylesheet.

Remarks

The Stylesheet property is no longer used in ArcGIS 10. The stylesheet that is used to display an ArcGIS item’s metadata is determined by the current ArcGIS metadata style.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setStylesheet in interface IMetadataHelper
Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStylesheet

public String getStylesheet()
                     throws IOException,
                            AutomationException
Name of the currently selected stylesheet.

Remarks

The Stylesheet property is no longer used in ArcGIS 10. The stylesheet that is used to display an ArcGIS item’s metadata is determined by the current ArcGIS metadata style.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getStylesheet in interface IMetadataHelper
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDefaultStylesheet

public void setDefaultStylesheet(String name)
                          throws IOException,
                                 AutomationException
Name of the default stylesheet.

Remarks

The DefaultStylesheet property is no longer used in ArcGIS 10. The stylesheet that is used to display an ArcGIS item’s metadata is determined by the current ArcGIS metadata style.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setDefaultStylesheet in interface IMetadataHelper
Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDefaultStylesheet

public String getDefaultStylesheet()
                            throws IOException,
                                   AutomationException
Name of the default stylesheet.

Remarks

The DefaultStylesheet property is no longer used in ArcGIS 10. The stylesheet that is used to display an ArcGIS item’s metadata is determined by the current ArcGIS metadata style.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getDefaultStylesheet in interface IMetadataHelper
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStylesheetPath

public String getStylesheetPath()
                         throws IOException,
                                AutomationException
Path to the Stylesheets directory.

Remarks

The StylesheetPath property is no longer used in ArcGIS 10. The stylesheet that is used to display an ArcGIS item’s metadata is clearly identified in the current ArcGIS metadata style by providing a file path that originates from the ArcGIS for Desktop install location.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getStylesheetPath in interface IMetadataHelper
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWebPagePath

public String getWebPagePath()
                      throws IOException,
                             AutomationException
Path to the HTML directory.

Remarks

The WebPagePath property is no longer used in ArcGIS 10. The messages that are displayed if an ArcGIS item does not support metadata or if the item’s metadata is not well-formed, for example, are generated by the metadata editor.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getWebPagePath in interface IMetadataHelper
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSynchronizationOption

public void setSynchronizationOption(int option)
                              throws IOException,
                                     AutomationException
When the Catalog creates and updates metadata automatically.

Remarks

The SynchronizationOption property is set for all items in ArcGIS, not individual documents. Synchronization cannot be disabled for individual documents in ArcGIS 10. By default the property is set to esriSyncAccessed, where metadata is always created and always updated. This property only determines if synchronization occurs when the metadata is viewed. It does not affect if metadata is updated programmatically or if synchronization occurs in connection with other operations.

The SynchronizationOption property can also be controlled through the user interface. A check box is available in the ArcGIS application’s Options dialog box that determines if metadata will be updated automatically when you view metadata. When the box is checked synchronization will always occur, and if metadata has not already been created it will be created. The SynchronizationOption property is set to esriSyncAccessed.

When unchecked, synchronization will never occur when you view the item’s metadata. The SynchronizationOption property is set to esriSyncNever. Other actions will update the metadata automatically even when this box is unchecked including using geoprocessing tools on the item, importing metadata, and so on.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setSynchronizationOption in interface IMetadataHelper
Parameters:
option - A com.esri.arcgis.catalog.esriSynchronizationOption constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSynchronizationOption

public int getSynchronizationOption()
                             throws IOException,
                                    AutomationException
When the Catalog creates and updates metadata automatically.

Description

This SynchronizationOption property allows for control of how metadata is created and updated automatically using ArcCatalog.

Remarks

The SynchronizationOption property is set for all items in ArcGIS, not individual documents. Synchronization cannot be disabled for individual documents in ArcGIS 10. By default the property is set to esriSyncAccessed, where metadata is always created and always updated. This property only determines if synchronization occurs when the metadata is viewed. It does not affect if metadata is updated programmatically or if synchronization occurs in connection with other operations.

The SynchronizationOption property can also be controlled through the user interface. A check box is available in the ArcGIS application’s Options dialog box that determines if metadata will be updated automatically when you view metadata. When the box is checked synchronization will always occur, and if metadata has not already been created it will be created. The SynchronizationOption property is set to esriSyncAccessed.

When unchecked, synchronization will never occur when you view the item’s metadata. The SynchronizationOption property is set to esriSyncNever. Other actions will update the metadata automatically even when this box is unchecked including using geoprocessing tools on the item, importing metadata, and so on.

 

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getSynchronizationOption in interface IMetadataHelper
Returns:
A com.esri.arcgis.catalog.esriSynchronizationOption constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSynchronizationInterval

public void setSynchronizationInterval(int interval)
                                throws IOException,
                                       AutomationException
The interval in seconds from the last update which must elapse before the Catalog will again update the metadata.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setSynchronizationInterval in interface IMetadataHelper
Parameters:
interval - The interval (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSynchronizationInterval

public int getSynchronizationInterval()
                               throws IOException,
                                      AutomationException
The interval in seconds from the last update which must elapse before the Catalog will again update the metadata.

Description

The SynchronizationInterval property allows metadata updates and creation to occur at regular intervals.

The value of the SynchronizationInterval property is measured in seconds.

Remarks

Depending how Updating metadata and Creating metadata (available from the SynchronizationOption property) are set up, by default, metadata is updated or created every time the selected item is viewed through the Metadata Tab (GxDocumentationView).

By default the SynchronizationInterval is 0 seconds, thus creating or updating metadata every time an item is viewed in the Metadata Tab. As long as the current time is 1 second past the values in the SyncDate & SyncTime, metadata will be updated.

Rather than continually updating or creating metadata, the SynchronizationInterval property allows the user to control when and how regularly metadata is updated or created. For instance if multiple people were accessing a feature class, one editing features and the other viewing metadata, with the default setting, the changes in the metadata would reflect those new edits in the feature class the first time the metadata was accessed through the Metadata Tab after the edits were committed. Changing the SynchronizationInterval property can postpone when changes are viewed.

This property was originally put in place to help deal with system load so that metadata is not having to be constantly created. But since the system load is rarely affected by the creation of metadata, it is a good idea to keep the defaults and always have the most accurate metadata.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getSynchronizationInterval in interface IMetadataHelper
Returns:
The interval
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isDirty in interface IPersistStream
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

enumConnectionPoints

public void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
                          throws IOException,
                                 AutomationException
enumConnectionPoints

Description

IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
enumConnectionPoints in interface IConnectionPointContainer
Parameters:
ppEnum - A reference to a com.esri.arcgis.display.IEnumConnectionPoints (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findConnectionPoint

public void findConnectionPoint(GUID riid,
                                IConnectionPoint[] ppCP)
                         throws IOException,
                                AutomationException
findConnectionPoint

Description

IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
findConnectionPoint in interface IConnectionPointContainer
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
ppCP - A reference to a com.esri.arcgis.display.IConnectionPoint (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException