com.esri.arcgis.geodatabase
Class MetadataSynchronizer

java.lang.Object
  extended by com.esri.arcgis.geodatabase.MetadataSynchronizer
All Implemented Interfaces:
IMetadataSynchronizer, IMetadataSynchronizerManager, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class MetadataSynchronizer
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IMetadataSynchronizer, IMetadataSynchronizerManager

ESRI Metadata Synchronizer object (singleton).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Singleton:

This type is a singleton.

See Also:
Serialized Form

Constructor Summary
MetadataSynchronizer()
          Constructs a MetadataSynchronizer using ArcGIS Engine.
MetadataSynchronizer(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
MetadataSynchronizer theMetadataSynchronizer = (MetadataSynchronizer) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 IUID getClassID()
          The class ID of the metadata synchronizer.
static String getClsid()
          getClsid.
 boolean getEnabled(int index)
          Indicates whether the Nth synchronizer is enabled.
 String getName()
          The name of the metadata synchronizer.
 int getNumSynchronizers()
          The number of available synchronizers.
 IMetadataSynchronizer getSynchronizer(int index)
          Gets the nth synchronizer.
 int hashCode()
          the hashcode for this object
 void setEnabled(int index, boolean enabled)
          Set the synchronizer to be enabled or disabled.
 void update(IXmlPropertySet propertySet, String itemDesc, Object value)
          Updates the metadata item using the value passed in.
 
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

MetadataSynchronizer

public MetadataSynchronizer()
                     throws IOException,
                            UnknownHostException
Constructs a MetadataSynchronizer using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

MetadataSynchronizer

public MetadataSynchronizer(Object obj)
                     throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
MetadataSynchronizer theMetadataSynchronizer = (MetadataSynchronizer) obj;

Construct a MetadataSynchronizer using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to MetadataSynchronizer.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


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

getName

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

Description

A string that identifies the synchronizer. The Name is used when managing metadata synchronizers through the IMetadataSynchronizationManager interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getClassID

public IUID getClassID()
                throws IOException,
                       AutomationException
The class ID of the metadata synchronizer.

Description

A UID object that must be unique to the synchronizer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IMetadataSynchronizer
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.

update

public void update(IXmlPropertySet propertySet,
                   String itemDesc,
                   Object value)
            throws IOException,
                   AutomationException
Updates the metadata item using the value passed in.

Description

This method is used to define the structure of the metadata that is written during synchronization. It is called once for each property of the dataset during synchronization. The method requires three parameters; pPropertySet, itemDesc, and Value.

Remarks

The pPropertySet parameter is an XML property set representing the metadata of the dataset being synchronized.

The itemDesc string parameter describes what object is being passed in the Value parameter.

The Value parameter is an object of the data sets whose metadata is being synchronized.

The different objects passed to the Update method, the Value parameter, vary from type of data set that is being synchronized. Not all itemDesc are supported for all data types. For instance CoverageEntity objects only apply to ArcInfo coverages and ArcInfo tables.

A complete list of the expected Values for the supported itemDesc items is available in the Technical Paper "Creating a Custom Metadata Synchronizer", May 2001.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
update in interface IMetadataSynchronizer
Parameters:
propertySet - A reference to a com.esri.arcgis.geodatabase.IXmlPropertySet (in)
itemDesc - The itemDesc (in)
value - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNumSynchronizers

public int getNumSynchronizers()
                        throws IOException,
                               AutomationException
The number of available synchronizers.

Description

Returns the number of metadata synchronizers registered on the machine.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getNumSynchronizers in interface IMetadataSynchronizerManager
Returns:
The numSynchronizers
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSynchronizer

public IMetadataSynchronizer getSynchronizer(int index)
                                      throws IOException,
                                             AutomationException
Gets the nth synchronizer.

Remarks

The GetSynchronizer method provides a reference to the IMetadataSynchronizer object.

Because the GetSynchronizer method uses an index to get the desired synchronizer, the IMetadataSynchronizerManager::NumSynchronizers property and IMetadataSynchronizer::Name are often used to first specify the metadata sychronizer of choice.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSynchronizer in interface IMetadataSynchronizerManager
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IMetadataSynchronizer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setEnabled

public void setEnabled(int index,
                       boolean enabled)
                throws IOException,
                       AutomationException
Set the synchronizer to be enabled or disabled.

Description

The SetEnabled method sets the enabled/disabled state of the synchronizer referenced by the index passed in to the first argument.

Remarks

The Index parameter is used to indicate the specific metadata synchronizer.

The second argument, of data type boolean, sets the state of the synchronizer.

Note that enabling and disabling synchronizers through this interface is persisted across sessions. If changes are meant to be temporary, it's recommended that the current enabled status of each synchronizer be stored prior to any changes being made, then restored after.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setEnabled in interface IMetadataSynchronizerManager
Parameters:
index - The index (in)
enabled - The enabled (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEnabled

public boolean getEnabled(int index)
                   throws IOException,
                          AutomationException
Indicates whether the Nth synchronizer is enabled.

Description

The GetEnabled method returns a boolean if the metadata sychronizer, specified using the index parameter, is currently enabled.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getEnabled in interface IMetadataSynchronizerManager
Parameters:
index - The index (in)
Returns:
The enabled
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.