|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.carto.ConvertLabelsToAnnotation
public class ConvertLabelsToAnnotation
An Esri convert labels to annotation helper class.
ConvertLabelsToAnnotation is a coarse grained object that simplifies the process of converting labels to annotation. Conversion to Geodatabase or Map Annotation is supported via the object. See IConvertLabelsToAnnotation for more information on how to setup a conversion.
Constructor Summary | |
---|---|
ConvertLabelsToAnnotation()
Constructs a ConvertLabelsToAnnotation using ArcGIS Engine. |
|
ConvertLabelsToAnnotation(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. ConvertLabelsToAnnotation theConvertLabelsToAnnotation = (ConvertLabelsToAnnotation) obj; |
Method Summary | |
---|---|
void |
addFeatureLayer(IFeatureLayer pFeatureLayer,
String annoLayerName,
IFeatureWorkspace pFeatureWorkspace,
IFeatureDataset pFeatureDataset,
boolean featureLinked,
boolean appendMode,
boolean requireSymbolID,
boolean autoCreate,
boolean autoUpdate,
String configKeyword)
Call this method for each feature layer be converted to annotation. |
void |
convertLabels()
Convert labels to annotation. |
boolean |
equals(Object o)
Compare this object with another |
IEnumLayer |
getAnnoLayers()
New database annotation layers created by the conversion process. |
static String |
getClsid()
getClsid. |
String |
getErrorInfo()
Error information generated by the conversion process. |
int |
hashCode()
the hashcode for this object |
void |
initialize(IMap pMap,
int storageType,
int whichFeatures,
boolean generateUnplacedAnnotation,
ITrackCancel pTrackCancel,
IAnnotationErrorEvents pAnnotationErrorEvents)
Call this method first to initialize the converter. |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
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 |
---|
public ConvertLabelsToAnnotation() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic ConvertLabelsToAnnotation(Object obj) throws IOException
ConvertLabelsToAnnotation theConvertLabelsToAnnotation = (ConvertLabelsToAnnotation) obj;
obj
to ConvertLabelsToAnnotation
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void initialize(IMap pMap, int storageType, int whichFeatures, boolean generateUnplacedAnnotation, ITrackCancel pTrackCancel, IAnnotationErrorEvents pAnnotationErrorEvents) throws IOException, AutomationException
This method initializes the conversion object with the global parameters for conversion. It is the first method that should be called when using the ConvertLabelsToAnnotation object. The initialization has the following inputs:
initialize
in interface IConvertLabelsToAnnotation
pMap
- A reference to a com.esri.arcgis.carto.IMap (in)storageType
- A com.esri.arcgis.carto.esriAnnotationStorageType constant (in)whichFeatures
- A com.esri.arcgis.carto.esriLabelWhichFeatures constant (in)generateUnplacedAnnotation
- The generateUnplacedAnnotation (in)pTrackCancel
- A reference to a com.esri.arcgis.system.ITrackCancel (in)pAnnotationErrorEvents
- A reference to a com.esri.arcgis.carto.IAnnotationErrorEvents (in, optional, pass 0 if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addFeatureLayer(IFeatureLayer pFeatureLayer, String annoLayerName, IFeatureWorkspace pFeatureWorkspace, IFeatureDataset pFeatureDataset, boolean featureLinked, boolean appendMode, boolean requireSymbolID, boolean autoCreate, boolean autoUpdate, String configKeyword) throws IOException, AutomationException
This method adds a layer to the list of layers for which labels will be converted into annotation. Initialize should be called on the ConvertLabelsToAnnotation object before calling this method. This method may be called multiple times for one conversion when more that one layer will be converted.
Depending on the storage type chosen in initialize, some of the input parameters are optional. For map annotation, input the following items:
~ A reference to the feature layer the labels will be converted fromAppend Mode:
If appendMode is True, the converter will look for the provided annotation class name in the specified workspace/feature dataset and convert labels to annotation features in that feature class. Append mode also performs additional logic to match existing annotation classes in the feature class with label classes being converted. If the classes match, they will be used rather than added to the annotation feature class extensions properties collection. If updates to the class extension are needed, an exclusive schema lock is required and an attempt will be made to obtain one.
If appendMode is false, a new annotation feature class will be created in specified workspace and feature dataset with the specified name and parameters as listed above.
addFeatureLayer
in interface IConvertLabelsToAnnotation
pFeatureLayer
- A reference to a com.esri.arcgis.carto.IFeatureLayer (in)annoLayerName
- The annoLayerName (in)pFeatureWorkspace
- A reference to a com.esri.arcgis.geodatabase.IFeatureWorkspace (in, optional, pass 0 if not required)pFeatureDataset
- A reference to a com.esri.arcgis.geodatabase.IFeatureDataset (in, optional, pass 0 if not required)featureLinked
- The featureLinked (in, optional, pass false if not required)appendMode
- The appendMode (in, optional, pass false if not required)requireSymbolID
- The requireSymbolID (in, optional, pass false if not required)autoCreate
- The autoCreate (in, optional, pass false if not required)autoUpdate
- The autoUpdate (in, optional, pass false if not required)configKeyword
- The configKeyword (in, optional, pass if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void convertLabels() throws IOException, AutomationException
The ConvertLabels method is used to perform the conversion process after the object has been initialized via the Initialize method and the layers have been added via AddFeatureLayer. ConvertLabels automatically adds map annotation to the map. Geodatabase annotation layers are not automatically added to the map and are instead provided in an enumeration via the AnnoLayers property.
convertLabels
in interface IConvertLabelsToAnnotation
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumLayer getAnnoLayers() throws IOException, AutomationException
Following the ConvertLabels method, geodatabase annotation layers are returned via this property.
getAnnoLayers
in interface IConvertLabelsToAnnotation
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getErrorInfo() throws IOException, AutomationException
This property returns a string of error information resulting from the conversion.
getErrorInfo
in interface IConvertLabelsToAnnotation
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |