Skip to content

INSDC Project compliance: enforce field constraints and add Collaborator affiliation support - #45

Open
mgonzalezporta wants to merge 1 commit into
masterfrom
insdc-project-compliance
Open

INSDC Project compliance: enforce field constraints and add Collaborator affiliation support#45
mgonzalezporta wants to merge 1 commit into
masterfrom
insdc-project-compliance

Conversation

@mgonzalezporta

@mgonzalezporta mgonzalezporta commented Mar 26, 2026

Copy link
Copy Markdown

Summary

Align the Project entity in webin-xml with the INSDC minimum specifications.

Changes

# INSDC Field Requirement Previous Status Changes Made
1 Description Mandatory, 20-4000 chars Optional (minOccurs="0"), no length check XSD: changed to minOccurs="1", added minLength=20 / maxLength=4000 restriction
2 Title Mandatory, 20-250 chars Mandatory, no length check XSD: added minLength=20 / maxLength=250 restriction
3 Submitter Name Mandatory Present via center_name attribute No change needed — already handled by ObjectType
4 Project Type Umbrella or Submission Present via xs:choice No change needed — already enforced
5 Contributor Name Optional COLLABORATOR was a plain string XSD: COLLABORATOR is now a complex type with NAME + AFFILIATION children. New Collaborator.java model. collaborators field added to Project.java and XmlProject.java with mapping in both directions.
6 Contributor Affiliation Optional Missing entirely Covered by the same COLLABORATOR restructure above — AFFILIATION is an optional child element
7 Publication Optional (PubMed/DOI) Present via PROJECT_LINKS No change needed — already supported via XREF links

Files changed

  • ENA.project.xsd — Description mandatory + length constraints on Title/Description + Collaborator restructure
  • Project.java — Added collaborators field + mapping
  • XmlProject.java — Added collaborators field with XML annotations + mapping
  • Collaborator.java — New model class (name + affiliation)

Not addressed at schema level

These are application-level concerns that cannot be enforced via XSD:

  • ASCII-only constraint — requires application-layer validation
  • Uniqueness per submitter — database/application constraint
  • Hierarchy rules (umbrellas can't have data directly, submission projects can't be parents) — business logic enforcement

Testing

Important: No tests have been run (no access to GitLab token)

…scription length constraints, restructure Collaborator to support affiliation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dipayan1985

Copy link
Copy Markdown
Contributor

@mgonzalezporta @haseeb-gh I would recommend adding a couple of unit tests for this change.

  1. Project object serialization and deserialization testing.
  2. Webin submission object serialization and deserialization testing.

@dipayan1985 dipayan1985 added the don't merge yet Not ready for merging label Apr 20, 2026

@dipayan1985 dipayan1985 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would recommend adding unit tests for project serialization and deserialization and webin submission serialization and deserialization.

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

Labels

don't merge yet Not ready for merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants