Class BundleMapLayerManager

java.lang.Object
overit.geocallapp.wfm.core.ux.bundler.search.detail.BundleMapLayerManager

public class BundleMapLayerManager extends Object
Layer manager class for BundleMapContainer following the MVC pattern. This class handles all the business logic for extracting and processing bundle-related geographic data from multiple BundleEntitiesAggregate models. For each BundleEntitiesAggregate, it manages a triad of layers: bundle operations, bundle header, and bundle starting position.
Since:
20.1
  • Field Details

  • Constructor Details

    • BundleMapLayerManager

      public BundleMapLayerManager()
  • Method Details

    • registerLayerTriad

      public void registerLayerTriad(String layerId, String layerName, List<BundleEntitiesAggregate> aggregates)
      Registers a triad of layers (bundle operations, bundle header, bundle starting position) for a specific set of BundleEntitiesAggregate using unique IDs and names based on bundle header.
      Parameters:
      layerId - the layer ID suffix
      layerName - the layer name suffix
      aggregates - the set of BundleEntitiesAggregate for which to register layers
    • registerLayer

      public void registerLayer(String layerId, BundleMapLayer layer)
      Registers a layer with a unique ID.
      Parameters:
      layerId - the layer ID
      layer - the layer to register
    • unregisterLayer

      public void unregisterLayer(String layerId)
      Unregisters a layer with the specified ID.
      Parameters:
      layerId - the layer ID
    • isLayerRegistered

      public boolean isLayerRegistered(String layerId)
      Checks if a layer with the specified ID is registered.
      Parameters:
      layerId - the layer ID
      Returns:
      true if the layer is registered, false otherwise
    • calculateMapEnvelope

      public org.locationtech.jts.geom.Envelope calculateMapEnvelope()
      Calculates the bounding box for all bundle operations across all aggregates. Returns empty bounding box if no valid coordinates are found.
      Returns:
      coordinate data for centering the map, or null if no coordinates available
    • fetchGeoJSONData

      public String fetchGeoJSONData(String layerId, Function<List<HashGetter>,String> toGeoJSONFunction, org.locationtech.jts.geom.Envelope bbox, Map<String,Collection<String>> selectedFeatures)
      Fetches GeoJSON data for a specific layer.
      Parameters:
      layerId - the layer ID
      toGeoJSONFunction - function to convert features to GeoJSON string
      bbox - the bounding box for filtering features
      selectedFeatures - selected features
      Returns:
      GeoJSON string for the specified layer
    • getGeoJSONInfo

      public Optional<String> getGeoJSONInfo(String layerId, String featureId)
      Retrieves GeoJSON information for a specific feature in a layer.
      Parameters:
      layerId - the layer ID
      featureId - the feature ID
      Returns:
      GeoJSON information for the specified feature, or empty if not found
    • getGeoJSONLayers

      public List<overit.geocall.basic.geos.ui.webmap.Layer> getGeoJSONLayers(boolean isVisible)
      Retrieves all GeoJSON layers.
      Returns:
      list of GeoJSON layers
    • setStartingPoint

      public void setStartingPoint(BundleEntitiesAggregate aggregate, String coordinateData) throws DAException, DAValidateException, IOException
      Sets the starting point for a specific bundle aggregate.
      Parameters:
      aggregate - the bundle aggregate
      coordinateData - the coordinate data
      Throws:
      DAException - if a database error occurs
      DAValidateException - if the coordinate data is invalid
      IOException - if an I/O error occurs
    • getLayer

      public BundleMapLayer getLayer(String layerId)
      Retrieves a specific layer by its ID.
      Parameters:
      layerId - the layer ID
      Returns:
      the layer, or null if not found