Skip to content

Centralize RDF/XHTML keywords (dc, Bag, rdf, etc.) as constants/enums #288

@dyrpsf

Description

@dyrpsf

This is a follow-up to PR #285 / issue #219.

During review, it was suggested to move repeated RDF/XHTML keywords such as
dc, Bag, rdf, etc. into a shared place, either as public static final
string constants or as an enum, to reduce the risk of typos and improve
long-term maintainability.

A possible approach would be to introduce something like:

  • org.sbml.jsbml.xml.RDFConstants (for RDF, Bag, li, about, …),
  • or an enum containing the commonly used element/attribute names,

and then have SBMLRDFAnnotationParser and related classes use these
constants instead of raw string literals.

This would be a pure code-style refactoring with no change in behavior.

I’d be happy to work on this if approved.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions