com.esri.arcgis.carto
Class MapReader

java.lang.Object
  extended by com.esri.arcgis.carto.MapReader
All Implemented Interfaces:
IMapReader, com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, Serializable

public class MapReader
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IMapReader, ISupportErrorInfo

The MapReader component provides programmatic access to the contents of a map document.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
MapReader()
          Constructs a MapReader using ArcGIS Engine.
MapReader(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
MapReader theMapReader = (MapReader) obj;
 
Method Summary
 void close()
          Clears out all of the map objects in memory.
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 IPropertySet getDocumentInfo()
          A set of name-value pairs for properties set for the map document (mxd only).
 IMap getMap(int index)
          The map object at the specified index.
 int getMapCount()
          The number of maps (data frames) in the document.
 IPageLayout getPageLayout()
          The PageLayout object.
 Picture getThumbnail()
          The thumbnail stored in the map document.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 boolean isAccessInternalObjects()
          Indicates whether the internal objects of the map can be exposed to external clients.
 void open(String filePath)
          Opens an mxd or pmf file stored at the specified path.
 
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

MapReader

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

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

MapReader

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

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

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

open

public void open(String filePath)
          throws IOException,
                 AutomationException
Opens an mxd or pmf file stored at the specified path.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

close

public void close()
           throws IOException,
                  AutomationException
Clears out all of the map objects in memory. The client must call the Open method again before attempting any other operations.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getMapCount

public int getMapCount()
                throws IOException,
                       AutomationException
The number of maps (data frames) in the document.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMapCount in interface IMapReader
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMap

public IMap getMap(int index)
            throws IOException,
                   AutomationException
The map object at the specified index.

Product Availability

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

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

getPageLayout

public IPageLayout getPageLayout()
                          throws IOException,
                                 AutomationException
The PageLayout object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getThumbnail

public Picture getThumbnail()
                     throws IOException,
                            AutomationException
The thumbnail stored in the map document.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getThumbnail in interface IMapReader
Returns:
A reference to a com.esri.arcgis.support.ms.stdole.Picture (A com.esri.arcgis.support.ms.stdole.Picture COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDocumentInfo

public IPropertySet getDocumentInfo()
                             throws IOException,
                                    AutomationException
A set of name-value pairs for properties set for the map document (mxd only). These properties are string values set in the map document's Map Properties dialog and include: Title, Subject, Author, Category, Keywords and Comments.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDocumentInfo in interface IMapReader
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.

isAccessInternalObjects

public boolean isAccessInternalObjects()
                                throws IOException,
                                       AutomationException
Indicates whether the internal objects of the map can be exposed to external clients.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isAccessInternalObjects in interface IMapReader
Returns:
The bAccess
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.