Class BundleMapLayerBase
java.lang.Object
overit.geocallapp.wfm.core.ux.bundler.search.detail.map.BundleMapLayerBase
- All Implemented Interfaces:
BundleMapLayer
- Direct Known Subclasses:
BundleHeaderMapLayer,BundleOperationsMapLayer,BundleStartingPositionMapLayer
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 Summary
FieldsModifier and TypeFieldDescriptionprotected List<BundleEntitiesAggregate> protected overit.geocall.basic.geos.ui.webmap.Layerprotected Stringprotected Stringprotected static final LogChannelstatic final Stringstatic final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBundleMapLayerBase(String layerId, String layerName, List<BundleEntitiesAggregate> aggregates) Creates a new instance of BundleMapLayerBase. -
Method Summary
Modifier and TypeMethodDescriptionorg.locationtech.jts.geom.EnvelopeCalculates the envelope for the layer.protected List<HashGetter> convertToFeatures(List<HashGetter> featuresData, Collection<String> selectedFeatures) Converts data to GeoJSON features.extractFeaturesData(BOBundleHeader header, BOBundleOperation bundleOperation, BOWorkOrderOperation workOrderOperation, BOAddress address) Extracts coordinates data from bundle operation, work order operation, and address.fetchGeoJSONData(Function<List<HashGetter>, String> toGeoJSONFunction, org.locationtech.jts.geom.Envelope bbox, Collection<String> selectedFeatures) Fetches GeoJSON data for the layer.getAddress(BOWorkOrderOperation workOrderOperation) Gets the address associated with a work order operation.abstract BundleEntitiesAggregategetAggregateFromFeatureId(String featureId) Retrieves the BundleEntitiesAggregate containing a specific feature.Returns the bundle entities aggregate.Returns the alternative X coordinate field.Returns the alternative Y coordinate field.List<org.locationtech.jts.geom.Coordinate> Returns the coordinates for map related operations on coordinates.getGeoJSONInfo(String featureId) Retrieves GeoJSON information for a bundle feature.overit.geocall.basic.geos.ui.webmap.LayerReturns the GeoJSON layer.Returns the GeoJSON style function.Returns the ID field.Returns the layer ID.Returns the layer name.protected DoublegetMidPointCoord(Double startingCoord, Double endingCoord) Calculates the midpoint between two coordinates.protected DoublegetMidPointXCoord(BOAddress address) Calculates the midpoint X coordinate between the start and end coordinates of an address.protected DoublegetMidPointYCoord(BOAddress address) Calculates the midpoint Y coordinate between the start and end coordinates of an address.Returns the primary X coordinate field.Returns the primary Y coordinate field.protected abstract overit.geocallapp.wfm.geos.geojson.GeoJSONEntityPoint.GeoJSONEntityPointPropertiesBuilderGets the GeoJSON entity point properties builder.protected abstract DynOgetTooltipData(String featureId) Retrieves tooltip data for a specific feature.getWorkOrderCode(Long workOrderId) Gets the work order code for a given work order ID.getWorkOrderOperation(BOBundleOperation bundleOperation) Gets the work order operation associated with a bundle operation.protected DoublegetXCoordinate(HashGetter coordinateData) Gets the X coordinate from coordinate data, preferring primary coordinates.protected DoublegetYCoordinate(HashGetter coordinateData) Gets the Y coordinate from coordinate data, preferring primary coordinates.voidsetAggregates(List<BundleEntitiesAggregate> aggregates) Sets the bundle entities aggregate.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocallapp.wfm.core.ux.bundler.search.detail.map.BundleMapLayer
getFeaturesData, getTooltipConfiguration
-
Field Details
-
MIDPOINT_X_COORD
- See Also:
-
MIDPOINT_Y_COORD
- See Also:
-
LOG
-
layerId
-
layerName
-
aggregates
-
layer
protected overit.geocall.basic.geos.ui.webmap.Layer layer
-
-
Constructor Details
-
BundleMapLayerBase
protected BundleMapLayerBase(String layerId, String layerName, List<BundleEntitiesAggregate> aggregates) Creates a new instance of BundleMapLayerBase.- Parameters:
layerId- the layer IDlayerName- the layer nameaggregates- the bundle entities aggregate
-
-
Method Details
-
getLayerId
Returns the layer ID.- Specified by:
getLayerIdin interfaceBundleMapLayer- Returns:
- the layer ID
-
getLayerName
Returns the layer name.- Specified by:
getLayerNamein interfaceBundleMapLayer- Returns:
- the layer name
-
getAggregates
Returns the bundle entities aggregate.- Returns:
- the bundle entities aggregate
-
setAggregates
Sets the bundle entities aggregate.- Parameters:
aggregates- the bundle entities aggregate
-
getPrimaryXField
Returns the primary X coordinate field.- Specified by:
getPrimaryXFieldin interfaceBundleMapLayer- Returns:
- the primary X coordinate field
-
getPrimaryYField
Returns the primary Y coordinate field.- Specified by:
getPrimaryYFieldin interfaceBundleMapLayer- Returns:
- the primary Y coordinate field
-
getAlternativeXField
Returns the alternative X coordinate field.- Specified by:
getAlternativeXFieldin interfaceBundleMapLayer- Returns:
- the alternative X coordinate field
-
getAlternativeYField
Returns the alternative Y coordinate field.- Specified by:
getAlternativeYFieldin interfaceBundleMapLayer- Returns:
- the alternative Y coordinate field
-
getIdField
Returns the ID field.- Specified by:
getIdFieldin interfaceBundleMapLayer- Returns:
- the ID field
-
getGeoJSONStyleFunction
Returns the GeoJSON style function.- Specified by:
getGeoJSONStyleFunctionin interfaceBundleMapLayer- Returns:
- the GeoJSON style function
-
getGeoJSONLayer
public overit.geocall.basic.geos.ui.webmap.Layer getGeoJSONLayer()Returns the GeoJSON layer.- Specified by:
getGeoJSONLayerin interfaceBundleMapLayer- 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:
fetchGeoJSONDatain interfaceBundleMapLayer- Parameters:
toGeoJSONFunction- function to convert features to GeoJSON stringbbox- the bounding box for filtering featuresselectedFeatures- the selected features- Returns:
- GeoJSON string for the layer
-
getXCoordinate
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
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 dataselectedFeatures- 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
Retrieves GeoJSON information for a bundle feature.- Specified by:
getGeoJSONInfoin interfaceBundleMapLayer- Parameters:
featureId- the feature ID- Returns:
- GeoJSON information for the specified bundle feature, or empty if not found
-
getTooltipData
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 dataDAValidateException- if there is a validation error retrieving the tooltip data
-
getWorkOrderOperation
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
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 headerbundleOperation- the bundle operationworkOrderOperation- the work order operationaddress- the address containing coordinates- Returns:
- coordinate data as HashGetter, could be empty if no valid coordinates are present
-
getMidPointXCoord
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
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
Calculates the midpoint between two coordinates.- Parameters:
startingCoord- the starting coordinateendingCoord- the ending coordinate- Returns:
- the midpoint coordinate, or null if no valid coordinates are present
-
getWorkOrderCode
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:BundleMapLayerCalculates the envelope for the layer.- Specified by:
calculateEnvelopein interfaceBundleMapLayer- Returns:
- the envelope
-
getCoordinates
Description copied from interface:BundleMapLayerReturns the coordinates for map related operations on coordinates.- Specified by:
getCoordinatesin interfaceBundleMapLayer- Returns:
- the list of coordinates
-
getAggregateFromFeatureId
Retrieves the BundleEntitiesAggregate containing a specific feature.- Parameters:
featureId- the feature ID- Returns:
- the BundleEntitiesAggregate containing the feature
-