Skip to content

Conversation

Andy2003
Copy link
Collaborator

@Andy2003 Andy2003 commented Jul 3, 2025

This PR refactors feature-attribute handling across the plugin by replacing String[]-based APIs with Map<String,Class<?>> and Set<String> for extra properties, adding dynamic attribute discovery/storage in layers, and updating tests and encoders to use the new API.

  • Migrate all getExtraPropertyNames and related APIs to getExtraProperties returning a Map<String,Class<?>>.
  • Update CopyDatabaseRecordProperties, GeoPipeline, GeoPipeFlow, and other classes to use Set<String> instead of String[].
  • Introduce dynamic attribute metadata capture in EditableLayerImpl and deprecate manual setFeatureAttributes.

@Andy2003 Andy2003 requested a review from Copilot July 3, 2025 14:37
@Andy2003 Andy2003 self-assigned this Jul 3, 2025
Copy link

github-actions bot commented Jul 3, 2025

Test Results

343 tests  ±0   318 ✅ ±0   10m 55s ⏱️ +3s
 35 suites ±0    25 💤 ±0 
 35 files   ±0     0 ❌ ±0 

Results for commit 3eeee71. ± Comparison against base commit 239be8e.

♻️ This comment has been updated with latest results.

Copilot

This comment was marked as outdated.

@Andy2003 Andy2003 force-pushed the feature/refactor-feture-attribute-handling branch from 13e0e2b to 3eeee71 Compare July 7, 2025 17:16
@Andy2003 Andy2003 requested a review from Copilot July 7, 2025 17:17
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors extra‐property handling by replacing array‐based APIs with map/set‐based ones, adds dynamic attribute discovery/storage, and updates tests, encoders, and procedures to use the new API.

  • Migrated all getExtraPropertyNames usages to getExtraProperties returning Map<String,Class<?>>, and String[]Set<String> in pipes.
  • Added dynamic metadata capture in EditableLayerImpl (via memorizeNodeMeta/saveAttributeMeta) and deprecated manual setters.
  • Updated all geometry encoders and feature builders to expose getEncoderProperties.

Reviewed Changes

Copilot reviewed 34 out of 39 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
EditableLayerImpl.java Implements dynamic property discovery and metadata storage
EditableLayerImpl.java Deprecates manual setters; adds mergeExtraPropertyNames
AbstractGeometryEncoder.java Adds getEncoderProperties
*Encoder.java (all encoders) Expose getEncoderProperties; replace literals with constants
SpatialProcedures.java Renames StringResultFeatureAttributeResult
GeoPipeline.java / CopyDatabaseRecordProperties.java / GeoPipeFlow.java Switch from arrays to Set<String> for extra property keys
Neo4jFeatureBuilder.java / Neo4jSpatialFeatureSource.java / etc. Update feature builders/sources to consume Map<String,Class<?>>
All tests (*Tests.java) Updated imports and invocations to use new map/set API
Constants.java Adds PROP_PREFIX_EXTRA_PROP_V2

@Andy2003 Andy2003 merged commit 7107e00 into master Jul 7, 2025
2 checks passed
@Andy2003 Andy2003 deleted the feature/refactor-feture-attribute-handling branch July 7, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant