com.esri.arcgis.carto
Class AnnotationExpressionParser

java.lang.Object
  extended by com.esri.arcgis.carto.AnnotationExpressionParser
All Implemented Interfaces:
IAnnotationExpressionParser, IAnnotationExpressionParser2, ICodedValueAttributes, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class AnnotationExpressionParser
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IAnnotationExpressionParser, IAnnotationExpressionParser2, ICodedValueAttributes

The expression parser handed out by the AnnotationExpressionEngine.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
AnnotationExpressionParser(Object obj)
          Construct a AnnotationExpressionParser using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 String findLabel(IFeature feature)
          The label for a given feature based on the annotation expression.
 String findLabel(IFeature feature, ILayerFields pLayerFields)
          The label for a given feature based on the annotation expression.
 String getAttribute(int index)
          The attribute fields in the expression.
 int getAttributeCount()
          The number of attribute fields in the expression.
 String getExpression()
          The annotation expression.
 int hashCode()
          the hashcode for this object
 boolean isUseCodedValue()
          Indicates if coded values are used.
 void lastError(int[] number, int[] line, String[] description)
          Reports error that occurred in FindLabel method.
 void setUseCodedValue(boolean flag)
          Indicates if coded values are used.
 
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

AnnotationExpressionParser

public AnnotationExpressionParser(Object obj)
                           throws IOException
Construct a AnnotationExpressionParser using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to AnnotationExpressionParser.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
AnnotationExpressionParser o = (AnnotationExpressionParser)obj; // will not work

AnnotationExpressionParser o = new AnnotationExpressionParser(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems AnnotationExpressionParser theAnnotationExpressionParser = (AnnotationExpressionParser) obj;
Method Detail

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

getExpression

public String getExpression()
                     throws IOException,
                            AutomationException
The annotation expression.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getExpression in interface IAnnotationExpressionParser
Specified by:
getExpression in interface IAnnotationExpressionParser2
Returns:
The expression
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAttributeCount

public int getAttributeCount()
                      throws IOException,
                             AutomationException
The number of attribute fields in the expression.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getAttributeCount in interface IAnnotationExpressionParser
Specified by:
getAttributeCount in interface IAnnotationExpressionParser2
Returns:
The attributes
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAttribute

public String getAttribute(int index)
                    throws IOException,
                           AutomationException
The attribute fields in the expression.

Product Availability

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

Specified by:
getAttribute in interface IAnnotationExpressionParser
Specified by:
getAttribute in interface IAnnotationExpressionParser2
Parameters:
index - The index (in)
Returns:
The attribute
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findLabel

public String findLabel(IFeature feature)
                 throws IOException,
                        AutomationException
The label for a given feature based on the annotation expression.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
findLabel in interface IAnnotationExpressionParser
Parameters:
feature - A reference to a com.esri.arcgis.geodatabase.IFeature (in)
Returns:
The label
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

lastError

public void lastError(int[] number,
                      int[] line,
                      String[] description)
               throws IOException,
                      AutomationException
Reports error that occurred in FindLabel method.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
lastError in interface IAnnotationExpressionParser
Specified by:
lastError in interface IAnnotationExpressionParser2
Parameters:
number - The number (in/out: use single element array)
line - The line (in/out: use single element array)
description - The description (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findLabel

public String findLabel(IFeature feature,
                        ILayerFields pLayerFields)
                 throws IOException,
                        AutomationException
The label for a given feature based on the annotation expression.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
findLabel in interface IAnnotationExpressionParser2
Parameters:
feature - A reference to a com.esri.arcgis.geodatabase.IFeature (in)
pLayerFields - A reference to a com.esri.arcgis.carto.ILayerFields (in)
Returns:
The label
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isUseCodedValue

public boolean isUseCodedValue()
                        throws IOException,
                               AutomationException
Indicates if coded values are used.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isUseCodedValue in interface ICodedValueAttributes
Returns:
The flag
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setUseCodedValue

public void setUseCodedValue(boolean flag)
                      throws IOException,
                             AutomationException
Indicates if coded values are used.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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