Class FeatureWrapper

java.lang.Object
org.sensorhub.api.feature.FeatureWrapper
All Implemented Interfaces:
IFeature, IResource

public class FeatureWrapper extends Object implements IFeature

Utility class for wrapping a feature and overriding some of its behavior

Since:
Oct 2, 2021
  • Field Details

  • Constructor Details

    • FeatureWrapper

      public FeatureWrapper(IFeature delegate)
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface IFeature
      Returns:
      the local/internal ID of the feature (often automatically assigned by the feature repository)
    • getUniqueIdentifier

      public String getUniqueIdentifier()
      Specified by:
      getUniqueIdentifier in interface IFeature
      Returns:
      the globally unique identifier that can be used to identify the same feature across contexts (e.g. across repositories)
    • getName

      public String getName()
      Specified by:
      getName in interface IResource
      Returns:
      The resource name
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface IResource
      Returns:
      A short description of the resource
    • getProperties

      public Map<QName,Object> getProperties()
      Specified by:
      getProperties in interface IFeature
      Returns:
      the property list
    • getGeometry

      public AbstractGeometry getGeometry()
      Specified by:
      getGeometry in interface IFeature
      Returns:
      the geometry/location (or null if feature has no geometry)
    • getValidTime

      public TimeExtent getValidTime()
      Specified by:
      getValidTime in interface IFeature
      Returns:
      feature validity period (or null if always valid)
    • getType

      public String getType()
      Specified by:
      getType in interface IFeature
      Returns:
      the feature type URI
    • hasCustomGeomProperty

      public boolean hasCustomGeomProperty()
      Description copied from interface: IFeature
      To be overriden by subclasses when a property other than location provides the geometry. In this case, no location property is serialized
      Specified by:
      hasCustomGeomProperty in interface IFeature
      Returns:
      True if a custom property contains the geometry
    • hasCustomTimeProperty

      public boolean hasCustomTimeProperty()
      Description copied from interface: IFeature
      To be overriden by subclasses when a property other than validTime provides the feature time. In this case, no validTime property is serialized
      Specified by:
      hasCustomTimeProperty in interface IFeature
      Returns:
      True if a custom property contains the feature time stamp