java.lang.Object
overit.geocallapp.wfm.core.ux.bundler.search.detail.map.BundleMapLayerBase
All Implemented Interfaces:
BundleMapLayer
Direct Known Subclasses:
BundleHeaderMapLayer, BundleOperationsMapLayer, BundleStartingPositionMapLayer

public abstract class BundleMapLayerBase extends Object implements BundleMapLayer
Base class for Bundle-related map layers. This class provides common functionality for creating and managing map layers that display Bundle-related geographic data.
Since:
20.1
  • Field Details

  • Constructor Details

    • BundleMapLayerBase

      protected BundleMapLayerBase(String layerId, String layerName, List<BundleEntitiesAggregate> aggregates)
      Creates a new instance of BundleMapLayerBase.
      Parameters:
      layerId - the layer ID
      layerName - the layer name
      aggregates - the bundle entities aggregate
  • Method Details

    • getLayerId

      public String getLayerId()
      Returns the layer ID.
      Specified by:
      getLayerId in interface BundleMapLayer
      Returns:
      the layer ID
    • getLayerName

      public String getLayerName()
      Returns the layer name.
      Specified by:
      getLayerName in interface BundleMapLayer
      Returns:
      the layer name
    • getAggregates

      public List<BundleEntitiesAggregate> getAggregates()
      Returns the bundle entities aggregate.
      Returns:
      the bundle entities aggregate
    • setAggregates

      public void setAggregates(List<BundleEntitiesAggregate> aggregates)
      Sets the bundle entities aggregate.
      Parameters:
      aggregates - the bundle entities aggregate
    • getPrimaryXField

      public String getPrimaryXField()
      Returns the primary X coordinate field.
      Specified by:
      getPrimaryXField in interface BundleMapLayer
      Returns:
      the primary X coordinate field
    • getPrimaryYField

      public String getPrimaryYField()
      Returns the primary Y coordinate field.
      Specified by:
      getPrimaryYField in interface BundleMapLayer
      Returns:
      the primary Y coordinate field
    • getAlternativeXField

      public String getAlternativeXField()
      Returns the alternative X coordinate field.
      Specified by:
      getAlternativeXField in interface BundleMapLayer
      Returns:
      the alternative X coordinate field
    • getAlternativeYField

      public String getAlternativeYField()
      Returns the alternative Y coordinate field.
      Specified by:
      getAlternativeYField in interface BundleMapLayer
      Returns:
      the alternative Y coordinate field
    • getIdField

      public String getIdField()
      Returns the ID field.
      Specified by:
      getIdField in interface BundleMapLayer
      Returns:
      the ID field
    • getGeoJSONStyleFunction

      public String getGeoJSONStyleFunction()
      Returns the GeoJSON style function.
      Specified by:
      getGeoJSONStyleFunction in interface BundleMapLayer
      Returns:
      the GeoJSON style function
    • getGeoJSONLayer

      public overit.geocall.basic.geos.ui.webmap.Layer getGeoJSONLayer()
      Returns the GeoJSON layer.
      Specified by:
      getGeoJSONLayer in interface BundleMapLayer
      Returns:
      the GeoJSON layer
    • fetchGeoJSONData

      public String fetchGeoJSONData(Function<List<HashGetter>,String> toGeoJSONFunction, org.locationtech.jts.geom.Envelope bbox, Collection<String> selectedFeatures)
      Fetches GeoJSON data for the layer.
      Specified by:
      fetchGeoJSONData in interface BundleMapLayer
      Parameters:
      toGeoJSONFunction - function to convert features to GeoJSON string
      bbox - the bounding box for filtering features
      selectedFeatures - the selected features
      Returns:
      GeoJSON string for the layer
    • getXCoordinate

      protected Double getXCoordinate(HashGetter coordinateData)
      Gets the X coordinate from coordinate data, preferring primary coordinates.
      Parameters:
      coordinateData - the coordinate data
      Returns:
      the X coordinate, or null if not available
    • getYCoordinate

      protected Double getYCoordinate(HashGetter coordinateData)
      Gets the Y coordinate from coordinate data, preferring primary coordinates.
      Parameters:
      coordinateData - the coordinate data
      Returns:
      the Y coordinate, or null if not available
    • convertToFeatures

      protected List<HashGetter> convertToFeatures(List<HashGetter> featuresData, Collection<String> selectedFeatures)
      Converts data to GeoJSON features.
      Parameters:
      featuresData - the coordinate data
      selectedFeatures - the selected features
      Returns:
      list of GeoJSON features
    • getPropertiesBuilder

      protected abstract overit.geocallapp.wfm.geos.geojson.GeoJSONEntityPoint.GeoJSONEntityPointPropertiesBuilder getPropertiesBuilder()
      Gets the GeoJSON entity point properties builder.
      Returns:
      the GeoJSON entity point properties builder
    • getGeoJSONInfo

      public String getGeoJSONInfo(String featureId)
      Retrieves GeoJSON information for a bundle feature.
      Specified by:
      getGeoJSONInfo in interface BundleMapLayer
      Parameters:
      featureId - the feature ID
      Returns:
      GeoJSON information for the specified bundle feature, or empty if not found
    • getTooltipData

      protected abstract DynO getTooltipData(String featureId) throws DAException, DAValidateException
      Retrieves tooltip data for a specific feature.
      Parameters:
      featureId - the feature ID
      Returns:
      tooltip data for the specified feature
      Throws:
      DAException - if there is an error retrieving the tooltip data
      DAValidateException - if there is a validation error retrieving the tooltip data
    • getWorkOrderOperation

      public BOWorkOrderOperation getWorkOrderOperation(BOBundleOperation bundleOperation)
      Gets the work order operation associated with a bundle operation.
      Parameters:
      bundleOperation - the bundle operation
      Returns:
      the associated work order operation, or null if not found
    • getAddress

      public BOAddress getAddress(BOWorkOrderOperation workOrderOperation)
      Gets the address associated with a work order operation.
      Parameters:
      workOrderOperation - the work order operation
      Returns:
      the associated address, or null if not found
    • extractFeaturesData

      public HashGetter extractFeaturesData(BOBundleHeader header, BOBundleOperation bundleOperation, BOWorkOrderOperation workOrderOperation, BOAddress address)
      Extracts coordinates data from bundle operation, work order operation, and address.
      Parameters:
      header - the bundle header
      bundleOperation - the bundle operation
      workOrderOperation - the work order operation
      address - the address containing coordinates
      Returns:
      coordinate data as HashGetter, could be empty if no valid coordinates are present
    • getMidPointXCoord

      protected Double getMidPointXCoord(BOAddress address)
      Calculates the midpoint X coordinate between the start and end coordinates of an address.
      Parameters:
      address - the address containing coordinates
      Returns:
      the midpoint X coordinate, or null if no valid coordinates are present
    • getMidPointYCoord

      protected Double getMidPointYCoord(BOAddress address)
      Calculates the midpoint Y coordinate between the start and end coordinates of an address.
      Parameters:
      address - the address containing coordinates
      Returns:
      the midpoint Y coordinate, or null if no valid coordinates are present
    • getMidPointCoord

      protected Double getMidPointCoord(Double startingCoord, Double endingCoord)
      Calculates the midpoint between two coordinates.
      Parameters:
      startingCoord - the starting coordinate
      endingCoord - the ending coordinate
      Returns:
      the midpoint coordinate, or null if no valid coordinates are present
    • getWorkOrderCode

      public String getWorkOrderCode(Long workOrderId)
      Gets the work order code for a given work order ID.
      Parameters:
      workOrderId - the work order ID
      Returns:
      the work order code, or empty string if not found
    • calculateEnvelope

      public org.locationtech.jts.geom.Envelope calculateEnvelope()
      Description copied from interface: BundleMapLayer
      Calculates the envelope for the layer.
      Specified by:
      calculateEnvelope in interface BundleMapLayer
      Returns:
      the envelope
    • getCoordinates

      public List<org.locationtech.jts.geom.Coordinate> getCoordinates()
      Description copied from interface: BundleMapLayer
      Returns the coordinates for map related operations on coordinates.
      Specified by:
      getCoordinates in interface BundleMapLayer
      Returns:
      the list of coordinates
    • getAggregateFromFeatureId

      public abstract BundleEntitiesAggregate getAggregateFromFeatureId(String featureId)
      Retrieves the BundleEntitiesAggregate containing a specific feature.
      Parameters:
      featureId - the feature ID
      Returns:
      the BundleEntitiesAggregate containing the feature