com.esri.arcgis.carto
Class MapLayerInfo

java.lang.Object
  extended by com.esri.arcgis.carto.MapLayerInfo
All Implemented Interfaces:
IMapLayerInfo, IMapLayerInfo2, com.esri.arcgis.interop.RemoteObjRef, IPersist, IPersistStream, IXMLSerialize, Externalizable, Serializable

public class MapLayerInfo
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IMapLayerInfo, IMapLayerInfo2, IXMLSerialize, IPersistStream, IPersist, Externalizable

The Map Layer Info coclass provides read-only information about a layer in a map.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
MapLayerInfo()
          Constructs a MapLayerInfo using ArcGIS Engine.
MapLayerInfo(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
MapLayerInfo theMapLayerInfo = (MapLayerInfo) obj;
 
Method Summary
 void deserialize(IXMLSerializeData data)
          Deserializes an object from XML.
 boolean equals(Object o)
          Compare this object with another
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 String getCopyrightText()
          Copyright information associated with the layer.
 String getDescription()
          The description of the layer.
 String getDisplayField()
          Primary display field.
 IEnvelope getExtent()
          The geographic extent of the layer.
 IStringArray getFieldAliases()
          Array of strings that contains field alias for each field in Fields property.
 IFields getFields()
          Array of attribute fields contained in the layer.
 int getID()
          The layer identifier.
 double getMaxScale()
          The maximum visible scale for the layer.
 double getMinScale()
          The minimum visible scale for the layer.
 String getName()
          The name of the layer.
 int getParentLayerID()
          If the layer is a member of a composite layer, this property identifies the parent layer.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 String getSourceDescription()
          The description of the source information for the layer.
 ILongArray getSubLayers()
          The list identifying the sublayers if the layer is a composite layer.
 String getType()
          The layer type.
 int hashCode()
          the hashcode for this object
 boolean isCanFind()
          Indicates if the layer supports the Find operation.
 boolean isCanIdentify()
          Indicates if the layer supports the Identify operation.
 boolean isCanScaleSymbols()
          Indicates if the layer supports symbol scaling.
 boolean isCanSelect()
          Indicates if the layer supports feature selection.
 boolean isComposite()
          Indicates if the layer is a composite layer.
 void isDirty()
          isDirty
 boolean isFeatureLayer()
          Indicates if the layer is a feature layer.
 boolean isHasAttributes()
          Indicates if the layer has attributes.
 boolean isHasHyperlinks()
          Indicates if the layer has hyperlinks.
 boolean isHasLabels()
          Indicates if the layer has labels to turn on and off.
 void load(IStream pstm)
          load
 void readExternal(ObjectInput in)
           
 void save(IStream pstm, int fClearDirty)
          save
 void serialize(IXMLSerializeData data)
          Serializes an object to XML.
 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

MapLayerInfo

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

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

MapLayerInfo

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

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

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

getID

public int getID()
          throws IOException,
                 AutomationException
The layer identifier. This ID is used throughout to uniquely identify the layer for all requests.

Remarks

ID is a unique identifier for a layer in a given instance of ArcGIS Server map service. It is important to note that ID, SourceID and the index of layers (see MapLayerInfos) in map document are not the same. SourceID is used for map service interaction with the GPServer.

When a map service is published, a unique ID is assigned to all layers within the original map document (.mxd) starting from 0 (zero). This ID is accessible from IMapServerObjects2, MapLayerInfo, LayerDescription, MapServerLegendInfo, MapServerIdentifyResult, MapServerFindResult and FeatureExtent.

ID is not re-usable and does not change if the order of the layer is changed. This would change the how each layer is ordered in the index of layers. Adding new a layer results in a new ID being assigned. IDs keep incrementing as new layers are added to the map service. The limit of id numbers available is the limit of Long data type.

Please note that if the layer order in the TOC of the original map is changed or if layers are added/removed, the IDs will change accordingly.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getID in interface IMapLayerInfo
Specified by:
getID in interface IMapLayerInfo2
Returns:
The layerID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getDescription

public String getDescription()
                      throws IOException,
                             AutomationException
The description of the layer. This property is set in the General tab of the Layer Properties dialog.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDescription in interface IMapLayerInfo
Specified by:
getDescription in interface IMapLayerInfo2
Returns:
The desc
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getType

public String getType()
               throws IOException,
                      AutomationException
The layer type.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getType in interface IMapLayerInfo
Specified by:
getType in interface IMapLayerInfo2
Returns:
The type
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSourceDescription

public String getSourceDescription()
                            throws IOException,
                                   AutomationException
The description of the source information for the layer.

Remarks

With ArcGIS Server 9.3 release, this property is deprecated and always returns empty string.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSourceDescription in interface IMapLayerInfo
Specified by:
getSourceDescription in interface IMapLayerInfo2
Returns:
The desc
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasLabels

public boolean isHasLabels()
                    throws IOException,
                           AutomationException
Indicates if the layer has labels to turn on and off.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isHasLabels in interface IMapLayerInfo
Specified by:
isHasLabels in interface IMapLayerInfo2
Returns:
The hasLabels
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanSelect

public boolean isCanSelect()
                    throws IOException,
                           AutomationException
Indicates if the layer supports feature selection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCanSelect in interface IMapLayerInfo
Specified by:
isCanSelect in interface IMapLayerInfo2
Returns:
The canSelect
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanScaleSymbols

public boolean isCanScaleSymbols()
                          throws IOException,
                                 AutomationException
Indicates if the layer supports symbol scaling.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCanScaleSymbols in interface IMapLayerInfo
Specified by:
isCanScaleSymbols in interface IMapLayerInfo2
Returns:
The canScale
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanIdentify

public boolean isCanIdentify()
                      throws IOException,
                             AutomationException
Indicates if the layer supports the Identify operation.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCanIdentify in interface IMapLayerInfo
Specified by:
isCanIdentify in interface IMapLayerInfo2
Returns:
The canId
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanFind

public boolean isCanFind()
                  throws IOException,
                         AutomationException
Indicates if the layer supports the Find operation.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCanFind in interface IMapLayerInfo
Specified by:
isCanFind in interface IMapLayerInfo2
Returns:
The canFind
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isFeatureLayer

public boolean isFeatureLayer()
                       throws IOException,
                              AutomationException
Indicates if the layer is a feature layer.

Product Availability

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

Specified by:
isFeatureLayer in interface IMapLayerInfo
Specified by:
isFeatureLayer in interface IMapLayerInfo2
Returns:
The isFeatureLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMinScale

public double getMinScale()
                   throws IOException,
                          AutomationException
The minimum visible scale for the layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMinScale in interface IMapLayerInfo
Specified by:
getMinScale in interface IMapLayerInfo2
Returns:
The scale
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMaxScale

public double getMaxScale()
                   throws IOException,
                          AutomationException
The maximum visible scale for the layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMaxScale in interface IMapLayerInfo
Specified by:
getMaxScale in interface IMapLayerInfo2
Returns:
The scale
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtent

public IEnvelope getExtent()
                    throws IOException,
                           AutomationException
The geographic extent of the layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getExtent in interface IMapLayerInfo
Specified by:
getExtent in interface IMapLayerInfo2
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasHyperlinks

public boolean isHasHyperlinks()
                        throws IOException,
                               AutomationException
Indicates if the layer has hyperlinks.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isHasHyperlinks in interface IMapLayerInfo
Specified by:
isHasHyperlinks in interface IMapLayerInfo2
Returns:
The hasLinks
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasAttributes

public boolean isHasAttributes()
                        throws IOException,
                               AutomationException
Indicates if the layer has attributes.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isHasAttributes in interface IMapLayerInfo
Specified by:
isHasAttributes in interface IMapLayerInfo2
Returns:
The hasAttr
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFields

public IFields getFields()
                  throws IOException,
                         AutomationException
Array of attribute fields contained in the layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFields in interface IMapLayerInfo
Specified by:
getFields in interface IMapLayerInfo2
Returns:
A reference to a com.esri.arcgis.geodatabase.IFields
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDisplayField

public String getDisplayField()
                       throws IOException,
                              AutomationException
Primary display field.

Product Availability

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

Specified by:
getDisplayField in interface IMapLayerInfo
Specified by:
getDisplayField in interface IMapLayerInfo2
Returns:
The fieldName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isComposite

public boolean isComposite()
                    throws IOException,
                           AutomationException
Indicates if the layer is a composite layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isComposite in interface IMapLayerInfo
Specified by:
isComposite in interface IMapLayerInfo2
Returns:
The isComposite
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSubLayers

public ILongArray getSubLayers()
                        throws IOException,
                               AutomationException
The list identifying the sublayers if the layer is a composite layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getParentLayerID

public int getParentLayerID()
                     throws IOException,
                            AutomationException
If the layer is a member of a composite layer, this property identifies the parent layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getParentLayerID in interface IMapLayerInfo
Specified by:
getParentLayerID in interface IMapLayerInfo2
Returns:
The layerID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFieldAliases

public IStringArray getFieldAliases()
                             throws IOException,
                                    AutomationException
Array of strings that contains field alias for each field in Fields property.

Product Availability

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

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

getCopyrightText

public String getCopyrightText()
                        throws IOException,
                               AutomationException
Copyright information associated with the layer.

Product Availability

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

Specified by:
getCopyrightText in interface IMapLayerInfo2
Returns:
The copyright
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

serialize

public void serialize(IXMLSerializeData data)
               throws IOException,
                      AutomationException
Serializes an object to XML.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

deserialize

public void deserialize(IXMLSerializeData data)
                 throws IOException,
                        AutomationException
Deserializes an object from XML.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
deserialize in interface IXMLSerialize
Parameters:
data - A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
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.

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