Skip to content

Fix #129: Implement Arrays Validation Rule 20116 for SBaseRef missing indices#290

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

Fix #129: Implement Arrays Validation Rule 20116 for SBaseRef missing indices#290
dyrpsf wants to merge 1 commit intosbmlteam:masterfrom
dyrpsf:fix-issue-129-arrays-validation

Conversation

@dyrpsf
Copy link
Copy Markdown
Contributor

@dyrpsf dyrpsf commented Mar 31, 2026

Overview

This PR resolves Issue #129, where the Arrays validation was failing to check rule 20116. Previously, if an SBaseRef pointed to an array (an object with a ListOfDimensions) but lacked the required Index objects, the validator would silently pass instead of throwing the expected error.

Changes

  • New Validation Rule: Created SBaseRefIndicesCheck.java in the arrays constraints package. This class safely looks up the referenced element (using getIdRef() or getElementByMetaId()) and checks if the target has dimensions. If it does, it verifies that the referencing SBaseRef contains a ListOfIndices.
  • Registered Rule 20116: Added ARRAYS_20116 to the GENERAL_CONSISTENCY checklist in ArraysSBasePluginConstraints.java so the JSBML validation engine actively runs the new check.

Validation

  • Successfully compiled the arrays extension (mvn clean test-compile -pl extensions/arrays).
  • Verified that the changes pass the local test suite (mvn test -pl extensions/arrays).

Closes #129

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 Rule 20116

1 participant