org.geotools.feature.type
Class AnnotationFeatureType

java.lang.Object
  extended byorg.geotools.feature.type.AnnotationFeatureType

public class AnnotationFeatureType
extends java.lang.Object

Defines required attributes for Annotations.

Annotations represent a text based geographic feature. The geometry stored in the feature indicates where the text should be drawn and the attribute indicated by the ANNOTATION_ATTRIBUTE_NAME attribute holds the text to be displayed for the feature.

Example:

   if ( feature.getFeatureType().isDescendedFrom( AnnotationFeatureType.ANNOTATION ) )
   {
     String attributeName = (String)feature.getAttribute( AnnotationFeatureType.ANNOTATION_ATTRIBUTE_NAME );
     String annotationText = (String)feature.getAttribute( attributeName );
     ... // Do something with the annotation text and feature
   }
 

Author:
John Meagher

Field Summary
static FeatureType ANNOTATION
          The FeatureType reference that should be used for Anotations.
static java.lang.String ANNOTATION_ATTRIBUTE_NAME
          The attribute name used to store the attribute name containing the annotation text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANNOTATION

public static final FeatureType ANNOTATION
The FeatureType reference that should be used for Anotations.


ANNOTATION_ATTRIBUTE_NAME

public static final java.lang.String ANNOTATION_ATTRIBUTE_NAME
The attribute name used to store the attribute name containing the annotation text. This is basically just a level of redirection.

See Also:
Constant Field Values


Copyright © GeoTools. All Rights Reserved.