Skip to content

Fix #99: Implement getTypeCode() for compat SBase inheritors#293

Open
dyrpsf wants to merge 1 commit intosbmlteam:masterfrom
dyrpsf:fix-issue-99-gettypecode
Open

Fix #99: Implement getTypeCode() for compat SBase inheritors#293
dyrpsf wants to merge 1 commit intosbmlteam:masterfrom
dyrpsf:fix-issue-99-gettypecode

Conversation

@dyrpsf
Copy link
Copy Markdown
Contributor

@dyrpsf dyrpsf commented Apr 7, 2026

Overview

This PR resolves Issue #99 by implementing the getTypeCode() method for all SBase inheritors within the libsbml-compat module, returning the appropriate integer constants to mirror the C++ libSBML API.

Changes Made

  • Created the missing libsbmlConstants.java interface to house the standard SBML_* integer type codes.
  • Added the getTypeCode() method to Species, Compartment, Model, SBMLDocument, and ListOfSpecies within the compatibility module.
  • Fixed a pre-existing broken import (org.sbml.jsbml.xml.test.SBML_L2V1Test) in SBMLDocument.java that was preventing the module from compiling.
  • Fixed a pre-existing missing import for MessageFormat in ListOfSpecies.java.
  • Fixed pre-existing missing throws XMLStreamException declarations on the Notes wrapper methods in Compartment.java.

Validation

  • Successfully compiled the libsbml-compat module.
  • Passed all module tests.

Closes #99

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.

implementation of the getTypeCode() methods

1 participant