com.esri.arcgis.carto
Interface IMapReader

All Superinterfaces:
Serializable
All Known Implementing Classes:
MapReader

public interface IMapReader
extends Serializable

Provides access to members that support reading a map document.

Remarks

MapReader is a helper coclass that reads the contents of a map document file (.mxd and .pmf). The IMapReader interface provides read-only access to: document information (DocumentInfo), the map object (Map), the number of map objects within the document (MapCount), the page layout object (PageLayout), and the thumbnail image stored in the document.

When To Use

When writing your own custom server object use IMapReader to read an .mxd or .pmf.

Product Availability

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


Method Summary
 void close()
          Clears out all of the map objects in memory.
 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.
 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.
 

Method Detail

open

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

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

close

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

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

getMapCount

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

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

getMap

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.

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

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

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

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

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

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

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

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