com.esri.arcgis.arcmapui
Class MetadataViewWindow

java.lang.Object
  extended by com.esri.arcgis.arcmapui.MetadataViewWindow
All Implemented Interfaces:
IDocumentEvents, IMetadataViewWindow, IMetadataViewWindow2, IMetadataViewWindow3, IActiveViewEvents, com.esri.arcgis.interop.RemoteObjRef, Serializable, EventListener

public class MetadataViewWindow
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IMetadataViewWindow, IMetadataViewWindow2, IMetadataViewWindow3, IActiveViewEvents, IDocumentEvents

MetadataViewWindow class used to display the metadata of selected layer's data source.

Product Availability

Available with ArcGIS Desktop.

See Also:
Serialized Form

Constructor Summary
MetadataViewWindow()
          Constructs a MetadataViewWindow using ArcGIS Engine.
MetadataViewWindow(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
MetadataViewWindow theMetadataViewWindow = (MetadataViewWindow) obj;
 
Method Summary
 void activeViewChanged(IDocumentEventsActiveViewChangedEvent theEvent)
          Fired when the active view changes.
 void afterDraw(IActiveViewEventsAfterDrawEvent theEvent)
          Fired after the specified phase is drawn.
 void afterItemDraw(IActiveViewEventsAfterItemDrawEvent theEvent)
          Fired after an individual view item is drawn.
 boolean beforeCloseDocument(IDocumentEventsBeforeCloseDocumentEvent theEvent)
          Fired before a document is closed.
 void closeDocument(IDocumentEventsCloseDocumentEvent theEvent)
          Fired when a document is closed.
 void contentsChanged(IActiveViewEventsContentsChangedEvent theEvent)
          Fired when the contents of the view changes.
 void contentsCleared(IActiveViewEventsContentsClearedEvent theEvent)
          Fired when the contents of the view is cleared.
 boolean equals(Object o)
          Compare this object with another
 IMetadataViewWindow findViaLayer(ILayer pLayer)
          Is Metadata (of a layer's data source) already being displayed.
 IMetadataViewWindow findViaStandaloneTable(IStandaloneTable pStandaloneTable)
          Is Metadata (of a standalone table) already being displayed.
 void focusMapChanged(IActiveViewEventsFocusMapChangedEvent theEvent)
          Fired when a new map is made active.
static String getClsid()
          getClsid.
 int getHWnd()
          HWND of the Metadata View Window.
 ILayer getLayer()
          The stored layer.
 IPropertySet getMetadata()
          The Metadata of the selected layer's data source.
 IMetadataHelper getMetadataHelper()
          The Metadata helper to get stylesheet path and metadata.
 String getSelectedStylesheet()
          Selected Stylesheet from Metadata helper.
 IStandaloneTable getStandaloneTable()
          The standalone table to view/edit.
 String getStylesheetPath()
          Stylesheet path from Metadata helper.
 int hashCode()
          the hashcode for this object
 void itemAdded(IActiveViewEventsItemAddedEvent theEvent)
          Fired when an item is added to the view.
 void itemDeleted(IActiveViewEventsItemDeletedEvent theEvent)
          Fired when an item is deleted from the view.
 void itemReordered(IActiveViewEventsItemReorderedEvent theEvent)
          Fired when a view item is reordered.
 void mapsChanged(IDocumentEventsMapsChangedEvent theEvent)
          Fired when a change is made to the map collection.
 void newDocument(IDocumentEventsNewDocumentEvent theEvent)
          Fired when a new document is created.
 void onContextMenu(IDocumentEventsOnContextMenuEvent theEvent)
          Indicates if a context menu should be displayed at the given xy location.
 void openDocument(IDocumentEventsOpenDocumentEvent theEvent)
          Fired when a document is opened.
 void refresh()
          Refresh the metadata view.
 void selectionChanged(IActiveViewEventsSelectionChangedEvent theEvent)
          Call this function to fire the selection changed event.
 void setAGSServerObjectNameByRef(IAGSServerObjectName rhs1)
          Pass the server object name to Metadata View window.
 void setApplicationByRef(Object rhs1)
          Provides the window with a reference to the application.
 void setDataSourceByRef(IDatasetName rhs1)
          Pass the data source name of the selected layer to Metadata View window.
 void setLayerByRef(ILayer pLayer)
          The stored layer.
 void setMetadataByRef(IPropertySet rhs1)
          Pass the metadata directly to Metadata View window.
 void setStandaloneTableByRef(IStandaloneTable table)
          The standalone table to view/edit.
 void show(boolean show)
          Show MetadataViewWindow of the selected layer's data source.
 void spatialReferenceChanged(IActiveViewEventsSpatialReferenceChangedEvent theEvent)
          Fired when the spatial reference is changed.
 void viewRefreshed(IActiveViewEventsViewRefreshedEvent theEvent)
          Fired when view is refreshed before draw happens.
 
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

MetadataViewWindow

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

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

MetadataViewWindow

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

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

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

setApplicationByRef

public void setApplicationByRef(Object rhs1)
                         throws IOException,
                                AutomationException
Provides the window with a reference to the application.

Product Availability

Available with ArcGIS Desktop.

Specified by:
setApplicationByRef in interface IMetadataViewWindow
Parameters:
rhs1 - A reference to another Automation Object (IDispatch) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayer

public ILayer getLayer()
                throws IOException,
                       AutomationException
The stored layer.

Product Availability

Available with ArcGIS Desktop.

Specified by:
getLayer in interface IMetadataViewWindow
Returns:
A reference to a com.esri.arcgis.carto.ILayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLayerByRef

public void setLayerByRef(ILayer pLayer)
                   throws IOException,
                          AutomationException
The stored layer.

Product Availability

Available with ArcGIS Desktop.

Specified by:
setLayerByRef in interface IMetadataViewWindow
Parameters:
pLayer - A reference to a com.esri.arcgis.carto.ILayer (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setStandaloneTableByRef

public void setStandaloneTableByRef(IStandaloneTable table)
                             throws IOException,
                                    AutomationException
The standalone table to view/edit.

Product Availability

Available with ArcGIS Desktop.

Specified by:
setStandaloneTableByRef in interface IMetadataViewWindow
Parameters:
table - A reference to a com.esri.arcgis.carto.IStandaloneTable (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStandaloneTable

public IStandaloneTable getStandaloneTable()
                                    throws IOException,
                                           AutomationException
The standalone table to view/edit.

Product Availability

Available with ArcGIS Desktop.

Specified by:
getStandaloneTable in interface IMetadataViewWindow
Returns:
A reference to a com.esri.arcgis.carto.IStandaloneTable
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDataSourceByRef

public void setDataSourceByRef(IDatasetName rhs1)
                        throws IOException,
                               AutomationException
Pass the data source name of the selected layer to Metadata View window.

Product Availability

Available with ArcGIS Desktop.

Specified by:
setDataSourceByRef in interface IMetadataViewWindow
Parameters:
rhs1 - A reference to a com.esri.arcgis.geodatabase.IDatasetName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findViaLayer

public IMetadataViewWindow findViaLayer(ILayer pLayer)
                                 throws IOException,
                                        AutomationException
Is Metadata (of a layer's data source) already being displayed.

Product Availability

Available with ArcGIS Desktop.

Specified by:
findViaLayer in interface IMetadataViewWindow
Parameters:
pLayer - A reference to a com.esri.arcgis.carto.ILayer (in)
Returns:
A reference to a com.esri.arcgis.arcmapui.IMetadataViewWindow
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findViaStandaloneTable

public IMetadataViewWindow findViaStandaloneTable(IStandaloneTable pStandaloneTable)
                                           throws IOException,
                                                  AutomationException
Is Metadata (of a standalone table) already being displayed.

Product Availability

Available with ArcGIS Desktop.

Specified by:
findViaStandaloneTable in interface IMetadataViewWindow
Parameters:
pStandaloneTable - A reference to a com.esri.arcgis.carto.IStandaloneTable (in)
Returns:
A reference to a com.esri.arcgis.arcmapui.IMetadataViewWindow
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHWnd

public int getHWnd()
            throws IOException,
                   AutomationException
HWND of the Metadata View Window.

Product Availability

Available with ArcGIS Desktop.

Specified by:
getHWnd in interface IMetadataViewWindow
Returns:
The hWnd (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStylesheetPath

public String getStylesheetPath()
                         throws IOException,
                                AutomationException
Stylesheet path from Metadata helper.

Product Availability

Available with ArcGIS Desktop.

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

getSelectedStylesheet

public String getSelectedStylesheet()
                             throws IOException,
                                    AutomationException
Selected Stylesheet from Metadata helper.

Product Availability

Available with ArcGIS Desktop.

Specified by:
getSelectedStylesheet in interface IMetadataViewWindow
Returns:
The pSelectedStylesheet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMetadata

public IPropertySet getMetadata()
                         throws IOException,
                                AutomationException
The Metadata of the selected layer's data source.

Product Availability

Available with ArcGIS Desktop.

Specified by:
getMetadata in interface IMetadataViewWindow
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMetadataHelper

public IMetadataHelper getMetadataHelper()
                                  throws IOException,
                                         AutomationException
The Metadata helper to get stylesheet path and metadata.

Product Availability

Available with ArcGIS Desktop.

Specified by:
getMetadataHelper in interface IMetadataViewWindow
Returns:
A reference to a com.esri.arcgis.catalogUI.IMetadataHelper
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

show

public void show(boolean show)
          throws IOException,
                 AutomationException
Show MetadataViewWindow of the selected layer's data source.

Product Availability

Available with ArcGIS Desktop.

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

refresh

public void refresh()
             throws IOException,
                    AutomationException
Refresh the metadata view.

Product Availability

Available with ArcGIS Desktop.

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

setMetadataByRef

public void setMetadataByRef(IPropertySet rhs1)
                      throws IOException,
                             AutomationException
Pass the metadata directly to Metadata View window.

Product Availability

Available with ArcGIS Desktop.

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

setAGSServerObjectNameByRef

public void setAGSServerObjectNameByRef(IAGSServerObjectName rhs1)
                                 throws IOException,
                                        AutomationException
Pass the server object name to Metadata View window.

Product Availability

Available with ArcGIS Desktop.

Specified by:
setAGSServerObjectNameByRef in interface IMetadataViewWindow3
Parameters:
rhs1 - A reference to a com.esri.arcgis.gisclient.IAGSServerObjectName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

contentsChanged

public void contentsChanged(IActiveViewEventsContentsChangedEvent theEvent)
                     throws IOException,
                            AutomationException
Fired when the contents of the view changes.

Remarks

The Map object fires this event when a new document is loaded. Adding a new layer to a Map does not trigger this event.

The PageLayout object fires the event when IGraphicsContainer::DeleteAllElements in called and when a new document is loaded.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
contentsChanged in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IActiveView.contentsChanged()

contentsCleared

public void contentsCleared(IActiveViewEventsContentsClearedEvent theEvent)
                     throws IOException,
                            AutomationException
Fired when the contents of the view is cleared.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
contentsCleared in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

itemAdded

public void itemAdded(IActiveViewEventsItemAddedEvent theEvent)
               throws IOException,
                      AutomationException
Fired when an item is added to the view.

Remarks

The Map fires the event every time a new layer is added.

The PageLayout fires this event whenever a new element is added to the layout. Elements include not only graphics but data frames as well.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
itemAdded in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

itemDeleted

public void itemDeleted(IActiveViewEventsItemDeletedEvent theEvent)
                 throws IOException,
                        AutomationException
Fired when an item is deleted from the view.

Remarks

The PageLayout object fires this event whenever elements are deleted from the layout.

The Map object fires this event when a layer is removed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
itemDeleted in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

itemReordered

public void itemReordered(IActiveViewEventsItemReorderedEvent theEvent)
                   throws IOException,
                          AutomationException
Fired when a view item is reordered.

Remarks

The Map objects only fire this event whenever IMap::MoveLayer is called. In the ArcMap application, this occurs when you reorder layers in the table of contents. The Map will also fire this event when new layers are added.

The PageLayout object fires this event when changing the order of graphics. For example, IGraphicsContainer::BringToFront, PutElementOrder, SendToBack, SendBackward, and BringForward all fire this event. These functions are on ArcMap's Drawing menu under the Order pull right menu. Although the Map object is also a graphics container, it does not fire this event when its graphics are reordered.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
itemReordered in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

selectionChanged

public void selectionChanged(IActiveViewEventsSelectionChangedEvent theEvent)
                      throws IOException,
                             AutomationException
Call this function to fire the selection changed event.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
selectionChanged in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

viewRefreshed

public void viewRefreshed(IActiveViewEventsViewRefreshedEvent theEvent)
                   throws IOException,
                          AutomationException
Fired when view is refreshed before draw happens.

Description

Method that gets fired in response to IActiveView::Refresh and IActiveView::PartialRefresh.

Remarks

This event is useful in the case where you're watching for something to change in the view and there aren't any specific events for that change (e.g. ContentsChanged, ItemAdded). You can always listen for this method as a last resort. Care must be taken however to be very efficient in your implementation of this event because it will be called quite often.

The event parameters directly coincide with the arguments to IActiveView::PartialRefresh. For additional information about the arguments, see the help for that method.

If the event object connects to both the layout and a map, then the view parameter tells you which object initiated the event.

In an implementation of this method you typically want to check the phase and respond to only one. Otherwise, your code will execute multiple times per drawing sequence.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
viewRefreshed in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

afterDraw

public void afterDraw(IActiveViewEventsAfterDrawEvent theEvent)
               throws IOException,
                      AutomationException
Fired after the specified phase is drawn.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
afterDraw in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

afterItemDraw

public void afterItemDraw(IActiveViewEventsAfterItemDrawEvent theEvent)
                   throws IOException,
                          AutomationException
Fired after an individual view item is drawn. Example: view items include layers in a map or elements in a page layout.

Remarks

AfterItemDraw can be used to execute after each individual item has drawn. Event firing can be an expensive operation (time consuming) when there are many layers in a map, however. As a result, the AfterItemDraw event is only fired when the IViewManger::VerboseEvents property is set to True. By default this property is False.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
afterItemDraw in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

focusMapChanged

public void focusMapChanged(IActiveViewEventsFocusMapChangedEvent theEvent)
                     throws IOException,
                            AutomationException
Fired when a new map is made active.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
focusMapChanged in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

spatialReferenceChanged

public void spatialReferenceChanged(IActiveViewEventsSpatialReferenceChangedEvent theEvent)
                             throws IOException,
                                    AutomationException
Fired when the spatial reference is changed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
spatialReferenceChanged in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

activeViewChanged

public void activeViewChanged(IDocumentEventsActiveViewChangedEvent theEvent)
                       throws IOException,
                              AutomationException
Fired when the active view changes.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
activeViewChanged in interface IDocumentEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

mapsChanged

public void mapsChanged(IDocumentEventsMapsChangedEvent theEvent)
                 throws IOException,
                        AutomationException
Fired when a change is made to the map collection.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
mapsChanged in interface IDocumentEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onContextMenu

public void onContextMenu(IDocumentEventsOnContextMenuEvent theEvent)
                   throws IOException,
                          AutomationException
Indicates if a context menu should be displayed at the given xy location. Return true if handled.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
onContextMenu in interface IDocumentEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

newDocument

public void newDocument(IDocumentEventsNewDocumentEvent theEvent)
                 throws IOException,
                        AutomationException
Fired when a new document is created.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
newDocument in interface IDocumentEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

openDocument

public void openDocument(IDocumentEventsOpenDocumentEvent theEvent)
                  throws IOException,
                         AutomationException
Fired when a document is opened.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
openDocument in interface IDocumentEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

beforeCloseDocument

public boolean beforeCloseDocument(IDocumentEventsBeforeCloseDocumentEvent theEvent)
                            throws IOException,
                                   AutomationException
Fired before a document is closed. Return True to abort the close process.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
beforeCloseDocument in interface IDocumentEvents
Parameters:
theEvent - The event
Returns:
The abortClose
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

closeDocument

public void closeDocument(IDocumentEventsCloseDocumentEvent theEvent)
                   throws IOException,
                          AutomationException
Fired when a document is closed.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
closeDocument in interface IDocumentEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.