Class TLcdFeaturedService

java.lang.Object
com.luciad.ais.model.service.TLcdService
com.luciad.ais.model.service.TLcdFeaturedService
All Implemented Interfaces:
ILcdService, ILcdDefaultDisplayNameSettable, ILcdDataObject, ILcdFeatured, Serializable

public class TLcdFeaturedService extends TLcdService implements ILcdDefaultDisplayNameSettable
The default implementation of a service object with additional properties.
Since:
6.2
See Also:
  • Constructor Details

    • TLcdFeaturedService

      @Deprecated public TLcdFeaturedService(int aNumberOfFeatures)
      Constructs a new TLcdFeaturedService. The user has to pass on the number of features he wants this featured service to have.
      Parameters:
      aNumberOfFeatures -
    • TLcdFeaturedService

      public TLcdFeaturedService(TLcdDataType aDataType)
      Creates a new instance for the given type.
      Parameters:
      aDataType - the data type of the returned instance
      Throws:
      IllegalArgumentException - if TLcdAISDataTypes.Service is not assignable from the given data type
      Since:
      10.1
      See Also:
  • Method Details

    • getValue

      public Object getValue(TLcdDataProperty aProperty)
      Description copied from interface: ILcdDataObject

      Returns the value of the given property.

      If the property is a collection, the returned value will never be null. If the property has not been set, an empty collection of the appropriate type will be returned (Set, List or Map).

      The property must not be null, and must be declared in the data object's type or in one of its super types. Otherwise an IllegalArgumentException is thrown.

      Specified by:
      getValue in interface ILcdDataObject
      Overrides:
      getValue in class TLcdService
      Parameters:
      aProperty - the property for which the value is to be returned
      Returns:
      the value of the given property for this data object
    • setValue

      public void setValue(TLcdDataProperty aProperty, Object aValue)
      Description copied from interface: ILcdDataObject

      Sets the value of the given property for this data object. The implementation is allowed to throw an exception if the given value can't be set.

      The given property must be declared in the data object's type or in one of its super types. In other words, getDataType().getProperties().contains( aProperty ) should always be true. Otherwise, the implementation should throw an IllegalArgumentException.

      Specified by:
      setValue in interface ILcdDataObject
      Overrides:
      setValue in class TLcdService
      Parameters:
      aProperty - the property for which the value is to be set
      aValue - the value to set
      See Also:
    • hasValue

      public boolean hasValue(TLcdDataProperty aProperty)
      Description copied from interface: ILcdDataObject
      Indicates whether this data object has a value for the given property.

      • aProperty is from the right data type, and this instance has a value for it: returns true
      • aProperty is from the right data type, and this instance has no value for it: returns false
      • aProperty is not from the right data type: not allowed, you will get IllegalArgumentException
      • aProperty is null: not allowed, you will get NullPointerException

      A multivalued property is considered to have a value if it has at least one value.

      Specified by:
      hasValue in interface ILcdDataObject
      Overrides:
      hasValue in class TLcdService
      Parameters:
      aProperty - the property for which to return whether a value is present or not.
      Returns:
      true if this data object has a value for the given property, false otherwise.
    • getFeature

      public Object getFeature(int aIndex)
      Description copied from interface: ILcdFeatured
      Returns the feature Object at the given index.
      Specified by:
      getFeature in interface ILcdFeatured
      Parameters:
      aIndex - a valid feature index.
      Returns:
      the feature Object at the given index.
      See Also:
    • setFeature

      public void setFeature(int aIndex, Object aObject)
      Description copied from interface: ILcdFeatured
      Sets the feature Object at the given index.
      Specified by:
      setFeature in interface ILcdFeatured
      Parameters:
      aIndex - a valid feature index.
      aObject - the new feature Object.
      See Also:
    • getFeatureCount

      public int getFeatureCount()
      Description copied from interface: ILcdFeatured
      Returns the number of features.
      Specified by:
      getFeatureCount in interface ILcdFeatured
      Returns:
      the number of features.
    • canSetFeature

      public boolean canSetFeature(int aIndex)
      Description copied from interface: ILcdFeatured
      Checks whether the specified feature is editable.
      Specified by:
      canSetFeature in interface ILcdFeatured
      Parameters:
      aIndex - a valid feature index.
      Returns:
      true if the feature can be set, false otherwise.
    • setDefaultDisplayNameIndex

      public void setDefaultDisplayNameIndex(int aDefaultDisplayNameIndex)
      Description copied from interface: ILcdDefaultDisplayNameSettable
      Sets the index of the feature to be used in the display name. The default value is 0.
      Specified by:
      setDefaultDisplayNameIndex in interface ILcdDefaultDisplayNameSettable
      Parameters:
      aDefaultDisplayNameIndex - a valid index in the list of features
      See Also:
    • getDefaultDisplayNameIndex

      public int getDefaultDisplayNameIndex()
      Description copied from interface: ILcdDefaultDisplayNameSettable
      Returns the current index of the feature to be uses in the display name.
      Specified by:
      getDefaultDisplayNameIndex in interface ILcdDefaultDisplayNameSettable
      Returns:
      the current index of the feature to use in the display name
      See Also:
    • getDefaultDisplayName

      public String getDefaultDisplayName()
      Description copied from interface: ILcdDefaultDisplayNameSettable
      Returns the String to be used to display the ILcdDefaultDisplayNameSettable object.
      Specified by:
      getDefaultDisplayName in interface ILcdDefaultDisplayNameSettable
      Returns:
      the String to be used to display the ILcdDefaultDisplayNameSettable object
    • toString

      public String toString()
      Overrides:
      toString in class Object