Skip to content

Fix #133: Recursively resolve array dimensions in parent objects#296

Open
dyrpsf wants to merge 1 commit intosbmlteam:masterfrom
dyrpsf:fix-issue-133-arrays-validation
Open

Fix #133: Recursively resolve array dimensions in parent objects#296
dyrpsf wants to merge 1 commit intosbmlteam:masterfrom
dyrpsf:fix-issue-133-arrays-validation

Conversation

@dyrpsf
Copy link
Copy Markdown
Contributor

@dyrpsf dyrpsf commented Apr 11, 2026

Overview

This PR resolves Issue #133 where array validation incorrectly threw a "not a dimension id" error when a child object (e.g., an EventAssignment) referenced a dimension defined on its parent (e.g., an Event).

Changes Made

  • Updated getDimension(String fieldId) in ArraysSBasePlugin.java.
  • Previously, the method only checked the current object's ListOfDimensions, returning null if the dimension wasn't defined locally.
  • The method now includes a fallback loop that traverses up the SBML tree (getParentSBMLObject()), checking the ArraysSBasePlugin of each parent to recursively resolve the dimension ID.

Validation

  • Successfully compiled the jsbml-arrays extension package.

Resolves #133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Arrays validation should check for dimensions of parent objects

1 participant