Class TLcdShapeListAnnotation

java.lang.Object
com.luciad.shape.TLcdShapeListAnnotation
All Implemented Interfaces:
ILcdAnnotation

public class TLcdShapeListAnnotation extends Object implements ILcdAnnotation
Provides information on the ILcdShape instances that can be contained within a shape list. If the instance class of a data type implements ILcdShapeList, this annotation can be set on the data type to provide information on which ILcdShape instances are allowed to be contained in the shape list implementation of instances of this data type. For example, if a data type MyFeature has instance class TLcdFeaturedShapeList, setting a TLcdShapeListAnnotation annotation on this data type with shape classes ILcdPoint and ILcdPolyline would indicate that only ILcdPoint and ILcdPolyline instances may be stored as shapes in the shape list instances of MyFeature. Note that this annotation is purely informative and that implementations of ILcdShapeList are not required to enforce this constraint.
  • Constructor Details

    • TLcdShapeListAnnotation

      public TLcdShapeListAnnotation(Set<Class<? extends ILcdShape>> aShapeClasses)
      Creates a new TLcdShapeListAnnotation with the specified list of shape classes. containsSingleShape is set to false.
      Parameters:
      aShapeClasses - the set of shape classes that is allowed as shape on the instances of this annotation's data type.
    • TLcdShapeListAnnotation

      public TLcdShapeListAnnotation(boolean aContainsSingleShape, Set<Class<? extends ILcdShape>> aShapeClasses)
      Creates a new TLcdShapeListAnnotation with the specified list of shape classes.
      Parameters:
      aShapeClasses - the set of shape classes that is allowed as shape on the instances of this annotation's data type.
    • TLcdShapeListAnnotation

      public TLcdShapeListAnnotation(Class<? extends ILcdShape>... aShapeClasses)
      Creates a new TLcdShapeListAnnotation with the specified list of shape classes. containsSingleShape is set to false.
      Parameters:
      aShapeClasses - the shape classes that are allowed as shape on the instances of this annotation's data type.
    • TLcdShapeListAnnotation

      public TLcdShapeListAnnotation(boolean aContainsSingleShape, Class<? extends ILcdShape>... aShapeClasses)
      Creates a new TLcdShapeListAnnotation with the specified list of shape classes and the given value for containsSingleShape.
      Parameters:
      aShapeClasses - the shape classes that are allowed as shape on the instances of this annotation's data type.
  • Method Details

    • getShapeClasses

      public Set<Class<? extends ILcdShape>> getShapeClasses()
      Returns the set of shape classes which are allowed as shapes on the shape list instances of this annotation's data type.
      Returns:
      the set of shape classes which are allowed as shapes on the shape list instances of this annotation's data type.
    • containsSingleShape

      public boolean containsSingleShape()
      Returns true if the shape list always contains at most a single shape. This is for instance the case for domain objects that have a single shape as geometry, but implement ILcdShapeList because that's a simple ILcdShape interface to implement. Also, it allows the domain object to be used for many different shapes without having to implement other shape interfaces.
      Returns:
      if the shape list contains at most a single shape