From 065b2591eed77fcb64a495fdf8b42a8fe0cc6316 Mon Sep 17 00:00:00 2001 From: markquintontulloch Date: Tue, 24 Dec 2024 09:03:28 +0000 Subject: [PATCH 1/9] Change modEntityId to primaryExternalId --- SEARCH.md | 8 +- .../src/components/Editors/GeneEditor.js | 4 +- .../GenomicEntityListTemplate.test.js | 2 +- .../__tests__/GenomicEntityTemplate.test.js | 4 +- src/main/cliapp/src/constants/FilterFields.js | 40 +++--- src/main/cliapp/src/constants/SortFields.js | 2 +- .../AffectedGenomicModelTable.js | 6 +- .../AffectedGenomicModelTable.test.js | 4 +- .../mockData/mockData.js | 6 +- .../allelesPage/AlleleDetailPage.js | 10 +- .../containers/allelesPage/AllelesTable.js | 8 +- .../__tests__/AllelesTable.test.js | 4 +- .../AlleleGeneAssociationsFormTable.js | 6 +- .../allelesPage/mockData/mockData.js | 4 +- .../constructsPage/ConstructsTable.js | 6 +- .../constructsPage/GenomicComponentsDialog.js | 2 +- .../constructsPage/mockData/mockData.js | 4 +- .../DiseaseAnnotationsTable.js | 52 ++++---- .../NewAnnotationForm.js | 32 ++--- .../mockData/mockData.js | 6 +- .../useNewAnnotationReducer.js | 2 +- .../GeneGeneticInteractionsTable.js | 8 +- .../mockData/mockData.js | 8 +- .../GeneMolecularInteractionsTable.js | 4 +- .../mockData/mockData.js | 4 +- .../src/containers/genesPage/GenesTable.js | 6 +- .../genesPage/__tests__/GenesTable.test.js | 4 +- .../containers/genesPage/mockData/mockData.js | 2 +- .../PhenotypeAnnotationsTable.js | 4 +- .../mockData/mockData.js | 10 +- .../containers/variantsPage/VariantsTable.js | 6 +- .../cliapp/src/utils/__tests__/utils.test.js | 16 +-- src/main/cliapp/src/utils/utils.js | 6 +- .../constants/EntityFieldConstants.java | 2 +- .../curation_api/dao/ConstructDAO.java | 2 +- .../curation_api/dao/GeneDAO.java | 2 +- .../dao/GeneOntologyAnnotationDAO.java | 2 +- .../curation_api/dao/GenomicEntityDAO.java | 2 +- .../model/entities/AGMDiseaseAnnotation.java | 10 +- .../entities/AGMPhenotypeAnnotation.java | 10 +- .../model/entities/AffectedGenomicModel.java | 4 +- .../curation_api/model/entities/Allele.java | 8 +- .../entities/AlleleDiseaseAnnotation.java | 6 +- .../entities/AllelePhenotypeAnnotation.java | 6 +- .../model/entities/Annotation.java | 4 +- .../model/entities/AssemblyComponent.java | 2 +- .../entities/BioSampleGenomicInformation.java | 4 +- .../model/entities/BiologicalEntity.java | 4 +- .../model/entities/CodingSequence.java | 2 +- .../model/entities/Construct.java | 4 +- .../model/entities/DiseaseAnnotation.java | 10 +- .../curation_api/model/entities/Exon.java | 2 +- .../curation_api/model/entities/Gene.java | 10 +- .../model/entities/GeneDiseaseAnnotation.java | 4 +- .../entities/GeneExpressionAnnotation.java | 2 +- .../entities/GeneExpressionExperiment.java | 2 +- .../entities/GeneGeneticInteraction.java | 4 +- .../entities/GenePhenotypeAnnotation.java | 4 +- .../model/entities/GenomeAssembly.java | 2 +- .../HTPExpressionDatasetSampleAnnotation.java | 6 +- .../curation_api/model/entities/Person.java | 4 +- .../model/entities/PhenotypeAnnotation.java | 2 +- .../entities/PredictedVariantConsequence.java | 2 +- .../curation_api/model/entities/Reagent.java | 8 +- .../model/entities/Transcript.java | 12 +- .../curation_api/model/entities/Variant.java | 2 +- .../AlleleGeneAssociation.java | 4 +- .../AlleleVariantAssociation.java | 4 +- ...ingSequenceGenomicLocationAssociation.java | 4 +- .../ConstructGenomicEntityAssociation.java | 4 +- .../ExonGenomicLocationAssociation.java | 4 +- .../geneAssociations/GeneGeneAssociation.java | 4 +- .../GeneGenomicLocationAssociation.java | 4 +- ...quenceTargetingReagentGeneAssociation.java | 2 +- .../TranscriptCodingSequenceAssociation.java | 8 +- .../TranscriptExonAssociation.java | 8 +- .../TranscriptGeneAssociation.java | 6 +- .../TranscriptGenomicLocationAssociation.java | 4 +- ...atedVariantGenomicLocationAssociation.java | 4 +- .../VariantGenomicLocationAssociation.java | 2 +- .../VariantLocationAssociation.java | 2 +- .../model/entities/base/SubmittedObject.java | 12 +- .../model/ingest/dto/AnnotationDTO.java | 4 +- .../ingest/dto/base/SubmittedObjectDTO.java | 4 +- .../services/AssemblyComponentService.java | 6 +- .../services/CodingSequenceService.java | 4 +- .../curation_api/services/ExonService.java | 4 +- .../curation_api/services/GeneService.java | 2 +- .../services/GenomeAssemblyService.java | 6 +- .../services/TranscriptService.java | 2 +- .../base/BaseAnnotationCrudService.java | 2 +- .../services/base/BaseEntityCrudService.java | 2 +- .../base/SubmittedObjectCrudService.java | 4 +- .../helpers/UniqueIdentifierHelper.java | 20 +-- .../validation/AnnotationValidator.java | 4 +- .../DiseaseAnnotationValidator.java | 2 +- .../services/validation/PersonValidator.java | 2 +- .../services/validation/ReagentValidator.java | 4 +- ...ReagentGeneAssociationFmsDTOValidator.java | 4 +- .../base/SubmittedObjectValidator.java | 8 +- .../dto/AffectedGenomicModelDTOValidator.java | 8 +- .../validation/dto/AlleleDTOValidator.java | 8 +- .../dto/AnnotationDTOValidator.java | 2 +- .../validation/dto/GeneDTOValidator.java | 8 +- .../validation/dto/ReagentDTOValidator.java | 2 +- .../validation/dto/VariantDTOValidator.java | 10 +- ...AGMPhenotypeAnnotationFmsDTOValidator.java | 2 +- ...elePhenotypeAnnotationFmsDTOValidator.java | 2 +- .../PhenotypeAnnotationFmsDTOValidator.java | 4 +- ...quenceTargetingReagentFmsDTOValidator.java | 4 +- .../dto/fms/VariantFmsDTOValidator.java | 4 +- .../v0.38.0.21__linkml_v2_9_1_update.sql | 23 ++++ .../AffectedGenomicModelITCase.java | 26 ++-- .../curation_api/AgmBulkUploadITCase.java | 8 +- .../curation_api/AlleleBulkUploadITCase.java | 12 +- ...AlleleGeneAssociationBulkUploadITCase.java | 10 +- .../AlleleGeneAssociationITCase.java | 24 ++-- .../curation_api/AlleleITCase.java | 42 +++--- .../ConstructBulkUploadITCase.java | 14 +- ...omicEntityAssociationBulkUploadITCase.java | 12 +- ...nstructGenomicEntityAssociationITCase.java | 14 +- .../curation_api/ConstructITCase.java | 32 ++--- .../DiseaseAnnotationBulkUploadITCase.java | 118 ++++++++--------- .../curation_api/DiseaseAnnotationITCase.java | 124 +++++++++--------- .../ExpressionBulkUploadFmsITCase.java | 4 +- .../curation_api/GeneBulkUploadITCase.java | 16 +-- .../curation_api/GeneITCase.java | 36 ++--- .../GeneInteractionBulkUploadFmsITCase.java | 28 ++-- .../curation_api/Gff3BulkUploadITCase.java | 14 +- ...ssionDatasetSampleAnnotationFmsITCase.java | 2 +- .../OrthologyBulkUploadFmsITCase.java | 4 +- .../ParalogyBulkUploadFmsITCase.java | 4 +- ...henotypeAnnotationBulkUploadFmsITCase.java | 34 ++--- ...ceTargetingReagentBulkUploadFmsITCase.java | 4 +- ...entGeneAssociationBulkUploadFmsITCase.java | 8 +- .../curation_api/VariantBulkUploadITCase.java | 12 +- .../curation_api/VariantFmsITCase.java | 6 +- .../curation_api/VariantITCase.java | 40 +++--- .../curation_api/base/BaseITCase.java | 62 ++++----- .../bulk/01_gene/AF_01_all_fields.json | 2 +- .../bulk/01_gene/DN_01_duplicate_notes.json | 2 +- .../bulk/01_gene/DX_01_duplicate_xref.json | 2 +- .../EN_01_empty_non_required_fields.json | 2 +- .../bulk/01_gene/ER_01_empty_mod_ids.json | 2 +- .../bulk/01_gene/ER_02_empty_taxon.json | 2 +- .../ER_03_empty_gene_symbol_display_text.json | 2 +- ..._04_empty_gene_full_name_display_text.json | 2 +- ...pty_gene_systematic_name_display_text.json | 2 +- ...ER_06_empty_gene_synonym_display_text.json | 2 +- .../ER_07_empty_gene_symbol_format_text.json | 2 +- ...R_08_empty_gene_full_name_format_text.json | 2 +- ...mpty_gene_systematic_name_format_text.json | 2 +- .../ER_10_empty_gene_synonym_format_text.json | 2 +- .../ER_11_empty_gene_symbol_name_type.json | 2 +- .../ER_12_empty_gene_full_name_name_type.json | 2 +- ..._empty_gene_systematic_name_name_type.json | 2 +- .../ER_14_empty_gene_synonym_name_type.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...ider_cross_reference_referenced_curie.json | 2 +- ...provider_cross_reference_display_name.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- ..._empty_gene_secondary_id_secondary_id.json | 2 +- .../bulk/01_gene/ER_21_empty_gene_type.json | 2 +- .../01_gene/ER_22_empty_note_type_name.json | 2 +- .../bulk/01_gene/ER_23_empty_free_text.json | 2 +- .../01_gene/IV_01_invalid_date_created.json | 2 +- .../01_gene/IV_02_invalid_date_updated.json | 2 +- .../bulk/01_gene/IV_03_invalid_taxon.json | 2 +- .../IV_04_invalid_gene_symbol_name_type.json | 2 +- ...V_05_invalid_gene_full_name_name_type.json | 2 +- ...nvalid_gene_systematic_name_name_type.json | 2 +- .../IV_07_invalid_gene_synonym_name_type.json | 2 +- ..._08_invalid_gene_symbol_synonym_scope.json | 2 +- ..._invalid_gene_full_name_synonym_scope.json | 2 +- ...id_gene_systematic_name_synonym_scope.json | 2 +- ...11_invalid_gene_synonym_synonym_scope.json | 2 +- .../IV_12_invalid_gene_symbol_evidence.json | 2 +- ...IV_13_invalid_gene_full_name_evidence.json | 2 +- ...invalid_gene_systematic_name_evidence.json | 2 +- .../IV_15_invalid_gene_synonym_evidence.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- ...19_invalid_gene_secondary_id_evidence.json | 2 +- .../bulk/01_gene/IV_20_invalid_gene_type.json | 2 +- .../01_gene/IV_21_invalid_note_type_name.json | 2 +- .../IV_22_invalid_evidence_curies.json | 2 +- .../MN_01_no_non_required_fields_level_1.json | 2 +- .../MN_02_no_non_required_fields_level_2.json | 2 +- .../bulk/01_gene/MR_02_no_taxon.json | 2 +- .../bulk/01_gene/MR_03_no_gene_symbol.json | 2 +- .../MR_04_no_gene_symbol_display_text.json | 2 +- .../MR_05_no_gene_full_name_display_text.json | 2 +- ..._no_gene_systematic_name_display_text.json | 2 +- .../MR_07_no_gene_synonym_display_text.json | 2 +- .../MR_08_no_gene_symbol_format_text.json | 2 +- .../MR_09_no_gene_full_name_format_text.json | 2 +- ...0_no_gene_systematic_name_format_text.json | 2 +- .../MR_11_no_gene_synonym_format_text.json | 2 +- .../MR_12_no_gene_symbol_name_type.json | 2 +- .../MR_13_no_gene_full_name_name_type.json | 2 +- ..._14_no_gene_systematic_name_name_type.json | 2 +- .../MR_15_no_gene_synonym_name_type.json | 2 +- .../bulk/01_gene/MR_16_no_data_provider.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...ider_cross_reference_referenced_curie.json | 2 +- ...provider_cross_reference_display_name.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- ..._22_no_gene_secondary_id_secondary_id.json | 2 +- .../bulk/01_gene/MR_23_no_gene_type.json | 2 +- .../bulk/01_gene/MR_24_no_note_type_name.json | 2 +- .../bulk/01_gene/MR_25_no_free_text.json | 2 +- ...D_01_update_all_except_default_fields.json | 2 +- ...E_01_update_empty_non_required_fields.json | 2 +- ...update_no_non_required_fields_level_1.json | 2 +- ...update_no_non_required_fields_level_2.json | 2 +- .../01_gene/VT_01_valid_taxon_for_HUMAN.json | 2 +- .../01_gene/VT_02_valid_taxon_for_RGD.json | 2 +- .../bulk/02_allele/AF_01_all_fields.json | 2 +- .../bulk/02_allele/DN_01_duplicate_notes.json | 2 +- .../EN_01_empty_non_required_fields.json | 2 +- .../bulk/02_allele/ER_01_empty_mod_ids.json | 2 +- .../bulk/02_allele/ER_02_empty_taxon.json | 2 +- ...y_allele_mutation_type_mutation_types.json | 2 +- ...R_04_empty_allele_symbol_display_text.json | 2 +- ...5_empty_allele_full_name_display_text.json | 2 +- ..._06_empty_allele_synonym_display_text.json | 2 +- ...ER_07_empty_allele_symbol_format_text.json | 2 +- ...08_empty_allele_full_name_format_text.json | 2 +- ...R_09_empty_allele_synonym_format_text.json | 2 +- .../ER_10_empty_allele_symbol_name_type.json | 2 +- ...R_11_empty_allele_full_name_name_type.json | 2 +- .../ER_12_empty_allele_synonym_name_type.json | 2 +- ...mpty_allele_secondary_id_secondary_id.json | 2 +- ...ele_inheritance_mode_inheritance_mode.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...ider_cross_reference_referenced_curie.json | 2 +- ...provider_cross_reference_display_name.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- ...functional_impacts_functional_impacts.json | 2 +- ...n_status_germline_transmission_status.json | 2 +- ...22_empty_related_notes_note_type_name.json | 2 +- .../ER_23_empty_related_notes_free_text.json | 2 +- ...llele_database_status_database_status.json | 2 +- ...omenclature_events_nomenclature_event.json | 2 +- .../02_allele/IV_01_invalid_date_created.json | 2 +- .../02_allele/IV_02_invalid_date_updated.json | 2 +- .../bulk/02_allele/IV_03_invalid_taxon.json | 2 +- .../IV_04_invalid_in_collection.json | 2 +- .../02_allele/IV_05_invalid_reference.json | 2 +- ...id_allele_mutation_type_mutation_type.json | 2 +- ...invalid_allele_mutation_type_evidence.json | 2 +- ...IV_08_invalid_allele_symbol_name_type.json | 2 +- ...09_invalid_allele_full_name_name_type.json | 2 +- ...V_10_invalid_allele_synonym_name_type.json | 2 +- ...1_invalid_allele_symbol_synonym_scope.json | 2 +- ...nvalid_allele_full_name_synonym_scope.json | 2 +- ..._invalid_allele_synonym_synonym_scope.json | 2 +- .../IV_14_invalid_allele_symbol_evidence.json | 2 +- ..._15_invalid_allele_full_name_evidence.json | 2 +- ...IV_16_invalid_allele_synonym_evidence.json | 2 +- ..._invalid_allele_secondary_id_evidence.json | 2 +- ...ele_inheritance_mode_inheritance_mode.json | 2 +- ...llele_inheritance_mode_phenotype_term.json | 2 +- ...alid_allele_inheritance_mode_evidence.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- ...functional_impacts_functional_impacts.json | 2 +- ...ele_functional_impacts_phenotype_term.json | 2 +- ...id_allele_functional_impacts_evidence.json | 2 +- ...n_status_germline_transmission_status.json | 2 +- ...germline_transmission_status_evidence.json | 2 +- ..._invalid_related_notes_note_type_name.json | 2 +- .../IV_30_invalid_related_notes_evidence.json | 2 +- ...llele_database_status_database_status.json | 2 +- ...valid_allele_database_status_evidence.json | 2 +- ...omenclature_events_nomenclature_event.json | 2 +- ...d_allele_nomenclature_events_evidence.json | 2 +- .../MN_01_no_non_required_fields_level_1.json | 2 +- .../MN_02_no_non_required_fields_level_2.json | 2 +- .../bulk/02_allele/MR_02_no_taxon.json | 2 +- ...o_allele_mutation_type_mutation_types.json | 2 +- .../02_allele/MR_04_no_allele_symbol.json | 2 +- .../MR_05_no_allele_symbol_display_text.json | 2 +- ...R_06_no_allele_full_name_display_text.json | 2 +- .../MR_07_no_allele_synonym_display_text.json | 2 +- .../MR_08_no_allele_symbol_format_text.json | 2 +- ...MR_09_no_allele_full_name_format_text.json | 2 +- .../MR_10_no_allele_synonym_format_text.json | 2 +- .../MR_11_no_allele_symbol_name_type.json | 2 +- .../MR_12_no_allele_full_name_name_type.json | 2 +- .../MR_13_no_allele_synonym_name_type.json | 2 +- ...4_no_allele_secondary_id_secondary_id.json | 2 +- ...ele_inheritance_mode_inheritance_mode.json | 2 +- .../02_allele/MR_16_no_data_provider.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...ider_cross_reference_referenced_curie.json | 2 +- ...provider_cross_reference_display_name.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- ...functional_impacts_functional_impacts.json | 2 +- ...n_status_germline_transmission_status.json | 2 +- ...MR_24_no_related_notes_note_type_name.json | 2 +- .../MR_25_no_related_notes_free_text.json | 2 +- ...llele_database_status_database_status.json | 2 +- ...omenclature_events_nomenclature_event.json | 2 +- .../bulk/02_allele/SI_01_secondary_ids.json | 2 +- ...D_01_update_all_except_default_fields.json | 2 +- ...E_01_update_empty_non_required_fields.json | 2 +- ...update_no_non_required_fields_level_1.json | 2 +- ...update_no_non_required_fields_level_2.json | 2 +- .../VT_01_valid_taxon_for_HUMAN.json | 2 +- .../02_allele/VT_02_valid_taxon_for_RGD.json | 2 +- .../bulk/03_agm/AF_01_all_fields.json | 2 +- .../EN_01_empty_non_required_fields.json | 2 +- .../bulk/03_agm/ER_01_empty_mod_ids.json | 2 +- .../bulk/03_agm/ER_02_empty_taxon.json | 2 +- .../bulk/03_agm/ER_03_empty_subtype.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...ider_cross_reference_referenced_curie.json | 2 +- ...provider_cross_reference_display_name.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- .../03_agm/IV_01_invalid_date_created.json | 2 +- .../03_agm/IV_02_invalid_date_updated.json | 2 +- .../bulk/03_agm/IV_03_invalid_taxon.json | 2 +- .../bulk/03_agm/IV_04_invalid_subtype.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- .../03_agm/MN_01_no_non_required_fields.json | 2 +- .../resources/bulk/03_agm/MR_02_no_taxon.json | 2 +- .../bulk/03_agm/MR_03_no_subtype.json | 2 +- .../bulk/03_agm/MR_04_no_data_provider.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...ider_cross_reference_referenced_curie.json | 2 +- ...provider_cross_reference_display_name.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- ...D_01_update_all_except_default_fields.json | 2 +- ...E_01_update_empty_non_required_fields.json | 2 +- .../UM_01_update_no_non_required_fields.json | 2 +- .../03_agm/VT_01_valid_taxon_for_HUMAN.json | 2 +- .../03_agm/VT_02_valid_taxon_for_RGD.json | 2 +- .../AF_01_all_fields_gene_annotation.json | 2 +- .../AF_02_all_fields_allele_annotation.json | 2 +- .../AF_03_all_fields_agm_annotation.json | 2 +- .../DN_01_duplicate_notes.json | 2 +- .../ED_01_empty_disease_genetic_modifier.json | 2 +- ...pty_disease_genetic_modifier_relation.json | 2 +- ...disease_genetic_modifier_and_relation.json | 2 +- ...04_empty_condition_relation_reference.json | 2 +- ...ndition_relation_handle_and_reference.json | 2 +- ...quired_fields_level_1_gene_annotation.json | 2 +- ...ired_fields_level_1_allele_annotation.json | 2 +- ...equired_fields_level_1_agm_annotation.json | 2 +- ..._04_empty_non_required_fields_level_2.json | 2 +- .../ER_01_empty_subject.json | 2 +- .../ER_02_empty_object.json | 2 +- ...mpty_disease_relation_gene_annotation.json | 2 +- ...ty_disease_relation_allele_annotation.json | 2 +- ...empty_disease_relation_agm_annotation.json | 2 +- .../ER_06_empty_evidence_codes.json | 2 +- .../ER_07_empty_single_reference.json | 2 +- .../ER_08_empty_data_provider.json | 2 +- .../ER_09_empty_condition_relations_type.json | 2 +- ...tion_relation_experimental_conditions.json | 2 +- .../ER_11_empty_condition_class.json | 2 +- .../ER_12_empty_related_note_type.json | 2 +- .../ER_13_empty_related_note_free_text.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...ider_cross_reference_referenced_curie.json | 2 +- ...provider_cross_reference_display_name.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- .../IV_01_invalid_date_created.json | 2 +- .../IV_02_invalid_date_updated.json | 2 +- .../IV_03_invalid_subject.json | 2 +- .../IV_04_invalid_object.json | 2 +- ...alid_disease_relation_gene_annotation.json | 2 +- ...id_disease_relation_allele_annotation.json | 2 +- ...valid_disease_relation_agm_annotation.json | 2 +- .../IV_08_invalid_evidence_code.json | 2 +- .../IV_09_invalid_single_reference.json | 2 +- .../IV_10_invalid_genetic_sex.json | 2 +- .../IV_11_invalid_sgd_strain_background.json | 2 +- .../IV_12_invalid_with.json | 2 +- .../IV_13_invalid_disease_qualifier.json | 2 +- .../IV_14_invalid_genetic_modifier.json | 2 +- ..._15_invalid_genetic_modifier_relation.json | 2 +- .../IV_16_invalid_annotation_type.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...valid_inferred_gene_allele_annotation.json | 2 +- ...valid_asserted_gene_allele_annotation.json | 2 +- ..._invalid_inferred_gene_agm_annotation.json | 2 +- ..._invalid_asserted_gene_agm_annotation.json | 2 +- ...nvalid_inferred_allele_agm_annotation.json | 2 +- ...nvalid_asserted_allele_agm_annotation.json | 2 +- ...IV_25_invalid_condition_relation_type.json | 2 +- ...d_condition_relation_single_reference.json | 2 +- .../IV_27_invalid_condition_class.json | 2 +- .../IV_28_non_slim_condition_class.json | 2 +- .../IV_29_invalid_condition_id.json | 2 +- ...IV_30_invalid_condition_gene_ontology.json | 2 +- .../IV_31_invalid_condition_anatomy.json | 2 +- .../IV_32_invalid_condition_taxon.json | 2 +- .../IV_33_invalid_condition_chemical.json | 2 +- .../IV_34_invalid_related_note_type.json | 2 +- .../IV_35_invalid_related_note_reference.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- .../MD_01_no_disease_genetic_modifier.json | 2 +- ..._no_disease_genetic_modifier_relation.json | 2 +- ..._disease_genetic_modifier_or_relation.json | 2 +- ...MD_04_no_condition_relation_reference.json | 2 +- ...ondition_relation_handle_or_reference.json | 2 +- .../MM_01_mismatched_note_reference.json | 2 +- ...smatched_condition_relation_reference.json | 2 +- ...quired_fields_level_1_gene_annotation.json | 2 +- ...ired_fields_level_1_allele_annotation.json | 2 +- ...equired_fields_level_1_agm_annotation.json | 2 +- .../MN_04_no_non_required_fields_level_2.json | 2 +- .../MR_01_no_subject.json | 2 +- .../MR_02_no_object.json | 2 +- ...3_no_disease_relation_gene_annotation.json | 2 +- ...no_disease_relation_allele_annotation.json | 2 +- ...05_no_disease_relation_agm_annotation.json | 2 +- .../MR_06_no_evidence_codes.json | 2 +- .../MR_07_no_single_reference.json | 2 +- .../MR_08_no_data_provider.json | 2 +- .../MR_09_no_condition_relations_type.json | 2 +- ...tion_relation_experimental_conditions.json | 2 +- .../MR_11_no_condition_class.json | 2 +- .../MR_12_no_related_note_type.json | 2 +- .../MR_13_no_related_note_free_text.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...ider_cross_reference_referenced_curie.json | 2 +- ...provider_cross_reference_display_name.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- .../SI_01_secondary_ids.json | 2 +- ...except_default_fields_gene_annotation.json | 2 +- ...cept_default_fields_allele_annotation.json | 2 +- ..._except_default_fields_agm_annotation.json | 2 +- ...quired_fields_level_1_gene_annotation.json | 2 +- ...ired_fields_level_1_allele_annotation.json | 2 +- ...equired_fields_level_1_agm_annotation.json | 2 +- ...ate_empty_non_required_fields_level_2.json | 2 +- ...quired_fields_level_1_gene_annotation.json | 2 +- ...ired_fields_level_1_allele_annotation.json | 2 +- ...equired_fields_level_1_agm_annotation.json | 2 +- ...update_no_non_required_fields_level_2.json | 2 +- .../US_01_unsupported_evidence_code.json | 2 +- .../VS_01_valid_subject_gene_for_HUMAN.json | 2 +- .../VS_02_valid_subject_gene_for_RGD.json | 2 +- .../VS_03_valid_subject_allele_for_HUMAN.json | 2 +- .../VS_04_valid_subject_allele_for_RGD.json | 2 +- .../VS_05_valid_subject_agm_for_HUMAN.json | 2 +- .../VS_06_valid_subject_agm_for_RGD.json | 2 +- .../bulk/05_construct/AF_01_all_fields.json | 2 +- .../05_construct/DN_01_duplicate_notes.json | 2 +- .../EN_01_empty_non_required_fields.json | 2 +- ..._construct_component_component_symbol.json | 2 +- ...ty_construct_component_note_note_type.json | 2 +- ...ty_construct_component_note_free_text.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...ider_cross_reference_referenced_curie.json | 2 +- ...provider_cross_reference_display_name.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- ...9_empty_construct_symbol_display_text.json | 2 +- ...mpty_construct_full_name_display_text.json | 2 +- ..._empty_construct_synonym_display_text.json | 2 +- ...12_empty_construct_symbol_format_text.json | 2 +- ...empty_construct_full_name_format_text.json | 2 +- ...4_empty_construct_synonym_format_text.json | 2 +- ...R_15_empty_construct_symbol_name_type.json | 2 +- ...6_empty_construct_full_name_name_type.json | 2 +- ..._17_empty_construct_synonym_name_type.json | 2 +- ...18_empty_construct_component_relation.json | 2 +- .../IV_01_invalid_date_created.json | 2 +- .../IV_02_invalid_date_updated.json | 2 +- .../05_construct/IV_03_invalid_reference.json | 2 +- ..._invalid_construct_component_evidence.json | 2 +- ..._05_invalid_construct_component_taxon.json | 2 +- ...id_construct_component_note_note_type.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- ...10_invalid_construct_symbol_name_type.json | 2 +- ...invalid_construct_full_name_name_type.json | 2 +- ...2_invalid_construct_synonym_name_type.json | 2 +- ...nvalid_construct_symbol_synonym_scope.json | 2 +- ...lid_construct_full_name_synonym_scope.json | 2 +- ...valid_construct_synonym_synonym_scope.json | 2 +- ..._16_invalid_construct_symbol_evidence.json | 2 +- ..._invalid_construct_full_name_evidence.json | 2 +- ...18_invalid_construct_synonym_evidence.json | 2 +- ..._invalid_construct_component_relation.json | 2 +- .../MN_01_no_non_required_fields_level_1.json | 2 +- .../MN_02_no_non_required_fields_level_2.json | 2 +- .../MN_03_no_non_required_fields_level_3.json | 2 +- ..._construct_component_component_symbol.json | 2 +- ...no_construct_component_note_note_type.json | 2 +- ...no_construct_component_note_free_text.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...ider_cross_reference_referenced_curie.json | 2 +- ...provider_cross_reference_display_name.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- ...R_09_no_construct_symbol_display_text.json | 2 +- ...0_no_construct_full_name_display_text.json | 2 +- ..._11_no_construct_synonym_display_text.json | 2 +- ...MR_12_no_construct_symbol_format_text.json | 2 +- ...13_no_construct_full_name_format_text.json | 2 +- ...R_14_no_construct_synonym_format_text.json | 2 +- .../MR_15_no_construct_symbol_name_type.json | 2 +- ...R_16_no_construct_full_name_name_type.json | 2 +- .../MR_17_no_construct_synonym_name_type.json | 2 +- ...MR_18_no_construct_component_relation.json | 2 +- ...D_01_update_all_except_default_fields.json | 2 +- ...E_01_update_empty_non_required_fields.json | 2 +- ...update_no_non_required_fields_level_1.json | 2 +- ...update_no_non_required_fields_level_2.json | 2 +- ...update_no_non_required_fields_level_3.json | 2 +- .../bulk/06_variant/AF_01_all_fields.json | 2 +- .../06_variant/DN_01_duplicate_notes.json | 2 +- .../EN_01_empty_non_required_fields.json | 2 +- .../bulk/06_variant/ER_01_empty_mod_ids.json | 2 +- .../bulk/06_variant/ER_02_empty_taxon.json | 2 +- .../06_variant/ER_03_empty_variant_type.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...ider_cross_reference_referenced_curie.json | 2 +- ...provider_cross_reference_display_name.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- .../ER_09_empty_related_notes_note_type.json | 2 +- .../ER_10_empty_related_notes_free_text.json | 2 +- .../IV_01_invalid_date_created.json | 2 +- .../IV_02_invalid_date_updated.json | 2 +- .../bulk/06_variant/IV_03_invalid_taxon.json | 2 +- .../IV_04_invalid_variant_type.json | 2 +- .../IV_05_invalid_variant_status.json | 2 +- ...06_invalid_source_general_consequence.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- ...IV_10_invalid_related_notes_note_type.json | 2 +- .../IV_11_invalid_related_notes_evidence.json | 2 +- .../MN_01_no_non_required_fields_level_1.json | 2 +- .../MN_02_no_non_required_fields_level_2.json | 2 +- .../bulk/06_variant/MR_02_no_taxon.json | 2 +- .../06_variant/MR_03_no_variant_type.json | 2 +- .../06_variant/MR_04_no_data_provider.json | 2 +- ...ider_source_organization_abbreviation.json | 2 +- ...ider_cross_reference_referenced_curie.json | 2 +- ...provider_cross_reference_display_name.json | 2 +- ..._data_provider_cross_reference_prefix.json | 2 +- ...ta_provider_cross_reference_page_area.json | 2 +- .../MR_10_no_related_notes_note_type.json | 2 +- .../MR_11_no_related_notes_free_text.json | 2 +- ...D_01_update_all_except_default_fields.json | 2 +- ...E_01_update_empty_non_required_fields.json | 2 +- ...update_no_non_required_fields_level_1.json | 2 +- ...update_no_non_required_fields_level_2.json | 2 +- 572 files changed, 1141 insertions(+), 1112 deletions(-) create mode 100644 src/main/resources/db/migration/v0.38.0.21__linkml_v2_9_1_update.sql diff --git a/SEARCH.md b/SEARCH.md index a15be727f..725a2a73e 100644 --- a/SEARCH.md +++ b/SEARCH.md @@ -61,7 +61,7 @@ This will be the size of the page that comes back. "order": 1 }, { - "field": "diseaseAnnotationSubject.modEntityId", + "field": "diseaseAnnotationSubject.primaryExternalId", "order": 1 } ], @@ -204,7 +204,7 @@ Search Payload: "order": 1 }, { - "field": "diseaseAnnotationSubject.modEntityId", + "field": "diseaseAnnotationSubject.primaryExternalId", "order": 1 } ], @@ -224,7 +224,7 @@ Return Payload "totalResults": 1163, "returnedRecords": 1, "debug": "true", - "esQuery": "{\"query\":{\"bool\":{\"must\":[{\"simple_query_string\":{\"boost\":31000.0,\"query\":\"false\",\"default_operator\":\"or\",\"fields\":[\"internal\"]}},{\"simple_query_string\":{\"boost\":21000.0,\"query\":\"false\",\"default_operator\":\"or\",\"fields\":[\"obsolete\"]}},{\"simple_query_string\":{\"boost\":11000.0,\"query\":\"wb\",\"default_operator\":\"and\",\"fields\":[\"uniqueId\"]}},{\"match_all\":{}}],\"minimum_should_match\":\"0\"}},\"sort\":[{\"diseaseAnnotationSubject.symbol_keyword\":{\"order\":\"asc\",\"unmapped_type\":\"keyword\"}},{\"diseaseAnnotationSubject.name_keyword\":{\"order\":\"asc\",\"unmapped_type\":\"keyword\"}},{\"diseaseAnnotationSubject.modEntityId_keyword\":{\"order\":\"asc\",\"unmapped_type\":\"keyword\"}}],\"docvalue_fields\":[\"_entity_type\"],\"_source\":false}" + "esQuery": "{\"query\":{\"bool\":{\"must\":[{\"simple_query_string\":{\"boost\":31000.0,\"query\":\"false\",\"default_operator\":\"or\",\"fields\":[\"internal\"]}},{\"simple_query_string\":{\"boost\":21000.0,\"query\":\"false\",\"default_operator\":\"or\",\"fields\":[\"obsolete\"]}},{\"simple_query_string\":{\"boost\":11000.0,\"query\":\"wb\",\"default_operator\":\"and\",\"fields\":[\"uniqueId\"]}},{\"match_all\":{}}],\"minimum_should_match\":\"0\"}},\"sort\":[{\"diseaseAnnotationSubject.symbol_keyword\":{\"order\":\"asc\",\"unmapped_type\":\"keyword\"}},{\"diseaseAnnotationSubject.name_keyword\":{\"order\":\"asc\",\"unmapped_type\":\"keyword\"}},{\"diseaseAnnotationSubject.primaryExternalId_keyword\":{\"order\":\"asc\",\"unmapped_type\":\"keyword\"}}],\"docvalue_fields\":[\"_entity_type\"],\"_source\":false}" } ``` @@ -286,7 +286,7 @@ Destringify the esQuery: } }, { - "diseaseAnnotationSubject.modEntityId_keyword": { + "diseaseAnnotationSubject.primaryExternalId_keyword": { "order": "asc", "unmapped_type": "keyword" } diff --git a/src/main/cliapp/src/components/Editors/GeneEditor.js b/src/main/cliapp/src/components/Editors/GeneEditor.js index 78f855864..286914b29 100644 --- a/src/main/cliapp/src/components/Editors/GeneEditor.js +++ b/src/main/cliapp/src/components/Editors/GeneEditor.js @@ -9,7 +9,7 @@ const geneSearch = (event, setFiltered, setInputValue) => { const searchService = new SearchService(); const autocompleteFields = [ 'curie', - 'modEntityId', + 'primaryExternalId', 'crossReferences.referencedCurie', 'geneFullName.formatText', 'geneFullName.displayText', @@ -37,7 +37,7 @@ export const GeneEditor = ({ props, errorMessages, onChange, dataKey, fieldName initialValue={getIdentifier(props?.rowData?.[fieldName])} rowProps={props} fieldName={fieldName} - subField="modEntityId" + subField="primaryExternalId" valueDisplay={(item, setAutocompleteHoverItem, op, query) => ( { geneFullName: { displayText: 'Gene Full Name 2', }, - modEntityId: 'ID2', + primaryExternalId: 'ID2', }, { geneSymbol: { diff --git a/src/main/cliapp/src/components/Templates/__tests__/GenomicEntityTemplate.test.js b/src/main/cliapp/src/components/Templates/__tests__/GenomicEntityTemplate.test.js index e4f9f5795..0aa8c4416 100644 --- a/src/main/cliapp/src/components/Templates/__tests__/GenomicEntityTemplate.test.js +++ b/src/main/cliapp/src/components/Templates/__tests__/GenomicEntityTemplate.test.js @@ -61,7 +61,7 @@ describe('GenomicEntityTemplate', () => { it('should render genomicEntity name and id when genomicEntity has name', () => { const genomicEntity = { name: 'genomicEntity Name', - modEntityId: 'ID', + primaryExternalId: 'ID', }; const result = render(); @@ -94,7 +94,7 @@ describe('GenomicEntityTemplate', () => { geneSymbol: { displayText: 'Gene Symbol', }, - modEntityId: 'ID', + primaryExternalId: 'ID', }; const { container } = render(); diff --git a/src/main/cliapp/src/constants/FilterFields.js b/src/main/cliapp/src/constants/FilterFields.js index acc2a8c70..23622813d 100644 --- a/src/main/cliapp/src/constants/FilterFields.js +++ b/src/main/cliapp/src/constants/FilterFields.js @@ -88,7 +88,7 @@ export const FIELD_SETS = Object.freeze({ 'assertedAllele.alleleSymbol.displayText', 'assertedAllele.alleleSymbol.formatText', 'assertedAllele.curie', - 'assertedAllele.modEntityId', + 'assertedAllele.primaryExternalId', 'assertedAllele.modInternalId', ], }, @@ -98,7 +98,7 @@ export const FIELD_SETS = Object.freeze({ 'assertedGenes.geneSymbol.displayText', 'assertedGenes.geneSymbol.formatText', 'assertedGenes.curie', - 'assertedGenes.modEntityId', + 'assertedGenes.primaryExternalId', 'assertedGenes.modInternalId', ], }, @@ -184,7 +184,7 @@ export const FIELD_SETS = Object.freeze({ 'constructGenomicEntityAssociations.constructGenomicEntityAssociationObject.symbol', 'constructGenomicEntityAssociations.constructGenomicEntityAssociationObject.name', 'constructGenomicEntityAssociations.constructGenomicEntityAssociationObject.curie', - 'constructGenomicEntityAssociations.constructGenomicEntityAssociationObject.modEntityId', + 'constructGenomicEntityAssociations.constructGenomicEntityAssociationObject.primaryExternalId', 'constructGenomicEntityAssociations.constructGenomicEntityAssociationObject.modInternalId', 'constructGenomicEntityAssociations.relation.name', ], @@ -260,7 +260,7 @@ export const FIELD_SETS = Object.freeze({ }, diseaseAnnotationSubjectFieldSet: { filterName: 'diseaseAnnotationSubjectFilter', - fields: ['diseaseAnnotationSubject.symbol', 'diseaseAnnotationSubject.modEntityId'], + fields: ['diseaseAnnotationSubject.symbol', 'diseaseAnnotationSubject.primaryExternalId'], }, diseaseQualifiersFieldSet: { filterName: 'diseaseQualifiersFilter', @@ -292,7 +292,7 @@ export const FIELD_SETS = Object.freeze({ 'geneAssociationSubject.geneSymbol.displayText', 'geneAssociationSubject.geneSymbol.formatText', 'geneAssociationSubject.curie', - 'geneAssociationSubject.modEntityId', + 'geneAssociationSubject.primaryExternalId', 'geneAssociationSubject.modInternalId', ], }, @@ -302,7 +302,7 @@ export const FIELD_SETS = Object.freeze({ 'geneGeneAssociationObject.geneSymbol.displayText', 'geneGeneAssociationObject.geneSymbol.formatText', 'geneGeneAssociationObject.curie', - 'geneGeneAssociationObject.modEntityId', + 'geneGeneAssociationObject.primaryExternalId', 'geneGeneAssociationObject.modInternalId', ], }, @@ -331,7 +331,7 @@ export const FIELD_SETS = Object.freeze({ fields: [ 'diseaseGeneticModifierAgms.name', 'diseaseGeneticModifierAgms.curie', - 'diseaseGeneticModifierAgms.modEntityId', + 'diseaseGeneticModifierAgms.primaryExternalId', 'diseaseGeneticModifierAgms.modInternalId', ], }, @@ -341,7 +341,7 @@ export const FIELD_SETS = Object.freeze({ 'diseaseGeneticModifierAlleles.alleleSymbol.displayText', 'diseaseGeneticModifierAlleles.alleleSymbol.formatText', 'diseaseGeneticModifierAlleles.curie', - 'diseaseGeneticModifierAlleles.modEntityId', + 'diseaseGeneticModifierAlleles.primaryExternalId', 'diseaseGeneticModifierAlleles.modInternalId', ], }, @@ -351,7 +351,7 @@ export const FIELD_SETS = Object.freeze({ 'diseaseGeneticModifierGenes.geneSymbol.displayText', 'diseaseGeneticModifierGenes.geneSymbol.formatText', 'diseaseGeneticModifierGenes.curie', - 'diseaseGeneticModifierGenes.modEntityId', + 'diseaseGeneticModifierGenes.primaryExternalId', 'diseaseGeneticModifierGenes.modInternalId', ], }, @@ -401,7 +401,7 @@ export const FIELD_SETS = Object.freeze({ 'inferredAllele.alleleSymbol.displayText', 'inferredAllele.alleleSymbol.formatText', 'inferredAllele.curie', - 'inferredAllele.modEntityId', + 'inferredAllele.primaryExternalId', 'inferredAllele.modInternalId', ], }, @@ -411,7 +411,7 @@ export const FIELD_SETS = Object.freeze({ 'inferredGene.geneSymbol.displayText', 'inferredGene.geneSymbol.formatText', 'inferredGene.curie', - 'inferredGene.modEntityId', + 'inferredGene.primaryExternalId', 'inferredGene.modInternalId', ], }, @@ -421,7 +421,7 @@ export const FIELD_SETS = Object.freeze({ 'interactorAGeneticPerturbation.alleleSymbol.displayText', 'interactorAGeneticPerturbation.alleleSymbol.formatText', 'interactorAGeneticPerturbation.curie', - 'interactorAGeneticPerturbation.modEntityId', + 'interactorAGeneticPerturbation.primaryExternalId', 'interactorAGeneticPerturbation.modInternalId', ], }, @@ -431,7 +431,7 @@ export const FIELD_SETS = Object.freeze({ 'interactorBGeneticPerturbation.alleleSymbol.displayText', 'interactorBGeneticPerturbation.alleleSymbol.formatText', 'interactorBGeneticPerturbation.curie', - 'interactorBGeneticPerturbation.modEntityId', + 'interactorBGeneticPerturbation.primaryExternalId', 'interactorBGeneticPerturbation.modInternalId', ], }, @@ -479,9 +479,9 @@ export const FIELD_SETS = Object.freeze({ filterName: 'memberTermsFilter', fields: ['memberTerms.name'], }, - modentityidFieldSet: { - filterName: 'modentityidFilter', - fields: ['modEntityId'], + primaryexternalidFieldSet: { + filterName: 'primaryexternalidFilter', + fields: ['primaryExternalId'], }, modinternalidFieldSet: { filterName: 'modinternalidFilter', @@ -544,7 +544,7 @@ export const FIELD_SETS = Object.freeze({ 'phenotypeAnnotationSubject.symbol', 'phenotypeAnnotationSubject.name', 'phenotypeAnnotationSubject.curie', - 'phenotypeAnnotationSubject.modEntityId', + 'phenotypeAnnotationSubject.primaryExternalId', 'phenotypeAnnotationSubject.modInternalId', ], }, @@ -589,7 +589,7 @@ export const FIELD_SETS = Object.freeze({ fields: [ 'sgdStrainBackground.name', 'sgdStrainBackground.curie', - 'sgdStrainBackground.modEntityId', + 'sgdStrainBackground.primaryExternalId', 'sgdStrainBackground.modInternalId', ], }, @@ -699,7 +699,7 @@ export const FIELD_SETS = Object.freeze({ 'with.geneSymbol.displayText', 'with.geneSymbol.formatText', 'with.curie', - 'with.modEntityId', + 'with.primaryExternalId', 'with.modInternalId', ], }, @@ -855,7 +855,7 @@ export const FILTER_CONFIGS = Object.freeze({ filterComponentType: 'input', fieldSets: [FIELD_SETS.literatureCrossReferenceFieldSet], }, - modentityidFilterConfig: { filterComponentType: 'input', fieldSets: [FIELD_SETS.modentityidFieldSet] }, + primaryexternalidFilterConfig: { filterComponentType: 'input', fieldSets: [FIELD_SETS.primaryexternalidFieldSet] }, modinternalidFilterConfig: { filterComponentType: 'input', fieldSets: [FIELD_SETS.modinternalidFieldSet] }, nameFilterConfig: { filterComponentType: 'input', fieldSets: [FIELD_SETS.nameFieldSet] }, namespaceFilterConfig: { filterComponentType: 'input', fieldSets: [FIELD_SETS.namespaceFieldSet] }, diff --git a/src/main/cliapp/src/constants/SortFields.js b/src/main/cliapp/src/constants/SortFields.js index a9fe4ed27..ae4e6fe1e 100644 --- a/src/main/cliapp/src/constants/SortFields.js +++ b/src/main/cliapp/src/constants/SortFields.js @@ -1,6 +1,6 @@ export const SORT_FIELDS = Object.freeze([ 'uniqueId', - 'modEntityId', + 'primaryExternalId', 'modInternalId', 'diseaseAnnotationSubject.symbol', 'phenotypeAnnotationSubject.symbol', diff --git a/src/main/cliapp/src/containers/affectedGenomicModelPage/AffectedGenomicModelTable.js b/src/main/cliapp/src/containers/affectedGenomicModelPage/AffectedGenomicModelTable.js index 85a69c977..f54ff4aaa 100644 --- a/src/main/cliapp/src/containers/affectedGenomicModelPage/AffectedGenomicModelTable.js +++ b/src/main/cliapp/src/containers/affectedGenomicModelPage/AffectedGenomicModelTable.js @@ -34,11 +34,11 @@ export const AffectedGenomicModelTable = () => { filterConfig: FILTER_CONFIGS.curieFilterConfig, }, { - field: 'modEntityId', + field: 'primaryExternalId', header: 'MOD Entity ID', - body: (rowData) => , + body: (rowData) => , sortable: true, - filterConfig: FILTER_CONFIGS.modentityidFilterConfig, + filterConfig: FILTER_CONFIGS.primaryexternalidFilterConfig, }, { field: 'modInternalId', diff --git a/src/main/cliapp/src/containers/affectedGenomicModelPage/__tests__/AffectedGenomicModelTable.test.js b/src/main/cliapp/src/containers/affectedGenomicModelPage/__tests__/AffectedGenomicModelTable.test.js index 2c1370822..7007e9267 100644 --- a/src/main/cliapp/src/containers/affectedGenomicModelPage/__tests__/AffectedGenomicModelTable.test.js +++ b/src/main/cliapp/src/containers/affectedGenomicModelPage/__tests__/AffectedGenomicModelTable.test.js @@ -36,7 +36,7 @@ describe('', () => { it('Contains Correct Table Data', async () => { let result = await renderWithClient(); - const modEntityId = await result.findByText(/WB:WBStrain00051221/i); - expect(modEntityId).toBeInTheDocument(); + const primaryExternalId = await result.findByText(/WB:WBStrain00051221/i); + expect(primaryExternalId).toBeInTheDocument(); }); }); diff --git a/src/main/cliapp/src/containers/affectedGenomicModelPage/mockData/mockData.js b/src/main/cliapp/src/containers/affectedGenomicModelPage/mockData/mockData.js index cdc512ea9..7258fbf3e 100644 --- a/src/main/cliapp/src/containers/affectedGenomicModelPage/mockData/mockData.js +++ b/src/main/cliapp/src/containers/affectedGenomicModelPage/mockData/mockData.js @@ -6,7 +6,7 @@ export const data = { obsolete: false, dbDateCreated: '2022-11-02T22:19:23.387435Z', dbDateUpdated: '2022-12-22T15:16:30.834738Z', - modEntityId: 'WB:WBStrain00051221', + primaryExternalId: 'WB:WBStrain00051221', taxon: { internal: false, obsolete: false, curie: 'NCBITaxon:6239', name: 'Caenorhabditis elegans' }, name: 'VC4532', subtype: { internal: false, obsolete: false, id: 25575353, name: 'strain' }, @@ -18,7 +18,7 @@ export const data = { internal: false, obsolete: false, dbDateUpdated: '2022-12-22T15:10:00.706858Z', - modEntityId: 'RGD:1581633', + primaryExternalId: 'RGD:1581633', taxon: { internal: false, obsolete: false, curie: 'NCBITaxon:10116', name: 'Rattus norvegicus' }, name: 'DA.ACI-(D15Rat6-D15Rat71)/Kini', subtype: { internal: false, obsolete: false, id: 25575353, name: 'strain' }, @@ -30,7 +30,7 @@ export const data = { internal: false, obsolete: false, dbDateUpdated: '2022-12-22T15:10:21.254879Z', - modEntityId: 'RGD:150404267', + primaryExternalId: 'RGD:150404267', taxon: { internal: false, obsolete: false, curie: 'NCBITaxon:10116', name: 'Rattus norvegicus' }, name: 'LEW-Myo15aci2/Ztm', subtype: { internal: false, obsolete: false, id: 25575353, name: 'strain' }, diff --git a/src/main/cliapp/src/containers/allelesPage/AlleleDetailPage.js b/src/main/cliapp/src/containers/allelesPage/AlleleDetailPage.js index 2ec0d8394..621b9163e 100644 --- a/src/main/cliapp/src/containers/allelesPage/AlleleDetailPage.js +++ b/src/main/cliapp/src/containers/allelesPage/AlleleDetailPage.js @@ -166,11 +166,11 @@ export default function AlleleDetailPage() { const headerText = () => { let prefix = 'Allele: '; - if (alleleState.allele?.alleleSymbol?.displayText && alleleState.allele?.modEntityId) { - return `${prefix} ${alleleState.allele.alleleSymbol.displayText} (${alleleState.allele.modEntityId})`; + if (alleleState.allele?.alleleSymbol?.displayText && alleleState.allele?.primaryExternalId) { + return `${prefix} ${alleleState.allele.alleleSymbol.displayText} (${alleleState.allele.primaryExternalId})`; } - if (alleleState.allele?.modEntityId) { - return `${prefix} ${alleleState.allele.modEntityId}`; + if (alleleState.allele?.primaryExternalId) { + return `${prefix} ${alleleState.allele.primaryExternalId}`; } return 'Allele Detail Page'; }; @@ -203,7 +203,7 @@ export default function AlleleDetailPage() { { filterConfig: FILTER_CONFIGS.curieFilterConfig, }, { - field: 'modEntityId', + field: 'primaryExternalId', header: 'MOD Entity ID', - body: (rowData) => , + body: (rowData) => , sortable: true, - filterConfig: FILTER_CONFIGS.modentityidFilterConfig, + filterConfig: FILTER_CONFIGS.primaryexternalidFilterConfig, }, { field: 'modInternalId', @@ -1175,7 +1175,7 @@ export const AllelesTable = () => { body: (rowData) => ( ), diff --git a/src/main/cliapp/src/containers/allelesPage/__tests__/AllelesTable.test.js b/src/main/cliapp/src/containers/allelesPage/__tests__/AllelesTable.test.js index 001eb8376..cb31623ec 100644 --- a/src/main/cliapp/src/containers/allelesPage/__tests__/AllelesTable.test.js +++ b/src/main/cliapp/src/containers/allelesPage/__tests__/AllelesTable.test.js @@ -51,7 +51,7 @@ describe('', () => { ); - const modEntityIdTd = await result.findByText(/FB:FBal0196303/i); + const primaryExternalIdTd = await result.findByText(/FB:FBal0196303/i); const nameTd = await result.findByText(/Saccharomyces cerevisiae UAS construct a of Stefancsik/i); const symbolTd = await result.findByText(/symbol display text/i); const secondaryIdsTd = await result.findByText(/FB:FBal0123136/i); @@ -63,7 +63,7 @@ describe('', () => { const alleleDatabaseStatusTd = await result.findByText(/approved/i); await waitFor(() => { - expect(modEntityIdTd).toBeInTheDocument(); + expect(primaryExternalIdTd).toBeInTheDocument(); expect(nameTd).toBeInTheDocument(); expect(symbolTd).toBeInTheDocument(); expect(secondaryIdsTd).toBeInTheDocument(); diff --git a/src/main/cliapp/src/containers/allelesPage/alleleGeneAssociations/AlleleGeneAssociationsFormTable.js b/src/main/cliapp/src/containers/allelesPage/alleleGeneAssociations/AlleleGeneAssociationsFormTable.js index 352938ce0..5019c9b31 100644 --- a/src/main/cliapp/src/containers/allelesPage/alleleGeneAssociations/AlleleGeneAssociationsFormTable.js +++ b/src/main/cliapp/src/containers/allelesPage/alleleGeneAssociations/AlleleGeneAssociationsFormTable.js @@ -28,7 +28,7 @@ export const AlleleGeneAssociationsFormTable = ({ const [first, setFirst] = useState(0); const [filters, setFilters] = useState({ 'relation.name': { value: null, matchMode: 'in' }, - 'alleleGeneAssociationObject.modEntityId': { value: null, matchMode: 'contains' }, + 'alleleGeneAssociationObject.primaryExternalId': { value: null, matchMode: 'contains' }, 'relatedNote.freeText': { value: null, matchMode: 'contains' }, 'evidenceCode.curie': { value: null, matchMode: 'contains' }, evidenceCurieSearchFilter: { value: null, matchMode: 'contains' }, @@ -128,8 +128,8 @@ export const AlleleGeneAssociationsFormTable = ({ headerClassName="surface-0" filter sortable - filterField="alleleGeneAssociationObject.modEntityId" - sortField="alleleGeneAssociationObject.modEntityId" + filterField="alleleGeneAssociationObject.primaryExternalId" + sortField="alleleGeneAssociationObject.primaryExternalId" showFilterMenu={false} /> { filterConfig: FILTER_CONFIGS.uniqueidFilterConfig, }, { - field: 'modEntityId', + field: 'primaryExternalId', header: 'MOD Entity ID', sortable: { isInEditMode }, - body: (rowData) => , - filterConfig: FILTER_CONFIGS.modentityidFilterConfig, + body: (rowData) => , + filterConfig: FILTER_CONFIGS.primaryexternalidFilterConfig, }, { field: 'modInternalId', diff --git a/src/main/cliapp/src/containers/constructsPage/GenomicComponentsDialog.js b/src/main/cliapp/src/containers/constructsPage/GenomicComponentsDialog.js index 3d329acd6..d5b5c1e07 100644 --- a/src/main/cliapp/src/containers/constructsPage/GenomicComponentsDialog.js +++ b/src/main/cliapp/src/containers/constructsPage/GenomicComponentsDialog.js @@ -155,7 +155,7 @@ export const GenomicComponentsDialog = ({ > { const sortMapping = { 'diseaseAnnotationObject.name': ['diseaseAnnotationObject.curie', 'diseaseAnnotationObject.namespace'], - 'diseaseAnnotationSubject.symbol': ['diseaseAnnotationSubject.name', 'diseaseAnnotationSubject.modEntityId'], - 'with.geneSymbol.displayText': ['with.geneFullName.displayText', 'with.modEntityId'], - 'sgdStrainBackground.name': ['sgdStrainBackground.modEntityId'], - 'diseaseGeneticModifier.symbol': ['diseaseGeneticModifier.name', 'diseaseGeneticModifier.modEntityId'], + 'diseaseAnnotationSubject.symbol': ['diseaseAnnotationSubject.name', 'diseaseAnnotationSubject.primaryExternalId'], + 'with.geneSymbol.displayText': ['with.geneFullName.displayText', 'with.primaryExternalId'], + 'sgdStrainBackground.name': ['sgdStrainBackground.primaryExternalId'], + 'diseaseGeneticModifier.symbol': ['diseaseGeneticModifier.name', 'diseaseGeneticModifier.primaryExternalId'], }; const mutation = useMutation((updatedAnnotation) => { @@ -491,7 +491,7 @@ export const DiseaseAnnotationsTable = () => { }; const onSubjectValueChange = (event, setFieldValue, props) => { - defaultAutocompleteOnChange(props, event, 'diseaseAnnotationSubject', setFieldValue, 'modEntityId'); + defaultAutocompleteOnChange(props, event, 'diseaseAnnotationSubject', setFieldValue, 'primaryExternalId'); }; const subjectSearch = (event, setFiltered, setQuery, props) => { @@ -511,7 +511,7 @@ export const DiseaseAnnotationsTable = () => { search={subjectSearch} rowProps={props} searchService={searchService} - subField="modEntityId" + subField="primaryExternalId" fieldName="diseaseAnnotationSubject" valueDisplay={(item, setAutocompleteHoverItem, op, query) => ( { }; const getSubjectAutocompleteFields = (props) => { - let subjectFields = ['curie', 'modEntityId', 'modInternalId', 'crossReferences.referencedCurie']; + let subjectFields = ['curie', 'primaryExternalId', 'modInternalId', 'crossReferences.referencedCurie']; if (props.rowData.type === 'AGMDiseaseAnnotation') { subjectFields.push('name'); } else if (props.rowData.type === 'AlleleDiseaseAnnotation') { @@ -572,11 +572,11 @@ export const DiseaseAnnotationsTable = () => { return subjectFields; }; const onSgdStrainBackgroundValueChange = (event, setFieldValue, props) => { - defaultAutocompleteOnChange(props, event, 'sgdStrainBackground', setFieldValue, 'modEntityId'); + defaultAutocompleteOnChange(props, event, 'sgdStrainBackground', setFieldValue, 'primaryExternalId'); }; const sgdStrainBackgroundSearch = (event, setFiltered, setQuery) => { - const autocompleteFields = ['name', 'curie', 'modEntityId', 'modInternalId', 'crossReferences.referencedCurie']; + const autocompleteFields = ['name', 'curie', 'primaryExternalId', 'modInternalId', 'crossReferences.referencedCurie']; const endpoint = 'agm'; const filterName = 'sgdStrainBackgroundFilter'; const filter = buildAutocompleteFilter(event, autocompleteFields); @@ -600,7 +600,7 @@ export const DiseaseAnnotationsTable = () => { search={sgdStrainBackgroundSearch} searchService={searchService} fieldName="sgdStrainBackground" - subField="modEntityId" + subField="primaryExternalId" valueDisplay={(item, setAutocompleteHoverItem, op, query) => ( { }; const geneticModifierAgmsSearch = (event, setFiltered, setInputValue) => { - const autocompleteFields = ['name', 'curie', 'modEntityId', 'modInternalId', 'crossReferences.referencedCurie']; + const autocompleteFields = ['name', 'curie', 'primaryExternalId', 'modInternalId', 'crossReferences.referencedCurie']; const endpoint = 'agm'; const filterName = 'geneticModifierAgmsFilter'; const filter = buildAutocompleteFilter(event, autocompleteFields); @@ -644,7 +644,7 @@ export const DiseaseAnnotationsTable = () => { initialValue={props.rowData.diseaseGeneticModifierAgms} rowProps={props} fieldName="diseaseGeneticModifierAgms" - subField="modEntityId" + subField="primaryExternalId" valueDisplay={(item, setAutocompleteHoverItem, op, query) => ( { 'alleleSynonyms.formatText', 'alleleSynonyms.displayText', 'curie', - 'modEntityId', + 'primaryExternalId', 'modInternalId', 'crossReferences.referencedCurie', 'alleleSecondaryIds.secondaryId', @@ -699,7 +699,7 @@ export const DiseaseAnnotationsTable = () => { initialValue={props.rowData.diseaseGeneticModifierAlleles} rowProps={props} fieldName="diseaseGeneticModifierAlleles" - subField="modEntityId" + subField="primaryExternalId" valueDisplay={(item, setAutocompleteHoverItem, op, query) => ( { 'geneSystematicName.displayText', 'geneSecondaryIds.secondaryId', 'curie', - 'modEntityId', + 'primaryExternalId', 'modInternalId', 'crossReferences.referencedCurie', ]; @@ -757,7 +757,7 @@ export const DiseaseAnnotationsTable = () => { initialValue={props.rowData.diseaseGeneticModifierGenes} rowProps={props} fieldName="diseaseGeneticModifierGenes" - subField="modEntityId" + subField="primaryExternalId" valueDisplay={(item, setAutocompleteHoverItem, op, query) => ( { }; const onAssertedAlleleValueChange = (event, setFieldValue, props) => { - defaultAutocompleteOnChange(props, event, 'assertedAllele', setFieldValue, 'modEntityId'); + defaultAutocompleteOnChange(props, event, 'assertedAllele', setFieldValue, 'primaryExternalId'); }; const assertedAlleleSearch = (event, setFiltered, setQuery) => { @@ -791,7 +791,7 @@ export const DiseaseAnnotationsTable = () => { 'alleleFullName.formatText', 'alleleFullName.displayText', 'curie', - 'modEntityId', + 'primaryExternalId', 'modInternalId', 'crossReferences.referencedCurie', 'alleleSecondaryIds.secondaryId', @@ -814,7 +814,7 @@ export const DiseaseAnnotationsTable = () => { initialValue={getIdentifier(props.rowData.assertedAllele)} rowProps={props} fieldName="assertedAllele" - subField="modEntityId" + subField="primaryExternalId" valueDisplay={(item, setAutocompleteHoverItem, op, query) => ( { 'geneFullName.formatText', 'geneFullName.displayText', 'curie', - 'modEntityId', + 'primaryExternalId', 'modInternalId', 'crossReferences.referencedCurie', 'geneSynonyms.formatText', @@ -922,7 +922,7 @@ export const DiseaseAnnotationsTable = () => { initialValue={props.rowData.assertedGenes} rowProps={props} fieldName="assertedGenes" - subField="modEntityId" + subField="primaryExternalId" valueDisplay={(item, setAutocompleteHoverItem, op, query) => ( { 'geneSymbol.displayText', 'geneFullName.formatText', 'geneFullName.displayText', - 'modEntityId', + 'primaryExternalId', 'modInternalId', 'curie', 'crossReferences.referencedCurie', @@ -984,7 +984,7 @@ export const DiseaseAnnotationsTable = () => { initialValue={props.rowData.with} rowProps={props} fieldName="with" - subField="modEntityId" + subField="primaryExternalId" valueDisplay={(item, setAutocompleteHoverItem, op, query) => ( { editor: (props) => uniqueIdEditorTemplate(props), }, { - field: 'modEntityId', + field: 'primaryExternalId', header: 'MOD Annotation ID', - body: (rowData) => , + body: (rowData) => , sortable: true, - filterConfig: FILTER_CONFIGS.modentityidFilterConfig, + filterConfig: FILTER_CONFIGS.primaryexternalidFilterConfig, }, { field: 'modInternalId', diff --git a/src/main/cliapp/src/containers/diseaseAnnotationsPage/NewAnnotationForm.js b/src/main/cliapp/src/containers/diseaseAnnotationsPage/NewAnnotationForm.js index 0ebad9548..a78a4a322 100644 --- a/src/main/cliapp/src/containers/diseaseAnnotationsPage/NewAnnotationForm.js +++ b/src/main/cliapp/src/containers/diseaseAnnotationsPage/NewAnnotationForm.js @@ -221,7 +221,7 @@ export const NewAnnotationForm = ({ }; const sgdStrainBackgroundSearch = (event, setFiltered, setQuery) => { - const autocompleteFields = ['name', 'curie', 'modEntityId', 'modInternalId', 'crossReferences.referencedCurie']; + const autocompleteFields = ['name', 'curie', 'primaryExternalId', 'modInternalId', 'crossReferences.referencedCurie']; const endpoint = 'agm'; const filterName = 'sgdStrainBackgroundFilter'; const filter = buildAutocompleteFilter(event, autocompleteFields); @@ -237,7 +237,7 @@ export const NewAnnotationForm = ({ }; const geneticModifierAgmsSearch = (event, setFiltered, setQuery) => { - const autocompleteFields = ['modEntityId', 'modInternalId', 'name', 'curie', 'crossReferences.referencedCurie']; + const autocompleteFields = ['primaryExternalId', 'modInternalId', 'name', 'curie', 'crossReferences.referencedCurie']; const endpoint = 'agm'; const filterName = 'geneticModifierAgmsFilter'; const filter = buildAutocompleteFilter(event, autocompleteFields); @@ -249,7 +249,7 @@ export const NewAnnotationForm = ({ const autocompleteFields = [ 'alleleSymbol.displayText', 'alleleFullName.displayText', - 'modEntityId', + 'primaryExternalId', 'modInternalId', 'curie', 'crossReferences.referencedCurie', @@ -267,7 +267,7 @@ export const NewAnnotationForm = ({ const autocompleteFields = [ 'geneSymbol.displayText', 'geneFullName.displayText', - 'modEntityId', + 'primaryExternalId', 'modInternalId', 'curie', 'crossReferences.referencedCurie', @@ -318,7 +318,7 @@ export const NewAnnotationForm = ({ 'alleleFullName.displayText', 'alleleSynonyms.displayText', 'geneSynonyms.displayText', - 'modEntityId', + 'primaryExternalId', 'modInternalId', 'curie', 'crossReferences.referencedCurie', @@ -422,7 +422,7 @@ export const NewAnnotationForm = ({ const autocompleteFields = [ 'geneSymbol.displayText', 'geneFullName.displayText', - 'modEntityId', + 'primaryExternalId', 'modInternalId', 'curie', 'crossReferences.referencedCurie', @@ -475,7 +475,7 @@ export const NewAnnotationForm = ({ const autocompleteFields = [ 'geneSymbol.displayText', 'geneFullName.displayText', - 'modEntityId', + 'primaryExternalId', 'modInternalId', 'curie', 'crossReferences.referencedCurie', @@ -492,7 +492,7 @@ export const NewAnnotationForm = ({ const autocompleteFields = [ 'alleleSymbol.displayText', 'alleleFullName.displayText', - 'modEntityId', + 'primaryExternalId', 'modInternalId', 'curie', 'crossReferences.referencedCurie', @@ -585,7 +585,7 @@ export const NewAnnotationForm = ({ initialValue={newAnnotation.diseaseAnnotationSubject} search={subjectSearch} fieldName="diseaseAnnotationSubject" - subField="modEntityId" + subField="primaryExternalId" name="diseaseAnnotationSubject" searchService={searchService} onValueChangeHandler={onSubjectChange} @@ -618,7 +618,7 @@ export const NewAnnotationForm = ({ customRef={assertedGenesRef} search={assertedGenesSearch} name="assertedGenes" - subField="modEntityId" + subField="primaryExternalId" label="Asserted Genes" fieldName="assertedGenes" disabled={!isAssertedGeneEnabled} @@ -656,7 +656,7 @@ export const NewAnnotationForm = ({ name="assertedAllele" label="Asserted Allele" fieldName="assertedAllele" - subField="modEntityId" + subField="primaryExternalId" disabled={!isAssertedAlleleEnabled} initialValue={newAnnotation.assertedAllele} onValueChangeHandler={onSingleReferenceChange} @@ -820,7 +820,7 @@ export const NewAnnotationForm = ({ name="with" label="With" fieldName="with" - subField="modEntityId" + subField="primaryExternalId" initialValue={newAnnotation.with} onValueChangeHandler={onArrayFieldChange} valueDisplay={(item, setAutocompleteHoverItem, op, query) => ( @@ -976,7 +976,7 @@ export const NewAnnotationForm = ({ fieldName="sgdStrainBackground" name="sgdStrainBackground" label="SGD Strain Background" - subField="modEntityId" + subField="primaryExternalId" valueDisplay={(item, setAutocompleteHoverItem, op, query) => ( ( ( ( { const sortMapping = { 'geneAssociationSubject.geneSymbol.displayText': [ 'geneAssociationSubject.geneFullName.displayText', - 'geneAssociationSubject.modEntityId', + 'geneAssociationSubject.primaryExternalId', ], 'geneGeneAssociationObject.geneSymbol.displayText': [ 'geneGeneAssociationObject.geneFullName.displayText', - 'geneGeneAssociationObject.modEntityId', + 'geneGeneAssociationObject.primaryExternalId', ], 'phenotypeAnnotationObject.name': ['phenotypeAnnotationObject.curie', 'phenotypeAnnotationObject.namespace'], 'interactionType.name': ['interactionType.curie'], @@ -49,11 +49,11 @@ export const GeneGeneticInteractionsTable = () => { 'interactionSource.name': ['interactionSource.curie'], 'interactorAGeneticPerturbation.alleleSymbolDisplayText': [ 'interactorAGeneticPerturbation.alleleFullName.displayText', - 'interactorAGeneticPerturbation.modEntityId', + 'interactorAGeneticPerturbation.primaryExternalId', ], 'interactorBGeneticPerturbation.alleleSymbolDisplayText': [ 'interactorBGeneticPerturbation.alleleFullName.displayText', - 'interactorBGeneticPerturbation.modEntityId', + 'interactorBGeneticPerturbation.primaryExternalId', ], }; diff --git a/src/main/cliapp/src/containers/geneGeneticInteractionsPage/mockData/mockData.js b/src/main/cliapp/src/containers/geneGeneticInteractionsPage/mockData/mockData.js index 37d0bd41c..89b15f13b 100644 --- a/src/main/cliapp/src/containers/geneGeneticInteractionsPage/mockData/mockData.js +++ b/src/main/cliapp/src/containers/geneGeneticInteractionsPage/mockData/mockData.js @@ -86,7 +86,7 @@ export const data = { internal: false, obsolete: false, dbDateUpdated: '2024-02-26T14:32:35.925338Z', - modEntityId: 'WB:WBGene00012970', + primaryExternalId: 'WB:WBGene00012970', dataProvider: { id: 75373965, internal: false, @@ -217,7 +217,7 @@ export const data = { internal: false, obsolete: false, dbDateUpdated: '2024-02-26T14:28:46.860335Z', - modEntityId: 'WB:WBGene00006765', + primaryExternalId: 'WB:WBGene00006765', dataProvider: { id: 75716655, internal: false, @@ -426,7 +426,7 @@ export const data = { internal: false, obsolete: false, dbDateUpdated: '2023-04-05T02:49:57.970413Z', - modEntityId: 'FB:FBal0196303', + primaryExternalId: 'FB:FBal0196303', taxon: { internal: false, obsolete: false, @@ -501,7 +501,7 @@ export const data = { internal: false, obsolete: false, dbDateUpdated: '2023-04-05T02:49:57.970413Z', - modEntityId: 'FB:FBal0196304', + primaryExternalId: 'FB:FBal0196304', taxon: { internal: false, obsolete: false, diff --git a/src/main/cliapp/src/containers/geneMolecularInteractionsPage/GeneMolecularInteractionsTable.js b/src/main/cliapp/src/containers/geneMolecularInteractionsPage/GeneMolecularInteractionsTable.js index 58a0ea749..854692016 100644 --- a/src/main/cliapp/src/containers/geneMolecularInteractionsPage/GeneMolecularInteractionsTable.js +++ b/src/main/cliapp/src/containers/geneMolecularInteractionsPage/GeneMolecularInteractionsTable.js @@ -34,11 +34,11 @@ export const GeneMolecularInteractionsTable = () => { const sortMapping = { 'geneAssociationSubject.geneSymbol.displayText': [ 'geneAssociationSubject.geneFullName.displayText', - 'geneAssociationSubject.modEntityId', + 'geneAssociationSubject.primaryExternalId', ], 'geneGeneAssociationObject.geneSymbol.displayText': [ 'geneGeneAssociationObject.geneFullName.displayText', - 'geneGeneAssociationObject.modEntityId', + 'geneGeneAssociationObject.primaryExternalId', ], 'phenotypeAnnotationObject.name': ['phenotypeAnnotationObject.curie', 'phenotypeAnnotationObject.namespace'], 'interactionType.name': ['interactionType.curie'], diff --git a/src/main/cliapp/src/containers/geneMolecularInteractionsPage/mockData/mockData.js b/src/main/cliapp/src/containers/geneMolecularInteractionsPage/mockData/mockData.js index 33fa88094..119b7cefd 100644 --- a/src/main/cliapp/src/containers/geneMolecularInteractionsPage/mockData/mockData.js +++ b/src/main/cliapp/src/containers/geneMolecularInteractionsPage/mockData/mockData.js @@ -86,7 +86,7 @@ export const data = { internal: false, obsolete: false, dbDateUpdated: '2024-02-26T14:32:35.925338Z', - modEntityId: 'WB:WBGene00012970', + primaryExternalId: 'WB:WBGene00012970', dataProvider: { id: 75373965, internal: false, @@ -217,7 +217,7 @@ export const data = { internal: false, obsolete: false, dbDateUpdated: '2024-02-26T14:28:46.860335Z', - modEntityId: 'WB:WBGene00006765', + primaryExternalId: 'WB:WBGene00006765', dataProvider: { id: 75716655, internal: false, diff --git a/src/main/cliapp/src/containers/genesPage/GenesTable.js b/src/main/cliapp/src/containers/genesPage/GenesTable.js index 4a0ee1498..3b0e5b282 100644 --- a/src/main/cliapp/src/containers/genesPage/GenesTable.js +++ b/src/main/cliapp/src/containers/genesPage/GenesTable.js @@ -204,11 +204,11 @@ export const GenesTable = () => { filterConfig: FILTER_CONFIGS.curieFilterConfig, }, { - field: 'modEntityId', + field: 'primaryExternalId', header: 'MOD Entity ID', sortable: true, - body: (rowData) => , - filterConfig: FILTER_CONFIGS.modentityidFilterConfig, + body: (rowData) => , + filterConfig: FILTER_CONFIGS.primaryexternalidFilterConfig, }, { field: 'modInternalId', diff --git a/src/main/cliapp/src/containers/genesPage/__tests__/GenesTable.test.js b/src/main/cliapp/src/containers/genesPage/__tests__/GenesTable.test.js index 2b586bd35..62268f0f9 100644 --- a/src/main/cliapp/src/containers/genesPage/__tests__/GenesTable.test.js +++ b/src/main/cliapp/src/containers/genesPage/__tests__/GenesTable.test.js @@ -38,7 +38,7 @@ describe('', () => { it('The table contains correct data', async () => { let result = await renderWithClient(); - const modEntityIdTd = await result.findByText(/WB:WBGene00003771/i); + const primaryExternalIdTd = await result.findByText(/WB:WBGene00003771/i); const nameTd = await result.findByText(/LEVamisole resistant 8/i); const symbolTd = await result.findByText(/lev-8/i); const synonymsTd = await result.findByText(/acr-13/i); @@ -49,7 +49,7 @@ describe('', () => { const geneTypeTd = await result.findByText(/protein_coding_gene/i); await waitFor(() => { - expect(modEntityIdTd).toBeInTheDocument(); + expect(primaryExternalIdTd).toBeInTheDocument(); expect(nameTd).toBeInTheDocument(); expect(symbolTd).toBeInTheDocument(); expect(synonymsTd).toBeInTheDocument(); diff --git a/src/main/cliapp/src/containers/genesPage/mockData/mockData.js b/src/main/cliapp/src/containers/genesPage/mockData/mockData.js index d09b3efe9..18fb323ac 100644 --- a/src/main/cliapp/src/containers/genesPage/mockData/mockData.js +++ b/src/main/cliapp/src/containers/genesPage/mockData/mockData.js @@ -21,7 +21,7 @@ export const data = { internal: false, obsolete: false, dbDateUpdated: '2023-05-16T12:31:21.941713Z', - modEntityId: 'WB:WBGene00003771', + primaryExternalId: 'WB:WBGene00003771', taxon: { internal: false, obsolete: false, diff --git a/src/main/cliapp/src/containers/phenotypeAnnotationsPage/PhenotypeAnnotationsTable.js b/src/main/cliapp/src/containers/phenotypeAnnotationsPage/PhenotypeAnnotationsTable.js index 69a704b2c..377768413 100644 --- a/src/main/cliapp/src/containers/phenotypeAnnotationsPage/PhenotypeAnnotationsTable.js +++ b/src/main/cliapp/src/containers/phenotypeAnnotationsPage/PhenotypeAnnotationsTable.js @@ -41,8 +41,8 @@ export const PhenotypeAnnotationsTable = () => { const sortMapping = { 'phenotypeAnnotationObject.name': ['phenotypeAnnotationObject.curie', 'phenotypeAnnotationObject.namespace'], - 'phenotypeAnnotationSubject.symbol': ['phenotypeAnnotationSubject.name', 'phenotypeAnnotationSubject.modEntityId'], - 'sgdStrainBackground.name': ['sgdStrainBackground.modEntityId'], + 'phenotypeAnnotationSubject.symbol': ['phenotypeAnnotationSubject.name', 'phenotypeAnnotationSubject.primaryExternalId'], + 'sgdStrainBackground.name': ['sgdStrainBackground.primaryExternalId'], }; const handleConditionRelationsOpen = (event, rowData, isInEdit) => { diff --git a/src/main/cliapp/src/containers/phenotypeAnnotationsPage/mockData/mockData.js b/src/main/cliapp/src/containers/phenotypeAnnotationsPage/mockData/mockData.js index 56d3b7188..d649245e4 100644 --- a/src/main/cliapp/src/containers/phenotypeAnnotationsPage/mockData/mockData.js +++ b/src/main/cliapp/src/containers/phenotypeAnnotationsPage/mockData/mockData.js @@ -157,7 +157,7 @@ export const data = { obsolete: false, dbDateCreated: '2023-06-09T13:47:14.458121Z', dbDateUpdated: '2024-01-17T17:52:00.624187Z', - modEntityId: 'ZFIN:ZDB-FISH-150901-427', + primaryExternalId: 'ZFIN:ZDB-FISH-150901-427', dataProvider: { id: 86992863, internal: false, @@ -220,7 +220,7 @@ export const data = { internal: false, obsolete: false, dbDateUpdated: '2024-02-06T11:36:48.627505Z', - modEntityId: 'MGI:87873', + primaryExternalId: 'MGI:87873', dataProvider: { id: 75609905, internal: false, @@ -338,7 +338,7 @@ export const data = { obsolete: false, dbDateCreated: '2023-08-08T03:48:07.853926Z', dbDateUpdated: '2024-02-07T09:13:21.51779Z', - modEntityId: 'MGI:1856658', + primaryExternalId: 'MGI:1856658', dataProvider: { id: 115684900, internal: false, @@ -459,7 +459,7 @@ export const data = { internal: false, obsolete: false, dbDateUpdated: '2024-02-06T11:34:46.000823Z', - modEntityId: 'MGI:1330812', + primaryExternalId: 'MGI:1330812', dataProvider: { id: 75135599, internal: false, @@ -577,7 +577,7 @@ export const data = { internal: false, obsolete: false, dbDateUpdated: '2024-02-06T23:17:33.99865Z', - modEntityId: 'MGI:1857811', + primaryExternalId: 'MGI:1857811', dataProvider: { id: 75138053, internal: false, diff --git a/src/main/cliapp/src/containers/variantsPage/VariantsTable.js b/src/main/cliapp/src/containers/variantsPage/VariantsTable.js index 36712327f..51b962017 100644 --- a/src/main/cliapp/src/containers/variantsPage/VariantsTable.js +++ b/src/main/cliapp/src/containers/variantsPage/VariantsTable.js @@ -171,11 +171,11 @@ export const VariantsTable = () => { filterConfig: FILTER_CONFIGS.curieFilterConfig, }, { - field: 'modEntityId', + field: 'primaryExternalId', header: 'MOD Entity ID', sortable: true, - body: (rowData) => , - filterConfig: FILTER_CONFIGS.modentityidFilterConfig, + body: (rowData) => , + filterConfig: FILTER_CONFIGS.primaryexternalidFilterConfig, }, { field: 'modInternalId', diff --git a/src/main/cliapp/src/utils/__tests__/utils.test.js b/src/main/cliapp/src/utils/__tests__/utils.test.js index 802dc4515..a26d7cfde 100644 --- a/src/main/cliapp/src/utils/__tests__/utils.test.js +++ b/src/main/cliapp/src/utils/__tests__/utils.test.js @@ -21,8 +21,8 @@ describe('removeInvalidFilters', () => { tokenOperator: 'OR', }, }, - modentityidFilter: { - modEntityId: { + primaryexternalidFilter: { + primaryExternalId: { queryString: 's', tokenOperator: 'AND', }, @@ -50,8 +50,8 @@ describe('removeInvalidFilters', () => { tokenOperator: 'OR', }, }, - modentityidFilter: { - modEntityId: { + primaryexternalidFilter: { + primaryExternalId: { queryString: 's', tokenOperator: 'AND', }, @@ -73,8 +73,8 @@ describe('removeInvalidFilters', () => { tokenOperator: 'OR', }, }, - modentityidFilter: { - modEntityId: { + primaryexternalidFilter: { + primaryExternalId: { queryString: 's', tokenOperator: 'AND', }, @@ -100,8 +100,8 @@ describe('removeInvalidFilters', () => { tokenOperator: 'OR', }, }, - modentityidFilter: { - invalidModEntityId: { + primaryexternalidFilter: { + invalidPrimaryExternalId: { queryString: 's', tokenOperator: 'AND', }, diff --git a/src/main/cliapp/src/utils/utils.js b/src/main/cliapp/src/utils/utils.js index 4a0facef5..7c99b4cbe 100644 --- a/src/main/cliapp/src/utils/utils.js +++ b/src/main/cliapp/src/utils/utils.js @@ -136,8 +136,8 @@ export function getIdentifier(data) { if (!data) { return null; } - if (data.modEntityId) { - return data.modEntityId; + if (data.primaryExternalId) { + return data.primaryExternalId; } if (data.modInternalId) { return data.modInternalId; @@ -453,7 +453,7 @@ export function validateFormBioEntityFields(newAnnotationForm, uiErrorMessages, if ( newAnnotationForm[field] && !Object.keys(newAnnotationForm['diseaseAnnotationSubject']).includes('curie') && - !Object.keys(newAnnotationForm['diseaseAnnotationSubject']).includes('modEntityId') && + !Object.keys(newAnnotationForm['diseaseAnnotationSubject']).includes('primaryExternalId') && !Object.keys(newAnnotationForm['diseaseAnnotationSubject']).includes('modInternalId') ) { const _uiErrorMessages = {}; diff --git a/src/main/java/org/alliancegenome/curation_api/constants/EntityFieldConstants.java b/src/main/java/org/alliancegenome/curation_api/constants/EntityFieldConstants.java index 557a17593..239458222 100644 --- a/src/main/java/org/alliancegenome/curation_api/constants/EntityFieldConstants.java +++ b/src/main/java/org/alliancegenome/curation_api/constants/EntityFieldConstants.java @@ -6,7 +6,7 @@ private EntityFieldConstants() { // Hidden from view, as it is a utility class } - public static final String ASSEMBLY = "genomeAssembly.modEntityId"; + public static final String ASSEMBLY = "genomeAssembly.primaryExternalId"; public static final String TAXON = "taxon.curie"; public static final String SOURCE_ORGANIZATION = "sourceOrganization.abbreviation"; public static final String DATA_PROVIDER = "dataProvider." + SOURCE_ORGANIZATION; diff --git a/src/main/java/org/alliancegenome/curation_api/dao/ConstructDAO.java b/src/main/java/org/alliancegenome/curation_api/dao/ConstructDAO.java index 1d588c9ee..429c421ad 100644 --- a/src/main/java/org/alliancegenome/curation_api/dao/ConstructDAO.java +++ b/src/main/java/org/alliancegenome/curation_api/dao/ConstructDAO.java @@ -18,7 +18,7 @@ protected ConstructDAO() { public Map getConstructIdMap() { Map constructIdMap = new HashMap<>(); - Query q = entityManager.createNativeQuery("SELECT a.id, a.modEntityId, a.modInternalId FROM Reagent as a where exists (select * from construct as g where g.id = a.id)"); + Query q = entityManager.createNativeQuery("SELECT a.id, a.primaryExternalId, a.modInternalId FROM Reagent as a where exists (select * from construct as g where g.id = a.id)"); List ids = q.getResultList(); ids.forEach(record -> { if (record[1] != null) { diff --git a/src/main/java/org/alliancegenome/curation_api/dao/GeneDAO.java b/src/main/java/org/alliancegenome/curation_api/dao/GeneDAO.java index 723785ac5..e521dec8d 100644 --- a/src/main/java/org/alliancegenome/curation_api/dao/GeneDAO.java +++ b/src/main/java/org/alliancegenome/curation_api/dao/GeneDAO.java @@ -114,7 +114,7 @@ public List findReferencingGeneExpressionAnnotations(Long geneId) { public Map getAllGeneIdsPerSpecies(Species species) { String sql = """ - select g.id, be.modentityid, s.displaytext + select g.id, be.primaryexternalid, s.displaytext from biologicalentity as be, gene as g, slotannotation as s where be.taxon_id = :ID AND be.id = g.id diff --git a/src/main/java/org/alliancegenome/curation_api/dao/GeneOntologyAnnotationDAO.java b/src/main/java/org/alliancegenome/curation_api/dao/GeneOntologyAnnotationDAO.java index 455352f1b..c62e57eb3 100644 --- a/src/main/java/org/alliancegenome/curation_api/dao/GeneOntologyAnnotationDAO.java +++ b/src/main/java/org/alliancegenome/curation_api/dao/GeneOntologyAnnotationDAO.java @@ -36,7 +36,7 @@ insert into GeneOntologyAnnotation (id, singlegene_id,goterm_id) public Map getAllGafIdsPerProvider(Organization sourceOrganization) { Query query = entityManager.createNativeQuery(""" - select gga.id, be.modentityid, ot.curie + select gga.id, be.primaryexternalid, ot.curie from GeneOntologyAnnotation as gga , BiologicalEntity as be, ontologyterm as ot, species as spec where gga.singlegene_id = be.id diff --git a/src/main/java/org/alliancegenome/curation_api/dao/GenomicEntityDAO.java b/src/main/java/org/alliancegenome/curation_api/dao/GenomicEntityDAO.java index bc6d184da..01f1b1e01 100644 --- a/src/main/java/org/alliancegenome/curation_api/dao/GenomicEntityDAO.java +++ b/src/main/java/org/alliancegenome/curation_api/dao/GenomicEntityDAO.java @@ -18,7 +18,7 @@ protected GenomicEntityDAO() { public Map getGenomicEntityIdMap() { Map genomicEntityIdMap = new HashMap<>(); - Query q = entityManager.createNativeQuery("SELECT a.id, a.modEntityId, a.modInternalId FROM BiologicalEntity as a where exists (select * from genomicentity as g where g.id = a.id)"); + Query q = entityManager.createNativeQuery("SELECT a.id, a.primaryExternalId, a.modInternalId FROM BiologicalEntity as a where exists (select * from genomicentity as g where g.id = a.id)"); List ids = q.getResultList(); ids.forEach(record -> { if (record[1] != null) { diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/AGMDiseaseAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/AGMDiseaseAnnotation.java index 873fc46fb..d02d938cc 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/AGMDiseaseAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/AGMDiseaseAnnotation.java @@ -43,7 +43,7 @@ }) public class AGMDiseaseAnnotation extends DiseaseAnnotation { - @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword"}) + @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @OnDelete(action = OnDeleteAction.CASCADE) @@ -51,7 +51,7 @@ public class AGMDiseaseAnnotation extends DiseaseAnnotation { private AffectedGenomicModel diseaseAnnotationSubject; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "geneSymbol.formatText", "geneSymbol.displayText", "geneSymbol.formatText_keyword", "geneSymbol.displayText_keyword", "geneFullName.formatText", "geneFullName.displayText", "geneFullName.formatText_keyword", "geneFullName.displayText_keyword", "geneSystematicName.formatText", "geneSystematicName.displayText", "geneSystematicName.formatText_keyword", "geneSystematicName.displayText_keyword", @@ -64,7 +64,7 @@ public class AGMDiseaseAnnotation extends DiseaseAnnotation { private Gene inferredGene; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "alleleSymbol.formatText", "alleleSymbol.displayText", "alleleSymbol.formatText_keyword", "alleleSymbol.displayText_keyword", "alleleFullName.formatText", "alleleFullName.displayText", "alleleFullName.formatText_keyword", "alleleFullName.displayText_keyword", "alleleSynonyms.formatText", "alleleSynonyms.displayText", "alleleSynonyms.formatText_keyword", "alleleSynonyms.displayText_keyword", @@ -76,7 +76,7 @@ public class AGMDiseaseAnnotation extends DiseaseAnnotation { private Allele inferredAllele; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "geneSymbol.formatText", "geneSymbol.displayText", "geneSymbol.formatText_keyword", "geneSymbol.displayText_keyword", "geneFullName.formatText", "geneFullName.displayText", "geneFullName.formatText_keyword", "geneFullName.displayText_keyword", "geneSystematicName.formatText", "geneSystematicName.displayText", "geneSystematicName.formatText_keyword", "geneSystematicName.displayText_keyword", @@ -97,7 +97,7 @@ public class AGMDiseaseAnnotation extends DiseaseAnnotation { private List assertedGenes; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "alleleSymbol.formatText", "alleleSymbol.displayText", "alleleSymbol.formatText_keyword", "alleleSymbol.displayText_keyword", "alleleFullName.formatText", "alleleFullName.displayText", "alleleFullName.formatText_keyword", "alleleFullName.displayText_keyword", "alleleSynonyms.formatText", "alleleSynonyms.displayText", "alleleSynonyms.formatText_keyword", "alleleSynonyms.displayText_keyword", diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/AGMPhenotypeAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/AGMPhenotypeAnnotation.java index d23d9dc19..bb7997337 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/AGMPhenotypeAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/AGMPhenotypeAnnotation.java @@ -45,7 +45,7 @@ public class AGMPhenotypeAnnotation extends PhenotypeAnnotation { - @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword"}) + @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @Fetch(FetchMode.SELECT) @@ -54,7 +54,7 @@ public class AGMPhenotypeAnnotation extends PhenotypeAnnotation { private AffectedGenomicModel phenotypeAnnotationSubject; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "geneSymbol.formatText", "geneSymbol.displayText", "geneSymbol.formatText_keyword", "geneSymbol.displayText_keyword", "geneFullName.formatText", "geneFullName.displayText", "geneFullName.formatText_keyword", "geneFullName.displayText_keyword", "geneSystematicName.formatText", "geneSystematicName.displayText", "geneSystematicName.formatText_keyword", "geneSystematicName.displayText_keyword", @@ -68,7 +68,7 @@ public class AGMPhenotypeAnnotation extends PhenotypeAnnotation { private Gene inferredGene; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "alleleSymbol.formatText", "alleleSymbol.displayText", "alleleSymbol.formatText_keyword", "alleleSymbol.displayText_keyword", "alleleFullName.formatText", "alleleFullName.displayText", "alleleFullName.formatText_keyword", "alleleFullName.displayText_keyword", "alleleSynonyms.formatText", "alleleSynonyms.displayText", "alleleSynonyms.formatText_keyword", "alleleSynonyms.displayText_keyword", @@ -81,7 +81,7 @@ public class AGMPhenotypeAnnotation extends PhenotypeAnnotation { private Allele inferredAllele; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "geneSymbol.formatText", "geneSymbol.displayText", "geneSymbol.formatText_keyword", "geneSymbol.displayText_keyword", "geneFullName.formatText", "geneFullName.displayText", "geneFullName.formatText_keyword", "geneFullName.displayText_keyword", "geneSystematicName.formatText", "geneSystematicName.displayText", "geneSystematicName.formatText_keyword", "geneSystematicName.displayText_keyword", @@ -103,7 +103,7 @@ public class AGMPhenotypeAnnotation extends PhenotypeAnnotation { private List assertedGenes; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "alleleSymbol.formatText", "alleleSymbol.displayText", "alleleSymbol.formatText_keyword", "alleleSymbol.displayText_keyword", "alleleFullName.formatText", "alleleFullName.displayText", "alleleFullName.formatText_keyword", "alleleFullName.displayText_keyword", "alleleSynonyms.formatText", "alleleSynonyms.displayText", "alleleSynonyms.formatText_keyword", "alleleSynonyms.displayText_keyword", diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/AffectedGenomicModel.java b/src/main/java/org/alliancegenome/curation_api/model/entities/AffectedGenomicModel.java index a9c494def..9bdbf6abd 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/AffectedGenomicModel.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/AffectedGenomicModel.java @@ -42,9 +42,9 @@ public class AffectedGenomicModel extends GenomicEntity { @IndexedEmbedded(includePaths = { "constructAssociationSubject.curie", "constructAssociationSubject.constructSymbol.displayText", "constructAssociationSubject.constructSymbol.formatText", - "constructAssociationSubject.constructFullName.displayText", "constructAssociationSubject.constructFullName.formatText", "constructAssociationSubject.modEntityId", + "constructAssociationSubject.constructFullName.displayText", "constructAssociationSubject.constructFullName.formatText", "constructAssociationSubject.primaryExternalId", "constructAssociationSubject.curie_keyword", "constructAssociationSubject.constructSymbol.displayText_keyword", "constructAssociationSubject.constructSymbol.formatText_keyword", - "constructAssociationSubject.constructFullName.displayText_keyword", "constructAssociationSubject.constructFullName.formatText_keyword", "constructAssociationSubject.modEntityId_keyword" + "constructAssociationSubject.constructFullName.displayText_keyword", "constructAssociationSubject.constructFullName.formatText_keyword", "constructAssociationSubject.primaryExternalId_keyword" }) @OneToMany(mappedBy = "constructGenomicEntityAssociationObject", cascade = CascadeType.ALL, orphanRemoval = true) @JsonView({View.FieldsAndLists.class, View.GeneDetailView.class}) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Allele.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Allele.java index 18bd7a5e1..2b7cfe077 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/Allele.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Allele.java @@ -178,7 +178,7 @@ public class Allele extends GenomicEntity { "alleleGeneAssociationObject.curie", "alleleGeneAssociationObject.geneSymbol.displayText", "alleleGeneAssociationObject.geneSymbol.formatText", "alleleGeneAssociationObject.geneFullName.displayText", "alleleGeneAssociationObject.geneFullName.formatText", "alleleGeneAssociationObject.curie_keyword", "alleleGeneAssociationObject.geneSymbol.displayText_keyword", "alleleGeneAssociationObject.geneSymbol.formatText_keyword", "alleleGeneAssociationObject.geneFullName.displayText_keyword", "alleleGeneAssociationObject.geneFullName.formatText_keyword", - "alleleGeneAssociationObject.modEntityId", "alleleGeneAssociationObject.modInternalId", "alleleGeneAssociationObject.modEntityId_keyword", "alleleGeneAssociationObject.modInternalId_keyword" + "alleleGeneAssociationObject.primaryExternalId", "alleleGeneAssociationObject.modInternalId", "alleleGeneAssociationObject.primaryExternalId_keyword", "alleleGeneAssociationObject.modInternalId_keyword" } ) @OneToMany(mappedBy = "alleleAssociationSubject", cascade = CascadeType.ALL, orphanRemoval = true) @@ -188,7 +188,7 @@ public class Allele extends GenomicEntity { @IndexedEmbedded( includePaths = { "alleleVariantAssociationObject.curie", "alleleGeneAssociationObject.curie_keyword", - "alleleVariantAssociationObject.modEntityId", "alleleVariantAssociationObject.modEntityId_keyword", + "alleleVariantAssociationObject.primaryExternalId", "alleleVariantAssociationObject.primaryExternalId_keyword", "alleleVariantAssociationObject.modInternalId", "alleleVariantAssociationObject.modInternalId_keyword" } ) @@ -208,9 +208,9 @@ public class Allele extends GenomicEntity { @IndexedEmbedded(includePaths = { "constructAssociationSubject.curie", "constructAssociationSubject.constructSymbol.displayText", "constructAssociationSubject.constructSymbol.formatText", - "constructAssociationSubject.constructFullName.displayText", "constructAssociationSubject.constructFullName.formatText", "constructAssociationSubject.modEntityId", + "constructAssociationSubject.constructFullName.displayText", "constructAssociationSubject.constructFullName.formatText", "constructAssociationSubject.primaryExternalId", "constructAssociationSubject.curie_keyword", "constructAssociationSubject.constructSymbol.displayText_keyword", "constructAssociationSubject.constructSymbol.formatText_keyword", - "constructAssociationSubject.constructFullName.displayText_keyword", "constructAssociationSubject.constructFullName.formatText_keyword", "constructAssociationSubject.modEntityId_keyword" + "constructAssociationSubject.constructFullName.displayText_keyword", "constructAssociationSubject.constructFullName.formatText_keyword", "constructAssociationSubject.primaryExternalId_keyword" }) @OneToMany(mappedBy = "constructGenomicEntityAssociationObject", cascade = CascadeType.ALL, orphanRemoval = true) @JsonView({ View.FieldsAndLists.class, View.GeneDetailView.class }) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/AlleleDiseaseAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/AlleleDiseaseAnnotation.java index c373723fd..5db250051 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/AlleleDiseaseAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/AlleleDiseaseAnnotation.java @@ -44,7 +44,7 @@ public class AlleleDiseaseAnnotation extends DiseaseAnnotation { @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "alleleSymbol.formatText", "alleleSymbol.displayText", "alleleSymbol.formatText_keyword", "alleleSymbol.displayText_keyword", "alleleFullName.formatText", "alleleFullName.displayText", "alleleFullName.formatText_keyword", "alleleFullName.displayText_keyword", "alleleSynonyms.formatText", "alleleSynonyms.displayText", "alleleSynonyms.formatText_keyword", "alleleSynonyms.displayText_keyword", @@ -58,7 +58,7 @@ public class AlleleDiseaseAnnotation extends DiseaseAnnotation { private Allele diseaseAnnotationSubject; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "geneSymbol.formatText", "geneSymbol.displayText", "geneSymbol.formatText_keyword", "geneSymbol.displayText_keyword", "geneFullName.formatText", "geneFullName.displayText", "geneFullName.formatText_keyword", "geneFullName.displayText_keyword", "geneSystematicName.formatText", "geneSystematicName.displayText", "geneSystematicName.formatText_keyword", "geneSystematicName.displayText_keyword", @@ -72,7 +72,7 @@ public class AlleleDiseaseAnnotation extends DiseaseAnnotation { private Gene inferredGene; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "geneSymbol.formatText", "geneSymbol.displayText", "geneSymbol.formatText_keyword", "geneSymbol.displayText_keyword", "geneFullName.formatText", "geneFullName.displayText", "geneFullName.formatText_keyword", "geneFullName.displayText_keyword", "geneSystematicName.formatText", "geneSystematicName.displayText", "geneSystematicName.formatText_keyword", "geneSystematicName.displayText_keyword", diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/AllelePhenotypeAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/AllelePhenotypeAnnotation.java index b3a893e3a..db1d8f728 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/AllelePhenotypeAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/AllelePhenotypeAnnotation.java @@ -44,7 +44,7 @@ public class AllelePhenotypeAnnotation extends PhenotypeAnnotation { @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "alleleSymbol.formatText", "alleleSymbol.displayText", "alleleSymbol.formatText_keyword", "alleleSymbol.displayText_keyword", "alleleFullName.formatText", "alleleFullName.displayText", "alleleFullName.formatText_keyword", "alleleFullName.displayText_keyword", "alleleSynonyms.formatText", "alleleSynonyms.displayText", "alleleSynonyms.formatText_keyword", "alleleSynonyms.displayText_keyword", @@ -58,7 +58,7 @@ public class AllelePhenotypeAnnotation extends PhenotypeAnnotation { private Allele phenotypeAnnotationSubject; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "geneSymbol.formatText", "geneSymbol.displayText", "geneSymbol.formatText_keyword", "geneSymbol.displayText_keyword", "geneFullName.formatText", "geneFullName.displayText", "geneFullName.formatText_keyword", "geneFullName.displayText_keyword", "geneSystematicName.formatText", "geneSystematicName.displayText", "geneSystematicName.formatText_keyword", "geneSystematicName.displayText_keyword", @@ -72,7 +72,7 @@ public class AllelePhenotypeAnnotation extends PhenotypeAnnotation { private Gene inferredGene; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "geneSymbol.formatText", "geneSymbol.displayText", "geneSymbol.formatText_keyword", "geneSymbol.displayText_keyword", "geneFullName.formatText", "geneFullName.displayText", "geneFullName.formatText_keyword", "geneFullName.displayText_keyword", "geneSystematicName.formatText", "geneSystematicName.displayText", "geneSystematicName.formatText_keyword", "geneSystematicName.displayText_keyword", diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java index 64a8a74b7..81ba7abfd 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java @@ -53,10 +53,10 @@ public class Annotation extends SingleReferenceAssociation { protected String curie; @FullTextField(analyzer = "autocompleteAnalyzer", searchAnalyzer = "autocompleteSearchAnalyzer") - @KeywordField(name = "modEntityId_keyword", aggregable = Aggregable.YES, sortable = Sortable.YES, searchable = Searchable.YES, normalizer = "sortNormalizer") + @KeywordField(name = "primaryExternalId_keyword", aggregable = Aggregable.YES, sortable = Sortable.YES, searchable = Searchable.YES, normalizer = "sortNormalizer") @JsonView({ View.FieldsOnly.class }) @EqualsAndHashCode.Include - private String modEntityId; + private String primaryExternalId; @FullTextField(analyzer = "autocompleteAnalyzer", searchAnalyzer = "autocompleteSearchAnalyzer") @KeywordField(name = "modInternalId_keyword", aggregable = Aggregable.YES, sortable = Sortable.YES, searchable = Searchable.YES, normalizer = "sortNormalizer") diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/AssemblyComponent.java b/src/main/java/org/alliancegenome/curation_api/model/entities/AssemblyComponent.java index a0a58a63e..af0075ec6 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/AssemblyComponent.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/AssemblyComponent.java @@ -37,7 +37,7 @@ public class AssemblyComponent extends GenomicEntity { @JsonView({ View.FieldsOnly.class }) private String name; - @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword"}) + @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @JsonView({ View.FieldsOnly.class }) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/BioSampleGenomicInformation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/BioSampleGenomicInformation.java index 986e06e92..505f2423e 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/BioSampleGenomicInformation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/BioSampleGenomicInformation.java @@ -37,7 +37,7 @@ public class BioSampleGenomicInformation extends AuditedObject { @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "alleleSymbol.formatText", "alleleSymbol.displayText", "alleleSymbol.formatText_keyword", "alleleSymbol.displayText_keyword", "alleleFullName.formatText", "alleleFullName.displayText", "alleleFullName.formatText_keyword", "alleleFullName.displayText_keyword", "alleleSynonyms.formatText", "alleleSynonyms.displayText", "alleleSynonyms.formatText_keyword", "alleleSynonyms.displayText_keyword", @@ -48,7 +48,7 @@ public class BioSampleGenomicInformation extends AuditedObject { @JsonView(View.FieldsOnly.class) private Allele bioSampleAllele; - @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword"}) + @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @JsonView(View.FieldsOnly.class) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/BiologicalEntity.java b/src/main/java/org/alliancegenome/curation_api/model/entities/BiologicalEntity.java index fa56b9f46..96cf4bedc 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/BiologicalEntity.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/BiologicalEntity.java @@ -52,13 +52,13 @@ @Index(name = "biologicalentity_curie_index", columnList = "curie"), @Index(name = "biologicalentity_createdby_index", columnList = "createdBy_id"), @Index(name = "biologicalentity_updatedby_index", columnList = "updatedBy_id"), - @Index(name = "biologicalentity_modentityid_index", columnList = "modentityid"), + @Index(name = "biologicalentity_primaryExternalId_index", columnList = "primaryExternalId"), @Index(name = "biologicalentity_modinternalid_index", columnList = "modinternalid"), @Index(name = "biologicalentity_dataprovider_index", columnList = "dataprovider_id") }, uniqueConstraints = { @UniqueConstraint(name = "biologicalentity_curie_uk", columnNames = "curie"), - @UniqueConstraint(name = "biologicalentity_modentityid_uk", columnNames = "modentityid"), + @UniqueConstraint(name = "biologicalentity_primaryExternalId_uk", columnNames = "primaryExternalId"), @UniqueConstraint(name = "biologicalentity_modinternalid_uk", columnNames = "modinternalid") } ) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/CodingSequence.java b/src/main/java/org/alliancegenome/curation_api/model/entities/CodingSequence.java index 0d3cb4924..204cc5ce7 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/CodingSequence.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/CodingSequence.java @@ -61,7 +61,7 @@ public class CodingSequence extends GenomicEntity { @IndexedEmbedded( includePaths = { "codingSequenceGenomicLocationAssociationObject.curie", "codingSequenceGenomicLocationAssociationObject.curie_keyword", - "codingSequenceGenomicLocationAssociationObject.modEntityId", "codingSequenceGenomicLocationAssociationObject.modEntityId_keyword", + "codingSequenceGenomicLocationAssociationObject.primaryExternalId", "codingSequenceGenomicLocationAssociationObject.primaryExternalId_keyword", "codingSequenceGenomicLocationAssociationObject.modInternalId", "codingSequenceGenomicLocationAssociationObject.modInternalId_keyword", "start", "end" } diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Construct.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Construct.java index 1e0ffb75e..b0229785d 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/Construct.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Construct.java @@ -75,9 +75,9 @@ public class Construct extends Reagent { private List constructComponents; @IndexedEmbedded(includePaths = { - "constructGenomicEntityAssociationObject.curie", "constructGenomicEntityAssociationObject.modEntityId", "constructGenomicEntityAssociationObject.modInternalId", + "constructGenomicEntityAssociationObject.curie", "constructGenomicEntityAssociationObject.primaryExternalId", "constructGenomicEntityAssociationObject.modInternalId", "constructGenomicEntityAssociationObject.name", "constructGenomicEntityAssociationObject.symbol", "relation.name", "constructGenomicEntityAssociationObject.curie_keyword", - "constructGenomicEntityAssociationObject.modEntityId_keyword", "constructGenomicEntityAssociationObject.modInternalId_keyword", "constructGenomicEntityAssociationObject.name_keyword", + "constructGenomicEntityAssociationObject.primaryExternalId_keyword", "constructGenomicEntityAssociationObject.modInternalId_keyword", "constructGenomicEntityAssociationObject.name_keyword", "constructGenomicEntityAssociationObject.symbol_keyword", "relation.name_keyword" }) @OneToMany(mappedBy = "constructAssociationSubject", cascade = CascadeType.ALL, orphanRemoval = true) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/DiseaseAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/DiseaseAnnotation.java index d295c7e0d..ae883cbfa 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/DiseaseAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/DiseaseAnnotation.java @@ -46,7 +46,7 @@ @Index(name = "DiseaseAnnotation_internal_index", columnList = "internal"), @Index(name = "DiseaseAnnotation_obsolete_index", columnList = "obsolete"), @Index(name = "DiseaseAnnotation_curie_index", columnList = "curie"), - @Index(name = "DiseaseAnnotation_modEntityId_index", columnList = "modEntityId"), + @Index(name = "DiseaseAnnotation_primaryExternalId_index", columnList = "primaryExternalId"), @Index(name = "DiseaseAnnotation_modInternalId_index", columnList = "modInternalId"), @Index(name = "DiseaseAnnotation_uniqueId_index", columnList = "uniqueId"), @Index(name = "DiseaseAnnotation_diseaseAnnotationObject_index", columnList = "diseaseAnnotationObject_id"), @@ -98,7 +98,7 @@ public abstract class DiseaseAnnotation extends Annotation { private List evidenceCodes; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "geneSymbol.formatText", "geneSymbol.displayText", "geneSymbol.formatText_keyword", "geneSymbol.displayText_keyword", "geneFullName.formatText", "geneFullName.displayText", "geneFullName.formatText_keyword", "geneFullName.displayText_keyword", "geneSystematicName.formatText", "geneSystematicName.displayText", "geneSystematicName.formatText_keyword", "geneSystematicName.displayText_keyword", @@ -152,7 +152,7 @@ public abstract class DiseaseAnnotation extends Annotation { private DataProvider secondaryDataProvider; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "geneSymbol.formatText", "geneSymbol.displayText", "geneSymbol.formatText_keyword", "geneSymbol.displayText_keyword", "geneFullName.formatText", "geneFullName.displayText", "geneFullName.formatText_keyword", "geneFullName.displayText_keyword", "geneSystematicName.formatText", "geneSystematicName.displayText", "geneSystematicName.formatText_keyword", "geneSystematicName.displayText_keyword", @@ -174,7 +174,7 @@ public abstract class DiseaseAnnotation extends Annotation { private List diseaseGeneticModifierGenes; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "alleleSymbol.formatText", "alleleSymbol.displayText", "alleleSymbol.formatText_keyword", "alleleSymbol.displayText_keyword", "alleleFullName.formatText", "alleleFullName.displayText", "alleleFullName.formatText_keyword", "alleleFullName.displayText_keyword", "alleleSynonyms.formatText", "alleleSynonyms.displayText", "alleleSynonyms.formatText_keyword", "alleleSynonyms.displayText_keyword", @@ -194,7 +194,7 @@ public abstract class DiseaseAnnotation extends Annotation { ) private List diseaseGeneticModifierAlleles; - @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword"}) + @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToMany @JsonView({View.FieldsAndLists.class, View.DiseaseAnnotation.class, View.ForPublic.class}) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Exon.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Exon.java index 2882ad164..215fc80ad 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/Exon.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Exon.java @@ -61,7 +61,7 @@ public class Exon extends GenomicEntity { @IndexedEmbedded( includePaths = { "exonGenomicLocationAssociationObject.curie", "exonGenomicLocationAssociationObject.curie_keyword", - "exonGenomicLocationAssociationObject.modEntityId", "exonGenomicLocationAssociationObject.modEntityId_keyword", + "exonGenomicLocationAssociationObject.primaryExternalId", "exonGenomicLocationAssociationObject.primaryExternalId_keyword", "exonGenomicLocationAssociationObject.modInternalId", "exonGenomicLocationAssociationObject.modInternalId_keyword", "start", "end" } diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Gene.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Gene.java index 017214a2f..130061cf4 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/Gene.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Gene.java @@ -94,8 +94,8 @@ public class Gene extends GenomicEntity { @IndexedEmbedded( includePaths = {"alleleAssociationSubject.curie", "alleleAssociationSubject.alleleSymbol.displayText", "alleleAssociationSubject.alleleSymbol.formatText", "alleleAssociationSubject.alleleFullName.displayText", "alleleAssociationSubject.alleleFullName.formatText", "alleleAssociationSubject.curie_keyword", "alleleAssociationSubject.alleleSymbol.displayText_keyword", "alleleAssociationSubject.alleleSymbol.formatText_keyword", - "alleleAssociationSubject.alleleFullName.displayText_keyword", "alleleAssociationSubject.alleleFullName.formatText_keyword", "alleleAssociationSubject.modEntityId", "alleleAssociationSubject.modInternalId", - "alleleAssociationSubject.modEntityId_keyword", "alleleAssociationSubject.modInternalId_keyword" + "alleleAssociationSubject.alleleFullName.displayText_keyword", "alleleAssociationSubject.alleleFullName.formatText_keyword", "alleleAssociationSubject.primaryExternalId", "alleleAssociationSubject.modInternalId", + "alleleAssociationSubject.primaryExternalId_keyword", "alleleAssociationSubject.modInternalId_keyword" } ) @OneToMany(mappedBy = "alleleGeneAssociationObject", cascade = CascadeType.ALL, orphanRemoval = true) @@ -113,7 +113,7 @@ public class Gene extends GenomicEntity { @IndexedEmbedded( includePaths = { "geneGenomicLocationAssociationObject.curie", "geneGenomicLocationAssociationObject.curie_keyword", - "geneGenomicLocationAssociationObject.modEntityId", "geneGenomicLocationAssociationObject.modEntityId_keyword", + "geneGenomicLocationAssociationObject.primaryExternalId", "geneGenomicLocationAssociationObject.primaryExternalId_keyword", "geneGenomicLocationAssociationObject.modInternalId", "geneGenomicLocationAssociationObject.modInternalId_keyword", "start", "end" } @@ -125,9 +125,9 @@ public class Gene extends GenomicEntity { @IndexedEmbedded(includePaths = { "constructAssociationSubject.curie", "constructAssociationSubject.constructSymbol.displayText", "constructAssociationSubject.constructSymbol.formatText", - "constructAssociationSubject.constructFullName.displayText", "constructAssociationSubject.constructFullName.formatText", "constructAssociationSubject.modEntityId", + "constructAssociationSubject.constructFullName.displayText", "constructAssociationSubject.constructFullName.formatText", "constructAssociationSubject.primaryExternalId", "constructAssociationSubject.curie_keyword", "constructAssociationSubject.constructSymbol.displayText_keyword", "constructAssociationSubject.constructSymbol.formatText_keyword", - "constructAssociationSubject.constructFullName.displayText_keyword", "constructAssociationSubject.constructFullName.formatText_keyword", "constructAssociationSubject.modEntityId_keyword" + "constructAssociationSubject.constructFullName.displayText_keyword", "constructAssociationSubject.constructFullName.formatText_keyword", "constructAssociationSubject.primaryExternalId_keyword" }) @OneToMany(mappedBy = "constructGenomicEntityAssociationObject", cascade = CascadeType.ALL, orphanRemoval = true) @JsonView({ View.FieldsAndLists.class, View.GeneDetailView.class }) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/GeneDiseaseAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/GeneDiseaseAnnotation.java index 3c2617943..b104a3908 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/GeneDiseaseAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/GeneDiseaseAnnotation.java @@ -37,7 +37,7 @@ public class GeneDiseaseAnnotation extends DiseaseAnnotation { @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "geneSymbol.formatText", "geneSymbol.displayText", "geneSymbol.formatText_keyword", "geneSymbol.displayText_keyword", "geneFullName.formatText", "geneFullName.displayText", "geneFullName.formatText_keyword", "geneFullName.displayText_keyword", "geneSystematicName.formatText", "geneSystematicName.displayText", "geneSystematicName.formatText_keyword", "geneSystematicName.displayText_keyword", @@ -50,7 +50,7 @@ public class GeneDiseaseAnnotation extends DiseaseAnnotation { @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) private Gene diseaseAnnotationSubject; - @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword"}) + @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionAnnotation.java index e5af5a562..5c1dc57db 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionAnnotation.java @@ -32,7 +32,7 @@ @Index(name = "GeneExpressionAnnotation_internal_index", columnList = "internal"), @Index(name = "GeneExpressionAnnotation_obsolete_index", columnList = "obsolete"), @Index(name = "GeneExpressionAnnotation_curie_index", columnList = "curie"), - @Index(name = "GeneExpressionAnnotation_modEntityId_index", columnList = "modEntityId"), + @Index(name = "GeneExpressionAnnotation_primaryExternalId_index", columnList = "primaryExternalId"), @Index(name = "GeneExpressionAnnotation_modInternalId_index", columnList = "modInternalId"), @Index(name = "GeneExpressionAnnotation_uniqueId_index", columnList = "uniqueId"), @Index(name = "GeneExpressionAnnotation_createdBy_index", columnList = "createdBy_id"), diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionExperiment.java b/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionExperiment.java index d9d587f5f..3d340b6cd 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionExperiment.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionExperiment.java @@ -17,7 +17,7 @@ @Table(indexes = { @Index(name = "geneexpressionexperiment_uniqueid_index", columnList = "uniqueid"), @Index(name = "geneexpressionexperiment_curie_index", columnList = "curie"), - @Index(name = "geneexpressionexperiment_modentityid_index", columnList = "modinternalid"), + @Index(name = "geneexpressionexperiment_primaryExternalId_index", columnList = "modinternalid"), @Index(name = "geneexpressionexperiment_modinternalid_index", columnList = "modinternalid"), @Index(name = "geneexpressionexperiment_singlereference_index", columnList = "singlereference_id"), @Index(name = "geneexpressionexperiment_entityassayedused_index", columnList = "entityassayed_id"), diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/GeneGeneticInteraction.java b/src/main/java/org/alliancegenome/curation_api/model/entities/GeneGeneticInteraction.java index 00b8a32f9..9209675b1 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/GeneGeneticInteraction.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/GeneGeneticInteraction.java @@ -62,7 +62,7 @@ public class GeneGeneticInteraction extends GeneInteraction { @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "alleleSymbol.formatText", "alleleSymbol.displayText", "alleleSymbol.formatText_keyword", "alleleSymbol.displayText_keyword", "alleleFullName.formatText", "alleleFullName.displayText", "alleleFullName.formatText_keyword", "alleleFullName.displayText_keyword", "alleleSynonyms.formatText", "alleleSynonyms.displayText", "alleleSynonyms.formatText_keyword", "alleleSynonyms.displayText_keyword", @@ -76,7 +76,7 @@ public class GeneGeneticInteraction extends GeneInteraction { private Allele interactorAGeneticPerturbation; @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "alleleSymbol.formatText", "alleleSymbol.displayText", "alleleSymbol.formatText_keyword", "alleleSymbol.displayText_keyword", "alleleFullName.formatText", "alleleFullName.displayText", "alleleFullName.formatText_keyword", "alleleFullName.displayText_keyword", "alleleSynonyms.formatText", "alleleSynonyms.displayText", "alleleSynonyms.formatText_keyword", "alleleSynonyms.displayText_keyword", diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/GenePhenotypeAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/GenePhenotypeAnnotation.java index f8f9ad158..d8fedf462 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/GenePhenotypeAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/GenePhenotypeAnnotation.java @@ -37,7 +37,7 @@ public class GenePhenotypeAnnotation extends PhenotypeAnnotation { @IndexedEmbedded(includePaths = { - "curie", "modEntityId", "modInternalId", "curie_keyword", "modEntityId_keyword", "modInternalId_keyword", + "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "geneSymbol.formatText", "geneSymbol.displayText", "geneSymbol.formatText_keyword", "geneSymbol.displayText_keyword", "geneFullName.formatText", "geneFullName.displayText", "geneFullName.formatText_keyword", "geneFullName.displayText_keyword", "geneSystematicName.formatText", "geneSystematicName.displayText", "geneSystematicName.formatText_keyword", "geneSystematicName.displayText_keyword", @@ -50,7 +50,7 @@ public class GenePhenotypeAnnotation extends PhenotypeAnnotation { @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) private Gene phenotypeAnnotationSubject; - @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword"}) + @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/GenomeAssembly.java b/src/main/java/org/alliancegenome/curation_api/model/entities/GenomeAssembly.java index deff41f04..d365a06c4 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/GenomeAssembly.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/GenomeAssembly.java @@ -42,7 +42,7 @@ public class GenomeAssembly extends BiologicalEntity { @JsonView({ View.FieldsAndLists.class }) private List crossReferences; - @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword"}) + @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @EqualsAndHashCode.Include diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetSampleAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetSampleAnnotation.java index 49cab988a..25e663f00 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetSampleAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetSampleAnnotation.java @@ -78,9 +78,9 @@ public class HTPExpressionDatasetSampleAnnotation extends AuditedObject { @JsonView({ View.FieldsOnly.class }) private BioSampleAge htpExpressionSampleAge; - @IndexedEmbedded(includePaths = {"bioSampleAllele.curie", "bioSampleAllele.modInternalId", "bioSampleAllele.modEntityId", "bioSampleAllele.modEntityId_keyword", - "bioSampleAllele.modInternalId_keyword", "bioSampleAgm.curie", "bioSampleAgm.modInternalId", "bioSampleAgm.modEntityId", "bioSampleAgm.modInternalId_keyword", - "bioSampleAgm.modEntityId_keyword", "bioSampleAllele.curie_keyword", "bioSampleAgm.curie_keyword", "bioSampleText", "bioSampleText_keyword" + @IndexedEmbedded(includePaths = {"bioSampleAllele.curie", "bioSampleAllele.modInternalId", "bioSampleAllele.primaryExternalId", "bioSampleAllele.primaryExternalId_keyword", + "bioSampleAllele.modInternalId_keyword", "bioSampleAgm.curie", "bioSampleAgm.modInternalId", "bioSampleAgm.primaryExternalId", "bioSampleAgm.modInternalId_keyword", + "bioSampleAgm.primaryExternalId_keyword", "bioSampleAllele.curie_keyword", "bioSampleAgm.curie_keyword", "bioSampleText", "bioSampleText_keyword" }) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @OneToOne(cascade = CascadeType.ALL, orphanRemoval = true) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Person.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Person.java index b216fdb9c..9f0d2b3e1 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/Person.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Person.java @@ -81,10 +81,10 @@ public class Person extends Agent { private String orcid; @FullTextField(analyzer = "autocompleteAnalyzer", searchAnalyzer = "autocompleteSearchAnalyzer") - @KeywordField(name = "modEntityId_keyword", aggregable = Aggregable.YES, sortable = Sortable.YES, searchable = Searchable.YES, normalizer = "sortNormalizer") + @KeywordField(name = "primaryExternalId_keyword", aggregable = Aggregable.YES, sortable = Sortable.YES, searchable = Searchable.YES, normalizer = "sortNormalizer") @JsonView({ View.FieldsOnly.class, View.PersonSettingView.class }) @Column(unique = true) - private String modEntityId; + private String primaryExternalId; @OneToMany(mappedBy = "person") @JsonView({ View.PersonSettingView.class }) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/PhenotypeAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/PhenotypeAnnotation.java index 3c9fcbeb8..c3df7e2a4 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/PhenotypeAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/PhenotypeAnnotation.java @@ -50,7 +50,7 @@ @Index(name = "PhenotypeAnnotation_internal_index", columnList = "internal"), @Index(name = "PhenotypeAnnotation_obsolete_index", columnList = "obsolete"), @Index(name = "PhenotypeAnnotation_curie_index", columnList = "curie"), - @Index(name = "PhenotypeAnnotation_modEntityId_index", columnList = "modEntityId"), + @Index(name = "PhenotypeAnnotation_primaryExternalId_index", columnList = "primaryExternalId"), @Index(name = "PhenotypeAnnotation_modInternalId_index", columnList = "modInternalId"), @Index(name = "PhenotypeAnnotation_uniqueId_index", columnList = "uniqueId"), @Index(name = "PhenotypeAnnotation_createdBy_index", columnList = "createdBy_id"), diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/PredictedVariantConsequence.java b/src/main/java/org/alliancegenome/curation_api/model/entities/PredictedVariantConsequence.java index 7920ede56..a9cab3cb5 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/PredictedVariantConsequence.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/PredictedVariantConsequence.java @@ -59,7 +59,7 @@ public class PredictedVariantConsequence extends AuditedObject { @JsonBackReference private CuratedVariantGenomicLocationAssociation variantGenomicLocation; - @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword"}) + @IndexedEmbedded(includePaths = {"name", "name_keyword", "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @JsonView({ View.FieldsOnly.class }) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Reagent.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Reagent.java index 220506e01..06fba36c9 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/Reagent.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Reagent.java @@ -39,7 +39,13 @@ @Schema(name = "reagent", description = "POJO that represents a reagent") @AGRCurationSchemaVersion(min = "2.0.0", max = LinkMLSchemaConstants.LATEST_RELEASE, dependencies = { SubmittedObject.class }) @Table(indexes = { - @Index(name = "reagent_uniqueId_index", columnList = "uniqueId") + @Index(name = "reagent_uniqueid_index", columnList = "uniqueid"), + @Index(name = "reagent_dataprovider_index", columnList = "dataprovider_id"), + @Index(name = "reagent_curie_index", columnList = "curie"), + @Index(name = "reagent_primaryexternalid_index", columnList = "primaryexternalid"), + @Index(name = "reagent_modinternalid_index", columnList = "modinternalid"), + @Index(name = "reagent_createdby_index", columnList = "createdby_id"), + @Index(name = "reagent_updatedby_index", columnList = "updatedby_id") }) public class Reagent extends SubmittedObject { diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Transcript.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Transcript.java index 0617af6f8..82b960b15 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/Transcript.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Transcript.java @@ -62,7 +62,7 @@ public class Transcript extends GenomicEntity { @IndexedEmbedded( includePaths = { "transcriptGenomicLocationAssociationObject.curie", "transcriptGenomicLocationAssociationObject.curie_keyword", - "transcriptGenomicLocationAssociationObject.modEntityId", "transcriptGenomicLocationAssociationObject.modEntityId_keyword", + "transcriptGenomicLocationAssociationObject.primaryExternalId", "transcriptGenomicLocationAssociationObject.primaryExternalId_keyword", "transcriptGenomicLocationAssociationObject.modInternalId", "transcriptGenomicLocationAssociationObject.modInternalId_keyword", "start", "end" } @@ -73,9 +73,9 @@ public class Transcript extends GenomicEntity { @IndexedEmbedded( includePaths = { - "transcriptCodingSequenceAssociationObject.curie", "transcriptCodingSequenceAssociationObject.name", "transcriptCodingSequenceAssociationObject.modEntityId", + "transcriptCodingSequenceAssociationObject.curie", "transcriptCodingSequenceAssociationObject.name", "transcriptCodingSequenceAssociationObject.primaryExternalId", "transcriptCodingSequenceAssociationObject.modInternalId", "transcriptCodingSequenceAssociationObject.uniqueId", - "transcriptCodingSequenceAssociationObject.curie_keyword", "transcriptCodingSequenceAssociationObject.name_keyword", "transcriptCodingSequenceAssociationObject.modEntityId_keyword", + "transcriptCodingSequenceAssociationObject.curie_keyword", "transcriptCodingSequenceAssociationObject.name_keyword", "transcriptCodingSequenceAssociationObject.primaryExternalId_keyword", "transcriptCodingSequenceAssociationObject.modInternalId_keyword", "transcriptCodingSequenceAssociationObject.uniqueId_keyword" } ) @@ -85,9 +85,9 @@ public class Transcript extends GenomicEntity { @IndexedEmbedded( includePaths = { - "transcriptExonAssociationObject.curie", "transcriptExonAssociationObject.name", "transcriptExonAssociationObject.modEntityId", + "transcriptExonAssociationObject.curie", "transcriptExonAssociationObject.name", "transcriptExonAssociationObject.primaryExternalId", "transcriptExonAssociationObject.modInternalId", "transcriptExonAssociationObject.uniqueId", - "transcriptExonAssociationObject.curie_keyword", "transcriptExonAssociationObject.name_keyword", "transcriptExonAssociationObject.modEntityId_keyword", + "transcriptExonAssociationObject.curie_keyword", "transcriptExonAssociationObject.name_keyword", "transcriptExonAssociationObject.primaryExternalId_keyword", "transcriptExonAssociationObject.modInternalId_keyword", "transcriptExonAssociationObject.uniqueId_keyword" } ) @@ -100,7 +100,7 @@ public class Transcript extends GenomicEntity { "transcriptGeneAssociationObject.curie", "transcriptGeneAssociationObject.geneSymbol.displayText", "transcriptGeneAssociationObject.geneSymbol.formatText", "transcriptGeneAssociationObject.geneFullName.displayText", "transcriptGeneAssociationObject.geneFullName.formatText", "transcriptGeneAssociationObject.curie_keyword", "transcriptGeneAssociationObject.geneSymbol.displayText_keyword", "transcriptGeneAssociationObject.geneSymbol.formatText_keyword", "transcriptGeneAssociationObject.geneFullName.displayText_keyword", "transcriptGeneAssociationObject.geneFullName.formatText_keyword", - "transcriptGeneAssociationObject.modEntityId", "transcriptGeneAssociationObject.modInternalId", "transcriptGeneAssociationObject.modEntityId_keyword", "transcriptGeneAssociationObject.modInternalId_keyword" + "transcriptGeneAssociationObject.primaryExternalId", "transcriptGeneAssociationObject.modInternalId", "transcriptGeneAssociationObject.primaryExternalId_keyword", "transcriptGeneAssociationObject.modInternalId_keyword" } ) @OneToMany(mappedBy = "transcriptAssociationSubject", cascade = CascadeType.ALL, orphanRemoval = true) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Variant.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Variant.java index fd9e50323..86d530126 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/Variant.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Variant.java @@ -76,7 +76,7 @@ public class Variant extends GenomicEntity { @IndexedEmbedded( includePaths = { "variantGenomicLocationAssociationObject.curie", "variantGenomicLocationAssociationObject.curie_keyword", - "variantGenomicLocationAssociationObject.modEntityId", "variantGenomicLocationAssociationObject.modEntityId_keyword", + "variantGenomicLocationAssociationObject.primaryExternalId", "variantGenomicLocationAssociationObject.primaryExternalId_keyword", "variantGenomicLocationAssociationObject.modInternalId", "variantGenomicLocationAssociationObject.modInternalId_keyword", "start", "end" } diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/alleleAssociations/AlleleGeneAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/alleleAssociations/AlleleGeneAssociation.java index 57897898c..206c015f0 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/alleleAssociations/AlleleGeneAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/alleleAssociations/AlleleGeneAssociation.java @@ -47,7 +47,7 @@ public class AlleleGeneAssociation extends AlleleGenomicEntityAssociation { @IndexedEmbedded(includePaths = { "curie", "alleleSymbol.displayText", "alleleSymbol.formatText", "alleleFullName.displayText", "alleleFullName.formatText", "curie_keyword", "alleleSymbol.displayText_keyword", "alleleSymbol.formatText_keyword", "alleleFullName.displayText_keyword", - "alleleFullName.formatText_keyword", "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword" }) + "alleleFullName.formatText_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword" }) @ManyToOne @JsonView({ View.FieldsOnly.class }) @JsonIgnoreProperties({"alleleGeneAssociations", "alleleVariantAssociations"}) @@ -56,7 +56,7 @@ public class AlleleGeneAssociation extends AlleleGenomicEntityAssociation { @IndexedEmbedded(includePaths = { "curie", "geneSymbol.displayText", "geneSymbol.formatText", "geneFullName.displayText", "geneFullName.formatText", "curie_keyword", "geneSymbol.displayText_keyword", "geneSymbol.formatText_keyword", - "geneFullName.displayText_keyword", "geneFullName.formatText_keyword", "modEntityId", "modEntityId_keyword", + "geneFullName.displayText_keyword", "geneFullName.formatText_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword" }) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/alleleAssociations/AlleleVariantAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/alleleAssociations/AlleleVariantAssociation.java index 4293c5b57..fb2676715 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/alleleAssociations/AlleleVariantAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/alleleAssociations/AlleleVariantAssociation.java @@ -47,14 +47,14 @@ public class AlleleVariantAssociation extends AlleleGenomicEntityAssociation { @IndexedEmbedded(includePaths = { "curie", "alleleSymbol.displayText", "alleleSymbol.formatText", "alleleFullName.displayText", "alleleFullName.formatText", "curie_keyword", "alleleSymbol.displayText_keyword", "alleleSymbol.formatText_keyword", "alleleFullName.displayText_keyword", - "alleleFullName.formatText_keyword", "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword" }) + "alleleFullName.formatText_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword" }) @ManyToOne @JsonView({ View.FieldsOnly.class }) @JsonIgnoreProperties({"alleleGeneAssociations", "alleleVariantAssociations"}) @Fetch(FetchMode.JOIN) private Allele alleleAssociationSubject; - @IndexedEmbedded(includePaths = { "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", + @IndexedEmbedded(includePaths = { "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword" }) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/codingSequenceAssociations/CodingSequenceGenomicLocationAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/codingSequenceAssociations/CodingSequenceGenomicLocationAssociation.java index 3d3bb1330..9d0690183 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/codingSequenceAssociations/CodingSequenceGenomicLocationAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/codingSequenceAssociations/CodingSequenceGenomicLocationAssociation.java @@ -56,7 +56,7 @@ public class CodingSequenceGenomicLocationAssociation extends LocationAssociation { @IndexedEmbedded(includePaths = { - "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", + "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword", "name", "name_keyword" }) @ManyToOne @@ -66,7 +66,7 @@ public class CodingSequenceGenomicLocationAssociation extends LocationAssociatio private CodingSequence codingSequenceAssociationSubject; @IndexedEmbedded(includePaths = { - "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", + "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword", "name", "name_keyword" }) @ManyToOne diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/constructAssociations/ConstructGenomicEntityAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/constructAssociations/ConstructGenomicEntityAssociation.java index 67b208014..5ee512ab1 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/constructAssociations/ConstructGenomicEntityAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/constructAssociations/ConstructGenomicEntityAssociation.java @@ -40,9 +40,9 @@ public class ConstructGenomicEntityAssociation extends EvidenceAssociation { @IndexedEmbedded(includePaths = { "curie", "constructSymbol.displayText", "constructSymbol.formatText", - "constructFullName.displayText", "constructFullName.formatText", "modEntityId", "modInternalId", + "constructFullName.displayText", "constructFullName.formatText", "primaryExternalId", "modInternalId", "curie_keyword", "constructSymbol.displayText_keyword", "constructSymbol.formatText_keyword", - "constructFullName.displayText_keyword", "constructFullName.formatText_keyword", "modEntityId_keyword", "modInternalId_keyword"}) + "constructFullName.displayText_keyword", "constructFullName.formatText_keyword", "primaryExternalId_keyword", "modInternalId_keyword"}) @ManyToOne @JsonView({View.FieldsOnly.class}) @JsonIgnoreProperties("constructGenomicEntityAssociations") diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/exonAssociations/ExonGenomicLocationAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/exonAssociations/ExonGenomicLocationAssociation.java index 43bf25182..6999dd9b7 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/exonAssociations/ExonGenomicLocationAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/exonAssociations/ExonGenomicLocationAssociation.java @@ -51,7 +51,7 @@ public class ExonGenomicLocationAssociation extends LocationAssociation { @IndexedEmbedded(includePaths = { - "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", + "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword", "name", "name_keyword" }) @ManyToOne @@ -61,7 +61,7 @@ public class ExonGenomicLocationAssociation extends LocationAssociation { private Exon exonAssociationSubject; @IndexedEmbedded(includePaths = { - "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", + "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword", "name", "name_keyword" }) @ManyToOne diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/geneAssociations/GeneGeneAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/geneAssociations/GeneGeneAssociation.java index d627dc7d4..a6bfdc1c4 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/geneAssociations/GeneGeneAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/geneAssociations/GeneGeneAssociation.java @@ -29,7 +29,7 @@ public class GeneGeneAssociation extends EvidenceAssociation { @IndexedEmbedded(includePaths = {"curie", "geneSymbol.displayText", "geneSymbol.formatText", "geneFullName.displayText", "geneFullName.formatText", "curie_keyword", "geneSymbol.displayText_keyword", "geneSymbol.formatText_keyword", "geneFullName.displayText_keyword", "geneFullName.formatText_keyword", - "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword"}) + "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @JsonView({ View.FieldsOnly.class }) @@ -37,7 +37,7 @@ public class GeneGeneAssociation extends EvidenceAssociation { @IndexedEmbedded(includePaths = {"curie", "geneSymbol.displayText", "geneSymbol.formatText", "geneFullName.displayText", "geneFullName.formatText", "curie_keyword", "geneSymbol.displayText_keyword", "geneSymbol.formatText_keyword", "geneFullName.displayText_keyword", "geneFullName.formatText_keyword", - "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword"}) + "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @JsonView({ View.FieldsOnly.class }) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/geneAssociations/GeneGenomicLocationAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/geneAssociations/GeneGenomicLocationAssociation.java index c829b5059..7dc26929c 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/geneAssociations/GeneGenomicLocationAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/geneAssociations/GeneGenomicLocationAssociation.java @@ -52,7 +52,7 @@ public class GeneGenomicLocationAssociation extends LocationAssociation { @IndexedEmbedded(includePaths = {"curie", "geneSymbol.displayText", "geneSymbol.formatText", "geneFullName.displayText", "geneFullName.formatText", "curie_keyword", "geneSymbol.displayText_keyword", "geneSymbol.formatText_keyword", "geneFullName.displayText_keyword", "geneFullName.formatText_keyword", - "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword"}) + "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @JsonIgnoreProperties({ @@ -65,7 +65,7 @@ public class GeneGenomicLocationAssociation extends LocationAssociation { private Gene geneAssociationSubject; @IndexedEmbedded(includePaths = { - "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", + "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword", "name", "name_keyword" }) @ManyToOne diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/sequenceTargetingReagentAssociations/SequenceTargetingReagentGeneAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/sequenceTargetingReagentAssociations/SequenceTargetingReagentGeneAssociation.java index 7f79ce10b..b5bd7a3b9 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/sequenceTargetingReagentAssociations/SequenceTargetingReagentGeneAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/sequenceTargetingReagentAssociations/SequenceTargetingReagentGeneAssociation.java @@ -62,7 +62,7 @@ public class SequenceTargetingReagentGeneAssociation extends EvidenceAssociation @IndexedEmbedded(includePaths = { "curie", "geneSymbol.displayText", "geneSymbol.formatText", "geneFullName.displayText", "geneFullName.formatText", "curie_keyword", "geneSymbol.displayText_keyword", "geneSymbol.formatText_keyword", - "geneFullName.displayText_keyword", "geneFullName.formatText_keyword", "modEntityId", "modEntityId_keyword", + "geneFullName.displayText_keyword", "geneFullName.formatText_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword" }) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptCodingSequenceAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptCodingSequenceAssociation.java index cd24ca3d7..9f8fde448 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptCodingSequenceAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptCodingSequenceAssociation.java @@ -42,8 +42,8 @@ public class TranscriptCodingSequenceAssociation extends EvidenceAssociation { - @IndexedEmbedded(includePaths = {"curie", "name", "modEntityId", "modInternalId", - "curie_keyword", "name_keyword", "modEntityId_keyword", "modInternalId_keyword"}) + @IndexedEmbedded(includePaths = {"curie", "name", "primaryExternalId", "modInternalId", + "curie_keyword", "name_keyword", "primaryExternalId_keyword", "modInternalId_keyword"}) @ManyToOne @JsonIgnoreProperties({ "transcriptCodingSequenceAssociations", @@ -54,8 +54,8 @@ public class TranscriptCodingSequenceAssociation extends EvidenceAssociation { @JsonView({ View.FieldsOnly.class }) private Transcript transcriptAssociationSubject; - @IndexedEmbedded(includePaths = {"curie", "name", "modEntityId", "modInternalId", "uniqueId", - "curie_keyword", "name_keyword", "modEntityId_keyword", "modInternalId_keyword", "uniqueId_keyword"}) + @IndexedEmbedded(includePaths = {"curie", "name", "primaryExternalId", "modInternalId", "uniqueId", + "curie_keyword", "name_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "uniqueId_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @JsonIgnoreProperties({ diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptExonAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptExonAssociation.java index 4ea3370b4..c8da10848 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptExonAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptExonAssociation.java @@ -42,8 +42,8 @@ public class TranscriptExonAssociation extends EvidenceAssociation { - @IndexedEmbedded(includePaths = {"curie", "name", "modEntityId", "modInternalId", - "curie_keyword", "name_keyword", "modEntityId_keyword", "modInternalId_keyword"}) + @IndexedEmbedded(includePaths = {"curie", "name", "primaryExternalId", "modInternalId", + "curie_keyword", "name_keyword", "primaryExternalId_keyword", "modInternalId_keyword"}) @ManyToOne @JsonIgnoreProperties({ "transcriptCodingSequenceAssociations", @@ -54,8 +54,8 @@ public class TranscriptExonAssociation extends EvidenceAssociation { @JsonView({ View.FieldsOnly.class }) private Transcript transcriptAssociationSubject; - @IndexedEmbedded(includePaths = {"curie", "name", "modEntityId", "modInternalId", "uniqueId", - "curie_keyword", "name_keyword", "modEntityId_keyword", "modInternalId_keyword", "uniqueId_keyword"}) + @IndexedEmbedded(includePaths = {"curie", "name", "primaryExternalId", "modInternalId", "uniqueId", + "curie_keyword", "name_keyword", "primaryExternalId_keyword", "modInternalId_keyword", "uniqueId_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @JsonIgnoreProperties({ diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptGeneAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptGeneAssociation.java index 3001b9f9c..545943bfc 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptGeneAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptGeneAssociation.java @@ -42,8 +42,8 @@ public class TranscriptGeneAssociation extends EvidenceAssociation { - @IndexedEmbedded(includePaths = {"curie", "name", "modEntityId", "modInternalId", - "curie_keyword", "name_keyword", "modEntityId_keyword", "modInternalId_keyword"}) + @IndexedEmbedded(includePaths = {"curie", "name", "primaryExternalId", "modInternalId", + "curie_keyword", "name_keyword", "primaryExternalId_keyword", "modInternalId_keyword"}) @ManyToOne @JsonIgnoreProperties({ "transcriptCodingSequenceAssociations", @@ -56,7 +56,7 @@ public class TranscriptGeneAssociation extends EvidenceAssociation { @IndexedEmbedded(includePaths = {"curie", "geneSymbol.displayText", "geneSymbol.formatText", "geneFullName.displayText", "geneFullName.formatText", "curie_keyword", "geneSymbol.displayText_keyword", "geneSymbol.formatText_keyword", "geneFullName.displayText_keyword", "geneFullName.formatText_keyword", - "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword"}) + "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @JsonIgnoreProperties({ diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptGenomicLocationAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptGenomicLocationAssociation.java index 6fc08ca74..8b110e746 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptGenomicLocationAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/transcriptAssociations/TranscriptGenomicLocationAssociation.java @@ -54,7 +54,7 @@ public class TranscriptGenomicLocationAssociation extends LocationAssociation { @IndexedEmbedded(includePaths = { - "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", + "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword", "name", "name_keyword" }) @ManyToOne @@ -69,7 +69,7 @@ public class TranscriptGenomicLocationAssociation extends LocationAssociation { private Transcript transcriptAssociationSubject; @IndexedEmbedded(includePaths = { - "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", + "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword", "name", "name_keyword" }) @ManyToOne diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/variantAssociations/CuratedVariantGenomicLocationAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/variantAssociations/CuratedVariantGenomicLocationAssociation.java index f62005b21..ba011ead1 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/variantAssociations/CuratedVariantGenomicLocationAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/variantAssociations/CuratedVariantGenomicLocationAssociation.java @@ -49,10 +49,10 @@ public class CuratedVariantGenomicLocationAssociation extends VariantGenomicLoca @IndexedEmbedded( includePaths = { - "variantTranscript.name", "variantTranscript.modEntityId", + "variantTranscript.name", "variantTranscript.primaryExternalId", "variantTranscript.modInternalId", "variantTranscript.curie", "vepConsequence.name", "variantTranscript.name_keyword", - "variantTranscript.modEntityId_keyword", "variantTranscript.modInternalId_keyword", + "variantTranscript.primaryExternalId_keyword", "variantTranscript.modInternalId_keyword", "variantTranscript.curie_keyword", "vepConsequence.name_keyword", "variantTranscript.transcriptId", "variantTranscript.transcriptId_keyword" } diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/variantAssociations/VariantGenomicLocationAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/variantAssociations/VariantGenomicLocationAssociation.java index d070e6faf..e9061db92 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/variantAssociations/VariantGenomicLocationAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/variantAssociations/VariantGenomicLocationAssociation.java @@ -37,7 +37,7 @@ public abstract class VariantGenomicLocationAssociation extends VariantLocationAssociation { @IndexedEmbedded(includePaths = { - "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", + "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword", "name", "name_keyword" }) @ManyToOne diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/variantAssociations/VariantLocationAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/variantAssociations/VariantLocationAssociation.java index 602e48636..8c0383a81 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/variantAssociations/VariantLocationAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/variantAssociations/VariantLocationAssociation.java @@ -37,7 +37,7 @@ public abstract class VariantLocationAssociation extends LocationAssociation { @IndexedEmbedded(includePaths = { - "curie", "curie_keyword", "modEntityId", "modEntityId_keyword", + "curie", "curie_keyword", "primaryExternalId", "primaryExternalId_keyword", "modInternalId", "modInternalId_keyword", "name", "name_keyword" }) @ManyToOne diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/base/SubmittedObject.java b/src/main/java/org/alliancegenome/curation_api/model/entities/base/SubmittedObject.java index 1593f965e..dc44d71ae 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/base/SubmittedObject.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/base/SubmittedObject.java @@ -36,9 +36,9 @@ public class SubmittedObject extends CurieObject { @FullTextField(analyzer = "autocompleteAnalyzer", searchAnalyzer = "autocompleteSearchAnalyzer") - @KeywordField(name = "modEntityId_keyword", aggregable = Aggregable.YES, sortable = Sortable.YES, searchable = Searchable.YES, normalizer = "sortNormalizer") + @KeywordField(name = "primaryExternalId_keyword", aggregable = Aggregable.YES, sortable = Sortable.YES, searchable = Searchable.YES, normalizer = "sortNormalizer") @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) - private String modEntityId; + private String primaryExternalId; @FullTextField(analyzer = "autocompleteAnalyzer", searchAnalyzer = "autocompleteSearchAnalyzer") @KeywordField(name = "modInternalId_keyword", aggregable = Aggregable.YES, sortable = Sortable.YES, searchable = Searchable.YES, normalizer = "sortNormalizer") @@ -61,8 +61,8 @@ public String getIdentifier() { if (StringUtils.isNotBlank(curie)) { return curie; } - if (StringUtils.isNotBlank(modEntityId)) { - return modEntityId; + if (StringUtils.isNotBlank(primaryExternalId)) { + return primaryExternalId; } if (StringUtils.isNotBlank(modInternalId)) { return modInternalId; @@ -73,8 +73,8 @@ public String getIdentifier() { @Transient @JsonIgnore public String getSubmittedIdentifier() { - if (StringUtils.isNotBlank(modEntityId)) { - return modEntityId; + if (StringUtils.isNotBlank(primaryExternalId)) { + return primaryExternalId; } if (StringUtils.isNotBlank(modInternalId)) { return modInternalId; diff --git a/src/main/java/org/alliancegenome/curation_api/model/ingest/dto/AnnotationDTO.java b/src/main/java/org/alliancegenome/curation_api/model/ingest/dto/AnnotationDTO.java index 84cbebebd..4fd898326 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/ingest/dto/AnnotationDTO.java +++ b/src/main/java/org/alliancegenome/curation_api/model/ingest/dto/AnnotationDTO.java @@ -19,8 +19,8 @@ public class AnnotationDTO extends AuditedObjectDTO { @JsonView({ View.FieldsOnly.class }) - @JsonProperty("mod_entity_id") - private String modEntityId; + @JsonProperty("primary_external_id") + private String primaryExternalId; @JsonView({ View.FieldsOnly.class }) @JsonProperty("mod_internal_id") diff --git a/src/main/java/org/alliancegenome/curation_api/model/ingest/dto/base/SubmittedObjectDTO.java b/src/main/java/org/alliancegenome/curation_api/model/ingest/dto/base/SubmittedObjectDTO.java index b516f4c74..2a577930a 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/ingest/dto/base/SubmittedObjectDTO.java +++ b/src/main/java/org/alliancegenome/curation_api/model/ingest/dto/base/SubmittedObjectDTO.java @@ -17,8 +17,8 @@ public class SubmittedObjectDTO extends AuditedObjectDTO { @JsonView({ View.FieldsOnly.class }) - @JsonProperty("mod_entity_id") - private String modEntityId; + @JsonProperty("primary_external_id") + private String primaryExternalId; @JsonView({ View.FieldsOnly.class }) @JsonProperty("mod_internal_id") diff --git a/src/main/java/org/alliancegenome/curation_api/services/AssemblyComponentService.java b/src/main/java/org/alliancegenome/curation_api/services/AssemblyComponentService.java index e944e140d..0956adfc0 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/AssemblyComponentService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/AssemblyComponentService.java @@ -80,13 +80,13 @@ private AssemblyComponent findAssemblyComponentOrCreateDB(String name, String as assemblyComponent.setGenomeAssembly(genomeAssembly); assemblyComponent.setTaxon(ncbiTaxonTermService.getByCurie(taxonCurie).getEntity()); assemblyComponent.setDataProvider(dataProviderService.getDefaultDataProvider(dataProvider.sourceOrganization)); - String modEntityId = ChromosomeAccessionEnum.getChromosomeAccession(name, assemblyId); - assemblyComponent.setModEntityId(modEntityId); + String primaryExternalId = ChromosomeAccessionEnum.getChromosomeAccession(name, assemblyId); + assemblyComponent.setPrimaryExternalId(primaryExternalId); return assemblyComponentDAO.persist(assemblyComponent); } public ObjectResponse deleteByIdentifier(String identifierString) { - AssemblyComponent assemblyComponent = findByAlternativeFields(List.of("modEntityId", "modInternalId"), identifierString); + AssemblyComponent assemblyComponent = findByAlternativeFields(List.of("primaryExternalId", "modInternalId"), identifierString); if (assemblyComponent != null) { assemblyComponentDAO.remove(assemblyComponent.getId()); } diff --git a/src/main/java/org/alliancegenome/curation_api/services/CodingSequenceService.java b/src/main/java/org/alliancegenome/curation_api/services/CodingSequenceService.java index 62fcfdcd3..536cf3255 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/CodingSequenceService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/CodingSequenceService.java @@ -44,13 +44,13 @@ public List getIdsByDataProvider(BackendBulkDataProvider dataProvider) { @Override public ObjectResponse getByIdentifier(String identifier) { - CodingSequence object = findByAlternativeFields(List.of("curie", "modEntityId", "modInternalId", "uniqueId"), identifier); + CodingSequence object = findByAlternativeFields(List.of("curie", "primaryExternalId", "modInternalId", "uniqueId"), identifier); ObjectResponse ret = new ObjectResponse(object); return ret; } public ObjectResponse deleteByIdentifier(String identifierString) { - CodingSequence codingSequence = findByAlternativeFields(List.of("curie", "modEntityId", "modInternalId", "uniqueId"), identifierString); + CodingSequence codingSequence = findByAlternativeFields(List.of("curie", "primaryExternalId", "modInternalId", "uniqueId"), identifierString); if (codingSequence != null) { codingSequenceDAO.remove(codingSequence.getId()); } diff --git a/src/main/java/org/alliancegenome/curation_api/services/ExonService.java b/src/main/java/org/alliancegenome/curation_api/services/ExonService.java index 09710dfb4..40d94c4a4 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/ExonService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/ExonService.java @@ -42,13 +42,13 @@ public List getIdsByDataProvider(BackendBulkDataProvider dataProvider) { @Override public ObjectResponse getByIdentifier(String identifier) { - Exon object = findByAlternativeFields(List.of("curie", "modEntityId", "modInternalId", "uniqueId"), identifier); + Exon object = findByAlternativeFields(List.of("curie", "primaryExternalId", "modInternalId", "uniqueId"), identifier); ObjectResponse ret = new ObjectResponse(object); return ret; } public ObjectResponse deleteByIdentifier(String identifierString) { - Exon exon = findByAlternativeFields(List.of("modEntityId", "modInternalId", "uniqueId"), identifierString); + Exon exon = findByAlternativeFields(List.of("primaryExternalId", "modInternalId", "uniqueId"), identifierString); if (exon != null) { exonDAO.remove(exon.getId()); } diff --git a/src/main/java/org/alliancegenome/curation_api/services/GeneService.java b/src/main/java/org/alliancegenome/curation_api/services/GeneService.java index a69c9734a..5476c1bba 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/GeneService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/GeneService.java @@ -218,7 +218,7 @@ public void addExpressionAtlasXref(String identifier, BackendBulkDataProvider da String resourceDescriptorPrefix; switch (dataProvider) { case FB -> { - searchField = "modEntityId"; + searchField = "primaryExternalId"; searchValue = "FB:" + identifier; referencedCurie = searchValue; resourceDescriptorPrefix = "FB"; diff --git a/src/main/java/org/alliancegenome/curation_api/services/GenomeAssemblyService.java b/src/main/java/org/alliancegenome/curation_api/services/GenomeAssemblyService.java index c6ed5b6eb..6047a4967 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/GenomeAssemblyService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/GenomeAssemblyService.java @@ -35,14 +35,14 @@ public GenomeAssembly getOrCreate(String assemblyName, BackendBulkDataProvider d if (StringUtils.isNotBlank(assemblyName)) { Map params = new HashMap<>(); - params.put("modEntityId", assemblyName); + params.put("primaryExternalId", assemblyName); params.put(EntityFieldConstants.DATA_PROVIDER, dataProvider.sourceOrganization); params.put(EntityFieldConstants.TAXON, dataProvider.canonicalTaxonCurie); SearchResponse resp = genomeAssemblyDAO.findByParams(params); if (resp == null || resp.getSingleResult() == null) { GenomeAssembly assembly = new GenomeAssembly(); - assembly.setModEntityId(assemblyName); + assembly.setPrimaryExternalId(assemblyName); assembly.setDataProvider(dataProviderService.getDefaultDataProvider(dataProvider.sourceOrganization)); assembly.setTaxon(ncbiTaxonTermService.getByCurie(dataProvider.canonicalTaxonCurie).getEntity()); @@ -56,7 +56,7 @@ public GenomeAssembly getOrCreate(String assemblyName, BackendBulkDataProvider d } public ObjectResponse deleteByIdentifier(String identifierString) { - GenomeAssembly assembly = findByAlternativeFields(List.of("modEntityId", "modInternalId"), identifierString); + GenomeAssembly assembly = findByAlternativeFields(List.of("primaryExternalId", "modInternalId"), identifierString); if (assembly != null) { genomeAssemblyDAO.remove(assembly.getId()); } diff --git a/src/main/java/org/alliancegenome/curation_api/services/TranscriptService.java b/src/main/java/org/alliancegenome/curation_api/services/TranscriptService.java index 4c8816b8e..000cc6bea 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/TranscriptService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/TranscriptService.java @@ -43,7 +43,7 @@ public List getIdsByDataProvider(BackendBulkDataProvider dataProvider) { } public ObjectResponse deleteByIdentifier(String identifierString) { - Transcript transcript = findByAlternativeFields(List.of("curie", "modEntityId", "modInternalId"), identifierString); + Transcript transcript = findByAlternativeFields(List.of("curie", "primaryExternalId", "modInternalId"), identifierString); if (transcript != null) { transcriptDAO.remove(transcript.getId()); } diff --git a/src/main/java/org/alliancegenome/curation_api/services/base/BaseAnnotationCrudService.java b/src/main/java/org/alliancegenome/curation_api/services/base/BaseAnnotationCrudService.java index a830031dc..6aec53ae3 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/base/BaseAnnotationCrudService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/base/BaseAnnotationCrudService.java @@ -37,7 +37,7 @@ protected List getAllReferencedConditionRelationIds(D dao) { } public ObjectResponse getByIdentifier(String identifier) { - E object = findByAlternativeFields(List.of("curie", "modEntityId", "modInternalId", "uniqueId"), identifier); + E object = findByAlternativeFields(List.of("curie", "primaryExternalId", "modInternalId", "uniqueId"), identifier); ObjectResponse ret = new ObjectResponse(object); return ret; } diff --git a/src/main/java/org/alliancegenome/curation_api/services/base/BaseEntityCrudService.java b/src/main/java/org/alliancegenome/curation_api/services/base/BaseEntityCrudService.java index 1f46bc312..9e75e9cef 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/base/BaseEntityCrudService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/base/BaseEntityCrudService.java @@ -65,7 +65,7 @@ public ObjectResponse getByCurie(String curie) { } public ObjectResponse getByIdentifier(String identifier) { - E object = findByAlternativeFields(List.of("curie", "modEntityId", "modInternalId"), identifier); + E object = findByAlternativeFields(List.of("curie", "primaryExternalId", "modInternalId"), identifier); ObjectResponse ret = new ObjectResponse(object); return ret; } diff --git a/src/main/java/org/alliancegenome/curation_api/services/base/SubmittedObjectCrudService.java b/src/main/java/org/alliancegenome/curation_api/services/base/SubmittedObjectCrudService.java index ca5b601f4..e4d8438bd 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/base/SubmittedObjectCrudService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/base/SubmittedObjectCrudService.java @@ -38,7 +38,7 @@ public E findByIdentifierString(String id) { return findByCurie(id); } - return findByAlternativeFields(List.of("modEntityId", "modInternalId"), id); + return findByAlternativeFields(List.of("primaryExternalId", "modInternalId"), id); } public List findIdsByIdentifierString(String id) { @@ -49,7 +49,7 @@ public List findIdsByIdentifierString(String id) { return ids; } - return findIdsByAlternativeFields(List.of("modEntityId", "modInternalId"), id); + return findIdsByAlternativeFields(List.of("primaryExternalId", "modInternalId"), id); } diff --git a/src/main/java/org/alliancegenome/curation_api/services/helpers/UniqueIdentifierHelper.java b/src/main/java/org/alliancegenome/curation_api/services/helpers/UniqueIdentifierHelper.java index 55d2b4d71..0e00b28c5 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/helpers/UniqueIdentifierHelper.java +++ b/src/main/java/org/alliancegenome/curation_api/services/helpers/UniqueIdentifierHelper.java @@ -14,8 +14,8 @@ private UniqueIdentifierHelper() { } public static String getIdentifyingField(E annotationDTO) { - if (StringUtils.isNotBlank(annotationDTO.getModEntityId())) { - return "modEntityId"; + if (StringUtils.isNotBlank(annotationDTO.getPrimaryExternalId())) { + return "primaryExternalId"; } else if (StringUtils.isNotBlank(annotationDTO.getModInternalId())) { return "modInternalId"; } else { @@ -31,9 +31,9 @@ public static void setObsoleteAndInternal(DiseaseAnnotationDTO dto, AuditedObjec } public static String setAnnotationID(E annotationDTO, F annotation, String uniqueId) { - if (StringUtils.isNotBlank(annotationDTO.getModEntityId())) { - annotation.setModEntityId(annotationDTO.getModEntityId()); - return annotationDTO.getModEntityId(); + if (StringUtils.isNotBlank(annotationDTO.getPrimaryExternalId())) { + annotation.setPrimaryExternalId(annotationDTO.getPrimaryExternalId()); + return annotationDTO.getPrimaryExternalId(); } else if (StringUtils.isNotBlank(annotationDTO.getModInternalId())) { annotation.setModInternalId(annotationDTO.getModInternalId()); return annotationDTO.getModInternalId(); @@ -44,8 +44,8 @@ public static String setAnnotati public static String getIdentifyingField(E submittedObjectDto) { - if (StringUtils.isNotBlank(submittedObjectDto.getModEntityId())) { - return "modEntityId"; + if (StringUtils.isNotBlank(submittedObjectDto.getPrimaryExternalId())) { + return "primaryExternalId"; } else if (StringUtils.isNotBlank(submittedObjectDto.getModInternalId())) { return "modInternalId"; } else { @@ -61,9 +61,9 @@ public static void setObsoleteAndInternal(SubmittedObjectDTO dto, SubmittedObjec } public static String setAnnotationID(E submittedObjectDTO, F submittedObject, String uniqueId) { - if (StringUtils.isNotBlank(submittedObjectDTO.getModEntityId())) { - submittedObject.setModEntityId(submittedObjectDTO.getModEntityId()); - return submittedObjectDTO.getModEntityId(); + if (StringUtils.isNotBlank(submittedObjectDTO.getPrimaryExternalId())) { + submittedObject.setPrimaryExternalId(submittedObjectDTO.getPrimaryExternalId()); + return submittedObjectDTO.getPrimaryExternalId(); } else if (StringUtils.isNotBlank(submittedObjectDTO.getModInternalId())) { submittedObject.setModInternalId(submittedObjectDTO.getModInternalId()); return submittedObjectDTO.getModInternalId(); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/AnnotationValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/AnnotationValidator.java index d05b2bb6b..0fec62daa 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/AnnotationValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/AnnotationValidator.java @@ -194,8 +194,8 @@ public Annotation validateCommonAnnotationFields(Annotation uiEntity, Annotation } dbEntity = validateAuditedObjectFields(uiEntity, dbEntity, newEntity); - String modEntityId = StringUtils.isNotBlank(uiEntity.getModEntityId()) ? uiEntity.getModEntityId() : null; - dbEntity.setModEntityId(modEntityId); + String primaryExternalId = StringUtils.isNotBlank(uiEntity.getPrimaryExternalId()) ? uiEntity.getPrimaryExternalId() : null; + dbEntity.setPrimaryExternalId(primaryExternalId); String modInternalId = StringUtils.isNotBlank(uiEntity.getModInternalId()) ? uiEntity.getModInternalId() : null; dbEntity.setModInternalId(modInternalId); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/DiseaseAnnotationValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/DiseaseAnnotationValidator.java index ff2edd521..5a93cd1c3 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/DiseaseAnnotationValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/DiseaseAnnotationValidator.java @@ -135,7 +135,7 @@ public List validateWith(DiseaseAnnotation uiEntity, DiseaseAnnotation dbE if (wg.getId() != null) { withGene = geneDAO.find(wg.getId()); } - if (withGene == null || withGene.getModEntityId() == null || !withGene.getModEntityId().startsWith("HGNC:")) { + if (withGene == null || withGene.getPrimaryExternalId() == null || !withGene.getPrimaryExternalId().startsWith("HGNC:")) { addMessageResponse("with", ValidationConstants.INVALID_MESSAGE); return null; } else if (withGene.getObsolete() && !previousIds.contains(withGene.getId())) { diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/PersonValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/PersonValidator.java index 4a13590e4..d521c15d1 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/PersonValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/PersonValidator.java @@ -41,7 +41,7 @@ public Person validatePerson(Person uiEntity) { dbEntity.setMiddleName(handleStringField(uiEntity.getMiddleName())); dbEntity.setLastName(handleStringField(uiEntity.getLastName())); dbEntity.setOrcid(handleStringField(uiEntity.getOrcid())); - dbEntity.setModEntityId(handleStringField(uiEntity.getModEntityId())); + dbEntity.setPrimaryExternalId(handleStringField(uiEntity.getPrimaryExternalId())); if (CollectionUtils.isNotEmpty(uiEntity.getEmails())) { dbEntity.setEmails(uiEntity.getEmails()); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/ReagentValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/ReagentValidator.java index 3c8d327af..97511bdaa 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/ReagentValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/ReagentValidator.java @@ -28,8 +28,8 @@ public Reagent validateCommonReagentFields(Reagent uiEntity, Reagent dbEntity) { } dbEntity = (Reagent) validateAuditedObjectFields(uiEntity, dbEntity, newEntity); - String modEntityId = StringUtils.isNotBlank(uiEntity.getModEntityId()) ? uiEntity.getModEntityId() : null; - dbEntity.setModEntityId(modEntityId); + String primaryExternalId = StringUtils.isNotBlank(uiEntity.getPrimaryExternalId()) ? uiEntity.getPrimaryExternalId() : null; + dbEntity.setPrimaryExternalId(primaryExternalId); String modInternalId = validateModInternalId(uiEntity); dbEntity.setModInternalId(modInternalId); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/associations/SequenceTargetingReagentGeneAssociationFmsDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/associations/SequenceTargetingReagentGeneAssociationFmsDTOValidator.java index ca24216f8..d300a170a 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/associations/SequenceTargetingReagentGeneAssociationFmsDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/associations/SequenceTargetingReagentGeneAssociationFmsDTOValidator.java @@ -34,11 +34,11 @@ public List validateSQTRGeneAssociation ObjectResponse sqtrResponse = new ObjectResponse<>(); SequenceTargetingReagent sqtr; - SearchResponse sqtrSearchResponse = sqtrDAO.findByField("modEntityId", + SearchResponse sqtrSearchResponse = sqtrDAO.findByField("primaryExternalId", dto.getPrimaryId()); if (sqtrSearchResponse == null || sqtrSearchResponse.getSingleResult() == null) { - sqtrResponse.addErrorMessage("modEntityId", + sqtrResponse.addErrorMessage("primaryExternalId", ValidationConstants.INVALID_MESSAGE + " (" + dto.getPrimaryId() + ")"); sqtr = new SequenceTargetingReagent(); } else { diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/base/SubmittedObjectValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/base/SubmittedObjectValidator.java index 821e4e67c..8a36c77bd 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/base/SubmittedObjectValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/base/SubmittedObjectValidator.java @@ -19,8 +19,8 @@ public E validateSubmittedObjectFields(E uiEntity, E dbEntity) { String curie = handleStringField(uiEntity.getCurie()); dbEntity.setCurie(curie); - String modEntityId = handleStringField(uiEntity.getModEntityId()); - dbEntity.setModEntityId(modEntityId); + String primaryExternalId = handleStringField(uiEntity.getPrimaryExternalId()); + dbEntity.setPrimaryExternalId(primaryExternalId); String modInternalId = validateModInternalId(uiEntity); dbEntity.setModInternalId(modInternalId); @@ -43,8 +43,8 @@ public String validateCurie(E uiEntity) { public String validateModInternalId(E uiEntity) { String modInternalId = uiEntity.getModInternalId(); if (StringUtils.isBlank(modInternalId)) { - if (StringUtils.isBlank(uiEntity.getModEntityId())) { - addMessageResponse("modInternalId", ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId"); + if (StringUtils.isBlank(uiEntity.getPrimaryExternalId())) { + addMessageResponse("modInternalId", ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId"); } return null; } diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AffectedGenomicModelDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AffectedGenomicModelDTOValidator.java index 7b83e9ef9..55a177667 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AffectedGenomicModelDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AffectedGenomicModelDTOValidator.java @@ -37,20 +37,20 @@ public class AffectedGenomicModelDTOValidator extends BaseDTOValidator { public AffectedGenomicModel validateAffectedGenomicModelDTO(AffectedGenomicModelDTO dto, BackendBulkDataProvider dataProvider) throws ValidationException { AffectedGenomicModel agm = null; - if (StringUtils.isNotBlank(dto.getModEntityId())) { - SearchResponse response = affectedGenomicModelDAO.findByField("modEntityId", dto.getModEntityId()); + if (StringUtils.isNotBlank(dto.getPrimaryExternalId())) { + SearchResponse response = affectedGenomicModelDAO.findByField("primaryExternalId", dto.getPrimaryExternalId()); if (response != null && response.getSingleResult() != null) { agm = response.getSingleResult(); } } else { - agmResponse.addErrorMessage("modEntityId", ValidationConstants.REQUIRED_MESSAGE); + agmResponse.addErrorMessage("primaryExternalId", ValidationConstants.REQUIRED_MESSAGE); } if (agm == null) { agm = new AffectedGenomicModel(); } - agm.setModEntityId(dto.getModEntityId()); + agm.setPrimaryExternalId(dto.getPrimaryExternalId()); agm.setModInternalId(handleStringField(dto.getModInternalId())); agm.setName(handleStringField(dto.getName())); if (CollectionUtils.isNotEmpty(dto.getSynonyms())) { diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AlleleDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AlleleDTOValidator.java index 2660db0cd..e61403661 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AlleleDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AlleleDTOValidator.java @@ -85,20 +85,20 @@ public Allele validateAlleleDTO(AlleleDTO dto, BackendBulkDataProvider dataProvi alleleResponse = new ObjectResponse<>(); Allele allele = null; - if (StringUtils.isNotBlank(dto.getModEntityId())) { - SearchResponse response = alleleDAO.findByField("modEntityId", dto.getModEntityId()); + if (StringUtils.isNotBlank(dto.getPrimaryExternalId())) { + SearchResponse response = alleleDAO.findByField("primaryExternalId", dto.getPrimaryExternalId()); if (response != null && response.getSingleResult() != null) { allele = response.getSingleResult(); } } else { - alleleResponse.addErrorMessage("modEntityId", ValidationConstants.REQUIRED_MESSAGE); + alleleResponse.addErrorMessage("primaryExternalId", ValidationConstants.REQUIRED_MESSAGE); } if (allele == null) { allele = new Allele(); } - allele.setModEntityId(dto.getModEntityId()); + allele.setPrimaryExternalId(dto.getPrimaryExternalId()); allele.setModInternalId(handleStringField(dto.getModInternalId())); ObjectResponse geResponse = validateGenomicEntityDTO(allele, dto, dataProvider); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AnnotationDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AnnotationDTOValidator.java index 5044fed15..c55e44572 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AnnotationDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AnnotationDTOValidator.java @@ -39,7 +39,7 @@ public ObjectResponse validat ObjectResponse annotResponse = validateAuditedObjectDTO(annotation, dto); annotation = annotResponse.getEntity(); - annotation.setModEntityId(handleStringField(dto.getModEntityId())); + annotation.setPrimaryExternalId(handleStringField(dto.getPrimaryExternalId())); annotation.setModInternalId(handleStringField(dto.getModInternalId())); if (dto.getDataProviderDto() == null) { diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/GeneDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/GeneDTOValidator.java index 15c9f9848..3ff72a376 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/GeneDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/GeneDTOValidator.java @@ -63,20 +63,20 @@ public Gene validateGeneDTO(GeneDTO dto, BackendBulkDataProvider dataProvider) t geneResponse = new ObjectResponse(); Gene gene = null; - if (StringUtils.isNotBlank(dto.getModEntityId())) { - SearchResponse response = geneDAO.findByField("modEntityId", dto.getModEntityId()); + if (StringUtils.isNotBlank(dto.getPrimaryExternalId())) { + SearchResponse response = geneDAO.findByField("primaryExternalId", dto.getPrimaryExternalId()); if (response != null && response.getSingleResult() != null) { gene = response.getSingleResult(); } } else { - geneResponse.addErrorMessage("modEntityId", ValidationConstants.REQUIRED_MESSAGE); + geneResponse.addErrorMessage("primaryExternalId", ValidationConstants.REQUIRED_MESSAGE); } if (gene == null) { gene = new Gene(); } - gene.setModEntityId(dto.getModEntityId()); + gene.setPrimaryExternalId(dto.getPrimaryExternalId()); gene.setModInternalId(handleStringField(dto.getModInternalId())); List relatedNotes = validateRelatedNotes(gene, dto); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/ReagentDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/ReagentDTOValidator.java index 9a96ec225..91a9bc1ac 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/ReagentDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/ReagentDTOValidator.java @@ -20,7 +20,7 @@ public ObjectResponse validateReage ObjectResponse reagentResponse = validateAuditedObjectDTO(reagent, dto); reagent = reagentResponse.getEntity(); - reagent.setModEntityId(handleStringField(dto.getModEntityId())); + reagent.setPrimaryExternalId(handleStringField(dto.getPrimaryExternalId())); reagent.setModInternalId(handleStringField(dto.getModInternalId())); reagent.setSecondaryIdentifiers(handleStringListField(dto.getSecondaryIdentifiers())); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/VariantDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/VariantDTOValidator.java index 134bbc2ea..cf1cd92b5 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/VariantDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/VariantDTOValidator.java @@ -45,16 +45,16 @@ public Variant validateVariantDTO(VariantDTO dto, BackendBulkDataProvider dataPr variantResponse = new ObjectResponse(); Variant variant = null; - if (StringUtils.isNotBlank(dto.getModEntityId())) { - SearchResponse response = variantDAO.findByField("modEntityId", dto.getModEntityId()); + if (StringUtils.isNotBlank(dto.getPrimaryExternalId())) { + SearchResponse response = variantDAO.findByField("primaryExternalId", dto.getPrimaryExternalId()); if (response != null && response.getSingleResult() != null) { variant = response.getSingleResult(); } } if (variant == null) { if (StringUtils.isBlank(dto.getModInternalId())) { - if (StringUtils.isBlank(dto.getModEntityId())) { - variantResponse.addErrorMessage("modInternalId", ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId"); + if (StringUtils.isBlank(dto.getPrimaryExternalId())) { + variantResponse.addErrorMessage("modInternalId", ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId"); } } else { SearchResponse response = variantDAO.findByField("modInternalId", dto.getModInternalId()); @@ -68,7 +68,7 @@ public Variant validateVariantDTO(VariantDTO dto, BackendBulkDataProvider dataPr variant = new Variant(); } - variant.setModEntityId(dto.getModEntityId()); + variant.setPrimaryExternalId(dto.getPrimaryExternalId()); variant.setModInternalId(dto.getModInternalId()); ObjectResponse geResponse = validateGenomicEntityDTO(variant, dto, dataProvider); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/AGMPhenotypeAnnotationFmsDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/AGMPhenotypeAnnotationFmsDTOValidator.java index 312d52865..ff2a3d4ac 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/AGMPhenotypeAnnotationFmsDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/AGMPhenotypeAnnotationFmsDTOValidator.java @@ -84,7 +84,7 @@ public List validateInferredOrAssertedEntities(AffectedG Reference reference = refResponse.getEntity(); String refString = reference == null ? null : reference.getCurie(); - List primaryAnnotations = findPrimaryAnnotations(agmPhenotypeAnnotationDAO, dto, primaryAnnotationSubject.getModEntityId(), refString); + List primaryAnnotations = findPrimaryAnnotations(agmPhenotypeAnnotationDAO, dto, primaryAnnotationSubject.getPrimaryExternalId(), refString); if (CollectionUtils.isEmpty(primaryAnnotations)) { PhenotypeFmsDTO inferredPrimaryDTO = createPrimaryAnnotationDTO(dto, primaryAnnotationSubject.getIdentifier()); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/AllelePhenotypeAnnotationFmsDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/AllelePhenotypeAnnotationFmsDTOValidator.java index fbde84ce8..26e14db3c 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/AllelePhenotypeAnnotationFmsDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/AllelePhenotypeAnnotationFmsDTOValidator.java @@ -81,7 +81,7 @@ public List validateInferredOrAssertedEntities(Allele Reference reference = refResponse.getEntity(); String refString = reference == null ? null : reference.getCurie(); - List primaryAnnotations = findPrimaryAnnotations(allelePhenotypeAnnotationDAO, dto, primaryAnnotationSubject.getModEntityId(), refString); + List primaryAnnotations = findPrimaryAnnotations(allelePhenotypeAnnotationDAO, dto, primaryAnnotationSubject.getPrimaryExternalId(), refString); if (CollectionUtils.isEmpty(primaryAnnotations)) { diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/PhenotypeAnnotationFmsDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/PhenotypeAnnotationFmsDTOValidator.java index ee59dceb0..511c87a2d 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/PhenotypeAnnotationFmsDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/PhenotypeAnnotationFmsDTOValidator.java @@ -168,9 +168,9 @@ private CrossReference createXrefFromPublicationId(String curie) { return xref; } - protected , E extends PhenotypeAnnotation> List findPrimaryAnnotations(D dao, PhenotypeFmsDTO dto, String primaryAnnotationSubjectModEntityId, String refString) { + protected , E extends PhenotypeAnnotation> List findPrimaryAnnotations(D dao, PhenotypeFmsDTO dto, String primaryAnnotationSubjectprimaryExternalId, String refString) { HashMap params = new HashMap<>(); - params.put("phenotypeAnnotationSubject.modEntityId", primaryAnnotationSubjectModEntityId); + params.put("phenotypeAnnotationSubject.primaryExternalId", primaryAnnotationSubjectprimaryExternalId); if (StringUtils.isNotBlank(dto.getPhenotypeStatement())) { params.put("phenotypeAnnotationObject", dto.getPhenotypeStatement()); } else { diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/SequenceTargetingReagentFmsDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/SequenceTargetingReagentFmsDTOValidator.java index f97d98efc..b964fc2d9 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/SequenceTargetingReagentFmsDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/SequenceTargetingReagentFmsDTOValidator.java @@ -45,10 +45,10 @@ public SequenceTargetingReagent validateSQTRFmsDTO(SequenceTargetingReagentFmsDT sqtrResponse.addErrorMessage("primaryId", ValidationConstants.REQUIRED_MESSAGE); sqtr = new SequenceTargetingReagent(); } else { - SearchResponse searchResponse = sqtrDAO.findByField("modEntityId", dto.getPrimaryId()); + SearchResponse searchResponse = sqtrDAO.findByField("primaryExternalId", dto.getPrimaryId()); if (searchResponse == null || searchResponse.getSingleResult() == null) { sqtr = new SequenceTargetingReagent(); - sqtr.setModEntityId(dto.getPrimaryId()); + sqtr.setPrimaryExternalId(dto.getPrimaryId()); } else { sqtr = searchResponse.getSingleResult(); } diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/VariantFmsDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/VariantFmsDTOValidator.java index d8594b880..5a0c4f8a5 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/VariantFmsDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/VariantFmsDTOValidator.java @@ -223,7 +223,7 @@ public void validateCuratedVariantGenomicLocationAssociation(VariantFmsDTO dto, if (cae != null) { Map params = new HashMap<>(); params.put("name", cae.chromosomeName); - params.put("genomeAssembly.modEntityId", cae.assemblyIdentifier); + params.put("genomeAssembly.primaryExternalId", cae.assemblyIdentifier); SearchResponse acResponse = assemblyComponentDAO.findByParams(params); if (acResponse != null) { chromosome = acResponse.getSingleResult(); @@ -307,7 +307,7 @@ public void validateAlleleVariantAssociation(VariantFmsDTO dto, List idsAd } else { if (CollectionUtils.isNotEmpty(allele.getAlleleVariantAssociations())) { for (AlleleVariantAssociation existingAssociation : allele.getAlleleVariantAssociations()) { - if (Objects.equals(dto.getAlleleId(), existingAssociation.getAlleleAssociationSubject().getModEntityId())) { + if (Objects.equals(dto.getAlleleId(), existingAssociation.getAlleleAssociationSubject().getPrimaryExternalId())) { association = alleleVariantAssociationDAO.find(existingAssociation.getId()); break; } diff --git a/src/main/resources/db/migration/v0.38.0.21__linkml_v2_9_1_update.sql b/src/main/resources/db/migration/v0.38.0.21__linkml_v2_9_1_update.sql new file mode 100644 index 000000000..9e30ab079 --- /dev/null +++ b/src/main/resources/db/migration/v0.38.0.21__linkml_v2_9_1_update.sql @@ -0,0 +1,23 @@ +ALTER TABLE biologicalentity RENAME COLUMN modentityid TO primaryexternalid; +ALTER TABLE diseaseannotation RENAME COLUMN modentityid TO primaryexternalid; +ALTER TABLE geneexpressionannotation RENAME COLUMN modentityid TO primaryexternalid; +ALTER TABLE geneexpressionexperiment RENAME COLUMN modentityid TO primaryexternalid; +ALTER TABLE phenotypeannotation RENAME COLUMN modentityid TO primaryexternalid; +ALTER TABLE person RENAME COLUMN modentityid TO primaryexternalid; +ALTER TABLE reagent RENAME COLUMN modentityid TO primaryexternalid; + +ALTER INDEX biologicalentity_modentityid_index RENAME TO biologicalentity_primaryexternalid_index; +ALTER INDEX diseaseannotation_modentityid_index RENAME TO diseaseannotation_primaryexternalid_index; +ALTER INDEX geneexpressionannotation_modentityid_index RENAME TO geneexpressionannotation_primaryexternalid_index; +ALTER INDEX geneexpressionexperiment_modentityid_index RENAME TO geneexpressionexperiment_primaryexternalid_index; +ALTER INDEX phenotypeannotation_modentityid_index RENAME TO phenotypeannotation_primaryexternalid_index; +ALTER INDEX reagent_modentityid_index RENAME TO reagent_primaryexternalid_index; + +ALTER TABLE biologicalentity RENAME CONSTRAINT biologicalentity_modentityid_uk TO biologicalentity_primaryexternalid_uk; +ALTER TABLE person RENAME CONSTRAINT uk_9omqedixfrwkqq9bdts63g65u TO person_primaryexternalid_uk; +ALTER TABLE reagent RENAME CONSTRAINT reagent_modentityid_uk TO reagent_primaryexternalid_uk; + +ALTER TABLE diseaseannotation ADD CONSTRAINT diseaseannotation_primaryexternalid_uk UNIQUE (primaryexternalid); +ALTER TABLE geneexpressionannotation ADD CONSTRAINT geneexpressionannotation_primaryexternalid_uk UNIQUE (primaryexternalid); +ALTER TABLE geneexpressionexperiment ADD CONSTRAINT geneexpressionexperiment_primaryexternalid_uk UNIQUE (primaryexternalid); +ALTER TABLE phenotypeannotation ADD CONSTRAINT phenotypeannotation_primaryexternalid_uk UNIQUE (primaryexternalid); \ No newline at end of file diff --git a/src/test/java/org/alliancegenome/curation_api/AffectedGenomicModelITCase.java b/src/test/java/org/alliancegenome/curation_api/AffectedGenomicModelITCase.java index c87b86bb9..d101006cb 100644 --- a/src/test/java/org/alliancegenome/curation_api/AffectedGenomicModelITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/AffectedGenomicModelITCase.java @@ -78,7 +78,7 @@ public void createValidAGM() { loadRequiredEntities(); AffectedGenomicModel agm = new AffectedGenomicModel(); - agm.setModEntityId(AGM); + agm.setPrimaryExternalId(AGM); agm.setTaxon(taxon); agm.setName("Test AGM"); agm.setDateCreated(datetime); @@ -100,7 +100,7 @@ public void createValidAGM() { get("/api/agm/" + AGM). then(). statusCode(200). - body("entity.modEntityId", is(AGM)). + body("entity.primaryExternalId", is(AGM)). body("entity.name", is("Test AGM")). body("entity.subtype.name", is(subtype.getName())). body("entity.taxon.curie", is(taxon.getCurie())). @@ -139,7 +139,7 @@ public void editAGM() { get("/api/agm/" + AGM). then(). statusCode(200). - body("entity.modEntityId", is(AGM)). + body("entity.primaryExternalId", is(AGM)). body("entity.name", is("AGM edited")). body("entity.subtype.name", is(subtype2.getName())). body("entity.taxon.curie", is(taxon2.getCurie())). @@ -164,7 +164,7 @@ public void createAGMWithMissingRequiredFields() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(3))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")). + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")). body("errorMessages.taxon", is(ValidationConstants.REQUIRED_MESSAGE)). body("errorMessages.subtype", is(ValidationConstants.REQUIRED_MESSAGE)); } @@ -173,7 +173,7 @@ public void createAGMWithMissingRequiredFields() { @Order(4) public void editAGMWithMissingModEntityId() { AffectedGenomicModel agm = getAffectedGenomicModel(AGM); - agm.setModEntityId(null); + agm.setPrimaryExternalId(null); RestAssured.given(). contentType("application/json"). @@ -183,7 +183,7 @@ public void editAGMWithMissingModEntityId() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(1))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")); + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")); } @Test @@ -211,7 +211,7 @@ public void editAGMWithMissingRequiredFields() { @Order(6) public void createAGMWithEmptyRequiredFields() { AffectedGenomicModel agm = new AffectedGenomicModel(); - agm.setModEntityId(""); + agm.setPrimaryExternalId(""); agm.setTaxon(taxon); agm.setSubtype(subtype); @@ -223,14 +223,14 @@ public void createAGMWithEmptyRequiredFields() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(1))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")); + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")); } @Test @Order(7) public void editAGMWithEmptyModEntityId() { AffectedGenomicModel agm = getAffectedGenomicModel(AGM); - agm.setModEntityId(""); + agm.setPrimaryExternalId(""); RestAssured.given(). contentType("application/json"). @@ -240,7 +240,7 @@ public void editAGMWithEmptyModEntityId() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(1))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")); + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")); } @Test @@ -254,7 +254,7 @@ public void createAGMWithInvalidFields() { invalidDataProvider.setSourceOrganization(nonPersistedOrganization); AffectedGenomicModel agm = new AffectedGenomicModel(); - agm.setModEntityId("AGM:0008"); + agm.setPrimaryExternalId("AGM:0008"); agm.setTaxon(nonPersistedTaxon); agm.setSubtype(nonPersistedTerm); agm.setDataProvider(invalidDataProvider); @@ -304,7 +304,7 @@ public void editAGMWithInvalidFields() { @Order(10) public void createAGMWithObsoleteFields() { AffectedGenomicModel agm = new AffectedGenomicModel(); - agm.setModEntityId("AGM:0010"); + agm.setPrimaryExternalId("AGM:0010"); agm.setTaxon(obsoleteTaxon); agm.setSubtype(obsoleteSubtype); agm.setDataProvider(obsoleteDataProvider); @@ -370,7 +370,7 @@ public void editAGMWithNullNonRequiredFields() { @Order(13) public void createAGMWithOnlyRequiredFields() { AffectedGenomicModel agm = new AffectedGenomicModel(); - agm.setModEntityId("AGM:0015"); + agm.setPrimaryExternalId("AGM:0015"); agm.setTaxon(taxon); agm.setSubtype(subtype); diff --git a/src/test/java/org/alliancegenome/curation_api/AgmBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/AgmBulkUploadITCase.java index 394501550..9004e2655 100644 --- a/src/test/java/org/alliancegenome/curation_api/AgmBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/AgmBulkUploadITCase.java @@ -59,7 +59,7 @@ public void agmBulkUploadCheckFields() throws Exception { get(agmGetEndpoint + "AGMTEST:Agm0001"). then(). statusCode(200). - body("entity.modEntityId", is("AGMTEST:Agm0001")). + body("entity.primaryExternalId", is("AGMTEST:Agm0001")). body("entity.name", is("TestAgm1")). body("entity.taxon.curie", is("NCBITaxon:6239")). body("entity.subtype.name", is("fish")). @@ -86,7 +86,7 @@ public void agmBulkUploadUpdateCheckFields() throws Exception { get(agmGetEndpoint + "AGMTEST:Agm0001"). then(). statusCode(200). - body("entity.modEntityId", is("AGMTEST:Agm0001")). + body("entity.primaryExternalId", is("AGMTEST:Agm0001")). body("entity.name", is("TestAgm1a")). body("entity.taxon.curie", is("NCBITaxon:10116")). body("entity.subtype.name", is("genotype")). @@ -153,7 +153,7 @@ public void agmBulkUploadUpdateMissingNonRequiredFields() throws Exception { get(agmGetEndpoint + "AGMTEST:Agm0001"). then(). statusCode(200). - body("entity.modEntityId", is("AGMTEST:Agm0001")). + body("entity.primaryExternalId", is("AGMTEST:Agm0001")). body("entity", not(hasKey("name"))). body("entity", not(hasKey("createdBy"))). body("entity", not(hasKey("updatedBy"))). @@ -173,7 +173,7 @@ public void agmBulkUploadUpdateEmptyNonRequiredFields() throws Exception { get(agmGetEndpoint + "AGMTEST:Agm0001"). then(). statusCode(200). - body("entity.modEntityId", is("AGMTEST:Agm0001")). + body("entity.primaryExternalId", is("AGMTEST:Agm0001")). body("entity", not(hasKey("name"))). body("entity", not(hasKey("createdBy"))). body("entity", not(hasKey("updatedBy"))). diff --git a/src/test/java/org/alliancegenome/curation_api/AlleleBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/AlleleBulkUploadITCase.java index 5b8f69c76..217e6a45b 100644 --- a/src/test/java/org/alliancegenome/curation_api/AlleleBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/AlleleBulkUploadITCase.java @@ -74,7 +74,7 @@ public void alleleBulkUploadCheckFields() throws Exception { get(alleleGetEndpoint + "ALLELETEST:Allele0001"). then(). statusCode(200). - body("entity.modEntityId", is("ALLELETEST:Allele0001")). + body("entity.primaryExternalId", is("ALLELETEST:Allele0001")). body("entity.taxon.curie", is("NCBITaxon:6239")). body("entity.internal", is(true)). body("entity.obsolete", is(true)). @@ -210,7 +210,7 @@ public void alleleBulkUploadUpdateCheckFields() throws Exception { get(alleleGetEndpoint + "ALLELETEST:Allele0001"). then(). statusCode(200). - body("entity.modEntityId", is("ALLELETEST:Allele0001")). + body("entity.primaryExternalId", is("ALLELETEST:Allele0001")). body("entity.taxon.curie", is("NCBITaxon:10116")). body("entity.internal", is(false)). body("entity.obsolete", is(false)). @@ -450,7 +450,7 @@ public void alleleBulkUploadUpdateMissingNonRequiredFields() throws Exception { get(alleleGetEndpoint + "ALLELETEST:Allele0001"). then(). statusCode(200). - body("entity.modEntityId", is("ALLELETEST:Allele0001")). + body("entity.primaryExternalId", is("ALLELETEST:Allele0001")). body("entity", not(hasKey("createdBy"))). body("entity", not(hasKey("updatedBy"))). body("entity", not(hasKey("dateCreated"))). @@ -479,7 +479,7 @@ public void alleleBulkUploadUpdateMissingNonRequiredFieldsLevel2() throws Except when(). get(alleleGetEndpoint + "ALLELETEST:Allele0001").then(). statusCode(200). - body("entity.modEntityId", is("ALLELETEST:Allele0001")). + body("entity.primaryExternalId", is("ALLELETEST:Allele0001")). body("entity.relatedNotes[0]", not(hasKey("evidence"))). body("entity.relatedNotes[0]", not(hasKey("createdBy"))). body("entity.relatedNotes[0]", not(hasKey("updatedBy"))). @@ -557,7 +557,7 @@ public void alleleBulkUploadUpdateEmptyNonRequiredFieldsLevel() throws Exception when(). get(alleleGetEndpoint + "ALLELETEST:Allele0001").then(). statusCode(200). - body("entity.modEntityId", is("ALLELETEST:Allele0001")). + body("entity.primaryExternalId", is("ALLELETEST:Allele0001")). body("entity", not(hasKey("createdBy"))). body("entity", not(hasKey("updatedBy"))). body("entity", not(hasKey("dateCreated"))). @@ -661,7 +661,7 @@ public void alleleBulkUploadDuplicateNotes() throws Exception { get(alleleGetEndpoint + "ALLELETEST:DN01"). then(). statusCode(200). - body("entity.modEntityId", is("ALLELETEST:DN01")). + body("entity.primaryExternalId", is("ALLELETEST:DN01")). body("entity.relatedNotes", hasSize(1)); } diff --git a/src/test/java/org/alliancegenome/curation_api/AlleleGeneAssociationBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/AlleleGeneAssociationBulkUploadITCase.java index f1047cbdf..dca60cd2e 100644 --- a/src/test/java/org/alliancegenome/curation_api/AlleleGeneAssociationBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/AlleleGeneAssociationBulkUploadITCase.java @@ -82,8 +82,8 @@ public void alleleGeneAssociationBulkUploadCheckFields() throws Exception { then(). statusCode(200). body("entity.relation.name", is(relationName)). - body("entity.alleleGeneAssociationObject.modEntityId", is(geneCurie)). - body("entity.alleleAssociationSubject.modEntityId", is(alleleCurie)). + body("entity.alleleGeneAssociationObject.primaryExternalId", is(geneCurie)). + body("entity.alleleAssociationSubject.primaryExternalId", is(alleleCurie)). body("entity.evidence", hasSize(1)). body("entity.evidence[0].curie", is(reference)). body("entity.evidenceCode.curie", is(evidenceCodeCurie)). @@ -110,7 +110,7 @@ public void alleleGeneAssociationBulkUploadCheckFields() throws Exception { statusCode(200). body("entity.alleleGeneAssociations", hasSize(1)). body("entity.alleleGeneAssociations[0].relation.name", is(relationName)). - body("entity.alleleGeneAssociations[0].alleleGeneAssociationObject.modEntityId", is(geneCurie)). + body("entity.alleleGeneAssociations[0].alleleGeneAssociationObject.primaryExternalId", is(geneCurie)). body("entity.alleleGeneAssociations[0].alleleAssociationSubject", not(hasKey("alleleGeneAssociations"))); RestAssured.given(). @@ -120,7 +120,7 @@ public void alleleGeneAssociationBulkUploadCheckFields() throws Exception { statusCode(200). body("entity.alleleGeneAssociations", hasSize(1)). body("entity.alleleGeneAssociations[0].relation.name", is(relationName)). - body("entity.alleleGeneAssociations[0].alleleGeneAssociationObject.modEntityId", is(geneCurie)). + body("entity.alleleGeneAssociations[0].alleleGeneAssociationObject.primaryExternalId", is(geneCurie)). body("entity.alleleGeneAssociations[0].alleleGeneAssociationObject", not(hasKey("alleleGeneAssociations"))); } @@ -137,7 +137,7 @@ public void alleleGeneAssociationBulkUploadUpdateCheckFields() throws Exception then(). statusCode(200). body("entity.relation.name", is(relationName)). - body("entity.alleleGeneAssociationObject.modEntityId", is(geneCurie)). + body("entity.alleleGeneAssociationObject.primaryExternalId", is(geneCurie)). body("entity.evidence", hasSize(1)). body("entity.evidence[0].curie", is(reference2)). body("entity.evidenceCode.curie", is(evidenceCodeCurie2)). diff --git a/src/test/java/org/alliancegenome/curation_api/AlleleGeneAssociationITCase.java b/src/test/java/org/alliancegenome/curation_api/AlleleGeneAssociationITCase.java index 8ab1144aa..eb102d754 100644 --- a/src/test/java/org/alliancegenome/curation_api/AlleleGeneAssociationITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/AlleleGeneAssociationITCase.java @@ -120,8 +120,8 @@ public void createValidAlleleGeneAssociation() { then(). statusCode(200). body("entity.relation.name", is(relation.getName())). - body("entity.alleleGeneAssociationObject.modEntityId", is(gene.getModEntityId())). - body("entity.alleleAssociationSubject.modEntityId", is(allele.getModEntityId())). + body("entity.alleleGeneAssociationObject.primaryExternalId", is(gene.getPrimaryExternalId())). + body("entity.alleleAssociationSubject.primaryExternalId", is(allele.getPrimaryExternalId())). body("entity.evidence", hasSize(1)). body("entity.evidence[0].curie", is(reference.getCurie())). body("entity.evidenceCode.curie", is(ecoTerm.getCurie())). @@ -139,22 +139,22 @@ public void createValidAlleleGeneAssociation() { RestAssured.given(). when(). - get(alleleGetEndpoint + allele.getModEntityId()). + get(alleleGetEndpoint + allele.getPrimaryExternalId()). then(). statusCode(200). body("entity.alleleGeneAssociations", hasSize(1)). body("entity.alleleGeneAssociations[0].relation.name", is(relation.getName())). - body("entity.alleleGeneAssociations[0].alleleGeneAssociationObject.modEntityId", is(gene.getModEntityId())). + body("entity.alleleGeneAssociations[0].alleleGeneAssociationObject.primaryExternalId", is(gene.getPrimaryExternalId())). body("entity.alleleGeneAssociations[0].alleleAssociationSubject", not(hasKey("alleleGeneAssociations"))); RestAssured.given(). when(). - get(geneGetEndpoint + gene.getModEntityId()). + get(geneGetEndpoint + gene.getPrimaryExternalId()). then(). statusCode(200). body("entity.alleleGeneAssociations", hasSize(1)). body("entity.alleleGeneAssociations[0].relation.name", is(relation.getName())). - body("entity.alleleGeneAssociations[0].alleleGeneAssociationObject.modEntityId", is(gene.getModEntityId())). + body("entity.alleleGeneAssociations[0].alleleGeneAssociationObject.primaryExternalId", is(gene.getPrimaryExternalId())). body("entity.alleleGeneAssociations[0].alleleGeneAssociationObject", not(hasKey("alleleGeneAssociations"))); } @@ -185,8 +185,8 @@ public void editAlleleGeneAssociation() { then(). statusCode(200). body("entity.relation.name", is(relation2.getName())). - body("entity.alleleGeneAssociationObject.modEntityId", is(gene2.getModEntityId())). - body("entity.alleleAssociationSubject.modEntityId", is(allele2.getModEntityId())). + body("entity.alleleGeneAssociationObject.primaryExternalId", is(gene2.getPrimaryExternalId())). + body("entity.alleleAssociationSubject.primaryExternalId", is(allele2.getPrimaryExternalId())). body("entity.evidence", hasSize(1)). body("entity.evidence[0].curie", is(reference2.getCurie())). body("entity.evidenceCode.curie", is(ecoTerm2.getCurie())). @@ -336,9 +336,9 @@ public void editAlleleGeneAssociationWithEmptyRequiredFieldsLevel2() { @Order(9) public void createAlleleGeneAssociationWithInvalidFields() { Allele nonPersistedAllele = new Allele(); - nonPersistedAllele.setModEntityId("NP:Allele01"); + nonPersistedAllele.setPrimaryExternalId("NP:Allele01"); Gene nonPersistedGene = new Gene(); - nonPersistedGene.setModEntityId("NP:Gene01"); + nonPersistedGene.setPrimaryExternalId("NP:Gene01"); Reference nonPersistedReference = new Reference(); nonPersistedReference.setCurie("AGRKB:Invalid"); ECOTerm nonPersistedEcoTerm = new ECOTerm(); @@ -379,9 +379,9 @@ public void createAlleleGeneAssociationWithInvalidFields() { @Order(9) public void editAlleleGeneAssociationWithInvalidFields() { Allele nonPersistedAllele = new Allele(); - nonPersistedAllele.setModEntityId("NP:Allele01"); + nonPersistedAllele.setPrimaryExternalId("NP:Allele01"); Gene nonPersistedGene = new Gene(); - nonPersistedGene.setModEntityId("NP:Gene01"); + nonPersistedGene.setPrimaryExternalId("NP:Gene01"); Reference nonPersistedReference = new Reference(); nonPersistedReference.setCurie("AGRKB:Invalid"); ECOTerm nonPersistedEcoTerm = new ECOTerm(); diff --git a/src/test/java/org/alliancegenome/curation_api/AlleleITCase.java b/src/test/java/org/alliancegenome/curation_api/AlleleITCase.java index 891683641..eb1c0e8f2 100644 --- a/src/test/java/org/alliancegenome/curation_api/AlleleITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/AlleleITCase.java @@ -220,7 +220,7 @@ public void createValidAllele() { loadRequiredEntities(); Allele allele = new Allele(); - allele.setModEntityId(ALLELE); + allele.setPrimaryExternalId(ALLELE); allele.setTaxon(taxon); allele.setInCollection(mmpInCollection); allele.setReferences(List.of(reference)); @@ -252,7 +252,7 @@ public void createValidAllele() { get("/api/allele/" + ALLELE). then(). statusCode(200). - body("entity.modEntityId", is(ALLELE)). + body("entity.primaryExternalId", is(ALLELE)). body("entity.taxon.curie", is(taxon.getCurie())). body("entity.internal", is(false)). body("entity.obsolete", is(false)). @@ -311,7 +311,7 @@ public void createValidAllele() { public void editAllele() { Allele allele = getAllele(ALLELE); allele.setCreatedBy(person); - allele.setModEntityId(ALLELE); + allele.setPrimaryExternalId(ALLELE); allele.setTaxon(taxon2); allele.setInCollection(wgsInCollection); allele.setReferences(List.of(reference2)); @@ -406,7 +406,7 @@ public void editAllele() { get("/api/allele/" + ALLELE). then(). statusCode(200). - body("entity.modEntityId", is(ALLELE)). + body("entity.primaryExternalId", is(ALLELE)). body("entity.inCollection.name", is(wgsInCollection.getName())). body("entity.references[0].curie", is(reference2.getCurie())). body("entity.dateCreated", is(datetime2.toString())). @@ -474,16 +474,16 @@ public void createAlleleWithMissingRequiredFieldsLevel1() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(3))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")). + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")). body("errorMessages.taxon", is(ValidationConstants.REQUIRED_MESSAGE)). body("errorMessages.alleleSymbol", is(ValidationConstants.REQUIRED_MESSAGE)); } @Test @Order(4) - public void editAlleleWithMissingModEntityId() { + public void editAlleleWithMissingPrimaryExternalId() { Allele allele = getAllele(ALLELE); - allele.setModEntityId(null); + allele.setPrimaryExternalId(null); RestAssured.given(). contentType("application/json"). @@ -493,7 +493,7 @@ public void editAlleleWithMissingModEntityId() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(1))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")); + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")); } @Test @@ -521,7 +521,7 @@ public void editAlleleWithMissingRequiredFieldsLevel1() { @Order(6) public void createAlleleWithEmptyRequiredFields() { Allele allele = new Allele(); - allele.setModEntityId(""); + allele.setPrimaryExternalId(""); allele.setTaxon(taxon); allele.setInCollection(mmpInCollection); allele.setReferences(List.of(reference)); @@ -546,14 +546,14 @@ public void createAlleleWithEmptyRequiredFields() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(1))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")); + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")); } @Test @Order(7) - public void editAlleleWithEmptyModEntityId() { + public void editAlleleWithEmptyPrimaryExternalId() { Allele allele = getAllele(ALLELE); - allele.setModEntityId(""); + allele.setPrimaryExternalId(""); RestAssured.given(). contentType("application/json"). @@ -563,14 +563,14 @@ public void editAlleleWithEmptyModEntityId() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(1))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")); + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")); } @Test @Order(8) public void createAlleleWithMissingRequiredFieldsLevel2() { Allele allele = new Allele(); - allele.setModEntityId("Allele:0008"); + allele.setPrimaryExternalId("Allele:0008"); allele.setTaxon(taxon); AlleleMutationTypeSlotAnnotation invalidMutationType = new AlleleMutationTypeSlotAnnotation(); @@ -712,7 +712,7 @@ public void editAlleleWithMissingRequiredFieldsLevel2() { @Order(10) public void createAlleleWithEmptyRequiredFieldsLevel2() { Allele allele = new Allele(); - allele.setModEntityId("Allele:0010"); + allele.setPrimaryExternalId("Allele:0010"); allele.setTaxon(taxon); AlleleSymbolSlotAnnotation invalidSymbol = createAlleleSymbolSlotAnnotation(null, "", symbolNameType, null, null); @@ -817,7 +817,7 @@ public void createAlleleWithInvalidFields() { invalidNote.setFreeText("Invalid"); Allele allele = new Allele(); - allele.setModEntityId("Allele:0012"); + allele.setPrimaryExternalId("Allele:0012"); allele.setTaxon(nonPersistedTaxon); allele.setInCollection(dominantInheritanceMode); allele.setReferences(List.of(nonPersistedReference)); @@ -1025,7 +1025,7 @@ public void editAlleleWithInvalidFields() { @Order(14) public void createAlleleWithObsoleteFields() { Allele allele = new Allele(); - allele.setModEntityId("Allele:0012"); + allele.setPrimaryExternalId("Allele:0012"); allele.setTaxon(obsoleteTaxon); allele.setInCollection(obsoleteCollection); allele.setReferences(List.of(obsoleteReference)); @@ -1374,7 +1374,7 @@ public void editAlleleWithNullNonRequiredFieldsLevel1() { @Order(19) public void createAlleleWithOnlyRequiredFieldsLevel1() { Allele allele = new Allele(); - allele.setModEntityId("ALLELE:0019"); + allele.setPrimaryExternalId("ALLELE:0019"); allele.setTaxon(taxon); allele.setAlleleSymbol(alleleSymbol); @@ -1391,7 +1391,7 @@ public void createAlleleWithOnlyRequiredFieldsLevel1() { @Order(20) public void createAlleleWithOnlyRequiredFieldsLevel2() { Allele allele = new Allele(); - allele.setModEntityId("ALLELE:0020"); + allele.setPrimaryExternalId("ALLELE:0020"); allele.setTaxon(taxon); AlleleMutationTypeSlotAnnotation minimalAlleleMutationType = createAlleleMutationTypeSlotAnnotation(null, List.of(soTerm)); @@ -1432,7 +1432,7 @@ public void createAlleleWithOnlyRequiredFieldsLevel2() { @Order(21) public void createAlleleWithDuplicateNote() { Allele allele = new Allele(); - allele.setModEntityId("ALLELE:0021"); + allele.setPrimaryExternalId("ALLELE:0021"); allele.setTaxon(taxon); AlleleSymbolSlotAnnotation alleleSymbol = createAlleleSymbolSlotAnnotation(null, "Test symbol", symbolNameType, null, null); @@ -1479,7 +1479,7 @@ public void updateAlleleDetailWithNewAssociations() { then(). statusCode(200). body("entity", hasKey("alleleGeneAssociations")). - body("entity.alleleGeneAssociations[0].alleleGeneAssociationObject.modEntityId", is(gene.getModEntityId())); + body("entity.alleleGeneAssociations[0].alleleGeneAssociationObject.primaryExternalId", is(gene.getPrimaryExternalId())); } @Test diff --git a/src/test/java/org/alliancegenome/curation_api/ConstructBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/ConstructBulkUploadITCase.java index 6741f762e..8fd9b2fd7 100644 --- a/src/test/java/org/alliancegenome/curation_api/ConstructBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/ConstructBulkUploadITCase.java @@ -82,7 +82,7 @@ public void constructBulkUploadCheckFields() throws Exception { get(constructGetEndpoint + "WB:Construct0001"). then(). statusCode(200). - body("entity.modEntityId", is("WB:Construct0001")). + body("entity.primaryExternalId", is("WB:Construct0001")). body("entity.internal", is(true)). body("entity.obsolete", is(true)). body("entity.createdBy.uniqueId", is("CONSTRUCTTEST:Person0001")). @@ -165,7 +165,7 @@ public void constructBulkUploadUpdateFields() throws Exception { get(constructGetEndpoint + "WB:Construct0001"). then(). statusCode(200). - body("entity.modEntityId", is("WB:Construct0001")). + body("entity.primaryExternalId", is("WB:Construct0001")). body("entity.internal", is(false)). body("entity.obsolete", is(false)). body("entity.createdBy.uniqueId", is("CONSTRUCTTEST:Person0002")). @@ -343,7 +343,7 @@ public void constructBulkUploadUpdateMissingNonRequiredFieldsLevel2() throws Exc get(constructGetEndpoint + "WB:Construct0001"). then(). statusCode(200). - body("entity", hasKey("modEntityId")). + body("entity", hasKey("primaryExternalId")). body("entity.constructSymbol", not(hasKey("synonymScope"))). body("entity.constructSymbol", not(hasKey("synonymUrl"))). body("entity.constructSymbol", not(hasKey("evidence"))). @@ -387,7 +387,7 @@ public void constructBulkUploadUpdateMissingNonRequiredFieldsLevel3() throws Exc get(constructGetEndpoint + "WB:Construct0001"). then(). statusCode(200). - body("entity", hasKey("modEntityId")). + body("entity", hasKey("primaryExternalId")). body("entity.constructComponents[0].relatedNotes[0]", not(hasKey("evidence"))). body("entity.constructComponents[0].relatedNotes[0]", not(hasKey("createdBy"))). body("entity.constructComponents[0].relatedNotes[0]", not(hasKey("updatedBy"))). @@ -406,7 +406,7 @@ public void constructBulkUploadUpdateEmptyNonRequiredFields() throws Exception { get(constructGetEndpoint + "WB:Construct0001"). then(). statusCode(200). - body("entity", hasKey("modEntityId")). + body("entity", hasKey("primaryExternalId")). body("entity", not(hasKey("createdBy"))). body("entity", not(hasKey("updatedBy"))). body("entity", not(hasKey("dateCreated"))). @@ -471,7 +471,7 @@ public void constructBulkUploadDuplicateNotes() throws Exception { get(constructGetEndpoint + "WB:DN01"). then(). statusCode(200). - body("entity.modEntityId", is("WB:DN01")). + body("entity.primaryExternalId", is("WB:DN01")). body("entity.constructComponents", hasSize(1)). body("entity.constructComponents[0].relatedNotes", hasSize(1)); } @@ -488,7 +488,7 @@ public void reloadInitialConstruct() throws Exception { get(constructGetEndpoint + "WB:Construct0001"). then(). statusCode(200). - body("entity.modEntityId", is("WB:Construct0001")); + body("entity.primaryExternalId", is("WB:Construct0001")); } } diff --git a/src/test/java/org/alliancegenome/curation_api/ConstructGenomicEntityAssociationBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/ConstructGenomicEntityAssociationBulkUploadITCase.java index 676ec279e..a04bf4f47 100644 --- a/src/test/java/org/alliancegenome/curation_api/ConstructGenomicEntityAssociationBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/ConstructGenomicEntityAssociationBulkUploadITCase.java @@ -76,8 +76,8 @@ public void constructGenomicEntityAssociationBulkUploadCheckFields() throws Exce then(). statusCode(200). body("entity.relation.name", is(relationName)). - body("entity.constructGenomicEntityAssociationObject.modEntityId", is(geneModEntityId)). - body("entity.constructAssociationSubject.modEntityId", is(constructModEntityId)). + body("entity.constructGenomicEntityAssociationObject.primaryExternalId", is(geneModEntityId)). + body("entity.constructAssociationSubject.primaryExternalId", is(constructModEntityId)). body("entity.evidence", hasSize(1)). body("entity.evidence[0].curie", is(reference)). body("entity.internal", is(true)). @@ -101,10 +101,10 @@ public void constructGenomicEntityAssociationBulkUploadCheckFields() throws Exce get(constructGetEndpoint + constructModEntityId). then(). statusCode(200). - body("entity.modEntityId", is(constructModEntityId)). + body("entity.primaryExternalId", is(constructModEntityId)). body("entity.constructGenomicEntityAssociations", hasSize(1)). body("entity.constructGenomicEntityAssociations[0].relation.name", is(relationName)). - body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject.modEntityId", is(geneModEntityId)). + body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject.primaryExternalId", is(geneModEntityId)). body("entity.constructGenomicEntityAssociations[0].constructAssociationSubject", not(hasKey("constructGenomicEntityAssociations"))); RestAssured.given(). @@ -114,7 +114,7 @@ public void constructGenomicEntityAssociationBulkUploadCheckFields() throws Exce statusCode(200). body("entity.constructGenomicEntityAssociations", hasSize(1)). body("entity.constructGenomicEntityAssociations[0].relation.name", is(relationName)). - body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject.modEntityId", is(geneModEntityId)). + body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject.primaryExternalId", is(geneModEntityId)). body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject", not(hasKey("constructGenomicEntityAssociations"))); } @@ -129,7 +129,7 @@ public void constructGenomicEntityAssociationBulkUploadUpdateCheckFields() throw then(). statusCode(200). body("entity.relation.name", is(relationName)). - body("entity.constructGenomicEntityAssociationObject.modEntityId", is(geneModEntityId)). + body("entity.constructGenomicEntityAssociationObject.primaryExternalId", is(geneModEntityId)). body("entity.evidence", hasSize(1)). body("entity.evidence[0].curie", is(reference2)). body("entity.internal", is(false)). diff --git a/src/test/java/org/alliancegenome/curation_api/ConstructGenomicEntityAssociationITCase.java b/src/test/java/org/alliancegenome/curation_api/ConstructGenomicEntityAssociationITCase.java index 05382712c..bb8c1a80d 100644 --- a/src/test/java/org/alliancegenome/curation_api/ConstructGenomicEntityAssociationITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/ConstructGenomicEntityAssociationITCase.java @@ -113,8 +113,8 @@ public void createValidConstructGenomicEntityAssociation() { then(). statusCode(200). body("entity.relation.name", is(relation.getName())). - body("entity.constructGenomicEntityAssociationObject.modEntityId", is(gene.getModEntityId())). - body("entity.constructAssociationSubject.modEntityId", is(construct.getModEntityId())). + body("entity.constructGenomicEntityAssociationObject.primaryExternalId", is(gene.getPrimaryExternalId())). + body("entity.constructAssociationSubject.primaryExternalId", is(construct.getPrimaryExternalId())). body("entity.evidence", hasSize(1)). body("entity.evidence[0].curie", is(reference.getCurie())). body("entity.internal", is(true)). @@ -131,22 +131,22 @@ public void createValidConstructGenomicEntityAssociation() { RestAssured.given(). when(). - get(constructGetEndpoint + construct.getModEntityId()). + get(constructGetEndpoint + construct.getPrimaryExternalId()). then(). statusCode(200). body("entity.constructGenomicEntityAssociations", hasSize(1)). body("entity.constructGenomicEntityAssociations[0].relation.name", is(relation.getName())). - body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject.modEntityId", is(gene.getModEntityId())). + body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject.primaryExternalId", is(gene.getPrimaryExternalId())). body("entity.constructGenomicEntityAssociations[0].constructAssociationSubject", not(hasKey("constructGeneAssociations"))); RestAssured.given(). when(). - get(geneGetEndpoint + gene.getModEntityId()). + get(geneGetEndpoint + gene.getPrimaryExternalId()). then(). statusCode(200). body("entity.constructGenomicEntityAssociations", hasSize(1)). body("entity.constructGenomicEntityAssociations[0].relation.name", is(relation.getName())). - body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject.modEntityId", is(gene.getModEntityId())). + body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject.primaryExternalId", is(gene.getPrimaryExternalId())). body("entity.constructGenomicEntityAssociations[0].constructAssociationSubject", not(hasKey("constructGeneAssociations"))); } @@ -177,7 +177,7 @@ public void editConstructGenomicEntityAssociation() { statusCode(200). body("entity.relation.name", is(relation2.getName())). body("entity.constructGenomicEntityAssociationObject.curie", is(gene2.getCurie())). - body("entity.constructAssociationSubject.modEntityId", is(construct2.getModEntityId())). + body("entity.constructAssociationSubject.primaryExternalId", is(construct2.getPrimaryExternalId())). body("entity.evidence", hasSize(1)). body("entity.evidence[0].curie", is(reference2.getCurie())). body("entity.internal", is(false)). diff --git a/src/test/java/org/alliancegenome/curation_api/ConstructITCase.java b/src/test/java/org/alliancegenome/curation_api/ConstructITCase.java index dc690e728..ab39aa230 100644 --- a/src/test/java/org/alliancegenome/curation_api/ConstructITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/ConstructITCase.java @@ -144,7 +144,7 @@ public void createValidConstruct() { loadRequiredEntities(); Construct construct = new Construct(); - construct.setModEntityId(CONSTRUCT); + construct.setPrimaryExternalId(CONSTRUCT); construct.setConstructSymbol(constructSymbol); construct.setConstructFullName(constructFullName); construct.setConstructSynonyms(List.of(constructSynonym)); @@ -167,7 +167,7 @@ public void createValidConstruct() { get("/api/construct/" + CONSTRUCT). then(). statusCode(200). - body("entity.modEntityId", is(CONSTRUCT)). + body("entity.primaryExternalId", is(CONSTRUCT)). body("entity.constructSymbol.displayText", is(constructSymbol.getDisplayText())). body("entity.constructSymbol.formatText", is(constructSymbol.getFormatText())). body("entity.constructSymbol.nameType.name", is(constructSymbol.getNameType().getName())). @@ -273,7 +273,7 @@ public void editConstruct() { get("/api/construct/" + CONSTRUCT). then(). statusCode(200). - body("entity.modEntityId", is(CONSTRUCT)). + body("entity.primaryExternalId", is(CONSTRUCT)). body("entity.internal", is(true)). body("entity.obsolete", is(true)). body("entity.references[0].curie", is(reference2.getCurie())). @@ -330,7 +330,7 @@ public void createConstructWithMissingRequiredFieldsLevel1() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(2))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")). + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")). body("errorMessages.constructSymbol", is(ValidationConstants.REQUIRED_MESSAGE)); } @@ -340,7 +340,7 @@ public void editConstructWithMissingRequiredFieldsLevel1() { Construct construct = getConstruct(CONSTRUCT); construct.setConstructSymbol(null); construct.setDataProvider(null); - construct.setModEntityId(null); + construct.setPrimaryExternalId(null); RestAssured.given(). contentType("application/json"). @@ -351,7 +351,7 @@ public void editConstructWithMissingRequiredFieldsLevel1() { statusCode(400). body("errorMessages", is(aMapWithSize(3))). body("errorMessages.constructSymbol", is(ValidationConstants.REQUIRED_MESSAGE)). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")). + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")). body("errorMessages.dataProvider", is(ValidationConstants.REQUIRED_MESSAGE)); } @@ -360,7 +360,7 @@ public void editConstructWithMissingRequiredFieldsLevel1() { public void createConstructWithMissingRequiredFieldsLevel2() { Construct construct = new Construct(); construct.setDataProvider(dataProvider); - construct.setModEntityId("Construct:0005"); + construct.setPrimaryExternalId("Construct:0005"); ConstructComponentSlotAnnotation invalidComponent = new ConstructComponentSlotAnnotation(); ConstructSymbolSlotAnnotation invalidSymbol = new ConstructSymbolSlotAnnotation(); @@ -465,7 +465,7 @@ public void createConstructWithEmptyRequiredFields() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(5))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")). + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")). body("errorMessages.constructSymbol", is(String.join(" | ", List.of( "displayText - " + ValidationConstants.REQUIRED_MESSAGE, "formatText - " + ValidationConstants.REQUIRED_MESSAGE)))). @@ -482,7 +482,7 @@ public void createConstructWithEmptyRequiredFields() { @Order(8) public void editConstructWithEmptyRequiredFields() { Construct construct = getConstruct(CONSTRUCT); - construct.setModEntityId(""); + construct.setPrimaryExternalId(""); construct.setModInternalId(""); ConstructComponentSlotAnnotation component = construct.getConstructComponents().get(0); component.setComponentSymbol(""); @@ -505,7 +505,7 @@ public void editConstructWithEmptyRequiredFields() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(5))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")). + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")). body("errorMessages.constructSymbol", is(String.join(" | ", List.of( "displayText - " + ValidationConstants.REQUIRED_MESSAGE, "formatText - " + ValidationConstants.REQUIRED_MESSAGE)))). @@ -542,7 +542,7 @@ public void createConstructWithInvalidFields() { Construct construct = new Construct(); - construct.setModEntityId("Construct:0009"); + construct.setPrimaryExternalId("Construct:0009"); construct.setReferences(List.of(nonPersistedReference)); construct.setDateCreated(datetime); construct.setDataProvider(invalidDataProvider); @@ -671,7 +671,7 @@ public void createConstructWithObsoleteFields() { ConstructSynonymSlotAnnotation obsoleteSynonym = createConstructSynonymSlotAnnotation(List.of(obsoleteReference), "Test synonym", obsoleteNameType, obsoleteSynonymScope, "https://test.org"); Construct construct = new Construct(); - construct.setModEntityId("Construct:0011"); + construct.setPrimaryExternalId("Construct:0011"); construct.setReferences(List.of(obsoleteReference)); construct.setDateCreated(datetime); construct.setDataProvider(obsoleteDataProvider); @@ -869,7 +869,7 @@ public void createConstructWithOnlyRequiredFieldsLevel1() { Construct construct = new Construct(); construct.setConstructSymbol(constructSymbol); construct.setDataProvider(dataProvider); - construct.setModEntityId("Construct:0015"); + construct.setPrimaryExternalId("Construct:0015"); RestAssured.given(). contentType("application/json"). @@ -886,7 +886,7 @@ public void createConstructWithOnlyRequiredFieldsLevel2() { Construct construct = new Construct(); construct.setConstructSymbol(constructSymbol); construct.setDataProvider(dataProvider); - construct.setModEntityId("Construct:0016"); + construct.setPrimaryExternalId("Construct:0016"); ConstructComponentSlotAnnotation minimalComponent = createConstructComponentSlotAnnotation(isRegulatedByRelation, null, "minimalCmp", null, null, null); ConstructSymbolSlotAnnotation minimalConstructSymbol = createConstructSymbolSlotAnnotation(null, "Test symbol", symbolNameType, null, null); @@ -913,7 +913,7 @@ public void createConstructWithDuplicateNote() { Construct construct = new Construct(); construct.setConstructSymbol(constructSymbol); construct.setDataProvider(dataProvider); - construct.setModEntityId("Construct:0017"); + construct.setPrimaryExternalId("Construct:0017"); ConstructComponentSlotAnnotation component = createConstructComponentSlotAnnotation(isRegulatedByRelation, null, "dnCmp", null, null, List.of(relatedNote, relatedNote)); construct.setConstructComponents(List.of(component)); @@ -954,7 +954,7 @@ public void updateConstructWithNewAssociations() { then(). statusCode(200). body("entity", hasKey("constructGenomicEntityAssociations")). - body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject.modEntityId", is(gene.getModEntityId())); + body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject.primaryExternalId", is(gene.getPrimaryExternalId())); } @Test diff --git a/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationBulkUploadITCase.java index bda9fcd2a..aada65f0f 100644 --- a/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationBulkUploadITCase.java @@ -193,7 +193,7 @@ public void geneDiseaseAnnotationBulkUploadCheckFields() throws Exception { get(geneDaGetEndpoint + geneDiseaseAnnotation). then(). statusCode(200). - body("entity.modEntityId", is(geneDiseaseAnnotation)). + body("entity.primaryExternalId", is(geneDiseaseAnnotation)). body("entity.negated", is(true)). body("entity.internal", is(true)). body("entity.obsolete", is(true)). @@ -203,7 +203,7 @@ public void geneDiseaseAnnotationBulkUploadCheckFields() throws Exception { body("entity.dateCreated", is(OffsetDateTime.parse("2022-03-09T22:10:12Z").toString())). body("entity.uniqueId", is("DATEST:Gene0001|is_implicated_in|true|DATEST:Disease0001|AGRKB:000000002|DATEST:Evidence0001|HGNC:0001|" + "exacerbated_by|DATEST:ExpCondTerm0001|DATEST:ExpCondTerm0002|DATEST:AnatomyTerm0001|DATEST:ChemicalTerm0001|DATEST:GOTerm0001|NCBITaxon:6239|Some amount|Free text|susceptibility|ameliorated_by|DATEST:AGM0002|DATEST:Allele0002|DATEST:Gene0002|SGD:AGM0001")). - body("entity.diseaseAnnotationSubject.modEntityId", is(gene)). + body("entity.diseaseAnnotationSubject.primaryExternalId", is(gene)). body("entity.diseaseAnnotationObject.curie", is(doTerm)). body("entity.relation.name", is(alleleAndGeneRelation)). body("entity.geneticSex.name", is(geneticSex)). @@ -234,12 +234,12 @@ public void geneDiseaseAnnotationBulkUploadCheckFields() throws Exception { body("entity.conditionRelations[0].conditions[0].conditionChemical.curie", is(chemicalTerm)). body("entity.conditionRelations[0].conditions[0].conditionFreeText", is("Free text")). body("entity.conditionRelations[0].conditions[0].conditionSummary", is("Test ExperimentalConditionOntologyTerm:Test ExperimentalConditionOntologyTerm:Test AnatomicalTerm:Test GOTerm:Test ChemicalTerm:Caenorhabditis elegans:Some amount:Free text")). - body("entity.diseaseGeneticModifierAgms[0].modEntityId", is(agm2)). - body("entity.diseaseGeneticModifierAlleles[0].modEntityId", is(allele2)). - body("entity.diseaseGeneticModifierGenes[0].modEntityId", is(gene2)). + body("entity.diseaseGeneticModifierAgms[0].primaryExternalId", is(agm2)). + body("entity.diseaseGeneticModifierAlleles[0].primaryExternalId", is(allele2)). + body("entity.diseaseGeneticModifierGenes[0].primaryExternalId", is(gene2)). body("entity.diseaseGeneticModifierRelation.name", is(diseaseGeneticModifierRelation)). body("entity.with", hasSize(1)). - body("entity.with[0].modEntityId", is(withGene)). + body("entity.with[0].primaryExternalId", is(withGene)). body("entity.singleReference.curie", is(reference)). body("entity.relatedNotes", hasSize(1)). body("entity.relatedNotes[0].internal", is(false)). @@ -253,7 +253,7 @@ public void geneDiseaseAnnotationBulkUploadCheckFields() throws Exception { body("entity.relatedNotes[0].references[0].curie", is(reference)). body("entity.annotationType.name", is(annotationType)). body("entity.diseaseQualifiers[0].name", is(diseaseQualifier)). - body("entity.sgdStrainBackground.modEntityId", is(sgdBackgroundStrain)). + body("entity.sgdStrainBackground.primaryExternalId", is(sgdBackgroundStrain)). body("entity.evidenceCodes", hasSize(1)). body("entity.evidenceCodes[0].curie", is(ecoTerm)). body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider)). @@ -276,7 +276,7 @@ public void alleleDiseaseAnnotationBulkUploadCheckFields() throws Exception { get(alleleDaGetEndpoint + alleleDiseaseAnnotation). then(). statusCode(200). - body("entity.modEntityId", is(alleleDiseaseAnnotation)). + body("entity.primaryExternalId", is(alleleDiseaseAnnotation)). body("entity.negated", is(true)). body("entity.internal", is(true)). body("entity.obsolete", is(true)). @@ -286,7 +286,7 @@ public void alleleDiseaseAnnotationBulkUploadCheckFields() throws Exception { body("entity.dateCreated", is(OffsetDateTime.parse("2022-03-09T22:10:12Z").toString())). body("entity.uniqueId", is("DATEST:Allele0001|is_implicated_in|true|DATEST:Disease0001|AGRKB:000000002|DATEST:Evidence0001|HGNC:0001|exacerbated_by|DATEST:ExpCondTerm0001|DATEST:ExpCondTerm0002|DATEST:AnatomyTerm0001|DATEST:ChemicalTerm0001|DATEST:GOTerm0001|NCBITaxon:6239|Some amount|Free text|susceptibility|ameliorated_by|DATEST:AGM0002|DATEST:Allele0002|DATEST:Gene0002")). - body("entity.diseaseAnnotationSubject.modEntityId", is(allele)). + body("entity.diseaseAnnotationSubject.primaryExternalId", is(allele)). body("entity.diseaseAnnotationObject.curie", is(doTerm)). body("entity.relation.name", is(alleleAndGeneRelation)). body("entity.geneticSex.name", is(geneticSex)). @@ -317,12 +317,12 @@ public void alleleDiseaseAnnotationBulkUploadCheckFields() throws Exception { body("entity.conditionRelations[0].conditions[0].conditionChemical.curie", is(chemicalTerm)). body("entity.conditionRelations[0].conditions[0].conditionFreeText", is("Free text")). body("entity.conditionRelations[0].conditions[0].conditionSummary", is("Test ExperimentalConditionOntologyTerm:Test ExperimentalConditionOntologyTerm:Test AnatomicalTerm:Test GOTerm:Test ChemicalTerm:Caenorhabditis elegans:Some amount:Free text")). - body("entity.diseaseGeneticModifierAgms[0].modEntityId", is(agm2)). - body("entity.diseaseGeneticModifierAlleles[0].modEntityId", is(allele2)). - body("entity.diseaseGeneticModifierGenes[0].modEntityId", is(gene2)). + body("entity.diseaseGeneticModifierAgms[0].primaryExternalId", is(agm2)). + body("entity.diseaseGeneticModifierAlleles[0].primaryExternalId", is(allele2)). + body("entity.diseaseGeneticModifierGenes[0].primaryExternalId", is(gene2)). body("entity.diseaseGeneticModifierRelation.name", is(diseaseGeneticModifierRelation)). body("entity.with", hasSize(1)). - body("entity.with[0].modEntityId", is(withGene)). + body("entity.with[0].primaryExternalId", is(withGene)). body("entity.singleReference.curie", is(reference)). body("entity.relatedNotes", hasSize(1)). body("entity.relatedNotes[0].internal", is(false)). @@ -340,8 +340,8 @@ public void alleleDiseaseAnnotationBulkUploadCheckFields() throws Exception { body("entity.evidenceCodes[0].curie", is(ecoTerm)). body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider)). body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider2)). - body("entity.inferredGene.modEntityId", is(gene)). - body("entity.assertedGenes[0].modEntityId", is(gene2)). + body("entity.inferredGene.primaryExternalId", is(gene)). + body("entity.assertedGenes[0].primaryExternalId", is(gene2)). body("entity.dataProvider.crossReference.referencedCurie", is("TEST:0001")). body("entity.dataProvider.crossReference.displayName", is("TEST:0001")). body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")). @@ -360,7 +360,7 @@ public void agmDiseaseAnnotationBulkUploadCheckFields() throws Exception { get(agmDaGetEndpoint + agmDiseaseAnnotation). then(). statusCode(200). - body("entity.modEntityId", is(agmDiseaseAnnotation)). + body("entity.primaryExternalId", is(agmDiseaseAnnotation)). body("entity.negated", is(true)). body("entity.internal", is(true)). body("entity.obsolete", is(true)). @@ -369,7 +369,7 @@ public void agmDiseaseAnnotationBulkUploadCheckFields() throws Exception { body("entity.dateUpdated", is(OffsetDateTime.parse("2022-03-10T22:10:12Z").toString())). body("entity.dateCreated", is(OffsetDateTime.parse("2022-03-09T22:10:12Z").toString())). body("entity.uniqueId", is("DATEST:AGM0001|is_model_of|true|DATEST:Disease0001|AGRKB:000000002|DATEST:Evidence0001|HGNC:0001|exacerbated_by|DATEST:ExpCondTerm0001|DATEST:ExpCondTerm0002|DATEST:AnatomyTerm0001|DATEST:ChemicalTerm0001|DATEST:GOTerm0001|NCBITaxon:6239|Some amount|Free text|susceptibility|ameliorated_by|DATEST:AGM0002|DATEST:Allele0002|DATEST:Gene0002")). - body("entity.diseaseAnnotationSubject.modEntityId", is(agm)). + body("entity.diseaseAnnotationSubject.primaryExternalId", is(agm)). body("entity.diseaseAnnotationObject.curie", is(doTerm)). body("entity.relation.name", is(agmRelation)). body("entity.geneticSex.name", is(geneticSex)). @@ -400,12 +400,12 @@ public void agmDiseaseAnnotationBulkUploadCheckFields() throws Exception { body("entity.conditionRelations[0].conditions[0].conditionChemical.curie", is(chemicalTerm)). body("entity.conditionRelations[0].conditions[0].conditionFreeText", is("Free text")). body("entity.conditionRelations[0].conditions[0].conditionSummary", is("Test ExperimentalConditionOntologyTerm:Test ExperimentalConditionOntologyTerm:Test AnatomicalTerm:Test GOTerm:Test ChemicalTerm:Caenorhabditis elegans:Some amount:Free text")). - body("entity.diseaseGeneticModifierAgms[0].modEntityId", is(agm2)). - body("entity.diseaseGeneticModifierAlleles[0].modEntityId", is(allele2)). - body("entity.diseaseGeneticModifierGenes[0].modEntityId", is(gene2)). + body("entity.diseaseGeneticModifierAgms[0].primaryExternalId", is(agm2)). + body("entity.diseaseGeneticModifierAlleles[0].primaryExternalId", is(allele2)). + body("entity.diseaseGeneticModifierGenes[0].primaryExternalId", is(gene2)). body("entity.diseaseGeneticModifierRelation.name", is(diseaseGeneticModifierRelation)). body("entity.with", hasSize(1)). - body("entity.with[0].modEntityId", is(withGene)). + body("entity.with[0].primaryExternalId", is(withGene)). body("entity.singleReference.curie", is(reference)). body("entity.relatedNotes", hasSize(1)). body("entity.relatedNotes[0].internal", is(false)). @@ -423,10 +423,10 @@ public void agmDiseaseAnnotationBulkUploadCheckFields() throws Exception { body("entity.evidenceCodes[0].curie", is(ecoTerm)). body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider)). body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider2)). - body("entity.inferredGene.modEntityId", is(gene)). - body("entity.assertedGenes[0].modEntityId", is(gene2)). - body("entity.inferredAllele.modEntityId", is(allele)). - body("entity.assertedAllele.modEntityId", is(allele2)). + body("entity.inferredGene.primaryExternalId", is(gene)). + body("entity.assertedGenes[0].primaryExternalId", is(gene2)). + body("entity.inferredAllele.primaryExternalId", is(allele)). + body("entity.assertedAllele.primaryExternalId", is(allele2)). body("entity.dataProvider.crossReference.referencedCurie", is("TEST:0001")). body("entity.dataProvider.crossReference.displayName", is("TEST:0001")). body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")). @@ -445,7 +445,7 @@ public void geneDiseaseAnnotationBulkUploadUpdateCheckFields() throws Exception get(geneDaGetEndpoint + geneDiseaseAnnotation). then(). statusCode(200). - body("entity.modEntityId", is(geneDiseaseAnnotation)). + body("entity.primaryExternalId", is(geneDiseaseAnnotation)). body("entity.negated", is(false)). body("entity.internal", is(false)). body("entity.obsolete", is(false)). @@ -455,7 +455,7 @@ public void geneDiseaseAnnotationBulkUploadUpdateCheckFields() throws Exception body("entity.dateCreated", is(OffsetDateTime.parse("2022-03-19T22:10:12Z").toString())). body("entity.uniqueId", is("DATEST:Gene0002|is_marker_for|false|DATEST:Disease0002|AGRKB:000000021|DATEST:Evidence0002|HGNC:0002|induced_by|DATEST:ExpCondTerm0003|DATEST:ExpCondTerm0001|DATEST:AnatomyTerm0002|DATEST:ChemicalTerm0002|DATEST:GOTerm0002|NCBITaxon:9606|Some amount 2|Free text 2|severity|exacerbated_by|DATEST:AGM0001|DATEST:Allele0001|DATEST:Gene0001|SGD:AGM0002")). - body("entity.diseaseAnnotationSubject.modEntityId", is(gene2)). + body("entity.diseaseAnnotationSubject.primaryExternalId", is(gene2)). body("entity.diseaseAnnotationObject.curie", is(doTerm2)). body("entity.relation.name", is(geneRelation)). body("entity.geneticSex.name", is(geneticSex2)). @@ -486,12 +486,12 @@ public void geneDiseaseAnnotationBulkUploadUpdateCheckFields() throws Exception body("entity.conditionRelations[0].conditions[0].conditionChemical.curie", is(chemicalTerm2)). body("entity.conditionRelations[0].conditions[0].conditionFreeText", is("Free text 2")). body("entity.conditionRelations[0].conditions[0].conditionSummary", is("Test ExperimentalConditionOntologyTerm 2:Test ExperimentalConditionOntologyTerm:Test AnatomicalTerm 2:Test GOTerm 2:Test ChemicalTerm 2:Homo sapiens:Some amount 2:Free text 2")). - body("entity.diseaseGeneticModifierAgms[0].modEntityId", is(agm)). - body("entity.diseaseGeneticModifierAlleles[0].modEntityId", is(allele)). - body("entity.diseaseGeneticModifierGenes[0].modEntityId", is(gene)). + body("entity.diseaseGeneticModifierAgms[0].primaryExternalId", is(agm)). + body("entity.diseaseGeneticModifierAlleles[0].primaryExternalId", is(allele)). + body("entity.diseaseGeneticModifierGenes[0].primaryExternalId", is(gene)). body("entity.diseaseGeneticModifierRelation.name", is(diseaseGeneticModifierRelation2)). body("entity.with", hasSize(1)). - body("entity.with[0].modEntityId", is(withGene2)). + body("entity.with[0].primaryExternalId", is(withGene2)). body("entity.singleReference.curie", is(reference2)). body("entity.relatedNotes", hasSize(1)). body("entity.relatedNotes[0].internal", is(true)). @@ -505,7 +505,7 @@ public void geneDiseaseAnnotationBulkUploadUpdateCheckFields() throws Exception body("entity.relatedNotes[0].references[0].curie", is(reference2)). body("entity.annotationType.name", is(annotationType2)). body("entity.diseaseQualifiers[0].name", is(diseaseQualifier2)). - body("entity.sgdStrainBackground.modEntityId", is(sgdBackgroundStrain2)). + body("entity.sgdStrainBackground.primaryExternalId", is(sgdBackgroundStrain2)). body("entity.evidenceCodes", hasSize(1)). body("entity.evidenceCodes[0].curie", is(ecoTerm2)). body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2)). @@ -528,7 +528,7 @@ public void alleleDiseaseAnnotationBulkUploadUpdateCheckFields() throws Exceptio get(alleleDaGetEndpoint + alleleDiseaseAnnotation). then(). statusCode(200). - body("entity.modEntityId", is(alleleDiseaseAnnotation)). + body("entity.primaryExternalId", is(alleleDiseaseAnnotation)). body("entity.negated", is(false)). body("entity.internal", is(false)). body("entity.obsolete", is(false)). @@ -537,7 +537,7 @@ public void alleleDiseaseAnnotationBulkUploadUpdateCheckFields() throws Exceptio body("entity.dateUpdated", is(OffsetDateTime.parse("2022-03-20T22:10:12Z").toString())). body("entity.dateCreated", is(OffsetDateTime.parse("2022-03-19T22:10:12Z").toString())). body("entity.uniqueId", is("DATEST:Allele0002|is_implicated_in|false|DATEST:Disease0002|AGRKB:000000021|DATEST:Evidence0002|HGNC:0002|induced_by|DATEST:ExpCondTerm0003|DATEST:ExpCondTerm0001|DATEST:AnatomyTerm0002|DATEST:ChemicalTerm0002|DATEST:GOTerm0002|NCBITaxon:9606|Some amount 2|Free text 2|severity|exacerbated_by|DATEST:AGM0001|DATEST:Allele0001|DATEST:Gene0001")). - body("entity.diseaseAnnotationSubject.modEntityId", is(allele2)). + body("entity.diseaseAnnotationSubject.primaryExternalId", is(allele2)). body("entity.diseaseAnnotationObject.curie", is(doTerm2)). body("entity.relation.name", is(alleleAndGeneRelation)). body("entity.geneticSex.name", is(geneticSex2)). @@ -568,12 +568,12 @@ public void alleleDiseaseAnnotationBulkUploadUpdateCheckFields() throws Exceptio body("entity.conditionRelations[0].conditions[0].conditionChemical.curie", is(chemicalTerm2)). body("entity.conditionRelations[0].conditions[0].conditionFreeText", is("Free text 2")). body("entity.conditionRelations[0].conditions[0].conditionSummary", is("Test ExperimentalConditionOntologyTerm 2:Test ExperimentalConditionOntologyTerm:Test AnatomicalTerm 2:Test GOTerm 2:Test ChemicalTerm 2:Homo sapiens:Some amount 2:Free text 2")). - body("entity.diseaseGeneticModifierAgms[0].modEntityId", is(agm)). - body("entity.diseaseGeneticModifierAlleles[0].modEntityId", is(allele)). - body("entity.diseaseGeneticModifierGenes[0].modEntityId", is(gene)). + body("entity.diseaseGeneticModifierAgms[0].primaryExternalId", is(agm)). + body("entity.diseaseGeneticModifierAlleles[0].primaryExternalId", is(allele)). + body("entity.diseaseGeneticModifierGenes[0].primaryExternalId", is(gene)). body("entity.diseaseGeneticModifierRelation.name", is(diseaseGeneticModifierRelation2)). body("entity.with", hasSize(1)). - body("entity.with[0].modEntityId", is(withGene2)). + body("entity.with[0].primaryExternalId", is(withGene2)). body("entity.singleReference.curie", is(reference2)). body("entity.relatedNotes", hasSize(1)). body("entity.relatedNotes[0].internal", is(true)). @@ -591,8 +591,8 @@ public void alleleDiseaseAnnotationBulkUploadUpdateCheckFields() throws Exceptio body("entity.evidenceCodes[0].curie", is(ecoTerm2)). body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2)). body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider)). - body("entity.inferredGene.modEntityId", is(gene2)). - body("entity.assertedGenes[0].modEntityId", is(gene)). + body("entity.inferredGene.primaryExternalId", is(gene2)). + body("entity.assertedGenes[0].primaryExternalId", is(gene)). body("entity.dataProvider.crossReference.referencedCurie", is("TEST:0002")). body("entity.dataProvider.crossReference.displayName", is("TEST:0002")). body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")). @@ -611,7 +611,7 @@ public void agmDiseaseAnnotationBulkUploadUpdateCheckFields() throws Exception { get(agmDaGetEndpoint + agmDiseaseAnnotation). then(). statusCode(200). - body("entity.modEntityId", is(agmDiseaseAnnotation)). + body("entity.primaryExternalId", is(agmDiseaseAnnotation)). body("entity.negated", is(false)). body("entity.internal", is(false)). body("entity.obsolete", is(false)). @@ -621,7 +621,7 @@ public void agmDiseaseAnnotationBulkUploadUpdateCheckFields() throws Exception { body("entity.dateCreated", is(OffsetDateTime.parse("2022-03-19T22:10:12Z").toString())). body("entity.uniqueId", is("DATEST:AGM0002|is_exacerbated_model_of|false|DATEST:Disease0002|AGRKB:000000021|DATEST:Evidence0002|HGNC:0002|induced_by|DATEST:ExpCondTerm0003|DATEST:ExpCondTerm0001|DATEST:AnatomyTerm0002|DATEST:ChemicalTerm0002|DATEST:GOTerm0002|NCBITaxon:9606|Some amount 2|Free text 2|severity|exacerbated_by|DATEST:AGM0001|DATEST:Allele0001|DATEST:Gene0001")). - body("entity.diseaseAnnotationSubject.modEntityId", is(agm2)). + body("entity.diseaseAnnotationSubject.primaryExternalId", is(agm2)). body("entity.diseaseAnnotationObject.curie", is(doTerm2)). body("entity.relation.name", is(agmRelation2)). body("entity.geneticSex.name", is(geneticSex2)). @@ -652,12 +652,12 @@ public void agmDiseaseAnnotationBulkUploadUpdateCheckFields() throws Exception { body("entity.conditionRelations[0].conditions[0].conditionChemical.curie", is(chemicalTerm2)). body("entity.conditionRelations[0].conditions[0].conditionFreeText", is("Free text 2")). body("entity.conditionRelations[0].conditions[0].conditionSummary", is("Test ExperimentalConditionOntologyTerm 2:Test ExperimentalConditionOntologyTerm:Test AnatomicalTerm 2:Test GOTerm 2:Test ChemicalTerm 2:Homo sapiens:Some amount 2:Free text 2")). - body("entity.diseaseGeneticModifierAgms[0].modEntityId", is(agm)). - body("entity.diseaseGeneticModifierAlleles[0].modEntityId", is(allele)). - body("entity.diseaseGeneticModifierGenes[0].modEntityId", is(gene)). + body("entity.diseaseGeneticModifierAgms[0].primaryExternalId", is(agm)). + body("entity.diseaseGeneticModifierAlleles[0].primaryExternalId", is(allele)). + body("entity.diseaseGeneticModifierGenes[0].primaryExternalId", is(gene)). body("entity.diseaseGeneticModifierRelation.name", is(diseaseGeneticModifierRelation2)). body("entity.with", hasSize(1)). - body("entity.with[0].modEntityId", is(withGene2)). + body("entity.with[0].primaryExternalId", is(withGene2)). body("entity.singleReference.curie", is(reference2)). body("entity.relatedNotes", hasSize(1)). body("entity.relatedNotes[0].internal", is(true)). @@ -675,10 +675,10 @@ public void agmDiseaseAnnotationBulkUploadUpdateCheckFields() throws Exception { body("entity.evidenceCodes[0].curie", is(ecoTerm2)). body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2)). body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider)). - body("entity.inferredGene.modEntityId", is(gene2)). - body("entity.assertedGenes[0].modEntityId", is(gene)). - body("entity.inferredAllele.modEntityId", is(allele2)). - body("entity.assertedAllele.modEntityId", is(allele)). + body("entity.inferredGene.primaryExternalId", is(gene2)). + body("entity.assertedGenes[0].primaryExternalId", is(gene)). + body("entity.inferredAllele.primaryExternalId", is(allele2)). + body("entity.assertedAllele.primaryExternalId", is(allele)). body("entity.dataProvider.crossReference.referencedCurie", is("TEST:0002")). body("entity.dataProvider.crossReference.displayName", is("TEST:0002")). body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")). @@ -825,7 +825,7 @@ public void geneDiseaseAnnotationUpdateMissingNonRequiredFieldsLevel1() throws E get(geneDaGetEndpoint + geneDiseaseAnnotation). then(). statusCode(200). - body("entity.modEntityId", is(geneDiseaseAnnotation)). + body("entity.primaryExternalId", is(geneDiseaseAnnotation)). body("entity", not(hasKey("createdBy"))). body("entity", not(hasKey("updatedBy"))). body("entity", not(hasKey("dateCreated"))). @@ -855,7 +855,7 @@ public void alleleDiseaseAnnotationUpdateMissingNonRequiredFieldsLevel1() throws get(alleleDaGetEndpoint + alleleDiseaseAnnotation). then(). statusCode(200). - body("entity.modEntityId", is(alleleDiseaseAnnotation)). + body("entity.primaryExternalId", is(alleleDiseaseAnnotation)). body("entity", not(hasKey("createdBy"))). body("entity", not(hasKey("updatedBy"))). body("entity", not(hasKey("dateCreated"))). @@ -886,7 +886,7 @@ public void agmDiseaseAnnotationUpdateMissingNonRequiredFieldsLevel1() throws Ex get(agmDaGetEndpoint + agmDiseaseAnnotation). then(). statusCode(200). - body("entity.modEntityId", is(agmDiseaseAnnotation)). + body("entity.primaryExternalId", is(agmDiseaseAnnotation)). body("entity", not(hasKey("createdBy"))). body("entity", not(hasKey("updatedBy"))). body("entity", not(hasKey("dateCreated"))). @@ -919,7 +919,7 @@ public void diseaseAnnotationUpdateMissingNonRequiredFieldsLevel2() throws Excep get(geneDaGetEndpoint + geneDiseaseAnnotation). then(). statusCode(200). - body("entity.modEntityId", is(geneDiseaseAnnotation)). + body("entity.primaryExternalId", is(geneDiseaseAnnotation)). body("entity.conditionRelations[0]", not(hasKey("singleReference"))). body("entity.conditionRelations[0]", not(hasKey("handle"))). body("entity.conditionRelations[0]", not(hasKey("createdBy"))). @@ -957,7 +957,7 @@ public void geneDiseaseAnnotationUpdateEmptyNonRequiredFieldsLevel1() throws Exc get(geneDaGetEndpoint + geneDiseaseAnnotation). then(). statusCode(200). - body("entity.modEntityId", is(geneDiseaseAnnotation)). + body("entity.primaryExternalId", is(geneDiseaseAnnotation)). body("entity", not(hasKey("createdBy"))). body("entity", not(hasKey("updatedBy"))). body("entity", not(hasKey("dateCreated"))). @@ -987,7 +987,7 @@ public void alleleDiseaseAnnotationUpdateEmptyNonRequiredFieldsLevel1() throws E get(alleleDaGetEndpoint + alleleDiseaseAnnotation). then(). statusCode(200). - body("entity.modEntityId", is(alleleDiseaseAnnotation)). + body("entity.primaryExternalId", is(alleleDiseaseAnnotation)). body("entity", not(hasKey("createdBy"))). body("entity", not(hasKey("updatedBy"))). body("entity", not(hasKey("dateCreated"))). @@ -1018,7 +1018,7 @@ public void agmDiseaseAnnotationUpdateEmptyNonRequiredFieldsLevel1() throws Exce get(agmDaGetEndpoint + agmDiseaseAnnotation). then(). statusCode(200). - body("entity.modEntityId", is(agmDiseaseAnnotation)). + body("entity.primaryExternalId", is(agmDiseaseAnnotation)). body("entity", not(hasKey("createdBy"))). body("entity", not(hasKey("updatedBy"))). body("entity", not(hasKey("dateCreated"))). @@ -1051,7 +1051,7 @@ public void diseaseAnnotationUpdateEmptyNonRequiredFieldsLevel2() throws Excepti get(geneDaGetEndpoint + geneDiseaseAnnotation). then(). statusCode(200). - body("entity.modEntityId", is(geneDiseaseAnnotation)). + body("entity.primaryExternalId", is(geneDiseaseAnnotation)). body("entity.conditionRelations[0]", not(hasKey("singleReference"))). body("entity.conditionRelations[0]", not(hasKey("handle"))). body("entity.conditionRelations[0]", not(hasKey("createdBy"))). @@ -1110,7 +1110,7 @@ public void diseaseAnnotationBulkUploadDuplicateNotes() throws Exception { get(geneDaGetEndpoint + "DATEST:DN01"). then(). statusCode(200). - body("entity.modEntityId", is("DATEST:DN01")). + body("entity.primaryExternalId", is("DATEST:DN01")). body("entity.relatedNotes", hasSize(1)); } diff --git a/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationITCase.java b/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationITCase.java index 9efcb43e0..e3ba2507a 100644 --- a/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationITCase.java @@ -204,11 +204,11 @@ private void loadRequiredEntities() throws Exception { nonPersistedOrganization = new Organization(); nonPersistedOrganization.setAbbreviation("INV"); nonPersistedAllele = new Allele(); - nonPersistedAllele.setModEntityId("ALLELE:Invalid"); + nonPersistedAllele.setPrimaryExternalId("ALLELE:Invalid"); nonPersistedGene = new Gene(); - nonPersistedGene.setModEntityId("GENE:Invalid"); + nonPersistedGene.setPrimaryExternalId("GENE:Invalid"); nonPersistedAgm = new AffectedGenomicModel(); - nonPersistedAgm.setModEntityId("AGM:Invalid"); + nonPersistedAgm.setPrimaryExternalId("AGM:Invalid"); nonPersistedReference = new Reference(); nonPersistedReference.setCurie("AGRKB:Invalid"); nonPersistedCondition = new ExperimentalCondition(); @@ -222,7 +222,7 @@ public void createGeneDiseaseAnnotation() throws Exception { GeneDiseaseAnnotation diseaseAnnotation = new GeneDiseaseAnnotation(); diseaseAnnotation.setRelation(alleleAndGeneRelation); - diseaseAnnotation.setModEntityId(GENE_DISEASE_ANNOTATION); + diseaseAnnotation.setPrimaryExternalId(GENE_DISEASE_ANNOTATION); diseaseAnnotation.setDateCreated(datetime); diseaseAnnotation.setNegated(false); diseaseAnnotation.setDiseaseAnnotationObject(doTerm); @@ -256,8 +256,8 @@ public void createGeneDiseaseAnnotation() throws Exception { then(). statusCode(200). body("entity.uniqueId", is("GENE:da0001|is_implicated_in|false|DOID:da0001|AGRKB:100000005|ECO:da00001|HGNC:1|has_condition|ZECO:da001|severity|ameliorated_by|SGD:da0001|ALLELE:da0002|GENE:da0002|SGD:da0002")). - body("entity.modEntityId", is(GENE_DISEASE_ANNOTATION)). - body("entity.diseaseAnnotationSubject.modEntityId", is(gene.getModEntityId())). + body("entity.primaryExternalId", is(GENE_DISEASE_ANNOTATION)). + body("entity.diseaseAnnotationSubject.primaryExternalId", is(gene.getPrimaryExternalId())). body("entity.diseaseAnnotationObject.curie", is(doTerm.getCurie())). body("entity.relation.name", is(alleleAndGeneRelation.getName())). body("entity.negated", is(false)). @@ -270,13 +270,13 @@ public void createGeneDiseaseAnnotation() throws Exception { body("entity.dateCreated", is(datetime.toString())). body("entity.geneticSex.name", is(geneticSex.getName())). body("entity.diseaseGeneticModifierRelation.name", is(diseaseGeneticModifierRelation.getName())). - body("entity.diseaseGeneticModifierAgms[0].modEntityId", is(agm2.getModEntityId())). - body("entity.diseaseGeneticModifierAlleles[0].modEntityId", is(allele2.getModEntityId())). - body("entity.diseaseGeneticModifierGenes[0].modEntityId", is(gene2.getModEntityId())). + body("entity.diseaseGeneticModifierAgms[0].primaryExternalId", is(agm2.getPrimaryExternalId())). + body("entity.diseaseGeneticModifierAlleles[0].primaryExternalId", is(allele2.getPrimaryExternalId())). + body("entity.diseaseGeneticModifierGenes[0].primaryExternalId", is(gene2.getPrimaryExternalId())). body("entity.annotationType.name", is(annotationType.getName())). body("entity.diseaseQualifiers[0].name", is(diseaseQualifier.getName())). - body("entity.with[0].modEntityId", is(withGene.getModEntityId())). - body("entity.sgdStrainBackground.modEntityId", is(agm.getModEntityId())). + body("entity.with[0].primaryExternalId", is(withGene.getPrimaryExternalId())). + body("entity.sgdStrainBackground.primaryExternalId", is(agm.getPrimaryExternalId())). body("entity.relatedNotes", hasSize(1)). body("entity.relatedNotes[0].noteType.name", is(relatedNote.getNoteType().getName())). body("entity.relatedNotes[0].freeText", is(relatedNote.getFreeText())). @@ -296,7 +296,7 @@ public void createGeneDiseaseAnnotation() throws Exception { public void createAlleleDiseaseAnnotation() { AlleleDiseaseAnnotation diseaseAnnotation = new AlleleDiseaseAnnotation(); diseaseAnnotation.setRelation(alleleAndGeneRelation); - diseaseAnnotation.setModEntityId(ALLELE_DISEASE_ANNOTATION); + diseaseAnnotation.setPrimaryExternalId(ALLELE_DISEASE_ANNOTATION); diseaseAnnotation.setDateCreated(datetime); diseaseAnnotation.setNegated(false); diseaseAnnotation.setDiseaseAnnotationObject(doTerm); @@ -331,8 +331,8 @@ public void createAlleleDiseaseAnnotation() { then(). statusCode(200). body("entity.uniqueId", is("ALLELE:da0001|is_implicated_in|false|DOID:da0001|AGRKB:100000005|ECO:da00001|HGNC:1|has_condition|ZECO:da001|severity|ameliorated_by|ALLELE:da0002|GENE:da0002|SGD:da0002")). - body("entity.modEntityId", is(ALLELE_DISEASE_ANNOTATION)). - body("entity.diseaseAnnotationSubject.modEntityId", is(allele.getModEntityId())). + body("entity.primaryExternalId", is(ALLELE_DISEASE_ANNOTATION)). + body("entity.diseaseAnnotationSubject.primaryExternalId", is(allele.getPrimaryExternalId())). body("entity.diseaseAnnotationObject.curie", is(doTerm.getCurie())). body("entity.relation.name", is(alleleAndGeneRelation.getName())). body("entity.negated", is(false)). @@ -345,12 +345,12 @@ public void createAlleleDiseaseAnnotation() { body("entity.dateCreated", is(datetime.toString())). body("entity.geneticSex.name", is(geneticSex.getName())). body("entity.diseaseGeneticModifierRelation.name", is(diseaseGeneticModifierRelation.getName())). - body("entity.diseaseGeneticModifierAgms[0].modEntityId", is(agm2.getModEntityId())). - body("entity.diseaseGeneticModifierAlleles[0].modEntityId", is(allele2.getModEntityId())). - body("entity.diseaseGeneticModifierGenes[0].modEntityId", is(gene2.getModEntityId())). + body("entity.diseaseGeneticModifierAgms[0].primaryExternalId", is(agm2.getPrimaryExternalId())). + body("entity.diseaseGeneticModifierAlleles[0].primaryExternalId", is(allele2.getPrimaryExternalId())). + body("entity.diseaseGeneticModifierGenes[0].primaryExternalId", is(gene2.getPrimaryExternalId())). body("entity.annotationType.name", is(annotationType.getName())). body("entity.diseaseQualifiers[0].name", is(diseaseQualifier.getName())). - body("entity.with[0].modEntityId", is(withGene.getModEntityId())). + body("entity.with[0].primaryExternalId", is(withGene.getPrimaryExternalId())). body("entity.relatedNotes", hasSize(1)). body("entity.relatedNotes[0].noteType.name", is(relatedNote.getNoteType().getName())). body("entity.relatedNotes[0].freeText", is(relatedNote.getFreeText())). @@ -363,9 +363,9 @@ public void createAlleleDiseaseAnnotation() { body("entity.conditionRelations[0].internal", is(false)). body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider.getSourceOrganization().getAbbreviation())). body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider2.getSourceOrganization().getAbbreviation())). - body("entity.inferredGene.modEntityId", is(gene.getModEntityId())). + body("entity.inferredGene.primaryExternalId", is(gene.getPrimaryExternalId())). body("entity.assertedGenes", hasSize(1)). - body("entity.assertedGenes[0].modEntityId", is(gene2.getModEntityId())); + body("entity.assertedGenes[0].primaryExternalId", is(gene2.getPrimaryExternalId())); } @Test @@ -373,7 +373,7 @@ public void createAlleleDiseaseAnnotation() { public void createAgmDiseaseAnnotation() { AGMDiseaseAnnotation diseaseAnnotation = new AGMDiseaseAnnotation(); diseaseAnnotation.setRelation(agmRelation); - diseaseAnnotation.setModEntityId(AGM_DISEASE_ANNOTATION); + diseaseAnnotation.setPrimaryExternalId(AGM_DISEASE_ANNOTATION); diseaseAnnotation.setDateCreated(datetime); diseaseAnnotation.setNegated(false); diseaseAnnotation.setDiseaseAnnotationObject(doTerm); @@ -410,8 +410,8 @@ public void createAgmDiseaseAnnotation() { then(). statusCode(200). body("entity.uniqueId", is("SGD:da0001|is_model_of|false|DOID:da0001|AGRKB:100000005|ECO:da00001|HGNC:1|has_condition|ZECO:da001|severity|ameliorated_by|ALLELE:da0002|GENE:da0002|SGD:da0002")). - body("entity.modEntityId", is(AGM_DISEASE_ANNOTATION)). - body("entity.diseaseAnnotationSubject.modEntityId", is(agm.getModEntityId())). + body("entity.primaryExternalId", is(AGM_DISEASE_ANNOTATION)). + body("entity.diseaseAnnotationSubject.primaryExternalId", is(agm.getPrimaryExternalId())). body("entity.diseaseAnnotationObject.curie", is(doTerm.getCurie())). body("entity.relation.name", is(agmRelation.getName())). body("entity.negated", is(false)). @@ -424,12 +424,12 @@ public void createAgmDiseaseAnnotation() { body("entity.dateCreated", is(datetime.toString())). body("entity.geneticSex.name", is(geneticSex.getName())). body("entity.diseaseGeneticModifierRelation.name", is(diseaseGeneticModifierRelation.getName())). - body("entity.diseaseGeneticModifierAgms[0].modEntityId", is(agm2.getModEntityId())). - body("entity.diseaseGeneticModifierAlleles[0].modEntityId", is(allele2.getModEntityId())). - body("entity.diseaseGeneticModifierGenes[0].modEntityId", is(gene2.getModEntityId())). + body("entity.diseaseGeneticModifierAgms[0].primaryExternalId", is(agm2.getPrimaryExternalId())). + body("entity.diseaseGeneticModifierAlleles[0].primaryExternalId", is(allele2.getPrimaryExternalId())). + body("entity.diseaseGeneticModifierGenes[0].primaryExternalId", is(gene2.getPrimaryExternalId())). body("entity.annotationType.name", is(annotationType.getName())). body("entity.diseaseQualifiers[0].name", is(diseaseQualifier.getName())). - body("entity.with[0].modEntityId", is(withGene.getModEntityId())). + body("entity.with[0].primaryExternalId", is(withGene.getPrimaryExternalId())). body("entity.relatedNotes", hasSize(1)). body("entity.relatedNotes[0].noteType.name", is(relatedNote.getNoteType().getName())). body("entity.relatedNotes[0].freeText", is(relatedNote.getFreeText())). @@ -442,11 +442,11 @@ public void createAgmDiseaseAnnotation() { body("entity.conditionRelations[0].internal", is(false)). body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider.getSourceOrganization().getAbbreviation())). body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider2.getSourceOrganization().getAbbreviation())). - body("entity.inferredGene.modEntityId", is(gene.getModEntityId())). + body("entity.inferredGene.primaryExternalId", is(gene.getPrimaryExternalId())). body("entity.assertedGenes", hasSize(1)). - body("entity.assertedGenes[0].modEntityId", is(gene2.getModEntityId())). - body("entity.inferredAllele.modEntityId", is(allele.getModEntityId())). - body("entity.assertedAllele.modEntityId", is(allele2.getModEntityId())); + body("entity.assertedGenes[0].primaryExternalId", is(gene2.getPrimaryExternalId())). + body("entity.inferredAllele.primaryExternalId", is(allele.getPrimaryExternalId())). + body("entity.assertedAllele.primaryExternalId", is(allele2.getPrimaryExternalId())); } @Test @@ -502,8 +502,8 @@ public void editGeneDiseaseAnnotation() { then(). statusCode(200). body("entity.uniqueId", is("GENE:da0002|is_marker_for|true|DOID:da0002|AGRKB:100000006|ECO:da00002|HGNC:2|induced_by|ZECO:da002|onset|exacerbated_by|SGD:da0002|ALLELE:da0001|GENE:da0001|SGD:da0001")). - body("entity.modEntityId", is(GENE_DISEASE_ANNOTATION)). - body("entity.diseaseAnnotationSubject.modEntityId", is(gene2.getModEntityId())). + body("entity.primaryExternalId", is(GENE_DISEASE_ANNOTATION)). + body("entity.diseaseAnnotationSubject.primaryExternalId", is(gene2.getPrimaryExternalId())). body("entity.diseaseAnnotationObject.curie", is(doTerm2.getCurie())). body("entity.relation.name", is(geneRelation.getName())). body("entity.negated", is(true)). @@ -516,13 +516,13 @@ public void editGeneDiseaseAnnotation() { body("entity.dateCreated", is(datetime2.toString())). body("entity.geneticSex.name", is(geneticSex2.getName())). body("entity.diseaseGeneticModifierRelation.name", is(diseaseGeneticModifierRelation2.getName())). - body("entity.diseaseGeneticModifierAgms[0].modEntityId", is(agm.getModEntityId())). - body("entity.diseaseGeneticModifierAlleles[0].modEntityId", is(allele.getModEntityId())). - body("entity.diseaseGeneticModifierGenes[0].modEntityId", is(gene.getModEntityId())). + body("entity.diseaseGeneticModifierAgms[0].primaryExternalId", is(agm.getPrimaryExternalId())). + body("entity.diseaseGeneticModifierAlleles[0].primaryExternalId", is(allele.getPrimaryExternalId())). + body("entity.diseaseGeneticModifierGenes[0].primaryExternalId", is(gene.getPrimaryExternalId())). body("entity.annotationType.name", is(annotationType2.getName())). body("entity.diseaseQualifiers[0].name", is(diseaseQualifier2.getName())). - body("entity.with[0].modEntityId", is(withGene2.getModEntityId())). - body("entity.sgdStrainBackground.modEntityId", is(agm2.getModEntityId())). + body("entity.with[0].primaryExternalId", is(withGene2.getPrimaryExternalId())). + body("entity.sgdStrainBackground.primaryExternalId", is(agm2.getPrimaryExternalId())). body("entity.relatedNotes", hasSize(1)). body("entity.relatedNotes[0].noteType.name", is(editedNote.getNoteType().getName())). body("entity.relatedNotes[0].freeText", is(editedNote.getFreeText())). @@ -590,8 +590,8 @@ public void editAlleleDiseaseAnnotation() { then(). statusCode(200). body("entity.uniqueId", is("ALLELE:da0002|is_implicated_in|true|DOID:da0002|AGRKB:100000006|ECO:da00002|HGNC:2|induced_by|ZECO:da002|onset|exacerbated_by|ALLELE:da0001|GENE:da0001|SGD:da0001")). - body("entity.modEntityId", is(ALLELE_DISEASE_ANNOTATION)). - body("entity.diseaseAnnotationSubject.modEntityId", is(allele2.getModEntityId())). + body("entity.primaryExternalId", is(ALLELE_DISEASE_ANNOTATION)). + body("entity.diseaseAnnotationSubject.primaryExternalId", is(allele2.getPrimaryExternalId())). body("entity.diseaseAnnotationObject.curie", is(doTerm2.getCurie())). body("entity.relation.name", is(alleleAndGeneRelation.getName())). body("entity.negated", is(true)). @@ -604,12 +604,12 @@ public void editAlleleDiseaseAnnotation() { body("entity.dateCreated", is(datetime2.toString())). body("entity.geneticSex.name", is(geneticSex2.getName())). body("entity.diseaseGeneticModifierRelation.name", is(diseaseGeneticModifierRelation2.getName())). - body("entity.diseaseGeneticModifierAgms[0].modEntityId", is(agm.getModEntityId())). - body("entity.diseaseGeneticModifierAlleles[0].modEntityId", is(allele.getModEntityId())). - body("entity.diseaseGeneticModifierGenes[0].modEntityId", is(gene.getModEntityId())). + body("entity.diseaseGeneticModifierAgms[0].primaryExternalId", is(agm.getPrimaryExternalId())). + body("entity.diseaseGeneticModifierAlleles[0].primaryExternalId", is(allele.getPrimaryExternalId())). + body("entity.diseaseGeneticModifierGenes[0].primaryExternalId", is(gene.getPrimaryExternalId())). body("entity.annotationType.name", is(annotationType2.getName())). body("entity.diseaseQualifiers[0].name", is(diseaseQualifier2.getName())). - body("entity.with[0].modEntityId", is(withGene2.getModEntityId())). + body("entity.with[0].primaryExternalId", is(withGene2.getPrimaryExternalId())). body("entity.relatedNotes", hasSize(1)). body("entity.relatedNotes[0].noteType.name", is(editedNote.getNoteType().getName())). body("entity.relatedNotes[0].freeText", is(editedNote.getFreeText())). @@ -622,9 +622,9 @@ public void editAlleleDiseaseAnnotation() { body("entity.conditionRelations[0].internal", is(true)). body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2.getSourceOrganization().getAbbreviation())). body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider.getSourceOrganization().getAbbreviation())). - body("entity.inferredGene.modEntityId", is(gene2.getModEntityId())). + body("entity.inferredGene.primaryExternalId", is(gene2.getPrimaryExternalId())). body("entity.assertedGenes", hasSize(1)). - body("entity.assertedGenes[0].modEntityId", is(gene.getModEntityId())); + body("entity.assertedGenes[0].primaryExternalId", is(gene.getPrimaryExternalId())); } @Test @@ -683,8 +683,8 @@ public void editAgmDiseaseAnnotation() { then(). statusCode(200). body("entity.uniqueId", is("SGD:da0002|is_exacerbated_model_of|true|DOID:da0002|AGRKB:100000006|ECO:da00002|HGNC:2|induced_by|ZECO:da002|onset|exacerbated_by|ALLELE:da0001|GENE:da0001|SGD:da0001")). - body("entity.modEntityId", is(AGM_DISEASE_ANNOTATION)). - body("entity.diseaseAnnotationSubject.modEntityId", is(agm2.getModEntityId())). + body("entity.primaryExternalId", is(AGM_DISEASE_ANNOTATION)). + body("entity.diseaseAnnotationSubject.primaryExternalId", is(agm2.getPrimaryExternalId())). body("entity.diseaseAnnotationObject.curie", is(doTerm2.getCurie())). body("entity.relation.name", is(agmRelation2.getName())). body("entity.negated", is(true)). @@ -697,12 +697,12 @@ public void editAgmDiseaseAnnotation() { body("entity.dateCreated", is(datetime2.toString())). body("entity.geneticSex.name", is(geneticSex2.getName())). body("entity.diseaseGeneticModifierRelation.name", is(diseaseGeneticModifierRelation2.getName())). - body("entity.diseaseGeneticModifierAgms[0].modEntityId", is(agm.getModEntityId())). - body("entity.diseaseGeneticModifierAlleles[0].modEntityId", is(allele.getModEntityId())). - body("entity.diseaseGeneticModifierGenes[0].modEntityId", is(gene.getModEntityId())). + body("entity.diseaseGeneticModifierAgms[0].primaryExternalId", is(agm.getPrimaryExternalId())). + body("entity.diseaseGeneticModifierAlleles[0].primaryExternalId", is(allele.getPrimaryExternalId())). + body("entity.diseaseGeneticModifierGenes[0].primaryExternalId", is(gene.getPrimaryExternalId())). body("entity.annotationType.name", is(annotationType2.getName())). body("entity.diseaseQualifiers[0].name", is(diseaseQualifier2.getName())). - body("entity.with[0].modEntityId", is(withGene2.getModEntityId())). + body("entity.with[0].primaryExternalId", is(withGene2.getPrimaryExternalId())). body("entity.relatedNotes", hasSize(1)). body("entity.relatedNotes[0].noteType.name", is(editedNote.getNoteType().getName())). body("entity.relatedNotes[0].freeText", is(editedNote.getFreeText())). @@ -715,11 +715,11 @@ public void editAgmDiseaseAnnotation() { body("entity.conditionRelations[0].internal", is(true)). body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2.getSourceOrganization().getAbbreviation())). body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider.getSourceOrganization().getAbbreviation())). - body("entity.inferredGene.modEntityId", is(gene2.getModEntityId())). + body("entity.inferredGene.primaryExternalId", is(gene2.getPrimaryExternalId())). body("entity.assertedGenes", hasSize(1)). - body("entity.assertedGenes[0].modEntityId", is(gene.getModEntityId())). - body("entity.inferredAllele.modEntityId", is(allele2.getModEntityId())). - body("entity.assertedAllele.modEntityId", is(allele.getModEntityId())); + body("entity.assertedGenes[0].primaryExternalId", is(gene.getPrimaryExternalId())). + body("entity.inferredAllele.primaryExternalId", is(allele2.getPrimaryExternalId())). + body("entity.assertedAllele.primaryExternalId", is(allele.getPrimaryExternalId())); } @Test @@ -867,7 +867,7 @@ public void editAgmDiseaseAnnotationWithMissingRequiredFieldsLevel1() { @Order(13) public void createGeneDiseaseAnnotationWithMissingRequiredFieldsLevel2() { GeneDiseaseAnnotation diseaseAnnotation = new GeneDiseaseAnnotation(); - diseaseAnnotation.setModEntityId("GeneDisease:0013"); + diseaseAnnotation.setPrimaryExternalId("GeneDisease:0013"); diseaseAnnotation.setRelation(geneRelation); diseaseAnnotation.setSingleReference(reference); diseaseAnnotation.setDiseaseAnnotationSubject(gene); @@ -904,7 +904,7 @@ public void createGeneDiseaseAnnotationWithMissingRequiredFieldsLevel2() { @Order(14) public void createAlleleDiseaseAnnotationWithMissingRequiredFieldsLevel2() { AlleleDiseaseAnnotation diseaseAnnotation = new AlleleDiseaseAnnotation(); - diseaseAnnotation.setModEntityId("AlleleDisease:0014"); + diseaseAnnotation.setPrimaryExternalId("AlleleDisease:0014"); diseaseAnnotation.setRelation(alleleAndGeneRelation); diseaseAnnotation.setSingleReference(reference); diseaseAnnotation.setDiseaseAnnotationSubject(allele); @@ -941,7 +941,7 @@ public void createAlleleDiseaseAnnotationWithMissingRequiredFieldsLevel2() { @Order(15) public void createAgmDiseaseAnnotationWithMissingRequiredFieldsLevel2() { AGMDiseaseAnnotation diseaseAnnotation = new AGMDiseaseAnnotation(); - diseaseAnnotation.setModEntityId("AGMDisease:0016"); + diseaseAnnotation.setPrimaryExternalId("AGMDisease:0016"); diseaseAnnotation.setRelation(agmRelation); diseaseAnnotation.setSingleReference(reference); diseaseAnnotation.setDiseaseAnnotationSubject(agm); @@ -1098,7 +1098,7 @@ public void editAgmDiseaseAnnotationWithMissingRequiredFieldsLevel2() { @Order(19) public void createGeneDiseaseAnnotationWithEmptyRequiredFieldsLevel2() { GeneDiseaseAnnotation diseaseAnnotation = new GeneDiseaseAnnotation(); - diseaseAnnotation.setModEntityId("GeneDisease:0019"); + diseaseAnnotation.setPrimaryExternalId("GeneDisease:0019"); diseaseAnnotation.setRelation(geneRelation); diseaseAnnotation.setSingleReference(reference); diseaseAnnotation.setDiseaseAnnotationSubject(gene); @@ -1126,7 +1126,7 @@ public void createGeneDiseaseAnnotationWithEmptyRequiredFieldsLevel2() { @Order(20) public void createAlleleDiseaseAnnotationWithEmptyRequiredFieldsLevel2() { AlleleDiseaseAnnotation diseaseAnnotation = new AlleleDiseaseAnnotation(); - diseaseAnnotation.setModEntityId("AlleleDisease:0020"); + diseaseAnnotation.setPrimaryExternalId("AlleleDisease:0020"); diseaseAnnotation.setRelation(alleleAndGeneRelation); diseaseAnnotation.setSingleReference(reference); diseaseAnnotation.setDiseaseAnnotationSubject(allele); @@ -1154,7 +1154,7 @@ public void createAlleleDiseaseAnnotationWithEmptyRequiredFieldsLevel2() { @Order(21) public void createAgmDiseaseAnnotationWithEmptyRequiredFieldsLevel2() { AGMDiseaseAnnotation diseaseAnnotation = new AGMDiseaseAnnotation(); - diseaseAnnotation.setModEntityId("AgmDisease:0021"); + diseaseAnnotation.setPrimaryExternalId("AgmDisease:0021"); diseaseAnnotation.setRelation(agmRelation); diseaseAnnotation.setSingleReference(reference); diseaseAnnotation.setDiseaseAnnotationSubject(agm); diff --git a/src/test/java/org/alliancegenome/curation_api/ExpressionBulkUploadFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/ExpressionBulkUploadFmsITCase.java index 7b4430edf..7ca667368 100644 --- a/src/test/java/org/alliancegenome/curation_api/ExpressionBulkUploadFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/ExpressionBulkUploadFmsITCase.java @@ -87,7 +87,7 @@ public void expressionBulkUploadAllFields() throws Exception { .body("results[0].dataProvider.sourceOrganization.abbreviation", is("ZFIN")) .body("results[0].uniqueId", is(experimentUniqueIdExpected)) .body("results[0].expressionAnnotations.size()", is(1)) - .body("results[0].entityAssayed.modEntityId", is(gene)) + .body("results[0].entityAssayed.primaryExternalId", is(gene)) .body("results[0].singleReference.crossReferences[0].referencedCurie", is(publicationId)) .body("results[0].expressionAssayUsed.curie", is(mmoTerm)) .body("results[0].obsolete", is(false)) @@ -104,7 +104,7 @@ public void expressionBulkUploadAllFields() throws Exception { .body("results", hasSize(1)) .body("results[0].dateCreated", is("2024-01-17T15:31:34Z")) .body("results[0].dataProvider.sourceOrganization.abbreviation", is("ZFIN")) - .body("results[0].expressionAnnotationSubject.modEntityId", is(gene)) + .body("results[0].expressionAnnotationSubject.primaryExternalId", is(gene)) .body("results[0].expressionAssayUsed.curie", is(mmoTerm)) .body("results[0].whereExpressedStatement", is("trunk")) .body("results[0].whenExpressedStageName", is("stage1")) diff --git a/src/test/java/org/alliancegenome/curation_api/GeneBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/GeneBulkUploadITCase.java index c9e7ed36d..39924d0ec 100644 --- a/src/test/java/org/alliancegenome/curation_api/GeneBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/GeneBulkUploadITCase.java @@ -87,7 +87,7 @@ public void geneBulkUploadCheckFields() throws Exception { get(geneGetEndpoint + "GENETEST:Gene0001"). then(). statusCode(200). - body("entity.modEntityId", is("GENETEST:Gene0001")). + body("entity.primaryExternalId", is("GENETEST:Gene0001")). body("entity.taxon.curie", is("NCBITaxon:6239")). body("entity.internal", is(true)). body("entity.obsolete", is(true)). @@ -183,7 +183,7 @@ public void geneBulkUploadUpdateFields() throws Exception { get(geneGetEndpoint + "GENETEST:Gene0001"). then(). statusCode(200). - body("entity.modEntityId", is("GENETEST:Gene0001")). + body("entity.primaryExternalId", is("GENETEST:Gene0001")). body("entity.taxon.curie", is("NCBITaxon:10116")). body("entity.internal", is(false)). body("entity.obsolete", is(false)). @@ -365,7 +365,7 @@ public void geneBulkUploadUpdateMissingNonRequiredFieldsLevel1() throws Exceptio get(geneGetEndpoint + "GENETEST:Gene0001"). then(). statusCode(200). - body("entity.modEntityId", is("GENETEST:Gene0001")). + body("entity.primaryExternalId", is("GENETEST:Gene0001")). body("entity", not(hasKey("relatedNotes"))). body("entity", not(hasKey("crossReferences"))). body("entity", not(hasKey("createdBy"))). @@ -388,7 +388,7 @@ public void geneBulkUploadUpdateMissingNonRequiredFieldsLevel2() throws Exceptio when(). get(geneGetEndpoint + "GENETEST:Gene0001").then(). statusCode(200). - body("entity.modEntityId", is("GENETEST:Gene0001")). + body("entity.primaryExternalId", is("GENETEST:Gene0001")). body("entity.relatedNotes[0]", not(hasKey("evidence"))). body("entity.relatedNotes[0]", not(hasKey("createdBy"))). body("entity.relatedNotes[0]", not(hasKey("updatedBy"))). @@ -440,7 +440,7 @@ public void geneBulkUploadUpdateEmptyNonRequiredFields() throws Exception { get(geneGetEndpoint + "GENETEST:Gene0001"). then(). statusCode(200). - body("entity.modEntityId", is("GENETEST:Gene0001")). + body("entity.primaryExternalId", is("GENETEST:Gene0001")). body("entity", not(hasKey("createdBy"))). body("entity", not(hasKey("updatedBy"))). body("entity", not(hasKey("dateCreated"))). @@ -518,7 +518,7 @@ public void geneBulkUploadDuplicateXref() throws Exception { get(geneGetEndpoint + "GENETEST:DX01"). then(). statusCode(200). - body("entity.modEntityId", is("GENETEST:DX01")). + body("entity.primaryExternalId", is("GENETEST:DX01")). body("entity.crossReferences", hasSize(1)); // Check reload also successful @@ -528,7 +528,7 @@ public void geneBulkUploadDuplicateXref() throws Exception { get(geneGetEndpoint + "GENETEST:DX01"). then(). statusCode(200). - body("entity.modEntityId", is("GENETEST:DX01")). + body("entity.primaryExternalId", is("GENETEST:DX01")). body("entity.crossReferences", hasSize(1)); } @@ -542,7 +542,7 @@ public void geneBulkUploadDuplicateNotes() throws Exception { get(geneGetEndpoint + "GENETEST:DN01"). then(). statusCode(200). - body("entity.modEntityId", is("GENETEST:DN01")). + body("entity.primaryExternalId", is("GENETEST:DN01")). body("entity.relatedNotes", hasSize(1)); } } diff --git a/src/test/java/org/alliancegenome/curation_api/GeneITCase.java b/src/test/java/org/alliancegenome/curation_api/GeneITCase.java index 95167bfcf..9e5382cf4 100644 --- a/src/test/java/org/alliancegenome/curation_api/GeneITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/GeneITCase.java @@ -127,7 +127,7 @@ public void createValidGene() { loadRequiredEntities(); Gene gene = new Gene(); - gene.setModEntityId(GENE); + gene.setPrimaryExternalId(GENE); gene.setDateCreated(datetime); gene.setTaxon(taxon); gene.setGeneType(soTerm); @@ -151,7 +151,7 @@ public void createValidGene() { get("/api/gene/" + GENE). then(). statusCode(200). - body("entity.modEntityId", is(GENE)). + body("entity.primaryExternalId", is(GENE)). body("entity.taxon.curie", is(taxon.getCurie())). body("entity.geneType.curie", is(soTerm.getCurie())). body("entity.internal", is(false)). @@ -251,7 +251,7 @@ public void editGene() { get("/api/gene/" + GENE). then(). statusCode(200). - body("entity.modEntityId", is(GENE)). + body("entity.primaryExternalId", is(GENE)). body("entity.taxon.curie", is(taxon2.getCurie())). body("entity.geneType.curie", is(soTerm2.getCurie())). body("entity.internal", is(true)). @@ -302,7 +302,7 @@ public void createGeneWithMissingRequiredFieldsLevel1() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(4))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")). + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")). body("errorMessages.taxon", is(ValidationConstants.REQUIRED_MESSAGE)). body("errorMessages.geneSymbol", is(ValidationConstants.REQUIRED_MESSAGE)). body("errorMessages.geneType", is(ValidationConstants.REQUIRED_MESSAGE)); @@ -310,9 +310,9 @@ public void createGeneWithMissingRequiredFieldsLevel1() { @Test @Order(4) - public void editGeneWithMissingModEntityId() { + public void editGeneWithMissingPrimaryExternalId() { Gene gene = getGene(GENE); - gene.setModEntityId(null); + gene.setPrimaryExternalId(null); RestAssured.given(). contentType("application/json"). @@ -322,7 +322,7 @@ public void editGeneWithMissingModEntityId() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(1))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")); + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")); } @Test @@ -353,7 +353,7 @@ public void editGeneWithMissingRequiredFieldsLevel1() { public void createGeneWithEmptyRequiredFieldsLevel1() { Gene gene = new Gene(); - gene.setModEntityId(""); + gene.setPrimaryExternalId(""); gene.setTaxon(taxon); gene.setGeneSymbol(geneSymbol); gene.setGeneType(soTerm); @@ -366,14 +366,14 @@ public void createGeneWithEmptyRequiredFieldsLevel1() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(1))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")); + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")); } @Test @Order(7) - public void editGeneWithEmptyModEntityId() { + public void editGeneWithEmptyPrimaryExternalId() { Gene gene = getGene(GENE); - gene.setModEntityId(""); + gene.setPrimaryExternalId(""); RestAssured.given(). contentType("application/json"). @@ -383,7 +383,7 @@ public void editGeneWithEmptyModEntityId() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(1))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")); + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")); } @Test @@ -391,7 +391,7 @@ public void editGeneWithEmptyModEntityId() { public void createGeneWithMissingRequiredFieldsLevel2() { Gene gene = new Gene(); - gene.setModEntityId("GENE:0008"); + gene.setPrimaryExternalId("GENE:0008"); gene.setTaxon(taxon); gene.setGeneType(soTerm); @@ -497,7 +497,7 @@ public void editGeneWithMissingRequiredFieldsLevel2() { public void createGeneWithEmptyRequiredFieldsLevel2() { Gene gene = new Gene(); - gene.setModEntityId("GENE:0010"); + gene.setPrimaryExternalId("GENE:0010"); gene.setTaxon(taxon); gene.setGeneType(soTerm); @@ -599,7 +599,7 @@ public void createGeneWithInvalidFields() { invalidDataProvider.setSourceOrganization(nonPersistedOrganization); Gene gene = new Gene(); - gene.setModEntityId("GENE:0012"); + gene.setPrimaryExternalId("GENE:0012"); gene.setTaxon(nonPersistedTaxon); gene.setGeneType(nonPersistedSoTerm); gene.setDataProvider(invalidDataProvider); @@ -722,7 +722,7 @@ public void editGeneWithInvalidFields() { @Order(14) public void createGeneWithObsoleteFields() { Gene gene = new Gene(); - gene.setModEntityId("GENE:0014"); + gene.setPrimaryExternalId("GENE:0014"); gene.setTaxon(obsoleteTaxon); gene.setGeneType(obsoleteSoTerm); gene.setDataProvider(obsoleteDataProvider); @@ -932,7 +932,7 @@ public void editGeneWithNullNonRequiredFieldsLevel1() { @Order(18) public void createGeneWithOnlyRequiredFields() { Gene gene = new Gene(); - gene.setModEntityId("GENE:0020"); + gene.setPrimaryExternalId("GENE:0020"); gene.setTaxon(taxon); gene.setGeneSymbol(geneSymbol); gene.setGeneType(soTerm); @@ -950,7 +950,7 @@ public void createGeneWithOnlyRequiredFields() { @Order(19) public void createGeneWithOnlyRequiredFieldsLevel2() { Gene gene = new Gene(); - gene.setModEntityId("GENE:0021"); + gene.setPrimaryExternalId("GENE:0021"); gene.setTaxon(taxon); gene.setGeneType(soTerm); diff --git a/src/test/java/org/alliancegenome/curation_api/GeneInteractionBulkUploadFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/GeneInteractionBulkUploadFmsITCase.java index 2856af58e..8dfeb183d 100644 --- a/src/test/java/org/alliancegenome/curation_api/GeneInteractionBulkUploadFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/GeneInteractionBulkUploadFmsITCase.java @@ -110,8 +110,8 @@ public void geneMolecularInteractionBulkUploadCheckFields() throws Exception { statusCode(200). body("entity.interactionId", is(geneMolecularInteractionId)). body("entity.uniqueId", is("WB:WBInteraction0001|WB:GITestGene0001|physically_interacts_with|WB:GITestGene0002|AGRKB:000000002|MI:Test0002|MI:Test0003|MI:Test0004|MI:Test0005|MI:Test0006|MI:Test0007")). - body("entity.geneAssociationSubject.modEntityId", is(gene1)). - body("entity.geneGeneAssociationObject.modEntityId", is(gene2)). + body("entity.geneAssociationSubject.primaryExternalId", is(gene1)). + body("entity.geneGeneAssociationObject.primaryExternalId", is(gene2)). body("entity.relation.name", is(VocabularyConstants.GENE_MOLECULAR_INTERACTION_RELATION_TERM)). body("entity.dateCreated", is("2024-01-17T00:00:00Z")). body("entity.dateUpdated", is("2024-01-18T00:00:00Z")). @@ -140,8 +140,8 @@ public void geneGeneticInteractionBulkUploadCheckFields() throws Exception { statusCode(200). body("entity.interactionId", is(geneGeneticInteractionId)). body("entity.uniqueId", is("WB:WBInteraction0002|WB:GITestGene0001|genetically_interacts_with|WB:GITestGene0002|AGRKB:000000002|MI:Test0002|MI:Test0003|MI:Test0004|MI:Test0005|MI:Test0006|MI:Test0001|WB:WBVar11111111|WB:WBVar22222222|Test WBPhenotype term")). - body("entity.geneAssociationSubject.modEntityId", is(gene1)). - body("entity.geneGeneAssociationObject.modEntityId", is(gene2)). + body("entity.geneAssociationSubject.primaryExternalId", is(gene1)). + body("entity.geneGeneAssociationObject.primaryExternalId", is(gene2)). body("entity.relation.name", is(VocabularyConstants.GENE_GENETIC_INTERACTION_RELATION_TERM)). body("entity.dateCreated", is("2024-01-17T00:00:00Z")). body("entity.dateUpdated", is("2024-01-18T00:00:00Z")). @@ -152,8 +152,8 @@ public void geneGeneticInteractionBulkUploadCheckFields() throws Exception { body("entity.interactorBRole.curie", is(miTerm4)). body("entity.interactorAType.curie", is(miTerm5)). body("entity.interactorBType.curie", is(miTerm6)). - body("entity.interactorAGeneticPerturbation.modEntityId", is(allele1)). - body("entity.interactorBGeneticPerturbation.modEntityId", is(allele2)). + body("entity.interactorAGeneticPerturbation.primaryExternalId", is(allele1)). + body("entity.interactorBGeneticPerturbation.primaryExternalId", is(allele2)). body("entity.phenotypesOrTraits[0]", is("Test WBPhenotype term")). body("entity.crossReferences[0].referencedCurie", is(geneGeneticInteractionId)); } @@ -171,8 +171,8 @@ public void geneMolecularInteractionBulkUploadUpdateCheckFields() throws Excepti statusCode(200). body("entity.interactionId", is(geneMolecularInteractionId)). body("entity.uniqueId", is("WB:WBInteraction0001|WB:GITestGene0002|physically_interacts_with|WB:GITestGene0001|AGRKB:000000021|MI:Test0003|MI:Test0004|MI:Test0005|MI:Test0006|MI:Test0007|MI:Test0001")). - body("entity.geneAssociationSubject.modEntityId", is(gene2)). - body("entity.geneGeneAssociationObject.modEntityId", is(gene1)). + body("entity.geneAssociationSubject.primaryExternalId", is(gene2)). + body("entity.geneGeneAssociationObject.primaryExternalId", is(gene1)). body("entity.relation.name", is(VocabularyConstants.GENE_MOLECULAR_INTERACTION_RELATION_TERM)). body("entity.dateCreated", is("2024-01-18T00:00:00Z")). body("entity.dateUpdated", is("2024-01-19T00:00:00Z")). @@ -201,8 +201,8 @@ public void geneGeneticInteractionBulkUploadUpdateCheckFields() throws Exception statusCode(200). body("entity.interactionId", is(geneGeneticInteractionId)). body("entity.uniqueId", is("WB:WBInteraction0002|WB:GITestGene0002|genetically_interacts_with|WB:GITestGene0001|AGRKB:000000021|MI:Test0003|MI:Test0004|MI:Test0005|MI:Test0006|MI:Test0007|MI:Test0002|WB:WBVar22222222|WB:WBVar11111111|vegetative growth, complete rescue")). - body("entity.geneAssociationSubject.modEntityId", is(gene2)). - body("entity.geneGeneAssociationObject.modEntityId", is(gene1)). + body("entity.geneAssociationSubject.primaryExternalId", is(gene2)). + body("entity.geneGeneAssociationObject.primaryExternalId", is(gene1)). body("entity.relation.name", is(VocabularyConstants.GENE_GENETIC_INTERACTION_RELATION_TERM)). body("entity.dateCreated", is("2024-01-18T00:00:00Z")). body("entity.dateUpdated", is("2024-01-19T00:00:00Z")). @@ -213,8 +213,8 @@ public void geneGeneticInteractionBulkUploadUpdateCheckFields() throws Exception body("entity.interactorBRole.curie", is(miTerm5)). body("entity.interactorAType.curie", is(miTerm6)). body("entity.interactorBType.curie", is(miTerm7)). - body("entity.interactorAGeneticPerturbation.modEntityId", is(allele2)). - body("entity.interactorBGeneticPerturbation.modEntityId", is(allele1)). + body("entity.interactorAGeneticPerturbation.primaryExternalId", is(allele2)). + body("entity.interactorBGeneticPerturbation.primaryExternalId", is(allele1)). body("entity.phenotypesOrTraits[0]", is("vegetative growth, complete rescue")). body("entity.crossReferences[0].referencedCurie", is(geneGeneticInteractionId)); } @@ -315,7 +315,7 @@ public void geneInteractionBulkUploadXrefLookup() throws Exception { get(geneMolecularInteractionGetEndpoint + geneInteractionXrefLookupId). then(). statusCode(200). - body("entity.geneAssociationSubject.modEntityId", is(gene3)); + body("entity.geneAssociationSubject.primaryExternalId", is(gene3)); } @@ -329,7 +329,7 @@ public void geneInteractionHumanGeneBulkUploadXrefLookup() throws Exception { get(geneMolecularInteractionGetEndpoint + geneInteractionXrefLookupId2). then(). statusCode(200). - body("entity.geneAssociationSubject.modEntityId", is(gene4)); + body("entity.geneAssociationSubject.primaryExternalId", is(gene4)); } diff --git a/src/test/java/org/alliancegenome/curation_api/Gff3BulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/Gff3BulkUploadITCase.java index 9d166187c..b53c98399 100644 --- a/src/test/java/org/alliancegenome/curation_api/Gff3BulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/Gff3BulkUploadITCase.java @@ -88,7 +88,7 @@ public void gff3DataBulkUploadTranscriptEntity() throws Exception { body("entity.transcriptGenomicLocationAssociations", hasSize(1)). body("entity.transcriptGenomicLocationAssociations[0].relation.name", is("located_on")). body("entity.transcriptGenomicLocationAssociations[0].transcriptGenomicLocationAssociationObject.name", is("I")). - body("entity.transcriptGenomicLocationAssociations[0].transcriptGenomicLocationAssociationObject.modEntityId", is("RefSeq:NC_003279.8")). + body("entity.transcriptGenomicLocationAssociations[0].transcriptGenomicLocationAssociationObject.primaryExternalId", is("RefSeq:NC_003279.8")). body("entity.transcriptGenomicLocationAssociations[0].transcriptGenomicLocationAssociationObject.taxon.curie", is("NCBITaxon:6239")). body("entity.transcriptGenomicLocationAssociations[0].start", is(1)). body("entity.transcriptGenomicLocationAssociations[0].end", is(1000)). @@ -96,7 +96,7 @@ public void gff3DataBulkUploadTranscriptEntity() throws Exception { body("entity.transcriptGenomicLocationAssociations[0].strand", is("+")). body("entity.transcriptGeneAssociations", hasSize(1)). body("entity.transcriptGeneAssociations[0].relation.name", is("is_child_of")). - body("entity.transcriptGeneAssociations[0].transcriptGeneAssociationObject.modEntityId", is(geneCurie)); + body("entity.transcriptGeneAssociations[0].transcriptGeneAssociationObject.primaryExternalId", is(geneCurie)); } @@ -122,7 +122,7 @@ public void gff3DataBulkUploadExonEntity() throws Exception { body("entity.exonGenomicLocationAssociations", hasSize(1)). body("entity.exonGenomicLocationAssociations[0].relation.name", is("located_on")). body("entity.exonGenomicLocationAssociations[0].exonGenomicLocationAssociationObject.name", is("I")). - body("entity.exonGenomicLocationAssociations[0].exonGenomicLocationAssociationObject.modEntityId", is("RefSeq:NC_003279.8")). + body("entity.exonGenomicLocationAssociations[0].exonGenomicLocationAssociationObject.primaryExternalId", is("RefSeq:NC_003279.8")). body("entity.exonGenomicLocationAssociations[0].exonGenomicLocationAssociationObject.taxon.curie", is("NCBITaxon:6239")). body("entity.exonGenomicLocationAssociations[0].start", is(1)). body("entity.exonGenomicLocationAssociations[0].end", is(100)). @@ -160,7 +160,7 @@ public void gff3DataBulkUploadCodingSequenceEntity() throws Exception { body("entity.codingSequenceGenomicLocationAssociations", hasSize(1)). body("entity.codingSequenceGenomicLocationAssociations[0].relation.name", is("located_on")). body("entity.codingSequenceGenomicLocationAssociations[0].codingSequenceGenomicLocationAssociationObject.name", is("I")). - body("entity.codingSequenceGenomicLocationAssociations[0].codingSequenceGenomicLocationAssociationObject.modEntityId", is("RefSeq:NC_003279.8")). + body("entity.codingSequenceGenomicLocationAssociations[0].codingSequenceGenomicLocationAssociationObject.primaryExternalId", is("RefSeq:NC_003279.8")). body("entity.codingSequenceGenomicLocationAssociations[0].codingSequenceGenomicLocationAssociationObject.taxon.curie", is("NCBITaxon:6239")). body("entity.codingSequenceGenomicLocationAssociations[0].start", is(10)). body("entity.codingSequenceGenomicLocationAssociations[0].end", is(100)). @@ -203,7 +203,7 @@ public void gff3DataBulkUploadUpdateTranscriptEntity() throws Exception { body("entity.transcriptGenomicLocationAssociations", hasSize(1)). body("entity.transcriptGenomicLocationAssociations[0].relation.name", is("located_on")). body("entity.transcriptGenomicLocationAssociations[0].transcriptGenomicLocationAssociationObject.name", is("II")). - body("entity.transcriptGenomicLocationAssociations[0].transcriptGenomicLocationAssociationObject.modEntityId", is("RefSeq:NC_003280.10")). + body("entity.transcriptGenomicLocationAssociations[0].transcriptGenomicLocationAssociationObject.primaryExternalId", is("RefSeq:NC_003280.10")). body("entity.transcriptGenomicLocationAssociations[0].transcriptGenomicLocationAssociationObject.taxon.curie", is("NCBITaxon:6239")). body("entity.transcriptGenomicLocationAssociations[0].start", is(2)). body("entity.transcriptGenomicLocationAssociations[0].end", is(2000)). @@ -284,11 +284,11 @@ public void gff3DataBulkUploadGeneLocation() throws Exception { get(geneGetEndpoint + geneCurie). then(). statusCode(200). - body("entity.modEntityId", is(geneCurie)). + body("entity.primaryExternalId", is(geneCurie)). body("entity.geneGenomicLocationAssociations", hasSize(1)). body("entity.geneGenomicLocationAssociations[0].relation.name", is("located_on")). body("entity.geneGenomicLocationAssociations[0].geneGenomicLocationAssociationObject.name", is("I")). - body("entity.geneGenomicLocationAssociations[0].geneGenomicLocationAssociationObject.modEntityId", is("RefSeq:NC_003279.8")). + body("entity.geneGenomicLocationAssociations[0].geneGenomicLocationAssociationObject.primaryExternalId", is("RefSeq:NC_003279.8")). body("entity.geneGenomicLocationAssociations[0].geneGenomicLocationAssociationObject.taxon.curie", is("NCBITaxon:6239")). body("entity.geneGenomicLocationAssociations[0].start", is(1)). body("entity.geneGenomicLocationAssociations[0].end", is(1005)). diff --git a/src/test/java/org/alliancegenome/curation_api/HTPExpressionDatasetSampleAnnotationFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/HTPExpressionDatasetSampleAnnotationFmsITCase.java index 74827885f..0159b4aae 100644 --- a/src/test/java/org/alliancegenome/curation_api/HTPExpressionDatasetSampleAnnotationFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/HTPExpressionDatasetSampleAnnotationFmsITCase.java @@ -65,7 +65,7 @@ public void htpDatasetSampleBulkUploadCheckFields() throws Exception { .body("results[0].expressionAssayUsed.curie", is("HTPMMO:assay001")) .body("results[0].htpExpressionSampleType.curie", is("HTPOBI:sample001")) .body("results[0].htpExpressionSampleAge.stage.developmentalStageStart.curie", is("ZFS:001")) - .body("results[0].genomicInformation.bioSampleAllele.modEntityId", is("AGA:Allele0001")) + .body("results[0].genomicInformation.bioSampleAllele.primaryExternalId", is("AGA:Allele0001")) .body("results[0].microarraySampleDetails.channelId", is("WB:[cgc4349]:fem-3:A")) .body("results[0].microarraySampleDetails.channelNumber", is(1)) .body("results[0].geneticSex.name", is("hermaphrodite")) diff --git a/src/test/java/org/alliancegenome/curation_api/OrthologyBulkUploadFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/OrthologyBulkUploadFmsITCase.java index 271bdb623..f2eb9caca 100644 --- a/src/test/java/org/alliancegenome/curation_api/OrthologyBulkUploadFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/OrthologyBulkUploadFmsITCase.java @@ -56,8 +56,8 @@ public void orthologyBulkUploadCheckFields() throws Exception { statusCode(200). body("totalResults", is(1)). body("results", hasSize(1)). - body("results[0].subjectGene.modEntityId", is("GENETEST:Gene0001")). - body("results[0].objectGene.modEntityId", is("HGNC:0001")). + body("results[0].subjectGene.primaryExternalId", is("GENETEST:Gene0001")). + body("results[0].objectGene.primaryExternalId", is("HGNC:0001")). body("results[0].subjectGene.taxon.curie", is("NCBITaxon:6239")). body("results[0].objectGene.taxon.curie", is("NCBITaxon:9606")). body("results[0].moderateFilter", is(false)). diff --git a/src/test/java/org/alliancegenome/curation_api/ParalogyBulkUploadFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/ParalogyBulkUploadFmsITCase.java index 69de7e46c..4ef2e4361 100644 --- a/src/test/java/org/alliancegenome/curation_api/ParalogyBulkUploadFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/ParalogyBulkUploadFmsITCase.java @@ -66,8 +66,8 @@ public void paralogyBulkUploadCheckFields() throws Exception { RestAssured.given().when().header("Content-Type", "application/json").body("{}").post(paralogyFindEndpoint) .then().statusCode(200).body("totalResults", is(1)).body("results", hasSize(1)) .body("results[0].confidence.name", is("moderate")) - .body("results[0].subjectGene.modEntityId", is("PARATEST:Gene000100")) - .body("results[0].objectGene.modEntityId", is("PARATEST:Gene000200")) + .body("results[0].subjectGene.primaryExternalId", is("PARATEST:Gene000100")) + .body("results[0].objectGene.primaryExternalId", is("PARATEST:Gene000200")) .body("results[0].identity", is(65)) .body("results[0].length", is(466)) .body("results[0].predictionMethodsMatched", hasSize(1)) diff --git a/src/test/java/org/alliancegenome/curation_api/PhenotypeAnnotationBulkUploadFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/PhenotypeAnnotationBulkUploadFmsITCase.java index a34f86a23..bb1a13fd3 100644 --- a/src/test/java/org/alliancegenome/curation_api/PhenotypeAnnotationBulkUploadFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/PhenotypeAnnotationBulkUploadFmsITCase.java @@ -103,7 +103,7 @@ public void agmPhenotypeAnnotationBulkUploadCheckFields() throws Exception { SearchResponse response = RestAssured.given().when() .header("Content-Type", "application/json").body("{}").post(agmPhenotypeAnnotationFindEndpoint).then() .statusCode(200).body("totalResults", is(1)).body("results", hasSize(1)) - .body("results[0].phenotypeAnnotationSubject.modEntityId", is(agm)) + .body("results[0].phenotypeAnnotationSubject.primaryExternalId", is(agm)) .body("results[0].phenotypeAnnotationObject", is(phenotypeStatement)) .body("results[0].relation.name", is("has_phenotype")) .body("results[0].dateCreated", is("2024-01-17T15:26:56Z")) @@ -141,7 +141,7 @@ public void allelePhenotypeAnnotationBulkUploadCheckFields() throws Exception { SearchResponse response = RestAssured.given().when() .header("Content-Type", "application/json").body("{}").post(allelePhenotypeAnnotationFindEndpoint) .then().statusCode(200).body("totalResults", is(1)).body("results", hasSize(1)) - .body("results[0].phenotypeAnnotationSubject.modEntityId", is(allele)) + .body("results[0].phenotypeAnnotationSubject.primaryExternalId", is(allele)) .body("results[0].phenotypeAnnotationObject", is(phenotypeStatement)) .body("results[0].relation.name", is("has_phenotype")) .body("results[0].dateCreated", is("2024-01-17T15:26:56Z")) @@ -177,7 +177,7 @@ public void genePhenotypeAnnotationBulkUploadCheckFields() throws Exception { RestAssured.given().when().header("Content-Type", "application/json").body("{}") .post(genePhenotypeAnnotationFindEndpoint).then().statusCode(200).body("totalResults", is(1)) - .body("results", hasSize(1)).body("results[0].phenotypeAnnotationSubject.modEntityId", is(gene)) + .body("results", hasSize(1)).body("results[0].phenotypeAnnotationSubject.primaryExternalId", is(gene)) .body("results[0].phenotypeAnnotationObject", is(phenotypeStatement)) .body("results[0].relation.name", is("has_phenotype")) .body("results[0].dateCreated", is("2024-01-17T15:26:56Z")) @@ -204,7 +204,7 @@ public void genePhenotypeAnnotationBulkUploadCheckFields() throws Exception { RestAssured.given().when().get("/api/gene/" + gene). then(). statusCode(200). - body("entity.modEntityId", is(gene)). + body("entity.primaryExternalId", is(gene)). body("entity.crossReferences", hasSize(1)). body("entity.crossReferences[0].displayName", is("PATEST")). body("entity.crossReferences[0].referencedCurie", is(gene)). @@ -222,9 +222,9 @@ public void agmPhenotypeAnnotationAddSecondaryAnnotationFields() throws Exceptio + "AS_01_add_secondary_allele_annotation_to_primary_agm_annotation.json", 3); RestAssured.given().when().get(phenotypeAnnotationGetEndpoint + agmPaId).then().statusCode(200) - .body("entity.phenotypeAnnotationSubject.modEntityId", is(agm)) - .body("entity.inferredGene.modEntityId", is(gene)) - .body("entity.assertedAllele.modEntityId", is(allele)); + .body("entity.phenotypeAnnotationSubject.primaryExternalId", is(agm)) + .body("entity.inferredGene.primaryExternalId", is(gene)) + .body("entity.assertedAllele.primaryExternalId", is(allele)); } @Test @@ -234,8 +234,8 @@ public void allelePhenotypeAnnotationAddSecondaryAnnotationFields() throws Excep + "AS_02_add_secondary_gene_annotation_to_primary_allele_annotation.json", 2); RestAssured.given().when().get(phenotypeAnnotationGetEndpoint + allelePaId).then().statusCode(200) - .body("entity.phenotypeAnnotationSubject.modEntityId", is(allele)) - .body("entity.inferredGene.modEntityId", is(gene)); + .body("entity.phenotypeAnnotationSubject.primaryExternalId", is(allele)) + .body("entity.inferredGene.primaryExternalId", is(gene)); } @Test @@ -247,7 +247,7 @@ public void agmPhenotypeAnnotationClearSecondaryAnnotationFields() throws Except phenotypeAnnotationTestFilePath + "AF_01_all_fields_primary_agm_annotation.json"); RestAssured.given().when().get(phenotypeAnnotationGetEndpoint + agmPaId).then().statusCode(200) - .body("entity.phenotypeAnnotationSubject.modEntityId", is(agm)) + .body("entity.phenotypeAnnotationSubject.primaryExternalId", is(agm)) .body("entity", not(hasKey("inferredGene"))); } @@ -258,7 +258,7 @@ public void allelePhenotypeAnnotationClearSecondaryAnnotationFields() throws Exc phenotypeAnnotationTestFilePath + "AF_02_all_fields_primary_allele_annotation.json"); RestAssured.given().when().get(phenotypeAnnotationGetEndpoint + allelePaId).then().statusCode(200) - .body("entity.phenotypeAnnotationSubject.modEntityId", is(allele)) + .body("entity.phenotypeAnnotationSubject.primaryExternalId", is(allele)) .body("entity", not(hasKey("inferredGene"))); } @@ -271,9 +271,9 @@ public void agmPhenotypeAnnotationInferredPrimaryAnnotation() throws Exception { + "IF_01_infer_primary_agm_annotation_from_secondary_allele_annotation.json"); RestAssured.given().when().header("Content-Type", "application/json") - .body("{\"phenotypeAnnotationSubject.modEntityId\" : \"" + agm2 + "\"}") + .body("{\"phenotypeAnnotationSubject.primaryExternalId\" : \"" + agm2 + "\"}") .post(agmPhenotypeAnnotationFindEndpoint).then().statusCode(200).body("totalResults", is(1)) - .body("results", hasSize(1)).body("results[0].phenotypeAnnotationSubject.modEntityId", is(agm2)) + .body("results", hasSize(1)).body("results[0].phenotypeAnnotationSubject.primaryExternalId", is(agm2)) .body("results[0].phenotypeAnnotationObject", is(phenotypeStatement)) .body("results[0].relation.name", is("has_phenotype")) .body("results[0].dateCreated", is("2024-01-17T15:26:56Z")) @@ -292,7 +292,7 @@ public void agmPhenotypeAnnotationInferredPrimaryAnnotation() throws Exception { .body("results[0].conditionRelations[0].conditions[0].conditionTaxon.curie", is("NCBITaxon:6239")) .body("results[0].conditionRelations[0].conditions[0].conditionChemical.curie", is(chemicalTerm)) .body("results[0].conditionRelations[0].conditions[0].conditionSummary", is("condition summary test")) - .body("results[0].inferredGene.modEntityId", is(gene)); + .body("results[0].inferredGene.primaryExternalId", is(gene)); } @Test @@ -302,9 +302,9 @@ public void allelePhenotypeAnnotationInferredPrimaryAnnotation() throws Exceptio + "IF_02_infer_primary_allele_annotation_from_secondary_gene_annotation.json"); RestAssured.given().when().header("Content-Type", "application/json") - .body("{\"phenotypeAnnotationSubject.modEntityId\" : \"" + allele2 + "\"}") + .body("{\"phenotypeAnnotationSubject.primaryExternalId\" : \"" + allele2 + "\"}") .post(allelePhenotypeAnnotationFindEndpoint).then().statusCode(200).body("totalResults", is(1)) - .body("results", hasSize(1)).body("results[0].phenotypeAnnotationSubject.modEntityId", is(allele2)) + .body("results", hasSize(1)).body("results[0].phenotypeAnnotationSubject.primaryExternalId", is(allele2)) .body("results[0].phenotypeAnnotationObject", is(phenotypeStatement)) .body("results[0].relation.name", is("has_phenotype")) .body("results[0].dateCreated", is("2024-01-17T15:26:56Z")) @@ -323,7 +323,7 @@ public void allelePhenotypeAnnotationInferredPrimaryAnnotation() throws Exceptio .body("results[0].conditionRelations[0].conditions[0].conditionTaxon.curie", is("NCBITaxon:6239")) .body("results[0].conditionRelations[0].conditions[0].conditionChemical.curie", is(chemicalTerm)) .body("results[0].conditionRelations[0].conditions[0].conditionSummary", is("condition summary test")) - .body("results[0].inferredGene.modEntityId", is(gene)); + .body("results[0].inferredGene.primaryExternalId", is(gene)); } @Test diff --git a/src/test/java/org/alliancegenome/curation_api/SequenceTargetingReagentBulkUploadFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/SequenceTargetingReagentBulkUploadFmsITCase.java index 5bb9fe659..ba99a15f6 100644 --- a/src/test/java/org/alliancegenome/curation_api/SequenceTargetingReagentBulkUploadFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/SequenceTargetingReagentBulkUploadFmsITCase.java @@ -56,7 +56,7 @@ public void sqtrBulkUploadCheckFields() throws Exception { statusCode(200). body("totalResults", is(1)). body("results", hasSize(1)). - body("results[0].modEntityId", is("ZFIN:ZDB-TALEN-180503-1")). + body("results[0].primaryExternalId", is("ZFIN:ZDB-TALEN-180503-1")). body("results[0].name", is("TALEN-inhbaa")). body("results[0].taxon.curie", is("NCBITaxon:7955")). body("results[0].synonyms", hasSize(1)). @@ -116,7 +116,7 @@ public void sqtrBulkUploadUpdateEmptyNonRequiredFields() throws Exception { body("totalResults", is(1)). body("results", hasSize(1)). body("results", hasSize(1)). - body("results[0]" , hasKey("modEntityId")). + body("results[0]" , hasKey("primaryExternalId")). body("results[0]" , hasKey("name")). body("results[0]" , hasKey("taxon")). body("results[0]" , hasKey("synonyms")). diff --git a/src/test/java/org/alliancegenome/curation_api/SequenceTargetingReagentGeneAssociationBulkUploadFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/SequenceTargetingReagentGeneAssociationBulkUploadFmsITCase.java index 46158106e..2c6881666 100644 --- a/src/test/java/org/alliancegenome/curation_api/SequenceTargetingReagentGeneAssociationBulkUploadFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/SequenceTargetingReagentGeneAssociationBulkUploadFmsITCase.java @@ -64,8 +64,8 @@ public void sqtrGeneAssociationBulkUploadCheckFields() throws Exception { then(). statusCode(200). body("entity.relation.name", is(relationName)). - body("entity.sequenceTargetingReagentGeneAssociationObject.modEntityId", is(geneCurie)). - body("entity.sequenceTargetingReagentAssociationSubject.modEntityId", is(sqtrModEntityId)); + body("entity.sequenceTargetingReagentGeneAssociationObject.primaryExternalId", is(geneCurie)). + body("entity.sequenceTargetingReagentAssociationSubject.primaryExternalId", is(sqtrModEntityId)); RestAssured.given(). when(). @@ -74,7 +74,7 @@ public void sqtrGeneAssociationBulkUploadCheckFields() throws Exception { statusCode(200). body("entity.sequenceTargetingReagentGeneAssociations", hasSize(1)). body("entity.sequenceTargetingReagentGeneAssociations[0].relation.name", is(relationName)). - body("entity.sequenceTargetingReagentGeneAssociations[0].sequenceTargetingReagentGeneAssociationObject.modEntityId", is(geneCurie)). + body("entity.sequenceTargetingReagentGeneAssociations[0].sequenceTargetingReagentGeneAssociationObject.primaryExternalId", is(geneCurie)). body("entity.sequenceTargetingReagentGeneAssociations[0].sequenceTargetingReagentAssociationSubject", not(hasKey("sequenceTargetingReagentGeneAssociations"))); RestAssured.given(). @@ -84,7 +84,7 @@ public void sqtrGeneAssociationBulkUploadCheckFields() throws Exception { statusCode(200). body("entity.sequenceTargetingReagentGeneAssociations", hasSize(1)). body("entity.sequenceTargetingReagentGeneAssociations[0].relation.name", is(relationName)). - body("entity.sequenceTargetingReagentGeneAssociations[0].sequenceTargetingReagentGeneAssociationObject.modEntityId", is(geneCurie)). + body("entity.sequenceTargetingReagentGeneAssociations[0].sequenceTargetingReagentGeneAssociationObject.primaryExternalId", is(geneCurie)). body("entity.sequenceTargetingReagentGeneAssociations[0].sequenceTargetingReagentGeneAssociationObject", not(hasKey("sequenceTargetingReagentGeneAssociations"))); } diff --git a/src/test/java/org/alliancegenome/curation_api/VariantBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/VariantBulkUploadITCase.java index 5f598180f..acac0008d 100644 --- a/src/test/java/org/alliancegenome/curation_api/VariantBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/VariantBulkUploadITCase.java @@ -83,7 +83,7 @@ public void variantBulkUploadCheckFields() throws Exception { get(variantGetEndpoint + "VARIANTTEST:Variant0001"). then(). statusCode(200). - body("entity.modEntityId", is("VARIANTTEST:Variant0001")). + body("entity.primaryExternalId", is("VARIANTTEST:Variant0001")). body("entity.taxon.curie", is("NCBITaxon:6239")). body("entity.internal", is(true)). body("entity.obsolete", is(true)). @@ -120,7 +120,7 @@ public void variantBulkUploadUpdateCheckFields() throws Exception { get(variantGetEndpoint + "VARIANTTEST:Variant0001"). then(). statusCode(200). - body("entity.modEntityId", is("VARIANTTEST:Variant0001")). + body("entity.primaryExternalId", is("VARIANTTEST:Variant0001")). body("entity.taxon.curie", is("NCBITaxon:10116")). body("entity.internal", is(false)). body("entity.obsolete", is(false)). @@ -205,7 +205,7 @@ public void variantBulkUploadUpdateMissingNonRequiredFields() throws Exception { get(variantGetEndpoint + "VARIANTTEST:Variant0001"). then(). statusCode(200). - body("entity.modEntityId", is("VARIANTTEST:Variant0001")). + body("entity.primaryExternalId", is("VARIANTTEST:Variant0001")). body("entity", not(hasKey("createdBy"))). body("entity", not(hasKey("updatedBy"))). body("entity", not(hasKey("dateCreated"))). @@ -226,7 +226,7 @@ public void variantBulkUploadUpdateMissingNonRequiredFieldsLevel2() throws Excep get(variantGetEndpoint + "VARIANTTEST:Variant0001"). then(). statusCode(200). - body("entity.modEntityId", is("VARIANTTEST:Variant0001")). + body("entity.primaryExternalId", is("VARIANTTEST:Variant0001")). body("entity.relatedNotes[0]", not(hasKey("evidence"))). body("entity.relatedNotes[0]", not(hasKey("createdBy"))). body("entity.relatedNotes[0]", not(hasKey("updatedBy"))). @@ -245,7 +245,7 @@ public void variantBulkUploadUpdateEmptyNonRequiredFields() throws Exception { get(variantGetEndpoint + "VARIANTTEST:Variant0001"). then(). statusCode(200). - body("entity.modEntityId", is("VARIANTTEST:Variant0001")). + body("entity.primaryExternalId", is("VARIANTTEST:Variant0001")). body("entity", not(hasKey("createdBy"))). body("entity", not(hasKey("updatedBy"))). body("entity", not(hasKey("dateCreated"))). @@ -282,7 +282,7 @@ public void variantBulkUploadDuplicateNotes() throws Exception { get(variantGetEndpoint + "VARIANTTEST:DN01"). then(). statusCode(200). - body("entity.modEntityId", is("VARIANTTEST:DN01")). + body("entity.primaryExternalId", is("VARIANTTEST:DN01")). body("entity.relatedNotes", hasSize(1)); } diff --git a/src/test/java/org/alliancegenome/curation_api/VariantFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/VariantFmsITCase.java index b78e22251..930a3fc25 100644 --- a/src/test/java/org/alliancegenome/curation_api/VariantFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/VariantFmsITCase.java @@ -100,7 +100,7 @@ public void variantFmsBulkUpload() throws Exception { body("entity.curatedVariantGenomicLocations[0].end", is(1000)). body("entity.alleleVariantAssociations", hasSize(1)). body("entity.alleleVariantAssociations[0].relation.name", is("has_variant")). - body("entity.alleleVariantAssociations[0].alleleAssociationSubject.modEntityId", is("WB:AlleleWithVar1")). + body("entity.alleleVariantAssociations[0].alleleAssociationSubject.primaryExternalId", is("WB:AlleleWithVar1")). body("entity.relatedNotes", hasSize(1)). body("entity.relatedNotes[0].internal", is(false)). body("entity.relatedNotes[0].freeText", is("This is a test note.")). @@ -141,9 +141,9 @@ public void variantFmsBulkUploadUpdate() throws Exception { body("entity.curatedVariantGenomicLocations[0].end", is(1000)). body("entity.alleleVariantAssociations", hasSize(2)). body("entity.alleleVariantAssociations[0].relation.name", is("has_variant")). - body("entity.alleleVariantAssociations[0].alleleAssociationSubject.modEntityId", is("WB:AlleleWithVar1")). + body("entity.alleleVariantAssociations[0].alleleAssociationSubject.primaryExternalId", is("WB:AlleleWithVar1")). body("entity.alleleVariantAssociations[1].relation.name", is("has_variant")). - body("entity.alleleVariantAssociations[1].alleleAssociationSubject.modEntityId", is("WB:AlleleWithVar2")). + body("entity.alleleVariantAssociations[1].alleleAssociationSubject.primaryExternalId", is("WB:AlleleWithVar2")). body("entity.relatedNotes", hasSize(1)). body("entity.relatedNotes[0].internal", is(false)). body("entity.relatedNotes[0].freeText", is("This is an updated test note.")). diff --git a/src/test/java/org/alliancegenome/curation_api/VariantITCase.java b/src/test/java/org/alliancegenome/curation_api/VariantITCase.java index 774d1e8d6..67d9809ae 100644 --- a/src/test/java/org/alliancegenome/curation_api/VariantITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/VariantITCase.java @@ -110,7 +110,7 @@ public void createValidVariant() { loadRequiredEntities(); Variant variant = new Variant(); - variant.setModEntityId(VARIANT); + variant.setPrimaryExternalId(VARIANT); variant.setTaxon(taxon); variant.setVariantType(variantTypeTerm); variant.setVariantStatus(variantStatus); @@ -132,7 +132,7 @@ public void createValidVariant() { get("/api/variant/" + VARIANT). then(). statusCode(200). - body("entity.modEntityId", is(VARIANT)). + body("entity.primaryExternalId", is(VARIANT)). body("entity.taxon.curie", is(taxon.getCurie())). body("entity.internal", is(false)). body("entity.obsolete", is(false)). @@ -155,7 +155,7 @@ public void createValidVariant() { public void editVariant() { Variant variant = getVariant(VARIANT); variant.setCreatedBy(person); - variant.setModEntityId(VARIANT); + variant.setPrimaryExternalId(VARIANT); variant.setTaxon(taxon2); variant.setVariantType(variantTypeTerm2); variant.setVariantStatus(variantStatus2); @@ -185,7 +185,7 @@ public void editVariant() { get("/api/variant/" + VARIANT). then(). statusCode(200). - body("entity.modEntityId", is(VARIANT)). + body("entity.primaryExternalId", is(VARIANT)). body("entity.variantType.curie", is(variantTypeTerm2.getCurie())). body("entity.variantStatus.name", is(variantStatus2.getName())). body("entity.sourceGeneralConsequence.curie", is(sgcTerm2.getCurie())). @@ -217,16 +217,16 @@ public void createVariantWithMissingRequiredFieldsLevel1() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(3))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")). + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")). body("errorMessages.taxon", is(ValidationConstants.REQUIRED_MESSAGE)). body("errorMessages.variantType", is(ValidationConstants.REQUIRED_MESSAGE)); } @Test @Order(4) - public void editVariantWithMissingModEntityId() { + public void editVariantWithMissingPrimaryExternalId() { Variant variant = getVariant(VARIANT); - variant.setModEntityId(null); + variant.setPrimaryExternalId(null); RestAssured.given(). contentType("application/json"). @@ -236,7 +236,7 @@ public void editVariantWithMissingModEntityId() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(1))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")); + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")); } @Test @@ -264,7 +264,7 @@ public void editVariantWithMissingRequiredFieldsLevel1() { @Order(6) public void createVariantWithEmptyRequiredFields() { Variant variant = new Variant(); - variant.setModEntityId(""); + variant.setPrimaryExternalId(""); variant.setTaxon(taxon); variant.setVariantType(variantTypeTerm); RestAssured.given(). @@ -275,14 +275,14 @@ public void createVariantWithEmptyRequiredFields() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(1))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")); + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")); } @Test @Order(7) - public void editVariantWithEmptyModEntityId() { + public void editVariantWithEmptyPrimaryExternalId() { Variant variant = getVariant(VARIANT); - variant.setModEntityId(""); + variant.setPrimaryExternalId(""); RestAssured.given(). contentType("application/json"). @@ -292,14 +292,14 @@ public void editVariantWithEmptyModEntityId() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(1))). - body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "modEntityId")); + body("errorMessages.modInternalId", is(ValidationConstants.REQUIRED_UNLESS_OTHER_FIELD_POPULATED_MESSAGE + "primaryExternalId")); } @Test @Order(8) public void createVariantWithMissingRequiredFieldsLevel2() { Variant variant = new Variant(); - variant.setModEntityId("Variant:0008"); + variant.setPrimaryExternalId("Variant:0008"); variant.setTaxon(taxon); variant.setVariantType(variantTypeTerm); @@ -347,7 +347,7 @@ public void editVariantWithMissingRequiredFieldsLevel2() { @Order(10) public void createVariantWithEmptyRequiredFieldsLevel2() { Variant variant = new Variant(); - variant.setModEntityId("Variant:0010"); + variant.setPrimaryExternalId("Variant:0010"); variant.setTaxon(taxon); variant.setVariantType(variantTypeTerm); @@ -404,7 +404,7 @@ public void createVariantWithInvalidFields() { invalidNote.setReferences(List.of(nonPersistedReference)); Variant variant = new Variant(); - variant.setModEntityId("Variant:0012"); + variant.setPrimaryExternalId("Variant:0012"); variant.setTaxon(nonPersistedTaxon); variant.setVariantType(nonPersistedSoTerm); variant.setVariantStatus(noteType); @@ -478,7 +478,7 @@ public void editVariantWithInvalidFields() { @Order(14) public void createVariantWithObsoleteFields() { Variant variant = new Variant(); - variant.setModEntityId("Variant:0012"); + variant.setPrimaryExternalId("Variant:0012"); variant.setTaxon(obsoleteTaxon); variant.setVariantType(obsoleteSoTerm); variant.setVariantStatus(obsoleteVariantStatus); @@ -602,7 +602,7 @@ public void editVariantWithNullNonRequiredFieldsLevel1() { @Order(19) public void createVariantWithOnlyRequiredFieldsLevel1() { Variant variant = new Variant(); - variant.setModEntityId("VARIANT:0019"); + variant.setPrimaryExternalId("VARIANT:0019"); variant.setTaxon(taxon); variant.setVariantType(variantTypeTerm); @@ -619,7 +619,7 @@ public void createVariantWithOnlyRequiredFieldsLevel1() { @Order(20) public void createVariantWithOnlyRequiredFieldsLevel2() { Variant variant = new Variant(); - variant.setModEntityId("VARIANT:0020"); + variant.setPrimaryExternalId("VARIANT:0020"); variant.setTaxon(taxon); variant.setVariantType(variantTypeTerm); @@ -639,7 +639,7 @@ public void createVariantWithOnlyRequiredFieldsLevel2() { @Order(21) public void createVariantWithDuplicateNote() { Variant variant = new Variant(); - variant.setModEntityId("VARIANT:0021"); + variant.setPrimaryExternalId("VARIANT:0021"); variant.setTaxon(taxon); variant.setVariantType(variantTypeTerm); diff --git a/src/test/java/org/alliancegenome/curation_api/base/BaseITCase.java b/src/test/java/org/alliancegenome/curation_api/base/BaseITCase.java index bb0b3b981..d458c426c 100644 --- a/src/test/java/org/alliancegenome/curation_api/base/BaseITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/base/BaseITCase.java @@ -168,16 +168,16 @@ public HashMap createCountParams(int total, int failed, int com return map; } - public AffectedGenomicModel createAffectedGenomicModel(String modEntityId, String name, String taxonCurie, String subtypeName, Boolean obsolete) throws Exception { - return createAffectedGenomicModel(modEntityId, name, taxonCurie, subtypeName, obsolete, null); + public AffectedGenomicModel createAffectedGenomicModel(String primaryExternalId, String name, String taxonCurie, String subtypeName, Boolean obsolete) throws Exception { + return createAffectedGenomicModel(primaryExternalId, name, taxonCurie, subtypeName, obsolete, null); } - public AffectedGenomicModel createAffectedGenomicModel(String modEntityId, String name, String taxonCurie, String subtypeName, Boolean obsolete, DataProvider dataProvider) { + public AffectedGenomicModel createAffectedGenomicModel(String primaryExternalId, String name, String taxonCurie, String subtypeName, Boolean obsolete, DataProvider dataProvider) { Vocabulary subtypeVocabulary = getVocabulary(VocabularyConstants.AGM_SUBTYPE_VOCABULARY); VocabularyTerm subtype = getVocabularyTerm(subtypeVocabulary, subtypeName); AffectedGenomicModel model = new AffectedGenomicModel(); - model.setModEntityId(modEntityId); + model.setPrimaryExternalId(primaryExternalId); model.setTaxon(getNCBITaxonTerm(taxonCurie)); model.setSubtype(subtype); model.setName(name); @@ -195,13 +195,13 @@ public AffectedGenomicModel createAffectedGenomicModel(String modEntityId, Strin return response.getEntity(); } - public Allele createAllele(String modEntityId, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete) { - return createAllele(modEntityId, modEntityId, taxonCurie, symbolNameTerm, obsolete, null); + public Allele createAllele(String primaryExternalId, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete) { + return createAllele(primaryExternalId, primaryExternalId, taxonCurie, symbolNameTerm, obsolete, null); } - public Allele createAllele(String modEntityId, String symbol, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, DataProvider dataProvider) { + public Allele createAllele(String primaryExternalId, String symbol, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, DataProvider dataProvider) { Allele allele = new Allele(); - allele.setModEntityId(modEntityId); + allele.setPrimaryExternalId(primaryExternalId); allele.setTaxon(getNCBITaxonTerm(taxonCurie)); allele.setObsolete(obsolete); allele.setInternal(false); @@ -244,9 +244,9 @@ public AnatomicalTerm createAnatomicalTerm(String curie, String name) throws Exc return response.getEntity(); } - public AssemblyComponent createAssemblyComponent(String modEntityId, String name, GenomeAssembly assembly, DataProvider dataProvider) throws Exception { + public AssemblyComponent createAssemblyComponent(String primaryExternalId, String name, GenomeAssembly assembly, DataProvider dataProvider) throws Exception { AssemblyComponent assemblyComponent = new AssemblyComponent(); - assemblyComponent.setModEntityId(modEntityId); + assemblyComponent.setPrimaryExternalId(primaryExternalId); assemblyComponent.setName(name); assemblyComponent.setDataProvider(dataProvider); assemblyComponent.setGenomeAssembly(assembly); @@ -263,9 +263,9 @@ public AssemblyComponent createAssemblyComponent(String modEntityId, String name return response.getEntity(); } - public BiologicalEntity createBiologicalEntity(String modEntityId, String taxonCurie) { + public BiologicalEntity createBiologicalEntity(String primaryExternalId, String taxonCurie) { BiologicalEntity bioEntity = new BiologicalEntity(); - bioEntity.setModEntityId(modEntityId); + bioEntity.setPrimaryExternalId(primaryExternalId); bioEntity.setTaxon(getNCBITaxonTerm(taxonCurie)); ObjectResponse response = given(). @@ -338,15 +338,15 @@ public ConditionRelation createConditionRelation(String handle, Reference refere return response.getEntity(); } - public Construct createConstruct(String modEntityId, Boolean obsolete, VocabularyTerm symbolNameTerm) { + public Construct createConstruct(String primaryExternalId, Boolean obsolete, VocabularyTerm symbolNameTerm) { Construct construct = new Construct(); - construct.setModEntityId(modEntityId); + construct.setPrimaryExternalId(primaryExternalId); construct.setObsolete(obsolete); ConstructSymbolSlotAnnotation symbol = new ConstructSymbolSlotAnnotation(); symbol.setNameType(symbolNameTerm); - symbol.setDisplayText(modEntityId); - symbol.setFormatText(modEntityId); + symbol.setDisplayText(primaryExternalId); + symbol.setFormatText(primaryExternalId); construct.setConstructSymbol(symbol); @@ -467,34 +467,34 @@ public ExperimentalConditionOntologyTerm createExperimentalConditionOntologyTerm return response.getEntity(); } - public Gene createGene(String modEntityId, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete) { - return createGene(modEntityId, taxonCurie, symbolNameTerm, obsolete, null); + public Gene createGene(String primaryExternalId, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete) { + return createGene(primaryExternalId, taxonCurie, symbolNameTerm, obsolete, null); } - public Gene createGene(String modEntityId, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, DataProvider dataProvider) { - return createGeneWithXref(modEntityId, taxonCurie, symbolNameTerm, obsolete, dataProvider, null); + public Gene createGene(String primaryExternalId, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, DataProvider dataProvider) { + return createGeneWithXref(primaryExternalId, taxonCurie, symbolNameTerm, obsolete, dataProvider, null); } - public List createGenes(List modEntityIds, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, DataProvider dataProvider) { + public List createGenes(List primaryExternalIds, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, DataProvider dataProvider) { List geneList = new ArrayList<>(); - for (String modEntityId : modEntityIds) { - geneList.add(createGene(modEntityId, taxonCurie, symbolNameTerm, obsolete, dataProvider)); + for (String primaryExternalId : primaryExternalIds) { + geneList.add(createGene(primaryExternalId, taxonCurie, symbolNameTerm, obsolete, dataProvider)); } return geneList; } - public Gene createGeneWithXref(String modEntityId, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, DataProvider dataProvider, String xrefCurie) { + public Gene createGeneWithXref(String primaryExternalId, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, DataProvider dataProvider, String xrefCurie) { Gene gene = new Gene(); - gene.setModEntityId(modEntityId); + gene.setPrimaryExternalId(primaryExternalId); gene.setTaxon(getNCBITaxonTerm(taxonCurie)); gene.setDataProvider(dataProvider); gene.setObsolete(obsolete); GeneSymbolSlotAnnotation symbol = new GeneSymbolSlotAnnotation(); symbol.setNameType(symbolNameTerm); - symbol.setDisplayText(modEntityId); - symbol.setFormatText(modEntityId); + symbol.setDisplayText(primaryExternalId); + symbol.setFormatText(primaryExternalId); gene.setGeneSymbol(symbol); @@ -788,9 +788,9 @@ public ResourceDescriptorPage createResourceDescriptorPage(String name, String u return response.getEntity(); } - public SequenceTargetingReagent createSequenceTargetingReagent(String modEntityId, Boolean obsolete, String name) { + public SequenceTargetingReagent createSequenceTargetingReagent(String primaryExternalId, Boolean obsolete, String name) { SequenceTargetingReagent sqtr = new SequenceTargetingReagent(); - sqtr.setModEntityId(modEntityId); + sqtr.setPrimaryExternalId(primaryExternalId); sqtr.setObsolete(obsolete); sqtr.setName(name); @@ -1140,10 +1140,10 @@ public GeneDiseaseAnnotation getGeneDiseaseAnnotation(String uniqueId) { return res.getEntity(); } - public GenomeAssembly getGenomeAssembly(String modEntityId) throws Exception { + public GenomeAssembly getGenomeAssembly(String primaryExternalId) throws Exception { ObjectResponse response = RestAssured.given(). when(). - get("/api/genomeassembly/" + modEntityId). + get("/api/genomeassembly/" + primaryExternalId). then(). statusCode(200). extract().body().as(getObjectResponseTypeRefGenomeAssembly()); diff --git a/src/test/resources/bulk/01_gene/AF_01_all_fields.json b/src/test/resources/bulk/01_gene/AF_01_all_fields.json index a03a2bef2..146ed42e4 100644 --- a/src/test/resources/bulk/01_gene/AF_01_all_fields.json +++ b/src/test/resources/bulk/01_gene/AF_01_all_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:Gene0001", + "primary_external_id": "GENETEST:Gene0001", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/DN_01_duplicate_notes.json b/src/test/resources/bulk/01_gene/DN_01_duplicate_notes.json index 3e7f86ea2..801dd8c93 100644 --- a/src/test/resources/bulk/01_gene/DN_01_duplicate_notes.json +++ b/src/test/resources/bulk/01_gene/DN_01_duplicate_notes.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:DN01", + "primary_external_id": "GENETEST:DN01", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/DX_01_duplicate_xref.json b/src/test/resources/bulk/01_gene/DX_01_duplicate_xref.json index 87cecd236..97157c102 100644 --- a/src/test/resources/bulk/01_gene/DX_01_duplicate_xref.json +++ b/src/test/resources/bulk/01_gene/DX_01_duplicate_xref.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:DX01", + "primary_external_id": "GENETEST:DX01", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/EN_01_empty_non_required_fields.json b/src/test/resources/bulk/01_gene/EN_01_empty_non_required_fields.json index a0d76b3c0..ebf92fb3b 100644 --- a/src/test/resources/bulk/01_gene/EN_01_empty_non_required_fields.json +++ b/src/test/resources/bulk/01_gene/EN_01_empty_non_required_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:EN01", + "primary_external_id": "GENETEST:EN01", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/ER_01_empty_mod_ids.json b/src/test/resources/bulk/01_gene/ER_01_empty_mod_ids.json index 893e850d7..3f11edf19 100644 --- a/src/test/resources/bulk/01_gene/ER_01_empty_mod_ids.json +++ b/src/test/resources/bulk/01_gene/ER_01_empty_mod_ids.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "", + "primary_external_id": "", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/ER_02_empty_taxon.json b/src/test/resources/bulk/01_gene/ER_02_empty_taxon.json index 888924a64..03ad799e6 100644 --- a/src/test/resources/bulk/01_gene/ER_02_empty_taxon.json +++ b/src/test/resources/bulk/01_gene/ER_02_empty_taxon.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER02", + "primary_external_id": "GENETEST:ER02", "taxon_curie": "", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/ER_03_empty_gene_symbol_display_text.json b/src/test/resources/bulk/01_gene/ER_03_empty_gene_symbol_display_text.json index 07c532d66..e5bf40b78 100644 --- a/src/test/resources/bulk/01_gene/ER_03_empty_gene_symbol_display_text.json +++ b/src/test/resources/bulk/01_gene/ER_03_empty_gene_symbol_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER03", + "primary_external_id": "GENETEST:ER03", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/ER_04_empty_gene_full_name_display_text.json b/src/test/resources/bulk/01_gene/ER_04_empty_gene_full_name_display_text.json index d01582336..f98d7bc64 100644 --- a/src/test/resources/bulk/01_gene/ER_04_empty_gene_full_name_display_text.json +++ b/src/test/resources/bulk/01_gene/ER_04_empty_gene_full_name_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER04", + "primary_external_id": "GENETEST:ER04", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/ER_05_empty_gene_systematic_name_display_text.json b/src/test/resources/bulk/01_gene/ER_05_empty_gene_systematic_name_display_text.json index 4b9e29ac8..4596a3686 100644 --- a/src/test/resources/bulk/01_gene/ER_05_empty_gene_systematic_name_display_text.json +++ b/src/test/resources/bulk/01_gene/ER_05_empty_gene_systematic_name_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER05", + "primary_external_id": "GENETEST:ER05", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/ER_06_empty_gene_synonym_display_text.json b/src/test/resources/bulk/01_gene/ER_06_empty_gene_synonym_display_text.json index 4f6eb9c7f..4838615e1 100644 --- a/src/test/resources/bulk/01_gene/ER_06_empty_gene_synonym_display_text.json +++ b/src/test/resources/bulk/01_gene/ER_06_empty_gene_synonym_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER06", + "primary_external_id": "GENETEST:ER06", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/ER_07_empty_gene_symbol_format_text.json b/src/test/resources/bulk/01_gene/ER_07_empty_gene_symbol_format_text.json index c672ce616..e74d04870 100644 --- a/src/test/resources/bulk/01_gene/ER_07_empty_gene_symbol_format_text.json +++ b/src/test/resources/bulk/01_gene/ER_07_empty_gene_symbol_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER07", + "primary_external_id": "GENETEST:ER07", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/ER_08_empty_gene_full_name_format_text.json b/src/test/resources/bulk/01_gene/ER_08_empty_gene_full_name_format_text.json index f00a8f79c..a03353e43 100644 --- a/src/test/resources/bulk/01_gene/ER_08_empty_gene_full_name_format_text.json +++ b/src/test/resources/bulk/01_gene/ER_08_empty_gene_full_name_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER08", + "primary_external_id": "GENETEST:ER08", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/ER_09_empty_gene_systematic_name_format_text.json b/src/test/resources/bulk/01_gene/ER_09_empty_gene_systematic_name_format_text.json index 98bfe1d08..afc9737c5 100644 --- a/src/test/resources/bulk/01_gene/ER_09_empty_gene_systematic_name_format_text.json +++ b/src/test/resources/bulk/01_gene/ER_09_empty_gene_systematic_name_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER09", + "primary_external_id": "GENETEST:ER09", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/ER_10_empty_gene_synonym_format_text.json b/src/test/resources/bulk/01_gene/ER_10_empty_gene_synonym_format_text.json index e5163011e..5b73b0504 100644 --- a/src/test/resources/bulk/01_gene/ER_10_empty_gene_synonym_format_text.json +++ b/src/test/resources/bulk/01_gene/ER_10_empty_gene_synonym_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER10", + "primary_external_id": "GENETEST:ER10", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/ER_11_empty_gene_symbol_name_type.json b/src/test/resources/bulk/01_gene/ER_11_empty_gene_symbol_name_type.json index 0b5462d86..7dd857a7b 100644 --- a/src/test/resources/bulk/01_gene/ER_11_empty_gene_symbol_name_type.json +++ b/src/test/resources/bulk/01_gene/ER_11_empty_gene_symbol_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER11", + "primary_external_id": "GENETEST:ER11", "taxon_curie": "", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/ER_12_empty_gene_full_name_name_type.json b/src/test/resources/bulk/01_gene/ER_12_empty_gene_full_name_name_type.json index 47241c9e7..17bcfd10b 100644 --- a/src/test/resources/bulk/01_gene/ER_12_empty_gene_full_name_name_type.json +++ b/src/test/resources/bulk/01_gene/ER_12_empty_gene_full_name_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER12", + "primary_external_id": "GENETEST:ER12", "taxon_curie": "", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/ER_13_empty_gene_systematic_name_name_type.json b/src/test/resources/bulk/01_gene/ER_13_empty_gene_systematic_name_name_type.json index 77db95829..a409c007e 100644 --- a/src/test/resources/bulk/01_gene/ER_13_empty_gene_systematic_name_name_type.json +++ b/src/test/resources/bulk/01_gene/ER_13_empty_gene_systematic_name_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER13", + "primary_external_id": "GENETEST:ER13", "taxon_curie": "", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/ER_14_empty_gene_synonym_name_type.json b/src/test/resources/bulk/01_gene/ER_14_empty_gene_synonym_name_type.json index b688a3169..8fb57be23 100644 --- a/src/test/resources/bulk/01_gene/ER_14_empty_gene_synonym_name_type.json +++ b/src/test/resources/bulk/01_gene/ER_14_empty_gene_synonym_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER14", + "primary_external_id": "GENETEST:ER14", "taxon_curie": "", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/ER_15_empty_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/01_gene/ER_15_empty_data_provider_source_organization_abbreviation.json index 091629de4..24ef66e25 100644 --- a/src/test/resources/bulk/01_gene/ER_15_empty_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/01_gene/ER_15_empty_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER15", + "primary_external_id": "GENETEST:ER15", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/ER_16_empty_data_provider_cross_reference_referenced_curie.json b/src/test/resources/bulk/01_gene/ER_16_empty_data_provider_cross_reference_referenced_curie.json index a688293eb..7d86321c7 100644 --- a/src/test/resources/bulk/01_gene/ER_16_empty_data_provider_cross_reference_referenced_curie.json +++ b/src/test/resources/bulk/01_gene/ER_16_empty_data_provider_cross_reference_referenced_curie.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER16", + "primary_external_id": "GENETEST:ER16", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/ER_17_empty_data_provider_cross_reference_display_name.json b/src/test/resources/bulk/01_gene/ER_17_empty_data_provider_cross_reference_display_name.json index 071e4734e..cbec073ea 100644 --- a/src/test/resources/bulk/01_gene/ER_17_empty_data_provider_cross_reference_display_name.json +++ b/src/test/resources/bulk/01_gene/ER_17_empty_data_provider_cross_reference_display_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER17", + "primary_external_id": "GENETEST:ER17", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/ER_18_empty_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/01_gene/ER_18_empty_data_provider_cross_reference_prefix.json index 1b06cc814..5160dfdd5 100644 --- a/src/test/resources/bulk/01_gene/ER_18_empty_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/01_gene/ER_18_empty_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER18", + "primary_external_id": "GENETEST:ER18", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/ER_19_empty_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/01_gene/ER_19_empty_data_provider_cross_reference_page_area.json index 21ec4146f..af0ab8e79 100644 --- a/src/test/resources/bulk/01_gene/ER_19_empty_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/01_gene/ER_19_empty_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER19", + "primary_external_id": "GENETEST:ER19", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/ER_20_empty_gene_secondary_id_secondary_id.json b/src/test/resources/bulk/01_gene/ER_20_empty_gene_secondary_id_secondary_id.json index 8b392c9a8..95f669d75 100644 --- a/src/test/resources/bulk/01_gene/ER_20_empty_gene_secondary_id_secondary_id.json +++ b/src/test/resources/bulk/01_gene/ER_20_empty_gene_secondary_id_secondary_id.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER20", + "primary_external_id": "GENETEST:ER20", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/ER_21_empty_gene_type.json b/src/test/resources/bulk/01_gene/ER_21_empty_gene_type.json index 84a28e1a8..80ad5ff47 100644 --- a/src/test/resources/bulk/01_gene/ER_21_empty_gene_type.json +++ b/src/test/resources/bulk/01_gene/ER_21_empty_gene_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:ER21", + "primary_external_id": "GENETEST:ER21", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/ER_22_empty_note_type_name.json b/src/test/resources/bulk/01_gene/ER_22_empty_note_type_name.json index 7cafc3448..e9b562c30 100644 --- a/src/test/resources/bulk/01_gene/ER_22_empty_note_type_name.json +++ b/src/test/resources/bulk/01_gene/ER_22_empty_note_type_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:Gene0001", + "primary_external_id": "GENETEST:Gene0001", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/ER_23_empty_free_text.json b/src/test/resources/bulk/01_gene/ER_23_empty_free_text.json index ec2ce4360..d200318dd 100644 --- a/src/test/resources/bulk/01_gene/ER_23_empty_free_text.json +++ b/src/test/resources/bulk/01_gene/ER_23_empty_free_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:Gene0001", + "primary_external_id": "GENETEST:Gene0001", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/IV_01_invalid_date_created.json b/src/test/resources/bulk/01_gene/IV_01_invalid_date_created.json index a9b14b566..6080fab9e 100644 --- a/src/test/resources/bulk/01_gene/IV_01_invalid_date_created.json +++ b/src/test/resources/bulk/01_gene/IV_01_invalid_date_created.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV01", + "primary_external_id": "GENETEST:IV01", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_02_invalid_date_updated.json b/src/test/resources/bulk/01_gene/IV_02_invalid_date_updated.json index 2d2c71be7..19819a3db 100644 --- a/src/test/resources/bulk/01_gene/IV_02_invalid_date_updated.json +++ b/src/test/resources/bulk/01_gene/IV_02_invalid_date_updated.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV02", + "primary_external_id": "GENETEST:IV02", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_03_invalid_taxon.json b/src/test/resources/bulk/01_gene/IV_03_invalid_taxon.json index bef77931c..60f9f96cc 100644 --- a/src/test/resources/bulk/01_gene/IV_03_invalid_taxon.json +++ b/src/test/resources/bulk/01_gene/IV_03_invalid_taxon.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "IV03", + "primary_external_id": "IV03", "taxon_curie": "NCBITaxon:1009", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_04_invalid_gene_symbol_name_type.json b/src/test/resources/bulk/01_gene/IV_04_invalid_gene_symbol_name_type.json index 92b609db8..1dc18b2a3 100644 --- a/src/test/resources/bulk/01_gene/IV_04_invalid_gene_symbol_name_type.json +++ b/src/test/resources/bulk/01_gene/IV_04_invalid_gene_symbol_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV04", + "primary_external_id": "GENETEST:IV04", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_05_invalid_gene_full_name_name_type.json b/src/test/resources/bulk/01_gene/IV_05_invalid_gene_full_name_name_type.json index c1ad84955..4de1b62f9 100644 --- a/src/test/resources/bulk/01_gene/IV_05_invalid_gene_full_name_name_type.json +++ b/src/test/resources/bulk/01_gene/IV_05_invalid_gene_full_name_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV05", + "primary_external_id": "GENETEST:IV05", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_06_invalid_gene_systematic_name_name_type.json b/src/test/resources/bulk/01_gene/IV_06_invalid_gene_systematic_name_name_type.json index a7dba910a..7aaf09b29 100644 --- a/src/test/resources/bulk/01_gene/IV_06_invalid_gene_systematic_name_name_type.json +++ b/src/test/resources/bulk/01_gene/IV_06_invalid_gene_systematic_name_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV06", + "primary_external_id": "GENETEST:IV06", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_07_invalid_gene_synonym_name_type.json b/src/test/resources/bulk/01_gene/IV_07_invalid_gene_synonym_name_type.json index a7d85d4d7..907c8b664 100644 --- a/src/test/resources/bulk/01_gene/IV_07_invalid_gene_synonym_name_type.json +++ b/src/test/resources/bulk/01_gene/IV_07_invalid_gene_synonym_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV07", + "primary_external_id": "GENETEST:IV07", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_08_invalid_gene_symbol_synonym_scope.json b/src/test/resources/bulk/01_gene/IV_08_invalid_gene_symbol_synonym_scope.json index 1505c46f4..96b8c5eea 100644 --- a/src/test/resources/bulk/01_gene/IV_08_invalid_gene_symbol_synonym_scope.json +++ b/src/test/resources/bulk/01_gene/IV_08_invalid_gene_symbol_synonym_scope.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV08", + "primary_external_id": "GENETEST:IV08", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_09_invalid_gene_full_name_synonym_scope.json b/src/test/resources/bulk/01_gene/IV_09_invalid_gene_full_name_synonym_scope.json index 81e5be8d9..585b9d6da 100644 --- a/src/test/resources/bulk/01_gene/IV_09_invalid_gene_full_name_synonym_scope.json +++ b/src/test/resources/bulk/01_gene/IV_09_invalid_gene_full_name_synonym_scope.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV09", + "primary_external_id": "GENETEST:IV09", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_10_invalid_gene_systematic_name_synonym_scope.json b/src/test/resources/bulk/01_gene/IV_10_invalid_gene_systematic_name_synonym_scope.json index 3781edcf5..c5aec61ee 100644 --- a/src/test/resources/bulk/01_gene/IV_10_invalid_gene_systematic_name_synonym_scope.json +++ b/src/test/resources/bulk/01_gene/IV_10_invalid_gene_systematic_name_synonym_scope.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV10", + "primary_external_id": "GENETEST:IV10", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_11_invalid_gene_synonym_synonym_scope.json b/src/test/resources/bulk/01_gene/IV_11_invalid_gene_synonym_synonym_scope.json index 3e96424f2..bcbd51aef 100644 --- a/src/test/resources/bulk/01_gene/IV_11_invalid_gene_synonym_synonym_scope.json +++ b/src/test/resources/bulk/01_gene/IV_11_invalid_gene_synonym_synonym_scope.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV11", + "primary_external_id": "GENETEST:IV11", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_12_invalid_gene_symbol_evidence.json b/src/test/resources/bulk/01_gene/IV_12_invalid_gene_symbol_evidence.json index 1cf8558ae..52b970b69 100644 --- a/src/test/resources/bulk/01_gene/IV_12_invalid_gene_symbol_evidence.json +++ b/src/test/resources/bulk/01_gene/IV_12_invalid_gene_symbol_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV12", + "primary_external_id": "GENETEST:IV12", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_13_invalid_gene_full_name_evidence.json b/src/test/resources/bulk/01_gene/IV_13_invalid_gene_full_name_evidence.json index ad9055667..fb7f690d9 100644 --- a/src/test/resources/bulk/01_gene/IV_13_invalid_gene_full_name_evidence.json +++ b/src/test/resources/bulk/01_gene/IV_13_invalid_gene_full_name_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV13", + "primary_external_id": "GENETEST:IV13", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_14_invalid_gene_systematic_name_evidence.json b/src/test/resources/bulk/01_gene/IV_14_invalid_gene_systematic_name_evidence.json index dba40ca74..1f1022ca3 100644 --- a/src/test/resources/bulk/01_gene/IV_14_invalid_gene_systematic_name_evidence.json +++ b/src/test/resources/bulk/01_gene/IV_14_invalid_gene_systematic_name_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV14", + "primary_external_id": "GENETEST:IV14", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_15_invalid_gene_synonym_evidence.json b/src/test/resources/bulk/01_gene/IV_15_invalid_gene_synonym_evidence.json index 48b02ef70..8408f6c08 100644 --- a/src/test/resources/bulk/01_gene/IV_15_invalid_gene_synonym_evidence.json +++ b/src/test/resources/bulk/01_gene/IV_15_invalid_gene_synonym_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV15", + "primary_external_id": "GENETEST:IV15", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_16_invalid_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/01_gene/IV_16_invalid_data_provider_source_organization_abbreviation.json index b721b0683..20c9dd4c8 100644 --- a/src/test/resources/bulk/01_gene/IV_16_invalid_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/01_gene/IV_16_invalid_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV16", + "primary_external_id": "GENETEST:IV16", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_17_invalid_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/01_gene/IV_17_invalid_data_provider_cross_reference_prefix.json index 1b243a094..d7b3c4b2d 100644 --- a/src/test/resources/bulk/01_gene/IV_17_invalid_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/01_gene/IV_17_invalid_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV17", + "primary_external_id": "GENETEST:IV17", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_18_invalid_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/01_gene/IV_18_invalid_data_provider_cross_reference_page_area.json index 836618ff7..147bcb2ad 100644 --- a/src/test/resources/bulk/01_gene/IV_18_invalid_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/01_gene/IV_18_invalid_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV18", + "primary_external_id": "GENETEST:IV18", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/IV_19_invalid_gene_secondary_id_evidence.json b/src/test/resources/bulk/01_gene/IV_19_invalid_gene_secondary_id_evidence.json index 817a30d26..e5da02097 100644 --- a/src/test/resources/bulk/01_gene/IV_19_invalid_gene_secondary_id_evidence.json +++ b/src/test/resources/bulk/01_gene/IV_19_invalid_gene_secondary_id_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV19", + "primary_external_id": "GENETEST:IV19", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/IV_20_invalid_gene_type.json b/src/test/resources/bulk/01_gene/IV_20_invalid_gene_type.json index 0380ddd42..26240a279 100644 --- a/src/test/resources/bulk/01_gene/IV_20_invalid_gene_type.json +++ b/src/test/resources/bulk/01_gene/IV_20_invalid_gene_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IV20", + "primary_external_id": "GENETEST:IV20", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/IV_21_invalid_note_type_name.json b/src/test/resources/bulk/01_gene/IV_21_invalid_note_type_name.json index 9aea9f316..d1728e4db 100644 --- a/src/test/resources/bulk/01_gene/IV_21_invalid_note_type_name.json +++ b/src/test/resources/bulk/01_gene/IV_21_invalid_note_type_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:Gene0001", + "primary_external_id": "GENETEST:Gene0001", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/IV_22_invalid_evidence_curies.json b/src/test/resources/bulk/01_gene/IV_22_invalid_evidence_curies.json index e1ffbc61b..6c2115215 100644 --- a/src/test/resources/bulk/01_gene/IV_22_invalid_evidence_curies.json +++ b/src/test/resources/bulk/01_gene/IV_22_invalid_evidence_curies.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:Gene0001", + "primary_external_id": "GENETEST:Gene0001", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/MN_01_no_non_required_fields_level_1.json b/src/test/resources/bulk/01_gene/MN_01_no_non_required_fields_level_1.json index 12c44bf1f..ee7cce9f2 100644 --- a/src/test/resources/bulk/01_gene/MN_01_no_non_required_fields_level_1.json +++ b/src/test/resources/bulk/01_gene/MN_01_no_non_required_fields_level_1.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MN01", + "primary_external_id": "GENETEST:MN01", "taxon_curie": "NCBITaxon:6239", "gene_symbol_dto": { "display_text": "Tg1", diff --git a/src/test/resources/bulk/01_gene/MN_02_no_non_required_fields_level_2.json b/src/test/resources/bulk/01_gene/MN_02_no_non_required_fields_level_2.json index 700d8903b..a3e11cc37 100644 --- a/src/test/resources/bulk/01_gene/MN_02_no_non_required_fields_level_2.json +++ b/src/test/resources/bulk/01_gene/MN_02_no_non_required_fields_level_2.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MN02", + "primary_external_id": "GENETEST:MN02", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/MR_02_no_taxon.json b/src/test/resources/bulk/01_gene/MR_02_no_taxon.json index 53257323d..58b7060c9 100644 --- a/src/test/resources/bulk/01_gene/MR_02_no_taxon.json +++ b/src/test/resources/bulk/01_gene/MR_02_no_taxon.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR02", + "primary_external_id": "GENETEST:MR02", "internal": true, "obsolete": false, "created_by_curie": "GENETEST:Person0001", diff --git a/src/test/resources/bulk/01_gene/MR_03_no_gene_symbol.json b/src/test/resources/bulk/01_gene/MR_03_no_gene_symbol.json index dfe024261..ae2fdfac4 100644 --- a/src/test/resources/bulk/01_gene/MR_03_no_gene_symbol.json +++ b/src/test/resources/bulk/01_gene/MR_03_no_gene_symbol.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR03", + "primary_external_id": "GENETEST:MR03", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/MR_04_no_gene_symbol_display_text.json b/src/test/resources/bulk/01_gene/MR_04_no_gene_symbol_display_text.json index fff9ac49c..2f3e7b26f 100644 --- a/src/test/resources/bulk/01_gene/MR_04_no_gene_symbol_display_text.json +++ b/src/test/resources/bulk/01_gene/MR_04_no_gene_symbol_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR04", + "primary_external_id": "GENETEST:MR04", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/MR_05_no_gene_full_name_display_text.json b/src/test/resources/bulk/01_gene/MR_05_no_gene_full_name_display_text.json index 2bc4bf601..76b3bb63e 100644 --- a/src/test/resources/bulk/01_gene/MR_05_no_gene_full_name_display_text.json +++ b/src/test/resources/bulk/01_gene/MR_05_no_gene_full_name_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR05", + "primary_external_id": "GENETEST:MR05", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/MR_06_no_gene_systematic_name_display_text.json b/src/test/resources/bulk/01_gene/MR_06_no_gene_systematic_name_display_text.json index 0213b8ac3..7893d52bc 100644 --- a/src/test/resources/bulk/01_gene/MR_06_no_gene_systematic_name_display_text.json +++ b/src/test/resources/bulk/01_gene/MR_06_no_gene_systematic_name_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR06", + "primary_external_id": "GENETEST:MR06", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/MR_07_no_gene_synonym_display_text.json b/src/test/resources/bulk/01_gene/MR_07_no_gene_synonym_display_text.json index b99063361..cbdf0e207 100644 --- a/src/test/resources/bulk/01_gene/MR_07_no_gene_synonym_display_text.json +++ b/src/test/resources/bulk/01_gene/MR_07_no_gene_synonym_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR07", + "primary_external_id": "GENETEST:MR07", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/MR_08_no_gene_symbol_format_text.json b/src/test/resources/bulk/01_gene/MR_08_no_gene_symbol_format_text.json index 320cb8664..84d2d699d 100644 --- a/src/test/resources/bulk/01_gene/MR_08_no_gene_symbol_format_text.json +++ b/src/test/resources/bulk/01_gene/MR_08_no_gene_symbol_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR08", + "primary_external_id": "GENETEST:MR08", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/MR_09_no_gene_full_name_format_text.json b/src/test/resources/bulk/01_gene/MR_09_no_gene_full_name_format_text.json index 52e04193e..2afbb154a 100644 --- a/src/test/resources/bulk/01_gene/MR_09_no_gene_full_name_format_text.json +++ b/src/test/resources/bulk/01_gene/MR_09_no_gene_full_name_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR09", + "primary_external_id": "GENETEST:MR09", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/MR_10_no_gene_systematic_name_format_text.json b/src/test/resources/bulk/01_gene/MR_10_no_gene_systematic_name_format_text.json index b148257cc..492db1a99 100644 --- a/src/test/resources/bulk/01_gene/MR_10_no_gene_systematic_name_format_text.json +++ b/src/test/resources/bulk/01_gene/MR_10_no_gene_systematic_name_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR10", + "primary_external_id": "GENETEST:MR10", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/MR_11_no_gene_synonym_format_text.json b/src/test/resources/bulk/01_gene/MR_11_no_gene_synonym_format_text.json index 11104998d..0f9a50cad 100644 --- a/src/test/resources/bulk/01_gene/MR_11_no_gene_synonym_format_text.json +++ b/src/test/resources/bulk/01_gene/MR_11_no_gene_synonym_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR11", + "primary_external_id": "GENETEST:MR11", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/MR_12_no_gene_symbol_name_type.json b/src/test/resources/bulk/01_gene/MR_12_no_gene_symbol_name_type.json index d6ae4616d..8f7a16351 100644 --- a/src/test/resources/bulk/01_gene/MR_12_no_gene_symbol_name_type.json +++ b/src/test/resources/bulk/01_gene/MR_12_no_gene_symbol_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR12", + "primary_external_id": "GENETEST:MR12", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/MR_13_no_gene_full_name_name_type.json b/src/test/resources/bulk/01_gene/MR_13_no_gene_full_name_name_type.json index dcc2cb915..fc7623476 100644 --- a/src/test/resources/bulk/01_gene/MR_13_no_gene_full_name_name_type.json +++ b/src/test/resources/bulk/01_gene/MR_13_no_gene_full_name_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR13", + "primary_external_id": "GENETEST:MR13", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/MR_14_no_gene_systematic_name_name_type.json b/src/test/resources/bulk/01_gene/MR_14_no_gene_systematic_name_name_type.json index e52147494..e2ae292f6 100644 --- a/src/test/resources/bulk/01_gene/MR_14_no_gene_systematic_name_name_type.json +++ b/src/test/resources/bulk/01_gene/MR_14_no_gene_systematic_name_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR14", + "primary_external_id": "GENETEST:MR14", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/MR_15_no_gene_synonym_name_type.json b/src/test/resources/bulk/01_gene/MR_15_no_gene_synonym_name_type.json index b90da4e15..513e16283 100644 --- a/src/test/resources/bulk/01_gene/MR_15_no_gene_synonym_name_type.json +++ b/src/test/resources/bulk/01_gene/MR_15_no_gene_synonym_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR15", + "primary_external_id": "GENETEST:MR15", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/01_gene/MR_16_no_data_provider.json b/src/test/resources/bulk/01_gene/MR_16_no_data_provider.json index 190d123d6..b9bd5a730 100644 --- a/src/test/resources/bulk/01_gene/MR_16_no_data_provider.json +++ b/src/test/resources/bulk/01_gene/MR_16_no_data_provider.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR16", + "primary_external_id": "GENETEST:MR16", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/MR_17_no_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/01_gene/MR_17_no_data_provider_source_organization_abbreviation.json index e0181c302..4bc76ea12 100644 --- a/src/test/resources/bulk/01_gene/MR_17_no_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/01_gene/MR_17_no_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR17", + "primary_external_id": "GENETEST:MR17", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/MR_18_no_data_provider_cross_reference_referenced_curie.json b/src/test/resources/bulk/01_gene/MR_18_no_data_provider_cross_reference_referenced_curie.json index 984655b9a..434bf0c6f 100644 --- a/src/test/resources/bulk/01_gene/MR_18_no_data_provider_cross_reference_referenced_curie.json +++ b/src/test/resources/bulk/01_gene/MR_18_no_data_provider_cross_reference_referenced_curie.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR18", + "primary_external_id": "GENETEST:MR18", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/MR_19_no_data_provider_cross_reference_display_name.json b/src/test/resources/bulk/01_gene/MR_19_no_data_provider_cross_reference_display_name.json index d9ca75371..1123182c1 100644 --- a/src/test/resources/bulk/01_gene/MR_19_no_data_provider_cross_reference_display_name.json +++ b/src/test/resources/bulk/01_gene/MR_19_no_data_provider_cross_reference_display_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR19", + "primary_external_id": "GENETEST:MR19", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/MR_20_no_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/01_gene/MR_20_no_data_provider_cross_reference_prefix.json index 310a526f9..f114b2bb2 100644 --- a/src/test/resources/bulk/01_gene/MR_20_no_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/01_gene/MR_20_no_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR20", + "primary_external_id": "GENETEST:MR20", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/MR_21_no_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/01_gene/MR_21_no_data_provider_cross_reference_page_area.json index 20d35e158..1a239deb7 100644 --- a/src/test/resources/bulk/01_gene/MR_21_no_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/01_gene/MR_21_no_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR21", + "primary_external_id": "GENETEST:MR21", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/MR_22_no_gene_secondary_id_secondary_id.json b/src/test/resources/bulk/01_gene/MR_22_no_gene_secondary_id_secondary_id.json index 08815a027..1f9630571 100644 --- a/src/test/resources/bulk/01_gene/MR_22_no_gene_secondary_id_secondary_id.json +++ b/src/test/resources/bulk/01_gene/MR_22_no_gene_secondary_id_secondary_id.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR22", + "primary_external_id": "GENETEST:MR22", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/MR_23_no_gene_type.json b/src/test/resources/bulk/01_gene/MR_23_no_gene_type.json index 6ea437290..20f32b330 100644 --- a/src/test/resources/bulk/01_gene/MR_23_no_gene_type.json +++ b/src/test/resources/bulk/01_gene/MR_23_no_gene_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:MR23", + "primary_external_id": "GENETEST:MR23", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/MR_24_no_note_type_name.json b/src/test/resources/bulk/01_gene/MR_24_no_note_type_name.json index 7734f63c3..e18af88e9 100644 --- a/src/test/resources/bulk/01_gene/MR_24_no_note_type_name.json +++ b/src/test/resources/bulk/01_gene/MR_24_no_note_type_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:Gene0001", + "primary_external_id": "GENETEST:Gene0001", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/MR_25_no_free_text.json b/src/test/resources/bulk/01_gene/MR_25_no_free_text.json index 2654c93e9..454069c8c 100644 --- a/src/test/resources/bulk/01_gene/MR_25_no_free_text.json +++ b/src/test/resources/bulk/01_gene/MR_25_no_free_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:Gene0001", + "primary_external_id": "GENETEST:Gene0001", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/UD_01_update_all_except_default_fields.json b/src/test/resources/bulk/01_gene/UD_01_update_all_except_default_fields.json index a6eb300cb..4b8daa1fe 100644 --- a/src/test/resources/bulk/01_gene/UD_01_update_all_except_default_fields.json +++ b/src/test/resources/bulk/01_gene/UD_01_update_all_except_default_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:Gene0001", + "primary_external_id": "GENETEST:Gene0001", "taxon_curie": "NCBITaxon:10116", "created_by_curie": "GENETEST:Person0002", "updated_by_curie": "GENETEST:Person0001", diff --git a/src/test/resources/bulk/01_gene/UE_01_update_empty_non_required_fields.json b/src/test/resources/bulk/01_gene/UE_01_update_empty_non_required_fields.json index 4a7d34963..2595fe65c 100644 --- a/src/test/resources/bulk/01_gene/UE_01_update_empty_non_required_fields.json +++ b/src/test/resources/bulk/01_gene/UE_01_update_empty_non_required_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:Gene0001", + "primary_external_id": "GENETEST:Gene0001", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/UM_01_update_no_non_required_fields_level_1.json b/src/test/resources/bulk/01_gene/UM_01_update_no_non_required_fields_level_1.json index 908fb29df..90ebc804c 100644 --- a/src/test/resources/bulk/01_gene/UM_01_update_no_non_required_fields_level_1.json +++ b/src/test/resources/bulk/01_gene/UM_01_update_no_non_required_fields_level_1.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:Gene0001", + "primary_external_id": "GENETEST:Gene0001", "taxon_curie": "NCBITaxon:6239", "gene_symbol_dto": { "display_text": "Tg1", diff --git a/src/test/resources/bulk/01_gene/UM_02_update_no_non_required_fields_level_2.json b/src/test/resources/bulk/01_gene/UM_02_update_no_non_required_fields_level_2.json index df3ee682a..efa6a84ed 100644 --- a/src/test/resources/bulk/01_gene/UM_02_update_no_non_required_fields_level_2.json +++ b/src/test/resources/bulk/01_gene/UM_02_update_no_non_required_fields_level_2.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:Gene0001", + "primary_external_id": "GENETEST:Gene0001", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/VT_01_valid_taxon_for_HUMAN.json b/src/test/resources/bulk/01_gene/VT_01_valid_taxon_for_HUMAN.json index e750a3391..7f86fe697 100644 --- a/src/test/resources/bulk/01_gene/VT_01_valid_taxon_for_HUMAN.json +++ b/src/test/resources/bulk/01_gene/VT_01_valid_taxon_for_HUMAN.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IT01", + "primary_external_id": "GENETEST:IT01", "taxon_curie": "NCBITaxon:9606", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/01_gene/VT_02_valid_taxon_for_RGD.json b/src/test/resources/bulk/01_gene/VT_02_valid_taxon_for_RGD.json index ad676a5a0..7fc4c2c2b 100644 --- a/src/test/resources/bulk/01_gene/VT_02_valid_taxon_for_RGD.json +++ b/src/test/resources/bulk/01_gene/VT_02_valid_taxon_for_RGD.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "GENETEST:IT01", + "primary_external_id": "GENETEST:IT01", "taxon_curie": "NCBITaxon:10116", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/AF_01_all_fields.json b/src/test/resources/bulk/02_allele/AF_01_all_fields.json index a4f7c4193..45cbccd87 100644 --- a/src/test/resources/bulk/02_allele/AF_01_all_fields.json +++ b/src/test/resources/bulk/02_allele/AF_01_all_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:Allele0001", + "primary_external_id": "ALLELETEST:Allele0001", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/DN_01_duplicate_notes.json b/src/test/resources/bulk/02_allele/DN_01_duplicate_notes.json index 496893518..57704fa16 100644 --- a/src/test/resources/bulk/02_allele/DN_01_duplicate_notes.json +++ b/src/test/resources/bulk/02_allele/DN_01_duplicate_notes.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:DN01", + "primary_external_id": "ALLELETEST:DN01", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/EN_01_empty_non_required_fields.json b/src/test/resources/bulk/02_allele/EN_01_empty_non_required_fields.json index b0834157f..35b882bf9 100644 --- a/src/test/resources/bulk/02_allele/EN_01_empty_non_required_fields.json +++ b/src/test/resources/bulk/02_allele/EN_01_empty_non_required_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:EN01", + "primary_external_id": "ALLELETEST:EN01", "taxon_curie": "NCBITaxon:6239", "created_by_curie": "", "updated_by_curie": "", diff --git a/src/test/resources/bulk/02_allele/ER_01_empty_mod_ids.json b/src/test/resources/bulk/02_allele/ER_01_empty_mod_ids.json index 3d31b2c99..1ec1c6a6b 100644 --- a/src/test/resources/bulk/02_allele/ER_01_empty_mod_ids.json +++ b/src/test/resources/bulk/02_allele/ER_01_empty_mod_ids.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "", + "primary_external_id": "", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/ER_02_empty_taxon.json b/src/test/resources/bulk/02_allele/ER_02_empty_taxon.json index 514eb2af5..2a5d4b6e8 100644 --- a/src/test/resources/bulk/02_allele/ER_02_empty_taxon.json +++ b/src/test/resources/bulk/02_allele/ER_02_empty_taxon.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER02", + "primary_external_id": "ALLELETEST:ER02", "taxon_curie": "", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/ER_03_empty_allele_mutation_type_mutation_types.json b/src/test/resources/bulk/02_allele/ER_03_empty_allele_mutation_type_mutation_types.json index 917563a83..5cf7b61e6 100644 --- a/src/test/resources/bulk/02_allele/ER_03_empty_allele_mutation_type_mutation_types.json +++ b/src/test/resources/bulk/02_allele/ER_03_empty_allele_mutation_type_mutation_types.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER03", + "primary_external_id": "ALLELETEST:ER03", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/ER_04_empty_allele_symbol_display_text.json b/src/test/resources/bulk/02_allele/ER_04_empty_allele_symbol_display_text.json index 88f32f52b..22b7d6f14 100644 --- a/src/test/resources/bulk/02_allele/ER_04_empty_allele_symbol_display_text.json +++ b/src/test/resources/bulk/02_allele/ER_04_empty_allele_symbol_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER04", + "primary_external_id": "ALLELETEST:ER04", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/ER_05_empty_allele_full_name_display_text.json b/src/test/resources/bulk/02_allele/ER_05_empty_allele_full_name_display_text.json index 5b2d0bfcb..cc6e1e962 100644 --- a/src/test/resources/bulk/02_allele/ER_05_empty_allele_full_name_display_text.json +++ b/src/test/resources/bulk/02_allele/ER_05_empty_allele_full_name_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER05", + "primary_external_id": "ALLELETEST:ER05", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/ER_06_empty_allele_synonym_display_text.json b/src/test/resources/bulk/02_allele/ER_06_empty_allele_synonym_display_text.json index 6c8821511..22373fb7b 100644 --- a/src/test/resources/bulk/02_allele/ER_06_empty_allele_synonym_display_text.json +++ b/src/test/resources/bulk/02_allele/ER_06_empty_allele_synonym_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER06", + "primary_external_id": "ALLELETEST:ER06", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/ER_07_empty_allele_symbol_format_text.json b/src/test/resources/bulk/02_allele/ER_07_empty_allele_symbol_format_text.json index f4e50a54e..218e53aa3 100644 --- a/src/test/resources/bulk/02_allele/ER_07_empty_allele_symbol_format_text.json +++ b/src/test/resources/bulk/02_allele/ER_07_empty_allele_symbol_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER07", + "primary_external_id": "ALLELETEST:ER07", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/ER_08_empty_allele_full_name_format_text.json b/src/test/resources/bulk/02_allele/ER_08_empty_allele_full_name_format_text.json index e7d5ddd54..1e2dac4d7 100644 --- a/src/test/resources/bulk/02_allele/ER_08_empty_allele_full_name_format_text.json +++ b/src/test/resources/bulk/02_allele/ER_08_empty_allele_full_name_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER08", + "primary_external_id": "ALLELETEST:ER08", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/ER_09_empty_allele_synonym_format_text.json b/src/test/resources/bulk/02_allele/ER_09_empty_allele_synonym_format_text.json index bd804be6f..886a90174 100644 --- a/src/test/resources/bulk/02_allele/ER_09_empty_allele_synonym_format_text.json +++ b/src/test/resources/bulk/02_allele/ER_09_empty_allele_synonym_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER09", + "primary_external_id": "ALLELETEST:ER09", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/ER_10_empty_allele_symbol_name_type.json b/src/test/resources/bulk/02_allele/ER_10_empty_allele_symbol_name_type.json index 652ea1fe8..6a888b404 100644 --- a/src/test/resources/bulk/02_allele/ER_10_empty_allele_symbol_name_type.json +++ b/src/test/resources/bulk/02_allele/ER_10_empty_allele_symbol_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER10", + "primary_external_id": "ALLELETEST:ER10", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/ER_11_empty_allele_full_name_name_type.json b/src/test/resources/bulk/02_allele/ER_11_empty_allele_full_name_name_type.json index 5780aaac2..887ee3a8f 100644 --- a/src/test/resources/bulk/02_allele/ER_11_empty_allele_full_name_name_type.json +++ b/src/test/resources/bulk/02_allele/ER_11_empty_allele_full_name_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER11", + "primary_external_id": "ALLELETEST:ER11", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/ER_12_empty_allele_synonym_name_type.json b/src/test/resources/bulk/02_allele/ER_12_empty_allele_synonym_name_type.json index 2f5434ce5..396332a6a 100644 --- a/src/test/resources/bulk/02_allele/ER_12_empty_allele_synonym_name_type.json +++ b/src/test/resources/bulk/02_allele/ER_12_empty_allele_synonym_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER12", + "primary_external_id": "ALLELETEST:ER12", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/ER_13_empty_allele_secondary_id_secondary_id.json b/src/test/resources/bulk/02_allele/ER_13_empty_allele_secondary_id_secondary_id.json index 50ff9ca51..d58d42f73 100644 --- a/src/test/resources/bulk/02_allele/ER_13_empty_allele_secondary_id_secondary_id.json +++ b/src/test/resources/bulk/02_allele/ER_13_empty_allele_secondary_id_secondary_id.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER13", + "primary_external_id": "ALLELETEST:ER13", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/ER_14_empty_allele_inheritance_mode_inheritance_mode.json b/src/test/resources/bulk/02_allele/ER_14_empty_allele_inheritance_mode_inheritance_mode.json index 004ced268..17c53d8b2 100644 --- a/src/test/resources/bulk/02_allele/ER_14_empty_allele_inheritance_mode_inheritance_mode.json +++ b/src/test/resources/bulk/02_allele/ER_14_empty_allele_inheritance_mode_inheritance_mode.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER14", + "primary_external_id": "ALLELETEST:ER14", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/ER_15_empty_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/02_allele/ER_15_empty_data_provider_source_organization_abbreviation.json index c5ff5b346..eec96ae9b 100644 --- a/src/test/resources/bulk/02_allele/ER_15_empty_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/02_allele/ER_15_empty_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER15", + "primary_external_id": "ALLELETEST:ER15", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/ER_16_empty_data_provider_cross_reference_referenced_curie.json b/src/test/resources/bulk/02_allele/ER_16_empty_data_provider_cross_reference_referenced_curie.json index e596cd787..c65226232 100644 --- a/src/test/resources/bulk/02_allele/ER_16_empty_data_provider_cross_reference_referenced_curie.json +++ b/src/test/resources/bulk/02_allele/ER_16_empty_data_provider_cross_reference_referenced_curie.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER16", + "primary_external_id": "ALLELETEST:ER16", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/ER_17_empty_data_provider_cross_reference_display_name.json b/src/test/resources/bulk/02_allele/ER_17_empty_data_provider_cross_reference_display_name.json index 9a2d7384a..d4bf73e5e 100644 --- a/src/test/resources/bulk/02_allele/ER_17_empty_data_provider_cross_reference_display_name.json +++ b/src/test/resources/bulk/02_allele/ER_17_empty_data_provider_cross_reference_display_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER17", + "primary_external_id": "ALLELETEST:ER17", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/ER_18_empty_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/02_allele/ER_18_empty_data_provider_cross_reference_prefix.json index 435cef0d7..64bb72078 100644 --- a/src/test/resources/bulk/02_allele/ER_18_empty_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/02_allele/ER_18_empty_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER18", + "primary_external_id": "ALLELETEST:ER18", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/ER_19_empty_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/02_allele/ER_19_empty_data_provider_cross_reference_page_area.json index 617eff68c..56c5d536b 100644 --- a/src/test/resources/bulk/02_allele/ER_19_empty_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/02_allele/ER_19_empty_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER19", + "primary_external_id": "ALLELETEST:ER19", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/ER_20_empty_allele_functional_impacts_functional_impacts.json b/src/test/resources/bulk/02_allele/ER_20_empty_allele_functional_impacts_functional_impacts.json index 9582e5cad..6d9123e8f 100644 --- a/src/test/resources/bulk/02_allele/ER_20_empty_allele_functional_impacts_functional_impacts.json +++ b/src/test/resources/bulk/02_allele/ER_20_empty_allele_functional_impacts_functional_impacts.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER20", + "primary_external_id": "ALLELETEST:ER20", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/ER_21_empty_allele_germline_transmission_status_germline_transmission_status.json b/src/test/resources/bulk/02_allele/ER_21_empty_allele_germline_transmission_status_germline_transmission_status.json index c80568cc9..589428513 100644 --- a/src/test/resources/bulk/02_allele/ER_21_empty_allele_germline_transmission_status_germline_transmission_status.json +++ b/src/test/resources/bulk/02_allele/ER_21_empty_allele_germline_transmission_status_germline_transmission_status.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER21", + "primary_external_id": "ALLELETEST:ER21", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/ER_22_empty_related_notes_note_type_name.json b/src/test/resources/bulk/02_allele/ER_22_empty_related_notes_note_type_name.json index aa64b6281..f17264ddb 100644 --- a/src/test/resources/bulk/02_allele/ER_22_empty_related_notes_note_type_name.json +++ b/src/test/resources/bulk/02_allele/ER_22_empty_related_notes_note_type_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER22", + "primary_external_id": "ALLELETEST:ER22", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/ER_23_empty_related_notes_free_text.json b/src/test/resources/bulk/02_allele/ER_23_empty_related_notes_free_text.json index 7a79efd24..dfd08e1e1 100644 --- a/src/test/resources/bulk/02_allele/ER_23_empty_related_notes_free_text.json +++ b/src/test/resources/bulk/02_allele/ER_23_empty_related_notes_free_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER23", + "primary_external_id": "ALLELETEST:ER23", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/ER_24_empty_allele_database_status_database_status.json b/src/test/resources/bulk/02_allele/ER_24_empty_allele_database_status_database_status.json index 33287cfac..499dda2f6 100644 --- a/src/test/resources/bulk/02_allele/ER_24_empty_allele_database_status_database_status.json +++ b/src/test/resources/bulk/02_allele/ER_24_empty_allele_database_status_database_status.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER24", + "primary_external_id": "ALLELETEST:ER24", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/ER_25_empty_allele_nomenclature_events_nomenclature_event.json b/src/test/resources/bulk/02_allele/ER_25_empty_allele_nomenclature_events_nomenclature_event.json index d2093f622..ed59ae3a6 100644 --- a/src/test/resources/bulk/02_allele/ER_25_empty_allele_nomenclature_events_nomenclature_event.json +++ b/src/test/resources/bulk/02_allele/ER_25_empty_allele_nomenclature_events_nomenclature_event.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:ER25", + "primary_external_id": "ALLELETEST:ER25", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_01_invalid_date_created.json b/src/test/resources/bulk/02_allele/IV_01_invalid_date_created.json index 130f6daa6..73424e57d 100644 --- a/src/test/resources/bulk/02_allele/IV_01_invalid_date_created.json +++ b/src/test/resources/bulk/02_allele/IV_01_invalid_date_created.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV01", + "primary_external_id": "ALLELETEST:IV01", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_02_invalid_date_updated.json b/src/test/resources/bulk/02_allele/IV_02_invalid_date_updated.json index ad03cc631..e0f6af60d 100644 --- a/src/test/resources/bulk/02_allele/IV_02_invalid_date_updated.json +++ b/src/test/resources/bulk/02_allele/IV_02_invalid_date_updated.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV02", + "primary_external_id": "ALLELETEST:IV02", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_03_invalid_taxon.json b/src/test/resources/bulk/02_allele/IV_03_invalid_taxon.json index 73347460f..27f4f1a5c 100644 --- a/src/test/resources/bulk/02_allele/IV_03_invalid_taxon.json +++ b/src/test/resources/bulk/02_allele/IV_03_invalid_taxon.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV03", + "primary_external_id": "ALLELETEST:IV03", "taxon_curie": "NCBITaxon:1009", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_04_invalid_in_collection.json b/src/test/resources/bulk/02_allele/IV_04_invalid_in_collection.json index 01b5bd0cd..914329ae5 100644 --- a/src/test/resources/bulk/02_allele/IV_04_invalid_in_collection.json +++ b/src/test/resources/bulk/02_allele/IV_04_invalid_in_collection.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV04", + "primary_external_id": "ALLELETEST:IV04", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_05_invalid_reference.json b/src/test/resources/bulk/02_allele/IV_05_invalid_reference.json index 7fbc2c998..1b6fd0cf7 100644 --- a/src/test/resources/bulk/02_allele/IV_05_invalid_reference.json +++ b/src/test/resources/bulk/02_allele/IV_05_invalid_reference.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV05", + "primary_external_id": "ALLELETEST:IV05", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_06_invalid_allele_mutation_type_mutation_type.json b/src/test/resources/bulk/02_allele/IV_06_invalid_allele_mutation_type_mutation_type.json index 83329def5..f57ed7528 100644 --- a/src/test/resources/bulk/02_allele/IV_06_invalid_allele_mutation_type_mutation_type.json +++ b/src/test/resources/bulk/02_allele/IV_06_invalid_allele_mutation_type_mutation_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV06", + "primary_external_id": "ALLELETEST:IV06", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_07_invalid_allele_mutation_type_evidence.json b/src/test/resources/bulk/02_allele/IV_07_invalid_allele_mutation_type_evidence.json index 318340412..973ce8d6e 100644 --- a/src/test/resources/bulk/02_allele/IV_07_invalid_allele_mutation_type_evidence.json +++ b/src/test/resources/bulk/02_allele/IV_07_invalid_allele_mutation_type_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV07", + "primary_external_id": "ALLELETEST:IV07", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_08_invalid_allele_symbol_name_type.json b/src/test/resources/bulk/02_allele/IV_08_invalid_allele_symbol_name_type.json index e643a6265..97a9535da 100644 --- a/src/test/resources/bulk/02_allele/IV_08_invalid_allele_symbol_name_type.json +++ b/src/test/resources/bulk/02_allele/IV_08_invalid_allele_symbol_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV08", + "primary_external_id": "ALLELETEST:IV08", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_09_invalid_allele_full_name_name_type.json b/src/test/resources/bulk/02_allele/IV_09_invalid_allele_full_name_name_type.json index 641443c17..f70988b11 100644 --- a/src/test/resources/bulk/02_allele/IV_09_invalid_allele_full_name_name_type.json +++ b/src/test/resources/bulk/02_allele/IV_09_invalid_allele_full_name_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV09", + "primary_external_id": "ALLELETEST:IV09", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_10_invalid_allele_synonym_name_type.json b/src/test/resources/bulk/02_allele/IV_10_invalid_allele_synonym_name_type.json index 466161db8..8edfb0274 100644 --- a/src/test/resources/bulk/02_allele/IV_10_invalid_allele_synonym_name_type.json +++ b/src/test/resources/bulk/02_allele/IV_10_invalid_allele_synonym_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV10", + "primary_external_id": "ALLELETEST:IV10", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_11_invalid_allele_symbol_synonym_scope.json b/src/test/resources/bulk/02_allele/IV_11_invalid_allele_symbol_synonym_scope.json index a8af3fdda..cf1b115f7 100644 --- a/src/test/resources/bulk/02_allele/IV_11_invalid_allele_symbol_synonym_scope.json +++ b/src/test/resources/bulk/02_allele/IV_11_invalid_allele_symbol_synonym_scope.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV11", + "primary_external_id": "ALLELETEST:IV11", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_12_invalid_allele_full_name_synonym_scope.json b/src/test/resources/bulk/02_allele/IV_12_invalid_allele_full_name_synonym_scope.json index 9407e5992..d44d3ad82 100644 --- a/src/test/resources/bulk/02_allele/IV_12_invalid_allele_full_name_synonym_scope.json +++ b/src/test/resources/bulk/02_allele/IV_12_invalid_allele_full_name_synonym_scope.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV12", + "primary_external_id": "ALLELETEST:IV12", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_13_invalid_allele_synonym_synonym_scope.json b/src/test/resources/bulk/02_allele/IV_13_invalid_allele_synonym_synonym_scope.json index 1c74f5dae..90662ddb3 100644 --- a/src/test/resources/bulk/02_allele/IV_13_invalid_allele_synonym_synonym_scope.json +++ b/src/test/resources/bulk/02_allele/IV_13_invalid_allele_synonym_synonym_scope.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV13", + "primary_external_id": "ALLELETEST:IV13", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_14_invalid_allele_symbol_evidence.json b/src/test/resources/bulk/02_allele/IV_14_invalid_allele_symbol_evidence.json index 658a42b69..711547117 100644 --- a/src/test/resources/bulk/02_allele/IV_14_invalid_allele_symbol_evidence.json +++ b/src/test/resources/bulk/02_allele/IV_14_invalid_allele_symbol_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV14", + "primary_external_id": "ALLELETEST:IV14", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_15_invalid_allele_full_name_evidence.json b/src/test/resources/bulk/02_allele/IV_15_invalid_allele_full_name_evidence.json index bdf271dad..9a379b936 100644 --- a/src/test/resources/bulk/02_allele/IV_15_invalid_allele_full_name_evidence.json +++ b/src/test/resources/bulk/02_allele/IV_15_invalid_allele_full_name_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV15", + "primary_external_id": "ALLELETEST:IV15", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_16_invalid_allele_synonym_evidence.json b/src/test/resources/bulk/02_allele/IV_16_invalid_allele_synonym_evidence.json index a04928df1..c1f598feb 100644 --- a/src/test/resources/bulk/02_allele/IV_16_invalid_allele_synonym_evidence.json +++ b/src/test/resources/bulk/02_allele/IV_16_invalid_allele_synonym_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV16", + "primary_external_id": "ALLELETEST:IV16", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_17_invalid_allele_secondary_id_evidence.json b/src/test/resources/bulk/02_allele/IV_17_invalid_allele_secondary_id_evidence.json index b940d8b66..43d8ac732 100644 --- a/src/test/resources/bulk/02_allele/IV_17_invalid_allele_secondary_id_evidence.json +++ b/src/test/resources/bulk/02_allele/IV_17_invalid_allele_secondary_id_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV17", + "primary_external_id": "ALLELETEST:IV17", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/IV_18_invalid_allele_inheritance_mode_inheritance_mode.json b/src/test/resources/bulk/02_allele/IV_18_invalid_allele_inheritance_mode_inheritance_mode.json index f4768e75a..d69e89b1c 100644 --- a/src/test/resources/bulk/02_allele/IV_18_invalid_allele_inheritance_mode_inheritance_mode.json +++ b/src/test/resources/bulk/02_allele/IV_18_invalid_allele_inheritance_mode_inheritance_mode.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV18", + "primary_external_id": "ALLELETEST:IV18", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_19_invalid_allele_inheritance_mode_phenotype_term.json b/src/test/resources/bulk/02_allele/IV_19_invalid_allele_inheritance_mode_phenotype_term.json index 61c9e3f61..52d52cb0c 100644 --- a/src/test/resources/bulk/02_allele/IV_19_invalid_allele_inheritance_mode_phenotype_term.json +++ b/src/test/resources/bulk/02_allele/IV_19_invalid_allele_inheritance_mode_phenotype_term.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV19", + "primary_external_id": "ALLELETEST:IV19", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_20_invalid_allele_inheritance_mode_evidence.json b/src/test/resources/bulk/02_allele/IV_20_invalid_allele_inheritance_mode_evidence.json index 85a44a114..1ca59200d 100644 --- a/src/test/resources/bulk/02_allele/IV_20_invalid_allele_inheritance_mode_evidence.json +++ b/src/test/resources/bulk/02_allele/IV_20_invalid_allele_inheritance_mode_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV20", + "primary_external_id": "ALLELETEST:IV20", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_21_invalid_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/02_allele/IV_21_invalid_data_provider_source_organization_abbreviation.json index f3b4d1a28..7935f3f14 100644 --- a/src/test/resources/bulk/02_allele/IV_21_invalid_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/02_allele/IV_21_invalid_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV21", + "primary_external_id": "ALLELETEST:IV21", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_22_invalid_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/02_allele/IV_22_invalid_data_provider_cross_reference_prefix.json index 0541f6b7d..9a7bbfa48 100644 --- a/src/test/resources/bulk/02_allele/IV_22_invalid_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/02_allele/IV_22_invalid_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV22", + "primary_external_id": "ALLELETEST:IV22", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_23_invalid_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/02_allele/IV_23_invalid_data_provider_cross_reference_page_area.json index 18804d3df..32adf0766 100644 --- a/src/test/resources/bulk/02_allele/IV_23_invalid_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/02_allele/IV_23_invalid_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV23", + "primary_external_id": "ALLELETEST:IV23", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_24_invalid_allele_functional_impacts_functional_impacts.json b/src/test/resources/bulk/02_allele/IV_24_invalid_allele_functional_impacts_functional_impacts.json index a52b0efc5..4edb9b730 100644 --- a/src/test/resources/bulk/02_allele/IV_24_invalid_allele_functional_impacts_functional_impacts.json +++ b/src/test/resources/bulk/02_allele/IV_24_invalid_allele_functional_impacts_functional_impacts.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV24", + "primary_external_id": "ALLELETEST:IV24", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_25_invalid_allele_functional_impacts_phenotype_term.json b/src/test/resources/bulk/02_allele/IV_25_invalid_allele_functional_impacts_phenotype_term.json index 925039bac..eb78a8673 100644 --- a/src/test/resources/bulk/02_allele/IV_25_invalid_allele_functional_impacts_phenotype_term.json +++ b/src/test/resources/bulk/02_allele/IV_25_invalid_allele_functional_impacts_phenotype_term.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV25", + "primary_external_id": "ALLELETEST:IV25", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_26_invalid_allele_functional_impacts_evidence.json b/src/test/resources/bulk/02_allele/IV_26_invalid_allele_functional_impacts_evidence.json index 936849682..2eb40e195 100644 --- a/src/test/resources/bulk/02_allele/IV_26_invalid_allele_functional_impacts_evidence.json +++ b/src/test/resources/bulk/02_allele/IV_26_invalid_allele_functional_impacts_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV26", + "primary_external_id": "ALLELETEST:IV26", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_27_invalid_allele_germline_transmission_status_germline_transmission_status.json b/src/test/resources/bulk/02_allele/IV_27_invalid_allele_germline_transmission_status_germline_transmission_status.json index 614abc4e9..d5a55d955 100644 --- a/src/test/resources/bulk/02_allele/IV_27_invalid_allele_germline_transmission_status_germline_transmission_status.json +++ b/src/test/resources/bulk/02_allele/IV_27_invalid_allele_germline_transmission_status_germline_transmission_status.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV27", + "primary_external_id": "ALLELETEST:IV27", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_28_invalid_allele_germline_transmission_status_evidence.json b/src/test/resources/bulk/02_allele/IV_28_invalid_allele_germline_transmission_status_evidence.json index 55089e852..d7d01b66b 100644 --- a/src/test/resources/bulk/02_allele/IV_28_invalid_allele_germline_transmission_status_evidence.json +++ b/src/test/resources/bulk/02_allele/IV_28_invalid_allele_germline_transmission_status_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV28", + "primary_external_id": "ALLELETEST:IV28", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_29_invalid_related_notes_note_type_name.json b/src/test/resources/bulk/02_allele/IV_29_invalid_related_notes_note_type_name.json index 5657f692e..e6381d978 100644 --- a/src/test/resources/bulk/02_allele/IV_29_invalid_related_notes_note_type_name.json +++ b/src/test/resources/bulk/02_allele/IV_29_invalid_related_notes_note_type_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV29", + "primary_external_id": "ALLELETEST:IV29", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_30_invalid_related_notes_evidence.json b/src/test/resources/bulk/02_allele/IV_30_invalid_related_notes_evidence.json index b010b0744..7a93cc3f8 100644 --- a/src/test/resources/bulk/02_allele/IV_30_invalid_related_notes_evidence.json +++ b/src/test/resources/bulk/02_allele/IV_30_invalid_related_notes_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV30", + "primary_external_id": "ALLELETEST:IV30", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_31_invalid_allele_database_status_database_status.json b/src/test/resources/bulk/02_allele/IV_31_invalid_allele_database_status_database_status.json index e18c93caa..6a282a909 100644 --- a/src/test/resources/bulk/02_allele/IV_31_invalid_allele_database_status_database_status.json +++ b/src/test/resources/bulk/02_allele/IV_31_invalid_allele_database_status_database_status.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV31", + "primary_external_id": "ALLELETEST:IV31", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_32_invalid_allele_database_status_evidence.json b/src/test/resources/bulk/02_allele/IV_32_invalid_allele_database_status_evidence.json index 7b44791ca..22bb1b776 100644 --- a/src/test/resources/bulk/02_allele/IV_32_invalid_allele_database_status_evidence.json +++ b/src/test/resources/bulk/02_allele/IV_32_invalid_allele_database_status_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV32", + "primary_external_id": "ALLELETEST:IV32", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_33_invalid_allele_nomenclature_events_nomenclature_event.json b/src/test/resources/bulk/02_allele/IV_33_invalid_allele_nomenclature_events_nomenclature_event.json index 08bfd4d53..b3e5dffa4 100644 --- a/src/test/resources/bulk/02_allele/IV_33_invalid_allele_nomenclature_events_nomenclature_event.json +++ b/src/test/resources/bulk/02_allele/IV_33_invalid_allele_nomenclature_events_nomenclature_event.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV33", + "primary_external_id": "ALLELETEST:IV33", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/IV_34_invalid_allele_nomenclature_events_evidence.json b/src/test/resources/bulk/02_allele/IV_34_invalid_allele_nomenclature_events_evidence.json index 6b06478db..6e32e7675 100644 --- a/src/test/resources/bulk/02_allele/IV_34_invalid_allele_nomenclature_events_evidence.json +++ b/src/test/resources/bulk/02_allele/IV_34_invalid_allele_nomenclature_events_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IV34", + "primary_external_id": "ALLELETEST:IV34", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/MN_01_no_non_required_fields_level_1.json b/src/test/resources/bulk/02_allele/MN_01_no_non_required_fields_level_1.json index 271caea0e..8cec83a36 100644 --- a/src/test/resources/bulk/02_allele/MN_01_no_non_required_fields_level_1.json +++ b/src/test/resources/bulk/02_allele/MN_01_no_non_required_fields_level_1.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MN01", + "primary_external_id": "ALLELETEST:MN01", "taxon_curie": "NCBITaxon:6239", "allele_symbol_dto": { "display_text": "Ta1", diff --git a/src/test/resources/bulk/02_allele/MN_02_no_non_required_fields_level_2.json b/src/test/resources/bulk/02_allele/MN_02_no_non_required_fields_level_2.json index e144878c8..58b39ad3b 100644 --- a/src/test/resources/bulk/02_allele/MN_02_no_non_required_fields_level_2.json +++ b/src/test/resources/bulk/02_allele/MN_02_no_non_required_fields_level_2.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MN01", + "primary_external_id": "ALLELETEST:MN01", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/MR_02_no_taxon.json b/src/test/resources/bulk/02_allele/MR_02_no_taxon.json index 6366a6476..8b3251989 100644 --- a/src/test/resources/bulk/02_allele/MR_02_no_taxon.json +++ b/src/test/resources/bulk/02_allele/MR_02_no_taxon.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR02", + "primary_external_id": "ALLELETEST:MR02", "internal": true, "obsolete": false, "created_by_curie": "ALLELETEST:Person0001", diff --git a/src/test/resources/bulk/02_allele/MR_03_no_allele_mutation_type_mutation_types.json b/src/test/resources/bulk/02_allele/MR_03_no_allele_mutation_type_mutation_types.json index c66983a3f..a0ebde96f 100644 --- a/src/test/resources/bulk/02_allele/MR_03_no_allele_mutation_type_mutation_types.json +++ b/src/test/resources/bulk/02_allele/MR_03_no_allele_mutation_type_mutation_types.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR03", + "primary_external_id": "ALLELETEST:MR03", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/MR_04_no_allele_symbol.json b/src/test/resources/bulk/02_allele/MR_04_no_allele_symbol.json index 1acfb7599..5fe657950 100644 --- a/src/test/resources/bulk/02_allele/MR_04_no_allele_symbol.json +++ b/src/test/resources/bulk/02_allele/MR_04_no_allele_symbol.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR04", + "primary_external_id": "ALLELETEST:MR04", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/MR_05_no_allele_symbol_display_text.json b/src/test/resources/bulk/02_allele/MR_05_no_allele_symbol_display_text.json index f1710cac0..78262ea19 100644 --- a/src/test/resources/bulk/02_allele/MR_05_no_allele_symbol_display_text.json +++ b/src/test/resources/bulk/02_allele/MR_05_no_allele_symbol_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR05", + "primary_external_id": "ALLELETEST:MR05", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/MR_06_no_allele_full_name_display_text.json b/src/test/resources/bulk/02_allele/MR_06_no_allele_full_name_display_text.json index 52865cf50..3908c56e6 100644 --- a/src/test/resources/bulk/02_allele/MR_06_no_allele_full_name_display_text.json +++ b/src/test/resources/bulk/02_allele/MR_06_no_allele_full_name_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR06", + "primary_external_id": "ALLELETEST:MR06", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/MR_07_no_allele_synonym_display_text.json b/src/test/resources/bulk/02_allele/MR_07_no_allele_synonym_display_text.json index 35fe21401..8b8d7be33 100644 --- a/src/test/resources/bulk/02_allele/MR_07_no_allele_synonym_display_text.json +++ b/src/test/resources/bulk/02_allele/MR_07_no_allele_synonym_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR07", + "primary_external_id": "ALLELETEST:MR07", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/MR_08_no_allele_symbol_format_text.json b/src/test/resources/bulk/02_allele/MR_08_no_allele_symbol_format_text.json index 865dff4bd..775cc341b 100644 --- a/src/test/resources/bulk/02_allele/MR_08_no_allele_symbol_format_text.json +++ b/src/test/resources/bulk/02_allele/MR_08_no_allele_symbol_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR08", + "primary_external_id": "ALLELETEST:MR08", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/MR_09_no_allele_full_name_format_text.json b/src/test/resources/bulk/02_allele/MR_09_no_allele_full_name_format_text.json index b5115d164..239023007 100644 --- a/src/test/resources/bulk/02_allele/MR_09_no_allele_full_name_format_text.json +++ b/src/test/resources/bulk/02_allele/MR_09_no_allele_full_name_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR09", + "primary_external_id": "ALLELETEST:MR09", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/MR_10_no_allele_synonym_format_text.json b/src/test/resources/bulk/02_allele/MR_10_no_allele_synonym_format_text.json index 584f07363..f5f71aeda 100644 --- a/src/test/resources/bulk/02_allele/MR_10_no_allele_synonym_format_text.json +++ b/src/test/resources/bulk/02_allele/MR_10_no_allele_synonym_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETESTMR10", + "primary_external_id": "ALLELETESTMR10", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/MR_11_no_allele_symbol_name_type.json b/src/test/resources/bulk/02_allele/MR_11_no_allele_symbol_name_type.json index 81cabfd27..8f98b16e2 100644 --- a/src/test/resources/bulk/02_allele/MR_11_no_allele_symbol_name_type.json +++ b/src/test/resources/bulk/02_allele/MR_11_no_allele_symbol_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR11", + "primary_external_id": "ALLELETEST:MR11", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/MR_12_no_allele_full_name_name_type.json b/src/test/resources/bulk/02_allele/MR_12_no_allele_full_name_name_type.json index d69ecb9b7..e334c04ea 100644 --- a/src/test/resources/bulk/02_allele/MR_12_no_allele_full_name_name_type.json +++ b/src/test/resources/bulk/02_allele/MR_12_no_allele_full_name_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR12", + "primary_external_id": "ALLELETEST:MR12", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/MR_13_no_allele_synonym_name_type.json b/src/test/resources/bulk/02_allele/MR_13_no_allele_synonym_name_type.json index 6bd85e71f..1cf3bfefc 100644 --- a/src/test/resources/bulk/02_allele/MR_13_no_allele_synonym_name_type.json +++ b/src/test/resources/bulk/02_allele/MR_13_no_allele_synonym_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR13", + "primary_external_id": "ALLELETEST:MR13", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/MR_14_no_allele_secondary_id_secondary_id.json b/src/test/resources/bulk/02_allele/MR_14_no_allele_secondary_id_secondary_id.json index 2b735857c..016f7de9e 100644 --- a/src/test/resources/bulk/02_allele/MR_14_no_allele_secondary_id_secondary_id.json +++ b/src/test/resources/bulk/02_allele/MR_14_no_allele_secondary_id_secondary_id.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR14", + "primary_external_id": "ALLELETEST:MR14", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/02_allele/MR_15_no_allele_inheritance_mode_inheritance_mode.json b/src/test/resources/bulk/02_allele/MR_15_no_allele_inheritance_mode_inheritance_mode.json index 2b71f0867..136ee8187 100644 --- a/src/test/resources/bulk/02_allele/MR_15_no_allele_inheritance_mode_inheritance_mode.json +++ b/src/test/resources/bulk/02_allele/MR_15_no_allele_inheritance_mode_inheritance_mode.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR15", + "primary_external_id": "ALLELETEST:MR15", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/MR_16_no_data_provider.json b/src/test/resources/bulk/02_allele/MR_16_no_data_provider.json index 27ad94d25..54d06459d 100644 --- a/src/test/resources/bulk/02_allele/MR_16_no_data_provider.json +++ b/src/test/resources/bulk/02_allele/MR_16_no_data_provider.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR16", + "primary_external_id": "ALLELETEST:MR16", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/MR_17_no_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/02_allele/MR_17_no_data_provider_source_organization_abbreviation.json index 498abe347..b1e68fdcf 100644 --- a/src/test/resources/bulk/02_allele/MR_17_no_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/02_allele/MR_17_no_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR17", + "primary_external_id": "ALLELETEST:MR17", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/MR_18_no_data_provider_cross_reference_referenced_curie.json b/src/test/resources/bulk/02_allele/MR_18_no_data_provider_cross_reference_referenced_curie.json index 9ebec95fc..fbaac01d4 100644 --- a/src/test/resources/bulk/02_allele/MR_18_no_data_provider_cross_reference_referenced_curie.json +++ b/src/test/resources/bulk/02_allele/MR_18_no_data_provider_cross_reference_referenced_curie.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR18", + "primary_external_id": "ALLELETEST:MR18", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/MR_19_no_data_provider_cross_reference_display_name.json b/src/test/resources/bulk/02_allele/MR_19_no_data_provider_cross_reference_display_name.json index 60ee80f25..956c437a9 100644 --- a/src/test/resources/bulk/02_allele/MR_19_no_data_provider_cross_reference_display_name.json +++ b/src/test/resources/bulk/02_allele/MR_19_no_data_provider_cross_reference_display_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR19", + "primary_external_id": "ALLELETEST:MR19", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/MR_20_no_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/02_allele/MR_20_no_data_provider_cross_reference_prefix.json index 2c12645d5..2511d3017 100644 --- a/src/test/resources/bulk/02_allele/MR_20_no_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/02_allele/MR_20_no_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR20", + "primary_external_id": "ALLELETEST:MR20", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/MR_21_no_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/02_allele/MR_21_no_data_provider_cross_reference_page_area.json index 219fd13f3..2c197d71a 100644 --- a/src/test/resources/bulk/02_allele/MR_21_no_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/02_allele/MR_21_no_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR21", + "primary_external_id": "ALLELETEST:MR21", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/MR_22_no_allele_functional_impacts_functional_impacts.json b/src/test/resources/bulk/02_allele/MR_22_no_allele_functional_impacts_functional_impacts.json index 17420c422..94098210c 100644 --- a/src/test/resources/bulk/02_allele/MR_22_no_allele_functional_impacts_functional_impacts.json +++ b/src/test/resources/bulk/02_allele/MR_22_no_allele_functional_impacts_functional_impacts.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR22", + "primary_external_id": "ALLELETEST:MR22", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/MR_23_no_allele_germline_transmission_status_germline_transmission_status.json b/src/test/resources/bulk/02_allele/MR_23_no_allele_germline_transmission_status_germline_transmission_status.json index 3ed5e9e61..bcf14f514 100644 --- a/src/test/resources/bulk/02_allele/MR_23_no_allele_germline_transmission_status_germline_transmission_status.json +++ b/src/test/resources/bulk/02_allele/MR_23_no_allele_germline_transmission_status_germline_transmission_status.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR23", + "primary_external_id": "ALLELETEST:MR23", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/MR_24_no_related_notes_note_type_name.json b/src/test/resources/bulk/02_allele/MR_24_no_related_notes_note_type_name.json index 682df5280..51acae064 100644 --- a/src/test/resources/bulk/02_allele/MR_24_no_related_notes_note_type_name.json +++ b/src/test/resources/bulk/02_allele/MR_24_no_related_notes_note_type_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR24", + "primary_external_id": "ALLELETEST:MR24", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/MR_25_no_related_notes_free_text.json b/src/test/resources/bulk/02_allele/MR_25_no_related_notes_free_text.json index b94712a8c..8b490e5a4 100644 --- a/src/test/resources/bulk/02_allele/MR_25_no_related_notes_free_text.json +++ b/src/test/resources/bulk/02_allele/MR_25_no_related_notes_free_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR25", + "primary_external_id": "ALLELETEST:MR25", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/MR_26_no_allele_database_status_database_status.json b/src/test/resources/bulk/02_allele/MR_26_no_allele_database_status_database_status.json index c63ad0d0e..90b658884 100644 --- a/src/test/resources/bulk/02_allele/MR_26_no_allele_database_status_database_status.json +++ b/src/test/resources/bulk/02_allele/MR_26_no_allele_database_status_database_status.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR26", + "primary_external_id": "ALLELETEST:MR26", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/MR_27_no_allele_nomenclature_events_nomenclature_event.json b/src/test/resources/bulk/02_allele/MR_27_no_allele_nomenclature_events_nomenclature_event.json index 724ec1827..240902b80 100644 --- a/src/test/resources/bulk/02_allele/MR_27_no_allele_nomenclature_events_nomenclature_event.json +++ b/src/test/resources/bulk/02_allele/MR_27_no_allele_nomenclature_events_nomenclature_event.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:MR27", + "primary_external_id": "ALLELETEST:MR27", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/SI_01_secondary_ids.json b/src/test/resources/bulk/02_allele/SI_01_secondary_ids.json index 960094826..f69b3bd3f 100644 --- a/src/test/resources/bulk/02_allele/SI_01_secondary_ids.json +++ b/src/test/resources/bulk/02_allele/SI_01_secondary_ids.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:SI01", + "primary_external_id": "ALLELETEST:SI01", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/UD_01_update_all_except_default_fields.json b/src/test/resources/bulk/02_allele/UD_01_update_all_except_default_fields.json index d5397ea28..652c9b750 100644 --- a/src/test/resources/bulk/02_allele/UD_01_update_all_except_default_fields.json +++ b/src/test/resources/bulk/02_allele/UD_01_update_all_except_default_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:Allele0001", + "primary_external_id": "ALLELETEST:Allele0001", "taxon_curie": "NCBITaxon:10116", "created_by_curie": "ALLELETEST:Person0002", "updated_by_curie": "ALLELETEST:Person0001", diff --git a/src/test/resources/bulk/02_allele/UE_01_update_empty_non_required_fields.json b/src/test/resources/bulk/02_allele/UE_01_update_empty_non_required_fields.json index 7d0e93baa..14f295f07 100644 --- a/src/test/resources/bulk/02_allele/UE_01_update_empty_non_required_fields.json +++ b/src/test/resources/bulk/02_allele/UE_01_update_empty_non_required_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:Allele0001", + "primary_external_id": "ALLELETEST:Allele0001", "taxon_curie": "NCBITaxon:6239", "created_by_curie": "", "updated_by_curie": "", diff --git a/src/test/resources/bulk/02_allele/UM_01_update_no_non_required_fields_level_1.json b/src/test/resources/bulk/02_allele/UM_01_update_no_non_required_fields_level_1.json index 13b876712..bdac084e3 100644 --- a/src/test/resources/bulk/02_allele/UM_01_update_no_non_required_fields_level_1.json +++ b/src/test/resources/bulk/02_allele/UM_01_update_no_non_required_fields_level_1.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:Allele0001", + "primary_external_id": "ALLELETEST:Allele0001", "taxon_curie": "NCBITaxon:6239", "allele_symbol_dto": { "display_text": "Ta1", diff --git a/src/test/resources/bulk/02_allele/UM_02_update_no_non_required_fields_level_2.json b/src/test/resources/bulk/02_allele/UM_02_update_no_non_required_fields_level_2.json index 8ae38d14c..3383cc633 100644 --- a/src/test/resources/bulk/02_allele/UM_02_update_no_non_required_fields_level_2.json +++ b/src/test/resources/bulk/02_allele/UM_02_update_no_non_required_fields_level_2.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:Allele0001", + "primary_external_id": "ALLELETEST:Allele0001", "taxon_curie": "NCBITaxon:6239", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/VT_01_valid_taxon_for_HUMAN.json b/src/test/resources/bulk/02_allele/VT_01_valid_taxon_for_HUMAN.json index a42ed57b2..f33e25770 100644 --- a/src/test/resources/bulk/02_allele/VT_01_valid_taxon_for_HUMAN.json +++ b/src/test/resources/bulk/02_allele/VT_01_valid_taxon_for_HUMAN.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IT01", + "primary_external_id": "ALLELETEST:IT01", "taxon_curie": "NCBITaxon:9606", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/02_allele/VT_02_valid_taxon_for_RGD.json b/src/test/resources/bulk/02_allele/VT_02_valid_taxon_for_RGD.json index c214ebc1d..defccc465 100644 --- a/src/test/resources/bulk/02_allele/VT_02_valid_taxon_for_RGD.json +++ b/src/test/resources/bulk/02_allele/VT_02_valid_taxon_for_RGD.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ALLELETEST:IT01", + "primary_external_id": "ALLELETEST:IT01", "taxon_curie": "NCBITaxon:10116", "internal": true, "obsolete": true, diff --git a/src/test/resources/bulk/03_agm/AF_01_all_fields.json b/src/test/resources/bulk/03_agm/AF_01_all_fields.json index faa907fa1..f5b8dbdce 100644 --- a/src/test/resources/bulk/03_agm/AF_01_all_fields.json +++ b/src/test/resources/bulk/03_agm/AF_01_all_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:Agm0001", + "primary_external_id": "AGMTEST:Agm0001", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/EN_01_empty_non_required_fields.json b/src/test/resources/bulk/03_agm/EN_01_empty_non_required_fields.json index ac64425c6..17ad117d0 100644 --- a/src/test/resources/bulk/03_agm/EN_01_empty_non_required_fields.json +++ b/src/test/resources/bulk/03_agm/EN_01_empty_non_required_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:EN01", + "primary_external_id": "AGMTEST:EN01", "subtype_name": "fish", "name": "", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/ER_01_empty_mod_ids.json b/src/test/resources/bulk/03_agm/ER_01_empty_mod_ids.json index c4799f5fc..bc0a58cc1 100644 --- a/src/test/resources/bulk/03_agm/ER_01_empty_mod_ids.json +++ b/src/test/resources/bulk/03_agm/ER_01_empty_mod_ids.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "", + "primary_external_id": "", "name": "TestAgm18", "taxon_curie": "NCBITaxon:6239", "internal": true, diff --git a/src/test/resources/bulk/03_agm/ER_02_empty_taxon.json b/src/test/resources/bulk/03_agm/ER_02_empty_taxon.json index 099874704..48eba6846 100644 --- a/src/test/resources/bulk/03_agm/ER_02_empty_taxon.json +++ b/src/test/resources/bulk/03_agm/ER_02_empty_taxon.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:ER02", + "primary_external_id": "AGMTEST:ER02", "name": "TestAgm19", "taxon_curie": "", "internal": true, diff --git a/src/test/resources/bulk/03_agm/ER_03_empty_subtype.json b/src/test/resources/bulk/03_agm/ER_03_empty_subtype.json index fc22280bc..6234a7668 100644 --- a/src/test/resources/bulk/03_agm/ER_03_empty_subtype.json +++ b/src/test/resources/bulk/03_agm/ER_03_empty_subtype.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:Agm0001", + "primary_external_id": "AGMTEST:Agm0001", "subtype_name": "", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/ER_04_empty_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/03_agm/ER_04_empty_data_provider_source_organization_abbreviation.json index 48aa18c7e..9f83f2ade 100644 --- a/src/test/resources/bulk/03_agm/ER_04_empty_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/03_agm/ER_04_empty_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:ER04", + "primary_external_id": "AGMTEST:ER04", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/ER_05_empty_data_provider_cross_reference_referenced_curie.json b/src/test/resources/bulk/03_agm/ER_05_empty_data_provider_cross_reference_referenced_curie.json index 9d9b26c8a..9d0896da4 100644 --- a/src/test/resources/bulk/03_agm/ER_05_empty_data_provider_cross_reference_referenced_curie.json +++ b/src/test/resources/bulk/03_agm/ER_05_empty_data_provider_cross_reference_referenced_curie.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:ER05", + "primary_external_id": "AGMTEST:ER05", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/ER_06_empty_data_provider_cross_reference_display_name.json b/src/test/resources/bulk/03_agm/ER_06_empty_data_provider_cross_reference_display_name.json index 59cced227..6544abdae 100644 --- a/src/test/resources/bulk/03_agm/ER_06_empty_data_provider_cross_reference_display_name.json +++ b/src/test/resources/bulk/03_agm/ER_06_empty_data_provider_cross_reference_display_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:ER06", + "primary_external_id": "AGMTEST:ER06", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/ER_07_empty_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/03_agm/ER_07_empty_data_provider_cross_reference_prefix.json index c0a58b856..cc935e50a 100644 --- a/src/test/resources/bulk/03_agm/ER_07_empty_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/03_agm/ER_07_empty_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:ER07", + "primary_external_id": "AGMTEST:ER07", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/ER_08_empty_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/03_agm/ER_08_empty_data_provider_cross_reference_page_area.json index e329b3169..c9e89baa2 100644 --- a/src/test/resources/bulk/03_agm/ER_08_empty_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/03_agm/ER_08_empty_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:ER08", + "primary_external_id": "AGMTEST:ER08", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/IV_01_invalid_date_created.json b/src/test/resources/bulk/03_agm/IV_01_invalid_date_created.json index 800c974a7..69a7c99c1 100644 --- a/src/test/resources/bulk/03_agm/IV_01_invalid_date_created.json +++ b/src/test/resources/bulk/03_agm/IV_01_invalid_date_created.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:Agm0011", + "primary_external_id": "AGMTEST:Agm0011", "name": "TestAgm11", "taxon_curie": "NCBITaxon:6239", "internal": true, diff --git a/src/test/resources/bulk/03_agm/IV_02_invalid_date_updated.json b/src/test/resources/bulk/03_agm/IV_02_invalid_date_updated.json index 64cc2970d..d5a7bd246 100644 --- a/src/test/resources/bulk/03_agm/IV_02_invalid_date_updated.json +++ b/src/test/resources/bulk/03_agm/IV_02_invalid_date_updated.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:Agm0012", + "primary_external_id": "AGMTEST:Agm0012", "name": "TestAgm12", "taxon_curie": "NCBITaxon:6239", "internal": true, diff --git a/src/test/resources/bulk/03_agm/IV_03_invalid_taxon.json b/src/test/resources/bulk/03_agm/IV_03_invalid_taxon.json index bbf465096..b68e12688 100644 --- a/src/test/resources/bulk/03_agm/IV_03_invalid_taxon.json +++ b/src/test/resources/bulk/03_agm/IV_03_invalid_taxon.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:Agm0010", + "primary_external_id": "AGMTEST:Agm0010", "name": "TestAgm10", "taxon_curie": "NCBITaxon:1009", "internal": true, diff --git a/src/test/resources/bulk/03_agm/IV_04_invalid_subtype.json b/src/test/resources/bulk/03_agm/IV_04_invalid_subtype.json index a56226ae3..cc8f9d481 100644 --- a/src/test/resources/bulk/03_agm/IV_04_invalid_subtype.json +++ b/src/test/resources/bulk/03_agm/IV_04_invalid_subtype.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:Agm0001", + "primary_external_id": "AGMTEST:Agm0001", "subtype_name": "invalid", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/IV_05_invalid_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/03_agm/IV_05_invalid_data_provider_source_organization_abbreviation.json index 03e8282c0..435cb942d 100644 --- a/src/test/resources/bulk/03_agm/IV_05_invalid_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/03_agm/IV_05_invalid_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:IV05", + "primary_external_id": "AGMTEST:IV05", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/IV_06_invalid_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/03_agm/IV_06_invalid_data_provider_cross_reference_prefix.json index f376937db..90e591a9f 100644 --- a/src/test/resources/bulk/03_agm/IV_06_invalid_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/03_agm/IV_06_invalid_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:IV06", + "primary_external_id": "AGMTEST:IV06", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/IV_07_invalid_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/03_agm/IV_07_invalid_data_provider_cross_reference_page_area.json index e73fa9f01..b713fb00a 100644 --- a/src/test/resources/bulk/03_agm/IV_07_invalid_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/03_agm/IV_07_invalid_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:IV07", + "primary_external_id": "AGMTEST:IV07", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/MN_01_no_non_required_fields.json b/src/test/resources/bulk/03_agm/MN_01_no_non_required_fields.json index 5061e0b51..293620d35 100644 --- a/src/test/resources/bulk/03_agm/MN_01_no_non_required_fields.json +++ b/src/test/resources/bulk/03_agm/MN_01_no_non_required_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:MN01", + "primary_external_id": "AGMTEST:MN01", "taxon_curie": "NCBITaxon:6239", "subtype_name": "fish", "data_provider_dto": { diff --git a/src/test/resources/bulk/03_agm/MR_02_no_taxon.json b/src/test/resources/bulk/03_agm/MR_02_no_taxon.json index 8616782c6..04bd6c984 100644 --- a/src/test/resources/bulk/03_agm/MR_02_no_taxon.json +++ b/src/test/resources/bulk/03_agm/MR_02_no_taxon.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:MR02", + "primary_external_id": "AGMTEST:MR02", "name": "TestAgm4", "internal": true, "obsolete": false, diff --git a/src/test/resources/bulk/03_agm/MR_03_no_subtype.json b/src/test/resources/bulk/03_agm/MR_03_no_subtype.json index e1f31a60f..9b9309475 100644 --- a/src/test/resources/bulk/03_agm/MR_03_no_subtype.json +++ b/src/test/resources/bulk/03_agm/MR_03_no_subtype.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:Agm0001", + "primary_external_id": "AGMTEST:Agm0001", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", "internal": true, diff --git a/src/test/resources/bulk/03_agm/MR_04_no_data_provider.json b/src/test/resources/bulk/03_agm/MR_04_no_data_provider.json index c2741cfab..b5b407852 100644 --- a/src/test/resources/bulk/03_agm/MR_04_no_data_provider.json +++ b/src/test/resources/bulk/03_agm/MR_04_no_data_provider.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:MR04", + "primary_external_id": "AGMTEST:MR04", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/MR_05_no_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/03_agm/MR_05_no_data_provider_source_organization_abbreviation.json index 7fa4a4e6e..bb6f2d190 100644 --- a/src/test/resources/bulk/03_agm/MR_05_no_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/03_agm/MR_05_no_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:MR05", + "primary_external_id": "AGMTEST:MR05", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/MR_06_no_data_provider_cross_reference_referenced_curie.json b/src/test/resources/bulk/03_agm/MR_06_no_data_provider_cross_reference_referenced_curie.json index 5a9d6937e..596d2de70 100644 --- a/src/test/resources/bulk/03_agm/MR_06_no_data_provider_cross_reference_referenced_curie.json +++ b/src/test/resources/bulk/03_agm/MR_06_no_data_provider_cross_reference_referenced_curie.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:MR06", + "primary_external_id": "AGMTEST:MR06", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/MR_07_no_data_provider_cross_reference_display_name.json b/src/test/resources/bulk/03_agm/MR_07_no_data_provider_cross_reference_display_name.json index fe7158dcd..6ddfe6cc2 100644 --- a/src/test/resources/bulk/03_agm/MR_07_no_data_provider_cross_reference_display_name.json +++ b/src/test/resources/bulk/03_agm/MR_07_no_data_provider_cross_reference_display_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:MR07", + "primary_external_id": "AGMTEST:MR07", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/MR_08_no_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/03_agm/MR_08_no_data_provider_cross_reference_prefix.json index ea788b531..c25bd9351 100644 --- a/src/test/resources/bulk/03_agm/MR_08_no_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/03_agm/MR_08_no_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:MR08", + "primary_external_id": "AGMTEST:MR08", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/MR_09_no_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/03_agm/MR_09_no_data_provider_cross_reference_page_area.json index 87590968b..8deb055ff 100644 --- a/src/test/resources/bulk/03_agm/MR_09_no_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/03_agm/MR_09_no_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:MR09", + "primary_external_id": "AGMTEST:MR09", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/UD_01_update_all_except_default_fields.json b/src/test/resources/bulk/03_agm/UD_01_update_all_except_default_fields.json index f5e9a8408..da3ef94ca 100644 --- a/src/test/resources/bulk/03_agm/UD_01_update_all_except_default_fields.json +++ b/src/test/resources/bulk/03_agm/UD_01_update_all_except_default_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:Agm0001", + "primary_external_id": "AGMTEST:Agm0001", "subtype_name": "genotype", "name": "TestAgm1a", "taxon_curie": "NCBITaxon:10116", diff --git a/src/test/resources/bulk/03_agm/UE_01_update_empty_non_required_fields.json b/src/test/resources/bulk/03_agm/UE_01_update_empty_non_required_fields.json index 0a8a93a0a..000a22c4a 100644 --- a/src/test/resources/bulk/03_agm/UE_01_update_empty_non_required_fields.json +++ b/src/test/resources/bulk/03_agm/UE_01_update_empty_non_required_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:Agm0001", + "primary_external_id": "AGMTEST:Agm0001", "subtype_name": "fish", "name": "", "taxon_curie": "NCBITaxon:6239", diff --git a/src/test/resources/bulk/03_agm/UM_01_update_no_non_required_fields.json b/src/test/resources/bulk/03_agm/UM_01_update_no_non_required_fields.json index fe33d7cbf..2735e42e4 100644 --- a/src/test/resources/bulk/03_agm/UM_01_update_no_non_required_fields.json +++ b/src/test/resources/bulk/03_agm/UM_01_update_no_non_required_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:Agm0001", + "primary_external_id": "AGMTEST:Agm0001", "taxon_curie": "NCBITaxon:6239", "subtype_name": "fish", "data_provider_dto": { diff --git a/src/test/resources/bulk/03_agm/VT_01_valid_taxon_for_HUMAN.json b/src/test/resources/bulk/03_agm/VT_01_valid_taxon_for_HUMAN.json index d98045198..464ef8521 100644 --- a/src/test/resources/bulk/03_agm/VT_01_valid_taxon_for_HUMAN.json +++ b/src/test/resources/bulk/03_agm/VT_01_valid_taxon_for_HUMAN.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:Agm0001", + "primary_external_id": "AGMTEST:Agm0001", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:9606", diff --git a/src/test/resources/bulk/03_agm/VT_02_valid_taxon_for_RGD.json b/src/test/resources/bulk/03_agm/VT_02_valid_taxon_for_RGD.json index 456503a6e..73b3c1b82 100644 --- a/src/test/resources/bulk/03_agm/VT_02_valid_taxon_for_RGD.json +++ b/src/test/resources/bulk/03_agm/VT_02_valid_taxon_for_RGD.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "AGMTEST:Agm0001", + "primary_external_id": "AGMTEST:Agm0001", "subtype_name": "fish", "name": "TestAgm1", "taxon_curie": "NCBITaxon:10116", diff --git a/src/test/resources/bulk/04_disease_annotation/AF_01_all_fields_gene_annotation.json b/src/test/resources/bulk/04_disease_annotation/AF_01_all_fields_gene_annotation.json index 34eaac35a..d7031ec5c 100644 --- a/src/test/resources/bulk/04_disease_annotation/AF_01_all_fields_gene_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/AF_01_all_fields_gene_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:Annot0001", + "primary_external_id": "DATEST:Annot0001", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/AF_02_all_fields_allele_annotation.json b/src/test/resources/bulk/04_disease_annotation/AF_02_all_fields_allele_annotation.json index 30b884705..c14bb3459 100644 --- a/src/test/resources/bulk/04_disease_annotation/AF_02_all_fields_allele_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/AF_02_all_fields_allele_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:Annot0002", + "primary_external_id": "DATEST:Annot0002", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/AF_03_all_fields_agm_annotation.json b/src/test/resources/bulk/04_disease_annotation/AF_03_all_fields_agm_annotation.json index 86b0bd796..fb066d04c 100644 --- a/src/test/resources/bulk/04_disease_annotation/AF_03_all_fields_agm_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/AF_03_all_fields_agm_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:Annot0003", + "primary_external_id": "DATEST:Annot0003", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/DN_01_duplicate_notes.json b/src/test/resources/bulk/04_disease_annotation/DN_01_duplicate_notes.json index ab79cf2cd..68a057cbd 100644 --- a/src/test/resources/bulk/04_disease_annotation/DN_01_duplicate_notes.json +++ b/src/test/resources/bulk/04_disease_annotation/DN_01_duplicate_notes.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:DN01", + "primary_external_id": "DATEST:DN01", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ED_01_empty_disease_genetic_modifier.json b/src/test/resources/bulk/04_disease_annotation/ED_01_empty_disease_genetic_modifier.json index d2106c1c3..a7c37621f 100644 --- a/src/test/resources/bulk/04_disease_annotation/ED_01_empty_disease_genetic_modifier.json +++ b/src/test/resources/bulk/04_disease_annotation/ED_01_empty_disease_genetic_modifier.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ED01", + "primary_external_id": "DATEST:ED01", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ED_02_empty_disease_genetic_modifier_relation.json b/src/test/resources/bulk/04_disease_annotation/ED_02_empty_disease_genetic_modifier_relation.json index 507799dd4..f3b81ed57 100644 --- a/src/test/resources/bulk/04_disease_annotation/ED_02_empty_disease_genetic_modifier_relation.json +++ b/src/test/resources/bulk/04_disease_annotation/ED_02_empty_disease_genetic_modifier_relation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ED02", + "primary_external_id": "DATEST:ED02", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ED_03_empty_disease_genetic_modifier_and_relation.json b/src/test/resources/bulk/04_disease_annotation/ED_03_empty_disease_genetic_modifier_and_relation.json index 2f0f47ef1..a829f9875 100644 --- a/src/test/resources/bulk/04_disease_annotation/ED_03_empty_disease_genetic_modifier_and_relation.json +++ b/src/test/resources/bulk/04_disease_annotation/ED_03_empty_disease_genetic_modifier_and_relation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ED03", + "primary_external_id": "DATEST:ED03", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ED_04_empty_condition_relation_reference.json b/src/test/resources/bulk/04_disease_annotation/ED_04_empty_condition_relation_reference.json index fb83e05ec..4e1b64be5 100644 --- a/src/test/resources/bulk/04_disease_annotation/ED_04_empty_condition_relation_reference.json +++ b/src/test/resources/bulk/04_disease_annotation/ED_04_empty_condition_relation_reference.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ED04", + "primary_external_id": "DATEST:ED04", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ED_05_empty_condition_relation_handle_and_reference.json b/src/test/resources/bulk/04_disease_annotation/ED_05_empty_condition_relation_handle_and_reference.json index bb5892a4d..4dd077934 100644 --- a/src/test/resources/bulk/04_disease_annotation/ED_05_empty_condition_relation_handle_and_reference.json +++ b/src/test/resources/bulk/04_disease_annotation/ED_05_empty_condition_relation_handle_and_reference.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ED05", + "primary_external_id": "DATEST:ED05", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/EN_01_empty_non_required_fields_level_1_gene_annotation.json b/src/test/resources/bulk/04_disease_annotation/EN_01_empty_non_required_fields_level_1_gene_annotation.json index 53b23e8bb..cadf7283b 100644 --- a/src/test/resources/bulk/04_disease_annotation/EN_01_empty_non_required_fields_level_1_gene_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/EN_01_empty_non_required_fields_level_1_gene_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:EN01", + "primary_external_id": "DATEST:EN01", "created_by_curie": "", "updated_by_curie": "", "date_created": "", diff --git a/src/test/resources/bulk/04_disease_annotation/EN_02_empty_non_required_fields_level_1_allele_annotation.json b/src/test/resources/bulk/04_disease_annotation/EN_02_empty_non_required_fields_level_1_allele_annotation.json index c6ef86139..a7c91094a 100644 --- a/src/test/resources/bulk/04_disease_annotation/EN_02_empty_non_required_fields_level_1_allele_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/EN_02_empty_non_required_fields_level_1_allele_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:EN02", + "primary_external_id": "DATEST:EN02", "created_by_curie": "", "updated_by_curie": "", "date_created": "", diff --git a/src/test/resources/bulk/04_disease_annotation/EN_03_empty_non_required_fields_level_1_agm_annotation.json b/src/test/resources/bulk/04_disease_annotation/EN_03_empty_non_required_fields_level_1_agm_annotation.json index 0443f17e8..485b153d4 100644 --- a/src/test/resources/bulk/04_disease_annotation/EN_03_empty_non_required_fields_level_1_agm_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/EN_03_empty_non_required_fields_level_1_agm_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:EN03", + "primary_external_id": "DATEST:EN03", "created_by_curie": "", "updated_by_curie": "", "date_created": "", diff --git a/src/test/resources/bulk/04_disease_annotation/EN_04_empty_non_required_fields_level_2.json b/src/test/resources/bulk/04_disease_annotation/EN_04_empty_non_required_fields_level_2.json index d213f2cad..85f5c33fd 100644 --- a/src/test/resources/bulk/04_disease_annotation/EN_04_empty_non_required_fields_level_2.json +++ b/src/test/resources/bulk/04_disease_annotation/EN_04_empty_non_required_fields_level_2.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:EN04", + "primary_external_id": "DATEST:EN04", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_01_empty_subject.json b/src/test/resources/bulk/04_disease_annotation/ER_01_empty_subject.json index e72dadedf..fe38fe057 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_01_empty_subject.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_01_empty_subject.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER01", + "primary_external_id": "DATEST:ER01", "internal": false, "obsolete": false, "gene_identifier": "", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_02_empty_object.json b/src/test/resources/bulk/04_disease_annotation/ER_02_empty_object.json index 1b4a500ea..044940a25 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_02_empty_object.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_02_empty_object.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER02", + "primary_external_id": "DATEST:ER02", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_03_empty_disease_relation_gene_annotation.json b/src/test/resources/bulk/04_disease_annotation/ER_03_empty_disease_relation_gene_annotation.json index 3363db01b..1ca48c254 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_03_empty_disease_relation_gene_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_03_empty_disease_relation_gene_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "ER03", + "primary_external_id": "ER03", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_04_empty_disease_relation_allele_annotation.json b/src/test/resources/bulk/04_disease_annotation/ER_04_empty_disease_relation_allele_annotation.json index 6d97c6814..e65378b52 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_04_empty_disease_relation_allele_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_04_empty_disease_relation_allele_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER04", + "primary_external_id": "DATEST:ER04", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_05_empty_disease_relation_agm_annotation.json b/src/test/resources/bulk/04_disease_annotation/ER_05_empty_disease_relation_agm_annotation.json index 91acb1332..0d2160fb2 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_05_empty_disease_relation_agm_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_05_empty_disease_relation_agm_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER05", + "primary_external_id": "DATEST:ER05", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_06_empty_evidence_codes.json b/src/test/resources/bulk/04_disease_annotation/ER_06_empty_evidence_codes.json index 5a071168d..cc6b928d2 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_06_empty_evidence_codes.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_06_empty_evidence_codes.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER06", + "primary_external_id": "DATEST:ER06", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_07_empty_single_reference.json b/src/test/resources/bulk/04_disease_annotation/ER_07_empty_single_reference.json index c7ae6151f..b7c8a5944 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_07_empty_single_reference.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_07_empty_single_reference.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER07", + "primary_external_id": "DATEST:ER07", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_08_empty_data_provider.json b/src/test/resources/bulk/04_disease_annotation/ER_08_empty_data_provider.json index 3e40df603..09a27e506 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_08_empty_data_provider.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_08_empty_data_provider.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER08", + "primary_external_id": "DATEST:ER08", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_09_empty_condition_relations_type.json b/src/test/resources/bulk/04_disease_annotation/ER_09_empty_condition_relations_type.json index a92501566..bb518a596 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_09_empty_condition_relations_type.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_09_empty_condition_relations_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER09", + "primary_external_id": "DATEST:ER09", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_10_empty_condition_relation_experimental_conditions.json b/src/test/resources/bulk/04_disease_annotation/ER_10_empty_condition_relation_experimental_conditions.json index e6d989dda..5f6964843 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_10_empty_condition_relation_experimental_conditions.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_10_empty_condition_relation_experimental_conditions.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER10", + "primary_external_id": "DATEST:ER10", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_11_empty_condition_class.json b/src/test/resources/bulk/04_disease_annotation/ER_11_empty_condition_class.json index 855a58385..2cedb879e 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_11_empty_condition_class.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_11_empty_condition_class.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER11", + "primary_external_id": "DATEST:ER11", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_12_empty_related_note_type.json b/src/test/resources/bulk/04_disease_annotation/ER_12_empty_related_note_type.json index 40b33eec0..59edaae94 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_12_empty_related_note_type.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_12_empty_related_note_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER12", + "primary_external_id": "DATEST:ER12", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_13_empty_related_note_free_text.json b/src/test/resources/bulk/04_disease_annotation/ER_13_empty_related_note_free_text.json index 3e8b46c87..d4656f76a 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_13_empty_related_note_free_text.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_13_empty_related_note_free_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER13", + "primary_external_id": "DATEST:ER13", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_14_empty_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/04_disease_annotation/ER_14_empty_data_provider_source_organization_abbreviation.json index 68926d1b0..a7f79676e 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_14_empty_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_14_empty_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER14", + "primary_external_id": "DATEST:ER14", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_15_empty_secondary_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/04_disease_annotation/ER_15_empty_secondary_data_provider_source_organization_abbreviation.json index e65b8c91b..69c5e1f00 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_15_empty_secondary_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_15_empty_secondary_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER15", + "primary_external_id": "DATEST:ER15", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_16_empty_data_provider_cross_reference_referenced_curie.json b/src/test/resources/bulk/04_disease_annotation/ER_16_empty_data_provider_cross_reference_referenced_curie.json index e90d04cfd..75702fb3a 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_16_empty_data_provider_cross_reference_referenced_curie.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_16_empty_data_provider_cross_reference_referenced_curie.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER16", + "primary_external_id": "DATEST:ER16", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_17_empty_data_provider_cross_reference_display_name.json b/src/test/resources/bulk/04_disease_annotation/ER_17_empty_data_provider_cross_reference_display_name.json index 22b07c74b..185174f46 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_17_empty_data_provider_cross_reference_display_name.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_17_empty_data_provider_cross_reference_display_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER17", + "primary_external_id": "DATEST:ER17", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/ER_18_empty_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/04_disease_annotation/ER_18_empty_data_provider_cross_reference_prefix.json index 031f5e431..e635e5739 100644 --- a/src/test/resources/bulk/04_disease_annotation/ER_18_empty_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/04_disease_annotation/ER_18_empty_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:ER18", + "primary_external_id": "DATEST:ER18", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_01_invalid_date_created.json b/src/test/resources/bulk/04_disease_annotation/IV_01_invalid_date_created.json index 61d0b63ff..f4b695c76 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_01_invalid_date_created.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_01_invalid_date_created.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV01", + "primary_external_id": "DATEST:IV01", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_02_invalid_date_updated.json b/src/test/resources/bulk/04_disease_annotation/IV_02_invalid_date_updated.json index 81c2d6f83..b153ee2a6 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_02_invalid_date_updated.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_02_invalid_date_updated.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV02", + "primary_external_id": "DATEST:IV02", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_03_invalid_subject.json b/src/test/resources/bulk/04_disease_annotation/IV_03_invalid_subject.json index 0a1187512..3b11fb818 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_03_invalid_subject.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_03_invalid_subject.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV03", + "primary_external_id": "DATEST:IV03", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0003", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_04_invalid_object.json b/src/test/resources/bulk/04_disease_annotation/IV_04_invalid_object.json index 566925bf1..ca7081371 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_04_invalid_object.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_04_invalid_object.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV04", + "primary_external_id": "DATEST:IV04", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_05_invalid_disease_relation_gene_annotation.json b/src/test/resources/bulk/04_disease_annotation/IV_05_invalid_disease_relation_gene_annotation.json index 3e37d7706..a8a704faf 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_05_invalid_disease_relation_gene_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_05_invalid_disease_relation_gene_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV05", + "primary_external_id": "DATEST:IV05", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_06_invalid_disease_relation_allele_annotation.json b/src/test/resources/bulk/04_disease_annotation/IV_06_invalid_disease_relation_allele_annotation.json index 96bebd1c9..cadf7106b 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_06_invalid_disease_relation_allele_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_06_invalid_disease_relation_allele_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV06", + "primary_external_id": "DATEST:IV06", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Allele0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_07_invalid_disease_relation_agm_annotation.json b/src/test/resources/bulk/04_disease_annotation/IV_07_invalid_disease_relation_agm_annotation.json index 2a67f3108..b5041abf1 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_07_invalid_disease_relation_agm_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_07_invalid_disease_relation_agm_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV07", + "primary_external_id": "DATEST:IV07", "internal": false, "obsolete": false, "gene_identifier": "DATEST:AGM0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_08_invalid_evidence_code.json b/src/test/resources/bulk/04_disease_annotation/IV_08_invalid_evidence_code.json index 2a6c69e4c..d326836e6 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_08_invalid_evidence_code.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_08_invalid_evidence_code.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV08", + "primary_external_id": "DATEST:IV08", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_09_invalid_single_reference.json b/src/test/resources/bulk/04_disease_annotation/IV_09_invalid_single_reference.json index 0edc8173a..21e621232 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_09_invalid_single_reference.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_09_invalid_single_reference.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV09", + "primary_external_id": "DATEST:IV09", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_10_invalid_genetic_sex.json b/src/test/resources/bulk/04_disease_annotation/IV_10_invalid_genetic_sex.json index f84f38d6e..fc596fc77 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_10_invalid_genetic_sex.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_10_invalid_genetic_sex.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV10", + "primary_external_id": "DATEST:IV10", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_11_invalid_sgd_strain_background.json b/src/test/resources/bulk/04_disease_annotation/IV_11_invalid_sgd_strain_background.json index 987fb9729..f379367f1 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_11_invalid_sgd_strain_background.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_11_invalid_sgd_strain_background.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV11", + "primary_external_id": "DATEST:IV11", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_12_invalid_with.json b/src/test/resources/bulk/04_disease_annotation/IV_12_invalid_with.json index 28a087ac7..6ffbf07bd 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_12_invalid_with.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_12_invalid_with.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV12", + "primary_external_id": "DATEST:IV12", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_13_invalid_disease_qualifier.json b/src/test/resources/bulk/04_disease_annotation/IV_13_invalid_disease_qualifier.json index 0ed69995b..001e94ea3 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_13_invalid_disease_qualifier.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_13_invalid_disease_qualifier.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV13", + "primary_external_id": "DATEST:IV13", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_14_invalid_genetic_modifier.json b/src/test/resources/bulk/04_disease_annotation/IV_14_invalid_genetic_modifier.json index ee9617ece..85f7324a0 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_14_invalid_genetic_modifier.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_14_invalid_genetic_modifier.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV14", + "primary_external_id": "DATEST:IV14", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_15_invalid_genetic_modifier_relation.json b/src/test/resources/bulk/04_disease_annotation/IV_15_invalid_genetic_modifier_relation.json index dbafc3552..04856d8d3 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_15_invalid_genetic_modifier_relation.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_15_invalid_genetic_modifier_relation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV15", + "primary_external_id": "DATEST:IV15", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_16_invalid_annotation_type.json b/src/test/resources/bulk/04_disease_annotation/IV_16_invalid_annotation_type.json index ce849d33d..2fda586ab 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_16_invalid_annotation_type.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_16_invalid_annotation_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV16", + "primary_external_id": "DATEST:IV16", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_17_invalid_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/04_disease_annotation/IV_17_invalid_data_provider_source_organization_abbreviation.json index 2ac196282..69152d6ee 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_17_invalid_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_17_invalid_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV17", + "primary_external_id": "DATEST:IV17", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_18_invalid_secondary_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/04_disease_annotation/IV_18_invalid_secondary_data_provider_source_organization_abbreviation.json index dc955b6d7..37fd2eca2 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_18_invalid_secondary_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_18_invalid_secondary_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV18", + "primary_external_id": "DATEST:IV18", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_19_invalid_inferred_gene_allele_annotation.json b/src/test/resources/bulk/04_disease_annotation/IV_19_invalid_inferred_gene_allele_annotation.json index 73229dc4d..995d0be02 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_19_invalid_inferred_gene_allele_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_19_invalid_inferred_gene_allele_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV19", + "primary_external_id": "DATEST:IV19", "internal": false, "obsolete": false, "allele_identifier": "DATEST:Allele0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_20_invalid_asserted_gene_allele_annotation.json b/src/test/resources/bulk/04_disease_annotation/IV_20_invalid_asserted_gene_allele_annotation.json index d5c4e7a46..e3327d097 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_20_invalid_asserted_gene_allele_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_20_invalid_asserted_gene_allele_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV20", + "primary_external_id": "DATEST:IV20", "internal": false, "obsolete": false, "allele_identifier": "DATEST:Allele0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_21_invalid_inferred_gene_agm_annotation.json b/src/test/resources/bulk/04_disease_annotation/IV_21_invalid_inferred_gene_agm_annotation.json index e1b8806d1..3f0832a9a 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_21_invalid_inferred_gene_agm_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_21_invalid_inferred_gene_agm_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV21", + "primary_external_id": "DATEST:IV21", "internal": false, "obsolete": false, "agm_identifier": "DATEST:AGM0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_22_invalid_asserted_gene_agm_annotation.json b/src/test/resources/bulk/04_disease_annotation/IV_22_invalid_asserted_gene_agm_annotation.json index 68328566c..3175ce807 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_22_invalid_asserted_gene_agm_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_22_invalid_asserted_gene_agm_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV22", + "primary_external_id": "DATEST:IV22", "internal": false, "obsolete": false, "agm_identifier": "DATEST:AGM0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_23_invalid_inferred_allele_agm_annotation.json b/src/test/resources/bulk/04_disease_annotation/IV_23_invalid_inferred_allele_agm_annotation.json index a93d7110c..517dafcd4 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_23_invalid_inferred_allele_agm_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_23_invalid_inferred_allele_agm_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV23", + "primary_external_id": "DATEST:IV23", "internal": false, "obsolete": false, "agm_identifier": "DATEST:AGM0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_24_invalid_asserted_allele_agm_annotation.json b/src/test/resources/bulk/04_disease_annotation/IV_24_invalid_asserted_allele_agm_annotation.json index c8e8c492c..45e634f80 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_24_invalid_asserted_allele_agm_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_24_invalid_asserted_allele_agm_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV24", + "primary_external_id": "DATEST:IV24", "internal": false, "obsolete": false, "agm_identifier": "DATEST:AGM0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_25_invalid_condition_relation_type.json b/src/test/resources/bulk/04_disease_annotation/IV_25_invalid_condition_relation_type.json index b1682c56f..9d058265a 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_25_invalid_condition_relation_type.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_25_invalid_condition_relation_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV25", + "primary_external_id": "DATEST:IV25", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_26_invalid_condition_relation_single_reference.json b/src/test/resources/bulk/04_disease_annotation/IV_26_invalid_condition_relation_single_reference.json index 44962ae3a..1be3c8e1a 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_26_invalid_condition_relation_single_reference.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_26_invalid_condition_relation_single_reference.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV26", + "primary_external_id": "DATEST:IV26", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_27_invalid_condition_class.json b/src/test/resources/bulk/04_disease_annotation/IV_27_invalid_condition_class.json index e6eb4512b..74e885bd5 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_27_invalid_condition_class.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_27_invalid_condition_class.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV27", + "primary_external_id": "DATEST:IV27", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_28_non_slim_condition_class.json b/src/test/resources/bulk/04_disease_annotation/IV_28_non_slim_condition_class.json index ef674bfc4..ff1244596 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_28_non_slim_condition_class.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_28_non_slim_condition_class.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV28", + "primary_external_id": "DATEST:IV28", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_29_invalid_condition_id.json b/src/test/resources/bulk/04_disease_annotation/IV_29_invalid_condition_id.json index 685733067..5273c4349 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_29_invalid_condition_id.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_29_invalid_condition_id.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV29", + "primary_external_id": "DATEST:IV29", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_30_invalid_condition_gene_ontology.json b/src/test/resources/bulk/04_disease_annotation/IV_30_invalid_condition_gene_ontology.json index a9081fd96..eda0acc4e 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_30_invalid_condition_gene_ontology.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_30_invalid_condition_gene_ontology.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV30", + "primary_external_id": "DATEST:IV30", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_31_invalid_condition_anatomy.json b/src/test/resources/bulk/04_disease_annotation/IV_31_invalid_condition_anatomy.json index 3059f9ac2..ba32cd55f 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_31_invalid_condition_anatomy.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_31_invalid_condition_anatomy.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV31", + "primary_external_id": "DATEST:IV31", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_32_invalid_condition_taxon.json b/src/test/resources/bulk/04_disease_annotation/IV_32_invalid_condition_taxon.json index cebd0eb7f..20f442897 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_32_invalid_condition_taxon.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_32_invalid_condition_taxon.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV32", + "primary_external_id": "DATEST:IV32", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_33_invalid_condition_chemical.json b/src/test/resources/bulk/04_disease_annotation/IV_33_invalid_condition_chemical.json index 9be1af7fa..685978d16 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_33_invalid_condition_chemical.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_33_invalid_condition_chemical.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV33", + "primary_external_id": "DATEST:IV33", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_34_invalid_related_note_type.json b/src/test/resources/bulk/04_disease_annotation/IV_34_invalid_related_note_type.json index ef1346c6e..ac1829fda 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_34_invalid_related_note_type.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_34_invalid_related_note_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV34", + "primary_external_id": "DATEST:IV34", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_35_invalid_related_note_reference.json b/src/test/resources/bulk/04_disease_annotation/IV_35_invalid_related_note_reference.json index 24f4043ac..675364487 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_35_invalid_related_note_reference.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_35_invalid_related_note_reference.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV35", + "primary_external_id": "DATEST:IV35", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_36_invalid_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/04_disease_annotation/IV_36_invalid_data_provider_cross_reference_page_area.json index fba4b798b..539679714 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_36_invalid_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_36_invalid_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV36", + "primary_external_id": "DATEST:IV36", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_37_invalid_secondary_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/04_disease_annotation/IV_37_invalid_secondary_data_provider_cross_reference_page_area.json index 5ac81e553..7691cd29c 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_37_invalid_secondary_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_37_invalid_secondary_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV37", + "primary_external_id": "DATEST:IV37", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_38_invalid_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/04_disease_annotation/IV_38_invalid_data_provider_cross_reference_prefix.json index cefb073fd..ba2bd542b 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_38_invalid_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_38_invalid_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV38", + "primary_external_id": "DATEST:IV38", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/IV_39_invalid_secondary_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/04_disease_annotation/IV_39_invalid_secondary_data_provider_cross_reference_prefix.json index 3e1138943..cde05a426 100644 --- a/src/test/resources/bulk/04_disease_annotation/IV_39_invalid_secondary_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/04_disease_annotation/IV_39_invalid_secondary_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:IV39", + "primary_external_id": "DATEST:IV39", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MD_01_no_disease_genetic_modifier.json b/src/test/resources/bulk/04_disease_annotation/MD_01_no_disease_genetic_modifier.json index 0fbe19ff9..cc5aa8851 100644 --- a/src/test/resources/bulk/04_disease_annotation/MD_01_no_disease_genetic_modifier.json +++ b/src/test/resources/bulk/04_disease_annotation/MD_01_no_disease_genetic_modifier.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MD01", + "primary_external_id": "DATEST:MD01", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MD_02_no_disease_genetic_modifier_relation.json b/src/test/resources/bulk/04_disease_annotation/MD_02_no_disease_genetic_modifier_relation.json index 019a5c52f..42d00c656 100644 --- a/src/test/resources/bulk/04_disease_annotation/MD_02_no_disease_genetic_modifier_relation.json +++ b/src/test/resources/bulk/04_disease_annotation/MD_02_no_disease_genetic_modifier_relation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MD02", + "primary_external_id": "DATEST:MD02", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MD_03_no_disease_genetic_modifier_or_relation.json b/src/test/resources/bulk/04_disease_annotation/MD_03_no_disease_genetic_modifier_or_relation.json index 5ab4bfb32..e3a4f650d 100644 --- a/src/test/resources/bulk/04_disease_annotation/MD_03_no_disease_genetic_modifier_or_relation.json +++ b/src/test/resources/bulk/04_disease_annotation/MD_03_no_disease_genetic_modifier_or_relation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MD03", + "primary_external_id": "DATEST:MD03", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MD_04_no_condition_relation_reference.json b/src/test/resources/bulk/04_disease_annotation/MD_04_no_condition_relation_reference.json index ba82fbf15..3f5c27abb 100644 --- a/src/test/resources/bulk/04_disease_annotation/MD_04_no_condition_relation_reference.json +++ b/src/test/resources/bulk/04_disease_annotation/MD_04_no_condition_relation_reference.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MD04", + "primary_external_id": "DATEST:MD04", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MD_05_no_condition_relation_handle_or_reference.json b/src/test/resources/bulk/04_disease_annotation/MD_05_no_condition_relation_handle_or_reference.json index b9ca13042..77f72e862 100644 --- a/src/test/resources/bulk/04_disease_annotation/MD_05_no_condition_relation_handle_or_reference.json +++ b/src/test/resources/bulk/04_disease_annotation/MD_05_no_condition_relation_handle_or_reference.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MD05", + "primary_external_id": "DATEST:MD05", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MM_01_mismatched_note_reference.json b/src/test/resources/bulk/04_disease_annotation/MM_01_mismatched_note_reference.json index 58311e177..f5e01928c 100644 --- a/src/test/resources/bulk/04_disease_annotation/MM_01_mismatched_note_reference.json +++ b/src/test/resources/bulk/04_disease_annotation/MM_01_mismatched_note_reference.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MM01", + "primary_external_id": "DATEST:MM01", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MM_02_mismatched_condition_relation_reference.json b/src/test/resources/bulk/04_disease_annotation/MM_02_mismatched_condition_relation_reference.json index da0798297..e4f004dce 100644 --- a/src/test/resources/bulk/04_disease_annotation/MM_02_mismatched_condition_relation_reference.json +++ b/src/test/resources/bulk/04_disease_annotation/MM_02_mismatched_condition_relation_reference.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MM02", + "primary_external_id": "DATEST:MM02", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MN_01_no_non_required_fields_level_1_gene_annotation.json b/src/test/resources/bulk/04_disease_annotation/MN_01_no_non_required_fields_level_1_gene_annotation.json index f8630698e..a004a89f4 100644 --- a/src/test/resources/bulk/04_disease_annotation/MN_01_no_non_required_fields_level_1_gene_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/MN_01_no_non_required_fields_level_1_gene_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MN01", + "primary_external_id": "DATEST:MN01", "gene_identifier": "DATEST:Gene0001", "do_term_curie": "DATEST:Disease0001", "data_provider_dto": { diff --git a/src/test/resources/bulk/04_disease_annotation/MN_02_no_non_required_fields_level_1_allele_annotation.json b/src/test/resources/bulk/04_disease_annotation/MN_02_no_non_required_fields_level_1_allele_annotation.json index a2d107a79..f2d4d6772 100644 --- a/src/test/resources/bulk/04_disease_annotation/MN_02_no_non_required_fields_level_1_allele_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/MN_02_no_non_required_fields_level_1_allele_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MN02", + "primary_external_id": "DATEST:MN02", "allele_identifier": "DATEST:Allele0001", "do_term_curie": "DATEST:Disease0001", "disease_relation_name": "is_implicated_in", diff --git a/src/test/resources/bulk/04_disease_annotation/MN_03_no_non_required_fields_level_1_agm_annotation.json b/src/test/resources/bulk/04_disease_annotation/MN_03_no_non_required_fields_level_1_agm_annotation.json index 012b36538..d68ad5a58 100644 --- a/src/test/resources/bulk/04_disease_annotation/MN_03_no_non_required_fields_level_1_agm_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/MN_03_no_non_required_fields_level_1_agm_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MN03", + "primary_external_id": "DATEST:MN03", "agm_identifier": "DATEST:AGM0001", "do_term_curie": "DATEST:Disease0001", "data_provider_dto": { diff --git a/src/test/resources/bulk/04_disease_annotation/MN_04_no_non_required_fields_level_2.json b/src/test/resources/bulk/04_disease_annotation/MN_04_no_non_required_fields_level_2.json index 1c74dee87..9b4de46f8 100644 --- a/src/test/resources/bulk/04_disease_annotation/MN_04_no_non_required_fields_level_2.json +++ b/src/test/resources/bulk/04_disease_annotation/MN_04_no_non_required_fields_level_2.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MN04", + "primary_external_id": "DATEST:MN04", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_01_no_subject.json b/src/test/resources/bulk/04_disease_annotation/MR_01_no_subject.json index 8f3b150be..c21b62cb6 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_01_no_subject.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_01_no_subject.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR01", + "primary_external_id": "DATEST:MR01", "internal": false, "obsolete": false, "do_term_curie": "DATEST:Disease0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_02_no_object.json b/src/test/resources/bulk/04_disease_annotation/MR_02_no_object.json index eab319c19..732eadca0 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_02_no_object.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_02_no_object.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR02", + "primary_external_id": "DATEST:MR02", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_03_no_disease_relation_gene_annotation.json b/src/test/resources/bulk/04_disease_annotation/MR_03_no_disease_relation_gene_annotation.json index a5e52acb1..5e7d8ecef 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_03_no_disease_relation_gene_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_03_no_disease_relation_gene_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR03", + "primary_external_id": "DATEST:MR03", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_04_no_disease_relation_allele_annotation.json b/src/test/resources/bulk/04_disease_annotation/MR_04_no_disease_relation_allele_annotation.json index 5d9bbd294..63c5234c7 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_04_no_disease_relation_allele_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_04_no_disease_relation_allele_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR04", + "primary_external_id": "DATEST:MR04", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_05_no_disease_relation_agm_annotation.json b/src/test/resources/bulk/04_disease_annotation/MR_05_no_disease_relation_agm_annotation.json index 7db03eb58..3c59507ff 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_05_no_disease_relation_agm_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_05_no_disease_relation_agm_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR05", + "primary_external_id": "DATEST:MR05", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_06_no_evidence_codes.json b/src/test/resources/bulk/04_disease_annotation/MR_06_no_evidence_codes.json index 67f6a3ed9..2bffa82bf 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_06_no_evidence_codes.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_06_no_evidence_codes.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR06", + "primary_external_id": "DATEST:MR06", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_07_no_single_reference.json b/src/test/resources/bulk/04_disease_annotation/MR_07_no_single_reference.json index 110160e17..92154d170 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_07_no_single_reference.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_07_no_single_reference.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR07", + "primary_external_id": "DATEST:MR07", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_08_no_data_provider.json b/src/test/resources/bulk/04_disease_annotation/MR_08_no_data_provider.json index a897f21da..453dd9286 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_08_no_data_provider.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_08_no_data_provider.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR08", + "primary_external_id": "DATEST:MR08", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_09_no_condition_relations_type.json b/src/test/resources/bulk/04_disease_annotation/MR_09_no_condition_relations_type.json index 530463544..61359afac 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_09_no_condition_relations_type.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_09_no_condition_relations_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR09", + "primary_external_id": "DATEST:MR09", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_10_no_condition_relation_experimental_conditions.json b/src/test/resources/bulk/04_disease_annotation/MR_10_no_condition_relation_experimental_conditions.json index 0e730d5e3..d6fde26ff 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_10_no_condition_relation_experimental_conditions.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_10_no_condition_relation_experimental_conditions.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR10", + "primary_external_id": "DATEST:MR10", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_11_no_condition_class.json b/src/test/resources/bulk/04_disease_annotation/MR_11_no_condition_class.json index f88f2418c..f128aa661 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_11_no_condition_class.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_11_no_condition_class.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR11", + "primary_external_id": "DATEST:MR11", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_12_no_related_note_type.json b/src/test/resources/bulk/04_disease_annotation/MR_12_no_related_note_type.json index f2b1faf3c..20540bce5 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_12_no_related_note_type.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_12_no_related_note_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR12", + "primary_external_id": "DATEST:MR12", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_13_no_related_note_free_text.json b/src/test/resources/bulk/04_disease_annotation/MR_13_no_related_note_free_text.json index 5d50c455a..b0c2e2759 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_13_no_related_note_free_text.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_13_no_related_note_free_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR13", + "primary_external_id": "DATEST:MR13", "internal": false, "obsolete": false, "gene_identifier": "DATEST:Gene0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_14_no_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/04_disease_annotation/MR_14_no_data_provider_source_organization_abbreviation.json index 434dcb3dc..cbc877762 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_14_no_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_14_no_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR14", + "primary_external_id": "DATEST:MR14", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_15_no_secondary_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/04_disease_annotation/MR_15_no_secondary_data_provider_source_organization_abbreviation.json index f30d86be4..19ade83fb 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_15_no_secondary_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_15_no_secondary_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR15", + "primary_external_id": "DATEST:MR15", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_16_no_data_provider_cross_reference_referenced_curie.json b/src/test/resources/bulk/04_disease_annotation/MR_16_no_data_provider_cross_reference_referenced_curie.json index 6a6c8a002..7122cec9e 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_16_no_data_provider_cross_reference_referenced_curie.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_16_no_data_provider_cross_reference_referenced_curie.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR16", + "primary_external_id": "DATEST:MR16", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_17_no_data_provider_cross_reference_display_name.json b/src/test/resources/bulk/04_disease_annotation/MR_17_no_data_provider_cross_reference_display_name.json index 0fa51b166..30d28c0dd 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_17_no_data_provider_cross_reference_display_name.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_17_no_data_provider_cross_reference_display_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR17", + "primary_external_id": "DATEST:MR17", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/MR_18_no_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/04_disease_annotation/MR_18_no_data_provider_cross_reference_prefix.json index e9cf3988a..f56fc9f66 100644 --- a/src/test/resources/bulk/04_disease_annotation/MR_18_no_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/04_disease_annotation/MR_18_no_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:MR18", + "primary_external_id": "DATEST:MR18", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/SI_01_secondary_ids.json b/src/test/resources/bulk/04_disease_annotation/SI_01_secondary_ids.json index 7d7135c7a..94fbf7636 100644 --- a/src/test/resources/bulk/04_disease_annotation/SI_01_secondary_ids.json +++ b/src/test/resources/bulk/04_disease_annotation/SI_01_secondary_ids.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:SI01", + "primary_external_id": "DATEST:SI01", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/UD_01_update_all_except_default_fields_gene_annotation.json b/src/test/resources/bulk/04_disease_annotation/UD_01_update_all_except_default_fields_gene_annotation.json index bd50ea07d..819a53f97 100644 --- a/src/test/resources/bulk/04_disease_annotation/UD_01_update_all_except_default_fields_gene_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/UD_01_update_all_except_default_fields_gene_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:Annot0001", + "primary_external_id": "DATEST:Annot0001", "created_by_curie": "DATEST:Person0002", "updated_by_curie": "DATEST:Person0001", "date_created": "2022-03-19T22:10:12+00:00", diff --git a/src/test/resources/bulk/04_disease_annotation/UD_02_update_all_except_default_fields_allele_annotation.json b/src/test/resources/bulk/04_disease_annotation/UD_02_update_all_except_default_fields_allele_annotation.json index c661fb381..39714de7c 100644 --- a/src/test/resources/bulk/04_disease_annotation/UD_02_update_all_except_default_fields_allele_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/UD_02_update_all_except_default_fields_allele_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:Annot0002", + "primary_external_id": "DATEST:Annot0002", "created_by_curie": "DATEST:Person0002", "updated_by_curie": "DATEST:Person0001", "date_created": "2022-03-19T22:10:12+00:00", diff --git a/src/test/resources/bulk/04_disease_annotation/UD_03_update_all_except_default_fields_agm_annotation.json b/src/test/resources/bulk/04_disease_annotation/UD_03_update_all_except_default_fields_agm_annotation.json index b8836be43..d32517c36 100644 --- a/src/test/resources/bulk/04_disease_annotation/UD_03_update_all_except_default_fields_agm_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/UD_03_update_all_except_default_fields_agm_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:Annot0003", + "primary_external_id": "DATEST:Annot0003", "created_by_curie": "DATEST:Person0002", "updated_by_curie": "DATEST:Person0001", "date_created": "2022-03-19T22:10:12+00:00", diff --git a/src/test/resources/bulk/04_disease_annotation/UE_01_update_empty_non_required_fields_level_1_gene_annotation.json b/src/test/resources/bulk/04_disease_annotation/UE_01_update_empty_non_required_fields_level_1_gene_annotation.json index aef14bdb8..4bbb593f0 100644 --- a/src/test/resources/bulk/04_disease_annotation/UE_01_update_empty_non_required_fields_level_1_gene_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/UE_01_update_empty_non_required_fields_level_1_gene_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:Annot0001", + "primary_external_id": "DATEST:Annot0001", "created_by_curie": "", "updated_by_curie": "", "date_created": "", diff --git a/src/test/resources/bulk/04_disease_annotation/UE_02_update_empty_non_required_fields_level_1_allele_annotation.json b/src/test/resources/bulk/04_disease_annotation/UE_02_update_empty_non_required_fields_level_1_allele_annotation.json index 4158ad708..3e8e2eeeb 100644 --- a/src/test/resources/bulk/04_disease_annotation/UE_02_update_empty_non_required_fields_level_1_allele_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/UE_02_update_empty_non_required_fields_level_1_allele_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:Annot0002", + "primary_external_id": "DATEST:Annot0002", "created_by_curie": "", "updated_by_curie": "", "date_created": "", diff --git a/src/test/resources/bulk/04_disease_annotation/UE_03_update_empty_non_required_fields_level_1_agm_annotation.json b/src/test/resources/bulk/04_disease_annotation/UE_03_update_empty_non_required_fields_level_1_agm_annotation.json index 9edfeb8ae..211603d3d 100644 --- a/src/test/resources/bulk/04_disease_annotation/UE_03_update_empty_non_required_fields_level_1_agm_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/UE_03_update_empty_non_required_fields_level_1_agm_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:Annot0003", + "primary_external_id": "DATEST:Annot0003", "created_by_curie": "", "updated_by_curie": "", "date_created": "", diff --git a/src/test/resources/bulk/04_disease_annotation/UE_04_update_empty_non_required_fields_level_2.json b/src/test/resources/bulk/04_disease_annotation/UE_04_update_empty_non_required_fields_level_2.json index 9e2ce550b..ca39f4a75 100644 --- a/src/test/resources/bulk/04_disease_annotation/UE_04_update_empty_non_required_fields_level_2.json +++ b/src/test/resources/bulk/04_disease_annotation/UE_04_update_empty_non_required_fields_level_2.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:Annot0001", + "primary_external_id": "DATEST:Annot0001", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/UM_01_update_no_non_required_fields_level_1_gene_annotation.json b/src/test/resources/bulk/04_disease_annotation/UM_01_update_no_non_required_fields_level_1_gene_annotation.json index e8c6d5433..a8433f103 100644 --- a/src/test/resources/bulk/04_disease_annotation/UM_01_update_no_non_required_fields_level_1_gene_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/UM_01_update_no_non_required_fields_level_1_gene_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:Annot0001", + "primary_external_id": "DATEST:Annot0001", "gene_identifier": "DATEST:Gene0001", "do_term_curie": "DATEST:Disease0001", "data_provider_dto": { diff --git a/src/test/resources/bulk/04_disease_annotation/UM_02_update_no_non_required_fields_level_1_allele_annotation.json b/src/test/resources/bulk/04_disease_annotation/UM_02_update_no_non_required_fields_level_1_allele_annotation.json index d2354cac9..6d75e783a 100644 --- a/src/test/resources/bulk/04_disease_annotation/UM_02_update_no_non_required_fields_level_1_allele_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/UM_02_update_no_non_required_fields_level_1_allele_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:Annot0002", + "primary_external_id": "DATEST:Annot0002", "allele_identifier": "DATEST:Allele0001", "do_term_curie": "DATEST:Disease0001", "disease_relation_name": "is_implicated_in", diff --git a/src/test/resources/bulk/04_disease_annotation/UM_03_update_no_non_required_fields_level_1_agm_annotation.json b/src/test/resources/bulk/04_disease_annotation/UM_03_update_no_non_required_fields_level_1_agm_annotation.json index f0a743e7d..b5d01220e 100644 --- a/src/test/resources/bulk/04_disease_annotation/UM_03_update_no_non_required_fields_level_1_agm_annotation.json +++ b/src/test/resources/bulk/04_disease_annotation/UM_03_update_no_non_required_fields_level_1_agm_annotation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:Annot0003", + "primary_external_id": "DATEST:Annot0003", "agm_identifier": "DATEST:AGM0001", "do_term_curie": "DATEST:Disease0001", "data_provider_dto": { diff --git a/src/test/resources/bulk/04_disease_annotation/UM_04_update_no_non_required_fields_level_2.json b/src/test/resources/bulk/04_disease_annotation/UM_04_update_no_non_required_fields_level_2.json index f8bbe4626..0f50605a8 100644 --- a/src/test/resources/bulk/04_disease_annotation/UM_04_update_no_non_required_fields_level_2.json +++ b/src/test/resources/bulk/04_disease_annotation/UM_04_update_no_non_required_fields_level_2.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:Annot0001", + "primary_external_id": "DATEST:Annot0001", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/US_01_unsupported_evidence_code.json b/src/test/resources/bulk/04_disease_annotation/US_01_unsupported_evidence_code.json index d3293e0cd..dfadf36a6 100644 --- a/src/test/resources/bulk/04_disease_annotation/US_01_unsupported_evidence_code.json +++ b/src/test/resources/bulk/04_disease_annotation/US_01_unsupported_evidence_code.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:US01", + "primary_external_id": "DATEST:US01", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/VS_01_valid_subject_gene_for_HUMAN.json b/src/test/resources/bulk/04_disease_annotation/VS_01_valid_subject_gene_for_HUMAN.json index 80ba24f9f..d5fc5b285 100644 --- a/src/test/resources/bulk/04_disease_annotation/VS_01_valid_subject_gene_for_HUMAN.json +++ b/src/test/resources/bulk/04_disease_annotation/VS_01_valid_subject_gene_for_HUMAN.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:VS01", + "primary_external_id": "DATEST:VS01", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/VS_02_valid_subject_gene_for_RGD.json b/src/test/resources/bulk/04_disease_annotation/VS_02_valid_subject_gene_for_RGD.json index 7292cee18..71b12ca72 100644 --- a/src/test/resources/bulk/04_disease_annotation/VS_02_valid_subject_gene_for_RGD.json +++ b/src/test/resources/bulk/04_disease_annotation/VS_02_valid_subject_gene_for_RGD.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:VS02", + "primary_external_id": "DATEST:VS02", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/VS_03_valid_subject_allele_for_HUMAN.json b/src/test/resources/bulk/04_disease_annotation/VS_03_valid_subject_allele_for_HUMAN.json index 40edc7f5f..f789d7781 100644 --- a/src/test/resources/bulk/04_disease_annotation/VS_03_valid_subject_allele_for_HUMAN.json +++ b/src/test/resources/bulk/04_disease_annotation/VS_03_valid_subject_allele_for_HUMAN.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:VS03", + "primary_external_id": "DATEST:VS03", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/VS_04_valid_subject_allele_for_RGD.json b/src/test/resources/bulk/04_disease_annotation/VS_04_valid_subject_allele_for_RGD.json index 30cac5b25..b1c738481 100644 --- a/src/test/resources/bulk/04_disease_annotation/VS_04_valid_subject_allele_for_RGD.json +++ b/src/test/resources/bulk/04_disease_annotation/VS_04_valid_subject_allele_for_RGD.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:VS04", + "primary_external_id": "DATEST:VS04", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/VS_05_valid_subject_agm_for_HUMAN.json b/src/test/resources/bulk/04_disease_annotation/VS_05_valid_subject_agm_for_HUMAN.json index ee24515cb..7e4260c69 100644 --- a/src/test/resources/bulk/04_disease_annotation/VS_05_valid_subject_agm_for_HUMAN.json +++ b/src/test/resources/bulk/04_disease_annotation/VS_05_valid_subject_agm_for_HUMAN.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:VS05", + "primary_external_id": "DATEST:VS05", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/04_disease_annotation/VS_06_valid_subject_agm_for_RGD.json b/src/test/resources/bulk/04_disease_annotation/VS_06_valid_subject_agm_for_RGD.json index 446220f36..ccdb57c18 100644 --- a/src/test/resources/bulk/04_disease_annotation/VS_06_valid_subject_agm_for_RGD.json +++ b/src/test/resources/bulk/04_disease_annotation/VS_06_valid_subject_agm_for_RGD.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "DATEST:VS06", + "primary_external_id": "DATEST:VS06", "internal": true, "obsolete": true, "created_by_curie": "DATEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/AF_01_all_fields.json b/src/test/resources/bulk/05_construct/AF_01_all_fields.json index f773510ec..32d1e2759 100644 --- a/src/test/resources/bulk/05_construct/AF_01_all_fields.json +++ b/src/test/resources/bulk/05_construct/AF_01_all_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:Construct0001", + "primary_external_id": "WB:Construct0001", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/DN_01_duplicate_notes.json b/src/test/resources/bulk/05_construct/DN_01_duplicate_notes.json index 9edd74565..0cfc54d65 100644 --- a/src/test/resources/bulk/05_construct/DN_01_duplicate_notes.json +++ b/src/test/resources/bulk/05_construct/DN_01_duplicate_notes.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:DN01", + "primary_external_id": "WB:DN01", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/EN_01_empty_non_required_fields.json b/src/test/resources/bulk/05_construct/EN_01_empty_non_required_fields.json index b4cf45794..ee9345eea 100644 --- a/src/test/resources/bulk/05_construct/EN_01_empty_non_required_fields.json +++ b/src/test/resources/bulk/05_construct/EN_01_empty_non_required_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "", + "primary_external_id": "", "internal": true, "obsolete": true, "created_by_curie": "", diff --git a/src/test/resources/bulk/05_construct/ER_01_empty_construct_component_component_symbol.json b/src/test/resources/bulk/05_construct/ER_01_empty_construct_component_component_symbol.json index 485457851..97c84636c 100644 --- a/src/test/resources/bulk/05_construct/ER_01_empty_construct_component_component_symbol.json +++ b/src/test/resources/bulk/05_construct/ER_01_empty_construct_component_component_symbol.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER01", + "primary_external_id": "WB:ER01", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_02_empty_construct_component_note_note_type.json b/src/test/resources/bulk/05_construct/ER_02_empty_construct_component_note_note_type.json index c0bd567e0..262f7bd4c 100644 --- a/src/test/resources/bulk/05_construct/ER_02_empty_construct_component_note_note_type.json +++ b/src/test/resources/bulk/05_construct/ER_02_empty_construct_component_note_note_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER02", + "primary_external_id": "WB:ER02", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_03_empty_construct_component_note_free_text.json b/src/test/resources/bulk/05_construct/ER_03_empty_construct_component_note_free_text.json index 1b9a941a7..898a1097f 100644 --- a/src/test/resources/bulk/05_construct/ER_03_empty_construct_component_note_free_text.json +++ b/src/test/resources/bulk/05_construct/ER_03_empty_construct_component_note_free_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER03", + "primary_external_id": "WB:ER03", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_04_empty_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/05_construct/ER_04_empty_data_provider_source_organization_abbreviation.json index 857fd8163..b9657e90a 100644 --- a/src/test/resources/bulk/05_construct/ER_04_empty_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/05_construct/ER_04_empty_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER04", + "primary_external_id": "WB:ER04", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_05_empty_data_provider_cross_reference_referenced_curie.json b/src/test/resources/bulk/05_construct/ER_05_empty_data_provider_cross_reference_referenced_curie.json index bec7cd854..b91099063 100644 --- a/src/test/resources/bulk/05_construct/ER_05_empty_data_provider_cross_reference_referenced_curie.json +++ b/src/test/resources/bulk/05_construct/ER_05_empty_data_provider_cross_reference_referenced_curie.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER05", + "primary_external_id": "WB:ER05", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_06_empty_data_provider_cross_reference_display_name.json b/src/test/resources/bulk/05_construct/ER_06_empty_data_provider_cross_reference_display_name.json index 9955d4cf8..56a80e800 100644 --- a/src/test/resources/bulk/05_construct/ER_06_empty_data_provider_cross_reference_display_name.json +++ b/src/test/resources/bulk/05_construct/ER_06_empty_data_provider_cross_reference_display_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER06", + "primary_external_id": "WB:ER06", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_07_empty_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/05_construct/ER_07_empty_data_provider_cross_reference_prefix.json index 01f4491cb..a885f8442 100644 --- a/src/test/resources/bulk/05_construct/ER_07_empty_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/05_construct/ER_07_empty_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER07", + "primary_external_id": "WB:ER07", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_08_empty_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/05_construct/ER_08_empty_data_provider_cross_reference_page_area.json index a18404e89..e1cd0528a 100644 --- a/src/test/resources/bulk/05_construct/ER_08_empty_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/05_construct/ER_08_empty_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER08", + "primary_external_id": "WB:ER08", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_09_empty_construct_symbol_display_text.json b/src/test/resources/bulk/05_construct/ER_09_empty_construct_symbol_display_text.json index 9d8417018..c561ebdc9 100644 --- a/src/test/resources/bulk/05_construct/ER_09_empty_construct_symbol_display_text.json +++ b/src/test/resources/bulk/05_construct/ER_09_empty_construct_symbol_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER09", + "primary_external_id": "WB:ER09", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_10_empty_construct_full_name_display_text.json b/src/test/resources/bulk/05_construct/ER_10_empty_construct_full_name_display_text.json index 18f790cca..75483560e 100644 --- a/src/test/resources/bulk/05_construct/ER_10_empty_construct_full_name_display_text.json +++ b/src/test/resources/bulk/05_construct/ER_10_empty_construct_full_name_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER10", + "primary_external_id": "WB:ER10", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_11_empty_construct_synonym_display_text.json b/src/test/resources/bulk/05_construct/ER_11_empty_construct_synonym_display_text.json index 13b52434e..c8d1d0021 100644 --- a/src/test/resources/bulk/05_construct/ER_11_empty_construct_synonym_display_text.json +++ b/src/test/resources/bulk/05_construct/ER_11_empty_construct_synonym_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER11", + "primary_external_id": "WB:ER11", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_12_empty_construct_symbol_format_text.json b/src/test/resources/bulk/05_construct/ER_12_empty_construct_symbol_format_text.json index 420ae17f1..2cbddd2ba 100644 --- a/src/test/resources/bulk/05_construct/ER_12_empty_construct_symbol_format_text.json +++ b/src/test/resources/bulk/05_construct/ER_12_empty_construct_symbol_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER12", + "primary_external_id": "WB:ER12", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_13_empty_construct_full_name_format_text.json b/src/test/resources/bulk/05_construct/ER_13_empty_construct_full_name_format_text.json index 5bfed1614..db1b630e5 100644 --- a/src/test/resources/bulk/05_construct/ER_13_empty_construct_full_name_format_text.json +++ b/src/test/resources/bulk/05_construct/ER_13_empty_construct_full_name_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER13", + "primary_external_id": "WB:ER13", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_14_empty_construct_synonym_format_text.json b/src/test/resources/bulk/05_construct/ER_14_empty_construct_synonym_format_text.json index be60bdf28..e8fab52fe 100644 --- a/src/test/resources/bulk/05_construct/ER_14_empty_construct_synonym_format_text.json +++ b/src/test/resources/bulk/05_construct/ER_14_empty_construct_synonym_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER14", + "primary_external_id": "WB:ER14", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_15_empty_construct_symbol_name_type.json b/src/test/resources/bulk/05_construct/ER_15_empty_construct_symbol_name_type.json index 51a2b19cc..8d71bee21 100644 --- a/src/test/resources/bulk/05_construct/ER_15_empty_construct_symbol_name_type.json +++ b/src/test/resources/bulk/05_construct/ER_15_empty_construct_symbol_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER15", + "primary_external_id": "WB:ER15", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_16_empty_construct_full_name_name_type.json b/src/test/resources/bulk/05_construct/ER_16_empty_construct_full_name_name_type.json index a2bafe1ac..e60eac106 100644 --- a/src/test/resources/bulk/05_construct/ER_16_empty_construct_full_name_name_type.json +++ b/src/test/resources/bulk/05_construct/ER_16_empty_construct_full_name_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER16", + "primary_external_id": "WB:ER16", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_17_empty_construct_synonym_name_type.json b/src/test/resources/bulk/05_construct/ER_17_empty_construct_synonym_name_type.json index 65b88ac0a..2c062c77d 100644 --- a/src/test/resources/bulk/05_construct/ER_17_empty_construct_synonym_name_type.json +++ b/src/test/resources/bulk/05_construct/ER_17_empty_construct_synonym_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER17", + "primary_external_id": "WB:ER17", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/ER_18_empty_construct_component_relation.json b/src/test/resources/bulk/05_construct/ER_18_empty_construct_component_relation.json index 47962da7e..2f07aec48 100644 --- a/src/test/resources/bulk/05_construct/ER_18_empty_construct_component_relation.json +++ b/src/test/resources/bulk/05_construct/ER_18_empty_construct_component_relation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:ER18", + "primary_external_id": "WB:ER18", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_01_invalid_date_created.json b/src/test/resources/bulk/05_construct/IV_01_invalid_date_created.json index 6cd95b4f0..76fef7b36 100644 --- a/src/test/resources/bulk/05_construct/IV_01_invalid_date_created.json +++ b/src/test/resources/bulk/05_construct/IV_01_invalid_date_created.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV01", + "primary_external_id": "WB:IV01", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_02_invalid_date_updated.json b/src/test/resources/bulk/05_construct/IV_02_invalid_date_updated.json index 5b57ffed1..39d8ac3f9 100644 --- a/src/test/resources/bulk/05_construct/IV_02_invalid_date_updated.json +++ b/src/test/resources/bulk/05_construct/IV_02_invalid_date_updated.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV02", + "primary_external_id": "WB:IV02", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_03_invalid_reference.json b/src/test/resources/bulk/05_construct/IV_03_invalid_reference.json index bc091e266..e6eccb403 100644 --- a/src/test/resources/bulk/05_construct/IV_03_invalid_reference.json +++ b/src/test/resources/bulk/05_construct/IV_03_invalid_reference.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV03", + "primary_external_id": "WB:IV03", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_04_invalid_construct_component_evidence.json b/src/test/resources/bulk/05_construct/IV_04_invalid_construct_component_evidence.json index 2e97d2cfa..9560a7a6f 100644 --- a/src/test/resources/bulk/05_construct/IV_04_invalid_construct_component_evidence.json +++ b/src/test/resources/bulk/05_construct/IV_04_invalid_construct_component_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV04", + "primary_external_id": "WB:IV04", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_05_invalid_construct_component_taxon.json b/src/test/resources/bulk/05_construct/IV_05_invalid_construct_component_taxon.json index a9c55e84e..274bc7b4d 100644 --- a/src/test/resources/bulk/05_construct/IV_05_invalid_construct_component_taxon.json +++ b/src/test/resources/bulk/05_construct/IV_05_invalid_construct_component_taxon.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV05", + "primary_external_id": "WB:IV05", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_06_invalid_construct_component_note_note_type.json b/src/test/resources/bulk/05_construct/IV_06_invalid_construct_component_note_note_type.json index 73da86d0c..3cd60cca9 100644 --- a/src/test/resources/bulk/05_construct/IV_06_invalid_construct_component_note_note_type.json +++ b/src/test/resources/bulk/05_construct/IV_06_invalid_construct_component_note_note_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV06", + "primary_external_id": "WB:IV06", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_07_invalid_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/05_construct/IV_07_invalid_data_provider_source_organization_abbreviation.json index 574ddd2ef..5066883c8 100644 --- a/src/test/resources/bulk/05_construct/IV_07_invalid_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/05_construct/IV_07_invalid_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV07", + "primary_external_id": "WB:IV07", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_08_invalid_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/05_construct/IV_08_invalid_data_provider_cross_reference_prefix.json index e2fa444bc..380346a69 100644 --- a/src/test/resources/bulk/05_construct/IV_08_invalid_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/05_construct/IV_08_invalid_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV08", + "primary_external_id": "WB:IV08", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_09_invalid_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/05_construct/IV_09_invalid_data_provider_cross_reference_page_area.json index dfc26457a..fde1a50c5 100644 --- a/src/test/resources/bulk/05_construct/IV_09_invalid_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/05_construct/IV_09_invalid_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV09", + "primary_external_id": "WB:IV09", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_10_invalid_construct_symbol_name_type.json b/src/test/resources/bulk/05_construct/IV_10_invalid_construct_symbol_name_type.json index e9da2fe47..f5b6db49b 100644 --- a/src/test/resources/bulk/05_construct/IV_10_invalid_construct_symbol_name_type.json +++ b/src/test/resources/bulk/05_construct/IV_10_invalid_construct_symbol_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV10", + "primary_external_id": "WB:IV10", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_11_invalid_construct_full_name_name_type.json b/src/test/resources/bulk/05_construct/IV_11_invalid_construct_full_name_name_type.json index 475b967fa..386c4e802 100644 --- a/src/test/resources/bulk/05_construct/IV_11_invalid_construct_full_name_name_type.json +++ b/src/test/resources/bulk/05_construct/IV_11_invalid_construct_full_name_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV11", + "primary_external_id": "WB:IV11", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_12_invalid_construct_synonym_name_type.json b/src/test/resources/bulk/05_construct/IV_12_invalid_construct_synonym_name_type.json index dec7669e7..1cd529f6f 100644 --- a/src/test/resources/bulk/05_construct/IV_12_invalid_construct_synonym_name_type.json +++ b/src/test/resources/bulk/05_construct/IV_12_invalid_construct_synonym_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV12", + "primary_external_id": "WB:IV12", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_13_invalid_construct_symbol_synonym_scope.json b/src/test/resources/bulk/05_construct/IV_13_invalid_construct_symbol_synonym_scope.json index fc81dacbe..d83ca5191 100644 --- a/src/test/resources/bulk/05_construct/IV_13_invalid_construct_symbol_synonym_scope.json +++ b/src/test/resources/bulk/05_construct/IV_13_invalid_construct_symbol_synonym_scope.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV13", + "primary_external_id": "WB:IV13", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_14_invalid_construct_full_name_synonym_scope.json b/src/test/resources/bulk/05_construct/IV_14_invalid_construct_full_name_synonym_scope.json index 1e3bfffbd..1b83d7f27 100644 --- a/src/test/resources/bulk/05_construct/IV_14_invalid_construct_full_name_synonym_scope.json +++ b/src/test/resources/bulk/05_construct/IV_14_invalid_construct_full_name_synonym_scope.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV14", + "primary_external_id": "WB:IV14", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_15_invalid_construct_synonym_synonym_scope.json b/src/test/resources/bulk/05_construct/IV_15_invalid_construct_synonym_synonym_scope.json index 8e37e0cc2..d33e9afb8 100644 --- a/src/test/resources/bulk/05_construct/IV_15_invalid_construct_synonym_synonym_scope.json +++ b/src/test/resources/bulk/05_construct/IV_15_invalid_construct_synonym_synonym_scope.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV15", + "primary_external_id": "WB:IV15", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_16_invalid_construct_symbol_evidence.json b/src/test/resources/bulk/05_construct/IV_16_invalid_construct_symbol_evidence.json index 91fe6871d..218a40ea1 100644 --- a/src/test/resources/bulk/05_construct/IV_16_invalid_construct_symbol_evidence.json +++ b/src/test/resources/bulk/05_construct/IV_16_invalid_construct_symbol_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV16", + "primary_external_id": "WB:IV16", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_17_invalid_construct_full_name_evidence.json b/src/test/resources/bulk/05_construct/IV_17_invalid_construct_full_name_evidence.json index 85b14e7de..efcb3757a 100644 --- a/src/test/resources/bulk/05_construct/IV_17_invalid_construct_full_name_evidence.json +++ b/src/test/resources/bulk/05_construct/IV_17_invalid_construct_full_name_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV17", + "primary_external_id": "WB:IV17", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_18_invalid_construct_synonym_evidence.json b/src/test/resources/bulk/05_construct/IV_18_invalid_construct_synonym_evidence.json index ac23f64f7..ecd57dd5f 100644 --- a/src/test/resources/bulk/05_construct/IV_18_invalid_construct_synonym_evidence.json +++ b/src/test/resources/bulk/05_construct/IV_18_invalid_construct_synonym_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV18", + "primary_external_id": "WB:IV18", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/IV_19_invalid_construct_component_relation.json b/src/test/resources/bulk/05_construct/IV_19_invalid_construct_component_relation.json index 3e5f1ed39..1831e76f5 100644 --- a/src/test/resources/bulk/05_construct/IV_19_invalid_construct_component_relation.json +++ b/src/test/resources/bulk/05_construct/IV_19_invalid_construct_component_relation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:IV19", + "primary_external_id": "WB:IV19", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MN_01_no_non_required_fields_level_1.json b/src/test/resources/bulk/05_construct/MN_01_no_non_required_fields_level_1.json index 53ed86098..0266d52aa 100644 --- a/src/test/resources/bulk/05_construct/MN_01_no_non_required_fields_level_1.json +++ b/src/test/resources/bulk/05_construct/MN_01_no_non_required_fields_level_1.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MN01", + "primary_external_id": "WB:MN01", "construct_symbol_dto": { "display_text": "Ta1", "format_text": "Ta1", diff --git a/src/test/resources/bulk/05_construct/MN_02_no_non_required_fields_level_2.json b/src/test/resources/bulk/05_construct/MN_02_no_non_required_fields_level_2.json index ae994a963..3f5389d05 100644 --- a/src/test/resources/bulk/05_construct/MN_02_no_non_required_fields_level_2.json +++ b/src/test/resources/bulk/05_construct/MN_02_no_non_required_fields_level_2.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MN02", + "primary_external_id": "WB:MN02", "construct_symbol_dto": { "display_text": "Ta1", "format_text": "Ta1", diff --git a/src/test/resources/bulk/05_construct/MN_03_no_non_required_fields_level_3.json b/src/test/resources/bulk/05_construct/MN_03_no_non_required_fields_level_3.json index 886ab5548..284707c54 100644 --- a/src/test/resources/bulk/05_construct/MN_03_no_non_required_fields_level_3.json +++ b/src/test/resources/bulk/05_construct/MN_03_no_non_required_fields_level_3.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MN03", + "primary_external_id": "WB:MN03", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_01_no_construct_component_component_symbol.json b/src/test/resources/bulk/05_construct/MR_01_no_construct_component_component_symbol.json index 25120956e..a139626d3 100644 --- a/src/test/resources/bulk/05_construct/MR_01_no_construct_component_component_symbol.json +++ b/src/test/resources/bulk/05_construct/MR_01_no_construct_component_component_symbol.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR01", + "primary_external_id": "WB:MR01", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_02_no_construct_component_note_note_type.json b/src/test/resources/bulk/05_construct/MR_02_no_construct_component_note_note_type.json index f0c7b43f7..0219e1d09 100644 --- a/src/test/resources/bulk/05_construct/MR_02_no_construct_component_note_note_type.json +++ b/src/test/resources/bulk/05_construct/MR_02_no_construct_component_note_note_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR02", + "primary_external_id": "WB:MR02", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_03_no_construct_component_note_free_text.json b/src/test/resources/bulk/05_construct/MR_03_no_construct_component_note_free_text.json index 34f73cbc6..c4f548aad 100644 --- a/src/test/resources/bulk/05_construct/MR_03_no_construct_component_note_free_text.json +++ b/src/test/resources/bulk/05_construct/MR_03_no_construct_component_note_free_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR03", + "primary_external_id": "WB:MR03", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_04_no_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/05_construct/MR_04_no_data_provider_source_organization_abbreviation.json index 534e0043b..81f6ef8e4 100644 --- a/src/test/resources/bulk/05_construct/MR_04_no_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/05_construct/MR_04_no_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR04", + "primary_external_id": "WB:MR04", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_05_no_data_provider_cross_reference_referenced_curie.json b/src/test/resources/bulk/05_construct/MR_05_no_data_provider_cross_reference_referenced_curie.json index e5644069a..c35f012bd 100644 --- a/src/test/resources/bulk/05_construct/MR_05_no_data_provider_cross_reference_referenced_curie.json +++ b/src/test/resources/bulk/05_construct/MR_05_no_data_provider_cross_reference_referenced_curie.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR05", + "primary_external_id": "WB:MR05", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_06_no_data_provider_cross_reference_display_name.json b/src/test/resources/bulk/05_construct/MR_06_no_data_provider_cross_reference_display_name.json index 4e5af1501..6543f46e8 100644 --- a/src/test/resources/bulk/05_construct/MR_06_no_data_provider_cross_reference_display_name.json +++ b/src/test/resources/bulk/05_construct/MR_06_no_data_provider_cross_reference_display_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR06", + "primary_external_id": "WB:MR06", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_07_no_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/05_construct/MR_07_no_data_provider_cross_reference_prefix.json index 91fb11b0f..14d9e1e9d 100644 --- a/src/test/resources/bulk/05_construct/MR_07_no_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/05_construct/MR_07_no_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR07", + "primary_external_id": "WB:MR07", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_08_no_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/05_construct/MR_08_no_data_provider_cross_reference_page_area.json index f8fa658c5..9946dce24 100644 --- a/src/test/resources/bulk/05_construct/MR_08_no_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/05_construct/MR_08_no_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR08", + "primary_external_id": "WB:MR08", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_09_no_construct_symbol_display_text.json b/src/test/resources/bulk/05_construct/MR_09_no_construct_symbol_display_text.json index b75961df6..3f6661e1b 100644 --- a/src/test/resources/bulk/05_construct/MR_09_no_construct_symbol_display_text.json +++ b/src/test/resources/bulk/05_construct/MR_09_no_construct_symbol_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR09", + "primary_external_id": "WB:MR09", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_10_no_construct_full_name_display_text.json b/src/test/resources/bulk/05_construct/MR_10_no_construct_full_name_display_text.json index da162d0f7..9a34684f0 100644 --- a/src/test/resources/bulk/05_construct/MR_10_no_construct_full_name_display_text.json +++ b/src/test/resources/bulk/05_construct/MR_10_no_construct_full_name_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR10", + "primary_external_id": "WB:MR10", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_11_no_construct_synonym_display_text.json b/src/test/resources/bulk/05_construct/MR_11_no_construct_synonym_display_text.json index 2599fb0e5..76d6d12f4 100644 --- a/src/test/resources/bulk/05_construct/MR_11_no_construct_synonym_display_text.json +++ b/src/test/resources/bulk/05_construct/MR_11_no_construct_synonym_display_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR11", + "primary_external_id": "WB:MR11", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_12_no_construct_symbol_format_text.json b/src/test/resources/bulk/05_construct/MR_12_no_construct_symbol_format_text.json index 0f3f84097..9f19d64d4 100644 --- a/src/test/resources/bulk/05_construct/MR_12_no_construct_symbol_format_text.json +++ b/src/test/resources/bulk/05_construct/MR_12_no_construct_symbol_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR12", + "primary_external_id": "WB:MR12", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_13_no_construct_full_name_format_text.json b/src/test/resources/bulk/05_construct/MR_13_no_construct_full_name_format_text.json index 59e408c35..90a063d75 100644 --- a/src/test/resources/bulk/05_construct/MR_13_no_construct_full_name_format_text.json +++ b/src/test/resources/bulk/05_construct/MR_13_no_construct_full_name_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR13", + "primary_external_id": "WB:MR13", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_14_no_construct_synonym_format_text.json b/src/test/resources/bulk/05_construct/MR_14_no_construct_synonym_format_text.json index ea0763eb8..b5d70e6bd 100644 --- a/src/test/resources/bulk/05_construct/MR_14_no_construct_synonym_format_text.json +++ b/src/test/resources/bulk/05_construct/MR_14_no_construct_synonym_format_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR14", + "primary_external_id": "WB:MR14", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_15_no_construct_symbol_name_type.json b/src/test/resources/bulk/05_construct/MR_15_no_construct_symbol_name_type.json index 7be040361..67af3c0a1 100644 --- a/src/test/resources/bulk/05_construct/MR_15_no_construct_symbol_name_type.json +++ b/src/test/resources/bulk/05_construct/MR_15_no_construct_symbol_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR15", + "primary_external_id": "WB:MR15", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_16_no_construct_full_name_name_type.json b/src/test/resources/bulk/05_construct/MR_16_no_construct_full_name_name_type.json index 7199aba2a..86e8bcdc3 100644 --- a/src/test/resources/bulk/05_construct/MR_16_no_construct_full_name_name_type.json +++ b/src/test/resources/bulk/05_construct/MR_16_no_construct_full_name_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR16", + "primary_external_id": "WB:MR16", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_17_no_construct_synonym_name_type.json b/src/test/resources/bulk/05_construct/MR_17_no_construct_synonym_name_type.json index 526d05e91..75623746e 100644 --- a/src/test/resources/bulk/05_construct/MR_17_no_construct_synonym_name_type.json +++ b/src/test/resources/bulk/05_construct/MR_17_no_construct_synonym_name_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR17", + "primary_external_id": "WB:MR17", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/MR_18_no_construct_component_relation.json b/src/test/resources/bulk/05_construct/MR_18_no_construct_component_relation.json index 15778e05f..a33a85f96 100644 --- a/src/test/resources/bulk/05_construct/MR_18_no_construct_component_relation.json +++ b/src/test/resources/bulk/05_construct/MR_18_no_construct_component_relation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:MR18", + "primary_external_id": "WB:MR18", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/UD_01_update_all_except_default_fields.json b/src/test/resources/bulk/05_construct/UD_01_update_all_except_default_fields.json index e2a625023..979e79552 100644 --- a/src/test/resources/bulk/05_construct/UD_01_update_all_except_default_fields.json +++ b/src/test/resources/bulk/05_construct/UD_01_update_all_except_default_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:Construct0001", + "primary_external_id": "WB:Construct0001", "created_by_curie": "CONSTRUCTTEST:Person0002", "updated_by_curie": "CONSTRUCTTEST:Person0001", "date_created": "2022-03-19T22:10:12+00:00", diff --git a/src/test/resources/bulk/05_construct/UE_01_update_empty_non_required_fields.json b/src/test/resources/bulk/05_construct/UE_01_update_empty_non_required_fields.json index 733c97e4a..fe78bbc9a 100644 --- a/src/test/resources/bulk/05_construct/UE_01_update_empty_non_required_fields.json +++ b/src/test/resources/bulk/05_construct/UE_01_update_empty_non_required_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:Construct0001", + "primary_external_id": "WB:Construct0001", "internal": true, "obsolete": true, "created_by_curie": "", diff --git a/src/test/resources/bulk/05_construct/UM_01_update_no_non_required_fields_level_1.json b/src/test/resources/bulk/05_construct/UM_01_update_no_non_required_fields_level_1.json index 131aa2f31..2301948f0 100644 --- a/src/test/resources/bulk/05_construct/UM_01_update_no_non_required_fields_level_1.json +++ b/src/test/resources/bulk/05_construct/UM_01_update_no_non_required_fields_level_1.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:Construct0001", + "primary_external_id": "WB:Construct0001", "construct_symbol_dto": { "display_text": "Ta1", "format_text": "Ta1", diff --git a/src/test/resources/bulk/05_construct/UM_02_update_no_non_required_fields_level_2.json b/src/test/resources/bulk/05_construct/UM_02_update_no_non_required_fields_level_2.json index 6633b0ec4..d85fbd349 100644 --- a/src/test/resources/bulk/05_construct/UM_02_update_no_non_required_fields_level_2.json +++ b/src/test/resources/bulk/05_construct/UM_02_update_no_non_required_fields_level_2.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:Construct0001", + "primary_external_id": "WB:Construct0001", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/05_construct/UM_03_update_no_non_required_fields_level_3.json b/src/test/resources/bulk/05_construct/UM_03_update_no_non_required_fields_level_3.json index 4dd9e96b6..eea7fd4df 100644 --- a/src/test/resources/bulk/05_construct/UM_03_update_no_non_required_fields_level_3.json +++ b/src/test/resources/bulk/05_construct/UM_03_update_no_non_required_fields_level_3.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "WB:Construct0001", + "primary_external_id": "WB:Construct0001", "internal": true, "obsolete": true, "created_by_curie": "CONSTRUCTTEST:Person0001", diff --git a/src/test/resources/bulk/06_variant/AF_01_all_fields.json b/src/test/resources/bulk/06_variant/AF_01_all_fields.json index 94dedc737..3fcba9042 100644 --- a/src/test/resources/bulk/06_variant/AF_01_all_fields.json +++ b/src/test/resources/bulk/06_variant/AF_01_all_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:Variant0001", + "primary_external_id": "VARIANTTEST:Variant0001", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/DN_01_duplicate_notes.json b/src/test/resources/bulk/06_variant/DN_01_duplicate_notes.json index 545c95531..0b6da144d 100644 --- a/src/test/resources/bulk/06_variant/DN_01_duplicate_notes.json +++ b/src/test/resources/bulk/06_variant/DN_01_duplicate_notes.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:DN01", + "primary_external_id": "VARIANTTEST:DN01", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/EN_01_empty_non_required_fields.json b/src/test/resources/bulk/06_variant/EN_01_empty_non_required_fields.json index edb8594aa..3b46b7b37 100644 --- a/src/test/resources/bulk/06_variant/EN_01_empty_non_required_fields.json +++ b/src/test/resources/bulk/06_variant/EN_01_empty_non_required_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:EN01", + "primary_external_id": "VARIANTTEST:EN01", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "", diff --git a/src/test/resources/bulk/06_variant/ER_01_empty_mod_ids.json b/src/test/resources/bulk/06_variant/ER_01_empty_mod_ids.json index da79c9d57..53d666935 100644 --- a/src/test/resources/bulk/06_variant/ER_01_empty_mod_ids.json +++ b/src/test/resources/bulk/06_variant/ER_01_empty_mod_ids.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "", + "primary_external_id": "", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/ER_02_empty_taxon.json b/src/test/resources/bulk/06_variant/ER_02_empty_taxon.json index 3f08b8741..a3593f5a7 100644 --- a/src/test/resources/bulk/06_variant/ER_02_empty_taxon.json +++ b/src/test/resources/bulk/06_variant/ER_02_empty_taxon.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:ER02", + "primary_external_id": "VARIANTTEST:ER02", "taxon_curie": "", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/ER_03_empty_variant_type.json b/src/test/resources/bulk/06_variant/ER_03_empty_variant_type.json index 79944ffcc..4a5a1b7b4 100644 --- a/src/test/resources/bulk/06_variant/ER_03_empty_variant_type.json +++ b/src/test/resources/bulk/06_variant/ER_03_empty_variant_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:ER03", + "primary_external_id": "VARIANTTEST:ER03", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/ER_04_empty_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/06_variant/ER_04_empty_data_provider_source_organization_abbreviation.json index 3f65e0e42..b3da9f579 100644 --- a/src/test/resources/bulk/06_variant/ER_04_empty_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/06_variant/ER_04_empty_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:ER04", + "primary_external_id": "VARIANTTEST:ER04", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/ER_05_empty_data_provider_cross_reference_referenced_curie.json b/src/test/resources/bulk/06_variant/ER_05_empty_data_provider_cross_reference_referenced_curie.json index 7083d310c..63dc6db4e 100644 --- a/src/test/resources/bulk/06_variant/ER_05_empty_data_provider_cross_reference_referenced_curie.json +++ b/src/test/resources/bulk/06_variant/ER_05_empty_data_provider_cross_reference_referenced_curie.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:ER05", + "primary_external_id": "VARIANTTEST:ER05", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/ER_06_empty_data_provider_cross_reference_display_name.json b/src/test/resources/bulk/06_variant/ER_06_empty_data_provider_cross_reference_display_name.json index 220dee3c2..10b93215b 100644 --- a/src/test/resources/bulk/06_variant/ER_06_empty_data_provider_cross_reference_display_name.json +++ b/src/test/resources/bulk/06_variant/ER_06_empty_data_provider_cross_reference_display_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:ER06", + "primary_external_id": "VARIANTTEST:ER06", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/ER_07_empty_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/06_variant/ER_07_empty_data_provider_cross_reference_prefix.json index 3de6dbeb5..b634466fd 100644 --- a/src/test/resources/bulk/06_variant/ER_07_empty_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/06_variant/ER_07_empty_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:ER07", + "primary_external_id": "VARIANTTEST:ER07", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/ER_08_empty_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/06_variant/ER_08_empty_data_provider_cross_reference_page_area.json index 74da99dd3..a3c7182b9 100644 --- a/src/test/resources/bulk/06_variant/ER_08_empty_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/06_variant/ER_08_empty_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:ER08", + "primary_external_id": "VARIANTTEST:ER08", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/ER_09_empty_related_notes_note_type.json b/src/test/resources/bulk/06_variant/ER_09_empty_related_notes_note_type.json index 7a248cd84..192957d35 100644 --- a/src/test/resources/bulk/06_variant/ER_09_empty_related_notes_note_type.json +++ b/src/test/resources/bulk/06_variant/ER_09_empty_related_notes_note_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:ER09", + "primary_external_id": "VARIANTTEST:ER09", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/ER_10_empty_related_notes_free_text.json b/src/test/resources/bulk/06_variant/ER_10_empty_related_notes_free_text.json index 544e2b086..fe1ad46ca 100644 --- a/src/test/resources/bulk/06_variant/ER_10_empty_related_notes_free_text.json +++ b/src/test/resources/bulk/06_variant/ER_10_empty_related_notes_free_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:ER10", + "primary_external_id": "VARIANTTEST:ER10", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/IV_01_invalid_date_created.json b/src/test/resources/bulk/06_variant/IV_01_invalid_date_created.json index ed0c6e255..786dcde35 100644 --- a/src/test/resources/bulk/06_variant/IV_01_invalid_date_created.json +++ b/src/test/resources/bulk/06_variant/IV_01_invalid_date_created.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:IV01", + "primary_external_id": "VARIANTTEST:IV01", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/IV_02_invalid_date_updated.json b/src/test/resources/bulk/06_variant/IV_02_invalid_date_updated.json index cd6cce1e1..c80d3a677 100644 --- a/src/test/resources/bulk/06_variant/IV_02_invalid_date_updated.json +++ b/src/test/resources/bulk/06_variant/IV_02_invalid_date_updated.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:IV02", + "primary_external_id": "VARIANTTEST:IV02", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/IV_03_invalid_taxon.json b/src/test/resources/bulk/06_variant/IV_03_invalid_taxon.json index 8ae3ba548..f23526b1d 100644 --- a/src/test/resources/bulk/06_variant/IV_03_invalid_taxon.json +++ b/src/test/resources/bulk/06_variant/IV_03_invalid_taxon.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:IV03", + "primary_external_id": "VARIANTTEST:IV03", "taxon_curie": "NCBITaxon:Invalid", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/IV_04_invalid_variant_type.json b/src/test/resources/bulk/06_variant/IV_04_invalid_variant_type.json index fe4206efd..a6808ab40 100644 --- a/src/test/resources/bulk/06_variant/IV_04_invalid_variant_type.json +++ b/src/test/resources/bulk/06_variant/IV_04_invalid_variant_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:IV04", + "primary_external_id": "VARIANTTEST:IV04", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:Invalid", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/IV_05_invalid_variant_status.json b/src/test/resources/bulk/06_variant/IV_05_invalid_variant_status.json index 8584fba88..01e321431 100644 --- a/src/test/resources/bulk/06_variant/IV_05_invalid_variant_status.json +++ b/src/test/resources/bulk/06_variant/IV_05_invalid_variant_status.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:IV05", + "primary_external_id": "VARIANTTEST:IV05", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "invalid", diff --git a/src/test/resources/bulk/06_variant/IV_06_invalid_source_general_consequence.json b/src/test/resources/bulk/06_variant/IV_06_invalid_source_general_consequence.json index b392487af..a0319d88b 100644 --- a/src/test/resources/bulk/06_variant/IV_06_invalid_source_general_consequence.json +++ b/src/test/resources/bulk/06_variant/IV_06_invalid_source_general_consequence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:IV06", + "primary_external_id": "VARIANTTEST:IV06", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/IV_07_invalid_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/06_variant/IV_07_invalid_data_provider_source_organization_abbreviation.json index cb9355a73..1cd44b33c 100644 --- a/src/test/resources/bulk/06_variant/IV_07_invalid_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/06_variant/IV_07_invalid_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:IV07", + "primary_external_id": "VARIANTTEST:IV07", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/IV_08_invalid_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/06_variant/IV_08_invalid_data_provider_cross_reference_prefix.json index 3f1ee271f..35bd52d0b 100644 --- a/src/test/resources/bulk/06_variant/IV_08_invalid_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/06_variant/IV_08_invalid_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:IV08", + "primary_external_id": "VARIANTTEST:IV08", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/IV_09_invalid_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/06_variant/IV_09_invalid_data_provider_cross_reference_page_area.json index ce60fe8ab..6149c8eeb 100644 --- a/src/test/resources/bulk/06_variant/IV_09_invalid_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/06_variant/IV_09_invalid_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:IV09", + "primary_external_id": "VARIANTTEST:IV09", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/IV_10_invalid_related_notes_note_type.json b/src/test/resources/bulk/06_variant/IV_10_invalid_related_notes_note_type.json index 40b3e161a..26bd00b7a 100644 --- a/src/test/resources/bulk/06_variant/IV_10_invalid_related_notes_note_type.json +++ b/src/test/resources/bulk/06_variant/IV_10_invalid_related_notes_note_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:IV10", + "primary_external_id": "VARIANTTEST:IV10", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/IV_11_invalid_related_notes_evidence.json b/src/test/resources/bulk/06_variant/IV_11_invalid_related_notes_evidence.json index ae9e57be0..9adf709ba 100644 --- a/src/test/resources/bulk/06_variant/IV_11_invalid_related_notes_evidence.json +++ b/src/test/resources/bulk/06_variant/IV_11_invalid_related_notes_evidence.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:IV11", + "primary_external_id": "VARIANTTEST:IV11", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/MN_01_no_non_required_fields_level_1.json b/src/test/resources/bulk/06_variant/MN_01_no_non_required_fields_level_1.json index d390c610c..b45b7e335 100644 --- a/src/test/resources/bulk/06_variant/MN_01_no_non_required_fields_level_1.json +++ b/src/test/resources/bulk/06_variant/MN_01_no_non_required_fields_level_1.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:MN01", + "primary_external_id": "VARIANTTEST:MN01", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "data_provider_dto": { diff --git a/src/test/resources/bulk/06_variant/MN_02_no_non_required_fields_level_2.json b/src/test/resources/bulk/06_variant/MN_02_no_non_required_fields_level_2.json index b8f241419..144da2d75 100644 --- a/src/test/resources/bulk/06_variant/MN_02_no_non_required_fields_level_2.json +++ b/src/test/resources/bulk/06_variant/MN_02_no_non_required_fields_level_2.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:MN02", + "primary_external_id": "VARIANTTEST:MN02", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/MR_02_no_taxon.json b/src/test/resources/bulk/06_variant/MR_02_no_taxon.json index beaaa4579..0b3648011 100644 --- a/src/test/resources/bulk/06_variant/MR_02_no_taxon.json +++ b/src/test/resources/bulk/06_variant/MR_02_no_taxon.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:MR02", + "primary_external_id": "VARIANTTEST:MR02", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", "source_general_consequence_curie": "SO:SGC001", diff --git a/src/test/resources/bulk/06_variant/MR_03_no_variant_type.json b/src/test/resources/bulk/06_variant/MR_03_no_variant_type.json index 26d39ff38..8acee3057 100644 --- a/src/test/resources/bulk/06_variant/MR_03_no_variant_type.json +++ b/src/test/resources/bulk/06_variant/MR_03_no_variant_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:MR03", + "primary_external_id": "VARIANTTEST:MR03", "taxon_curie": "NCBITaxon:6239", "variant_status_name": "status_test", "source_general_consequence_curie": "SO:SGC001", diff --git a/src/test/resources/bulk/06_variant/MR_04_no_data_provider.json b/src/test/resources/bulk/06_variant/MR_04_no_data_provider.json index 0ca4bff2f..5ce48ced3 100644 --- a/src/test/resources/bulk/06_variant/MR_04_no_data_provider.json +++ b/src/test/resources/bulk/06_variant/MR_04_no_data_provider.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:MR04", + "primary_external_id": "VARIANTTEST:MR04", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/MR_05_no_data_provider_source_organization_abbreviation.json b/src/test/resources/bulk/06_variant/MR_05_no_data_provider_source_organization_abbreviation.json index 4fa4b59e9..550430753 100644 --- a/src/test/resources/bulk/06_variant/MR_05_no_data_provider_source_organization_abbreviation.json +++ b/src/test/resources/bulk/06_variant/MR_05_no_data_provider_source_organization_abbreviation.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:MR05", + "primary_external_id": "VARIANTTEST:MR05", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/MR_06_no_data_provider_cross_reference_referenced_curie.json b/src/test/resources/bulk/06_variant/MR_06_no_data_provider_cross_reference_referenced_curie.json index b17396f08..bb38024ef 100644 --- a/src/test/resources/bulk/06_variant/MR_06_no_data_provider_cross_reference_referenced_curie.json +++ b/src/test/resources/bulk/06_variant/MR_06_no_data_provider_cross_reference_referenced_curie.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:MR06", + "primary_external_id": "VARIANTTEST:MR06", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/MR_07_no_data_provider_cross_reference_display_name.json b/src/test/resources/bulk/06_variant/MR_07_no_data_provider_cross_reference_display_name.json index ab878dcc8..a7b9a5a3c 100644 --- a/src/test/resources/bulk/06_variant/MR_07_no_data_provider_cross_reference_display_name.json +++ b/src/test/resources/bulk/06_variant/MR_07_no_data_provider_cross_reference_display_name.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:MR07", + "primary_external_id": "VARIANTTEST:MR07", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/MR_08_no_data_provider_cross_reference_prefix.json b/src/test/resources/bulk/06_variant/MR_08_no_data_provider_cross_reference_prefix.json index d6eb1c761..0022690b8 100644 --- a/src/test/resources/bulk/06_variant/MR_08_no_data_provider_cross_reference_prefix.json +++ b/src/test/resources/bulk/06_variant/MR_08_no_data_provider_cross_reference_prefix.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:MR08", + "primary_external_id": "VARIANTTEST:MR08", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/MR_09_no_data_provider_cross_reference_page_area.json b/src/test/resources/bulk/06_variant/MR_09_no_data_provider_cross_reference_page_area.json index 8752dcbdd..685d74dc1 100644 --- a/src/test/resources/bulk/06_variant/MR_09_no_data_provider_cross_reference_page_area.json +++ b/src/test/resources/bulk/06_variant/MR_09_no_data_provider_cross_reference_page_area.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:MR09", + "primary_external_id": "VARIANTTEST:MR09", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/MR_10_no_related_notes_note_type.json b/src/test/resources/bulk/06_variant/MR_10_no_related_notes_note_type.json index 8332dc32e..f22aee6bc 100644 --- a/src/test/resources/bulk/06_variant/MR_10_no_related_notes_note_type.json +++ b/src/test/resources/bulk/06_variant/MR_10_no_related_notes_note_type.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:MR10", + "primary_external_id": "VARIANTTEST:MR10", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/MR_11_no_related_notes_free_text.json b/src/test/resources/bulk/06_variant/MR_11_no_related_notes_free_text.json index 3e983ef00..7e1da6b0f 100644 --- a/src/test/resources/bulk/06_variant/MR_11_no_related_notes_free_text.json +++ b/src/test/resources/bulk/06_variant/MR_11_no_related_notes_free_text.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:MR11", + "primary_external_id": "VARIANTTEST:MR11", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", diff --git a/src/test/resources/bulk/06_variant/UD_01_update_all_except_default_fields.json b/src/test/resources/bulk/06_variant/UD_01_update_all_except_default_fields.json index 9b1a918d9..7f375335d 100644 --- a/src/test/resources/bulk/06_variant/UD_01_update_all_except_default_fields.json +++ b/src/test/resources/bulk/06_variant/UD_01_update_all_except_default_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:Variant0001", + "primary_external_id": "VARIANTTEST:Variant0001", "taxon_curie": "NCBITaxon:10116", "variant_type_curie": "SO:VT002", "variant_status_name": "status_test_2", diff --git a/src/test/resources/bulk/06_variant/UE_01_update_empty_non_required_fields.json b/src/test/resources/bulk/06_variant/UE_01_update_empty_non_required_fields.json index 14cb13cab..3a3ad1e9c 100644 --- a/src/test/resources/bulk/06_variant/UE_01_update_empty_non_required_fields.json +++ b/src/test/resources/bulk/06_variant/UE_01_update_empty_non_required_fields.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:Variant0001", + "primary_external_id": "VARIANTTEST:Variant0001", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "", diff --git a/src/test/resources/bulk/06_variant/UM_01_update_no_non_required_fields_level_1.json b/src/test/resources/bulk/06_variant/UM_01_update_no_non_required_fields_level_1.json index 726bd44f2..086950804 100644 --- a/src/test/resources/bulk/06_variant/UM_01_update_no_non_required_fields_level_1.json +++ b/src/test/resources/bulk/06_variant/UM_01_update_no_non_required_fields_level_1.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:Variant0001", + "primary_external_id": "VARIANTTEST:Variant0001", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "data_provider_dto": { diff --git a/src/test/resources/bulk/06_variant/UM_02_update_no_non_required_fields_level_2.json b/src/test/resources/bulk/06_variant/UM_02_update_no_non_required_fields_level_2.json index abc00f85e..3ac5f121e 100644 --- a/src/test/resources/bulk/06_variant/UM_02_update_no_non_required_fields_level_2.json +++ b/src/test/resources/bulk/06_variant/UM_02_update_no_non_required_fields_level_2.json @@ -1,6 +1,6 @@ [ { - "mod_entity_id": "VARIANTTEST:Variant0001", + "primary_external_id": "VARIANTTEST:Variant0001", "taxon_curie": "NCBITaxon:6239", "variant_type_curie": "SO:VT001", "variant_status_name": "status_test", From 46de023089860cd6ed3ca8cb9ead1f1b029231ed Mon Sep 17 00:00:00 2001 From: markquintontulloch Date: Mon, 6 Jan 2025 10:44:20 +0000 Subject: [PATCH 2/9] Update constants --- .../curation_api/constants/EntityFieldConstants.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/alliancegenome/curation_api/constants/EntityFieldConstants.java b/src/main/java/org/alliancegenome/curation_api/constants/EntityFieldConstants.java index 239458222..63c9621fb 100644 --- a/src/main/java/org/alliancegenome/curation_api/constants/EntityFieldConstants.java +++ b/src/main/java/org/alliancegenome/curation_api/constants/EntityFieldConstants.java @@ -8,7 +8,7 @@ private EntityFieldConstants() { public static final String ASSEMBLY = "genomeAssembly.primaryExternalId"; public static final String TAXON = "taxon.curie"; - public static final String SOURCE_ORGANIZATION = "sourceOrganization.abbreviation"; + public static final String SOURCE_ORGANIZATION = "abbreviation"; public static final String DATA_PROVIDER = "dataProvider." + SOURCE_ORGANIZATION; public static final String SECONDARY_DATA_PROVIDER = "secondaryDataProvider." + SOURCE_ORGANIZATION; From e835187785eaa2df6463183592df9f03c51e1c6f Mon Sep 17 00:00:00 2001 From: Mark Quinton-Tulloch Date: Mon, 6 Jan 2025 10:55:35 +0000 Subject: [PATCH 3/9] More modEntityId to primaryExternalId changes --- .../AffectedGenomicModelITCase.java | 4 +-- .../AgmStrAssociationBulkUploadITCase.java | 12 ++++---- ...omicEntityAssociationBulkUploadITCase.java | 28 +++++++++---------- ...entGeneAssociationBulkUploadFmsITCase.java | 8 +++--- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/test/java/org/alliancegenome/curation_api/AffectedGenomicModelITCase.java b/src/test/java/org/alliancegenome/curation_api/AffectedGenomicModelITCase.java index d101006cb..01cac47a9 100644 --- a/src/test/java/org/alliancegenome/curation_api/AffectedGenomicModelITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/AffectedGenomicModelITCase.java @@ -171,7 +171,7 @@ public void createAGMWithMissingRequiredFields() { @Test @Order(4) - public void editAGMWithMissingModEntityId() { + public void editAGMWithMissingPrimaryExternalId() { AffectedGenomicModel agm = getAffectedGenomicModel(AGM); agm.setPrimaryExternalId(null); @@ -228,7 +228,7 @@ public void createAGMWithEmptyRequiredFields() { @Test @Order(7) - public void editAGMWithEmptyModEntityId() { + public void editAGMWithEmptyPrimaryExternalId() { AffectedGenomicModel agm = getAffectedGenomicModel(AGM); agm.setPrimaryExternalId(""); diff --git a/src/test/java/org/alliancegenome/curation_api/AgmStrAssociationBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/AgmStrAssociationBulkUploadITCase.java index 1c7fd315e..6729f705d 100644 --- a/src/test/java/org/alliancegenome/curation_api/AgmStrAssociationBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/AgmStrAssociationBulkUploadITCase.java @@ -74,8 +74,8 @@ public void agmSequenceTargetingReagentAssociationBulkUploadCheckFields() throws then(). statusCode(200). body("entity.relation.name", is(relationName)). - body("entity.agmSequenceTargetingReagentAssociationObject.modEntityId", is(strCurie)). - body("entity.agmAssociationSubject.modEntityId", is(agmCurie)). + body("entity.agmSequenceTargetingReagentAssociationObject.primaryExternalId", is(strCurie)). + body("entity.agmAssociationSubject.primaryExternalId", is(agmCurie)). body("entity.internal", is(false)). body("entity.obsolete", is(false)). body("entity.createdBy.uniqueId", is("AGMTEST:Person0001")). @@ -90,7 +90,7 @@ public void agmSequenceTargetingReagentAssociationBulkUploadCheckFields() throws statusCode(200). body("entity.agmSequenceTargetingReagentAssociations", hasSize(1)). body("entity.agmSequenceTargetingReagentAssociations[0].relation.name", is(relationName)). - body("entity.agmSequenceTargetingReagentAssociations[0].agmSequenceTargetingReagentAssociationObject.modEntityId", is(strCurie)). + body("entity.agmSequenceTargetingReagentAssociations[0].agmSequenceTargetingReagentAssociationObject.primaryExternalId", is(strCurie)). body("entity.agmSequenceTargetingReagentAssociations[0].agmAssociationSubject", not(hasKey("agmSequenceTargetingReagentAssociations"))); RestAssured.given(). @@ -100,7 +100,7 @@ public void agmSequenceTargetingReagentAssociationBulkUploadCheckFields() throws statusCode(200). body("entity.agmSequenceTargetingReagentAssociations", hasSize(1)). body("entity.agmSequenceTargetingReagentAssociations[0].relation.name", is(relationName)). - body("entity.agmSequenceTargetingReagentAssociations[0].agmSequenceTargetingReagentAssociationObject.modEntityId", is(strCurie)). + body("entity.agmSequenceTargetingReagentAssociations[0].agmSequenceTargetingReagentAssociationObject.primaryExternalId", is(strCurie)). body("entity.agmSequenceTargetingReagentAssociations[0].agmSequenceTargetingReagentAssociationObject", not(hasKey("agmSequenceTargetingReagentAssociations"))); } @@ -116,8 +116,8 @@ public void agmStrAssociationBulkUploadUpdateCheckFields() throws Exception { then(). statusCode(200). body("entity.relation.name", is(relationName)). - body("entity.agmSequenceTargetingReagentAssociationObject.modEntityId", is(strCurie)). - body("entity.agmAssociationSubject.modEntityId", is(agmCurie)). + body("entity.agmSequenceTargetingReagentAssociationObject.primaryExternalId", is(strCurie)). + body("entity.agmAssociationSubject.primaryExternalId", is(agmCurie)). body("entity.internal", is(true)). body("entity.obsolete", is(true)). body("entity.createdBy.uniqueId", is("AGMTEST:Person0001")). diff --git a/src/test/java/org/alliancegenome/curation_api/ConstructGenomicEntityAssociationBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/ConstructGenomicEntityAssociationBulkUploadITCase.java index a04bf4f47..f91c8cd3c 100644 --- a/src/test/java/org/alliancegenome/curation_api/ConstructGenomicEntityAssociationBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/ConstructGenomicEntityAssociationBulkUploadITCase.java @@ -34,9 +34,9 @@ @Order(202) public class ConstructGenomicEntityAssociationBulkUploadITCase extends BaseITCase { - private String constructModEntityId = "WB:Construct0001"; + private String constructPrimaryExternalId = "WB:Construct0001"; private String relationName = "is_regulated_by"; - private String geneModEntityId = "GENETEST:Gene0001"; + private String genePrimaryExternalId = "GENETEST:Gene0001"; private String reference = "AGRKB:000000001"; private String reference2 = "AGRKB:000000021"; private String noteType = "comment"; @@ -59,8 +59,8 @@ public void init() { private final String geneGetEndpoint = "/api/gene/"; private void loadRequiredEntities() throws Exception { - gene = getGene(geneModEntityId); - construct = getConstruct(constructModEntityId); + gene = getGene(genePrimaryExternalId); + construct = getConstruct(constructPrimaryExternalId); } @Test @@ -76,8 +76,8 @@ public void constructGenomicEntityAssociationBulkUploadCheckFields() throws Exce then(). statusCode(200). body("entity.relation.name", is(relationName)). - body("entity.constructGenomicEntityAssociationObject.primaryExternalId", is(geneModEntityId)). - body("entity.constructAssociationSubject.primaryExternalId", is(constructModEntityId)). + body("entity.constructGenomicEntityAssociationObject.primaryExternalId", is(genePrimaryExternalId)). + body("entity.constructAssociationSubject.primaryExternalId", is(constructPrimaryExternalId)). body("entity.evidence", hasSize(1)). body("entity.evidence[0].curie", is(reference)). body("entity.internal", is(true)). @@ -98,23 +98,23 @@ public void constructGenomicEntityAssociationBulkUploadCheckFields() throws Exce RestAssured.given(). when(). - get(constructGetEndpoint + constructModEntityId). + get(constructGetEndpoint + constructPrimaryExternalId). then(). statusCode(200). - body("entity.primaryExternalId", is(constructModEntityId)). + body("entity.primaryExternalId", is(constructPrimaryExternalId)). body("entity.constructGenomicEntityAssociations", hasSize(1)). body("entity.constructGenomicEntityAssociations[0].relation.name", is(relationName)). - body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject.primaryExternalId", is(geneModEntityId)). + body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject.primaryExternalId", is(genePrimaryExternalId)). body("entity.constructGenomicEntityAssociations[0].constructAssociationSubject", not(hasKey("constructGenomicEntityAssociations"))); RestAssured.given(). when(). - get(geneGetEndpoint + geneModEntityId). + get(geneGetEndpoint + genePrimaryExternalId). then(). statusCode(200). body("entity.constructGenomicEntityAssociations", hasSize(1)). body("entity.constructGenomicEntityAssociations[0].relation.name", is(relationName)). - body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject.primaryExternalId", is(geneModEntityId)). + body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject.primaryExternalId", is(genePrimaryExternalId)). body("entity.constructGenomicEntityAssociations[0].constructGenomicEntityAssociationObject", not(hasKey("constructGenomicEntityAssociations"))); } @@ -129,7 +129,7 @@ public void constructGenomicEntityAssociationBulkUploadUpdateCheckFields() throw then(). statusCode(200). body("entity.relation.name", is(relationName)). - body("entity.constructGenomicEntityAssociationObject.primaryExternalId", is(geneModEntityId)). + body("entity.constructGenomicEntityAssociationObject.primaryExternalId", is(genePrimaryExternalId)). body("entity.evidence", hasSize(1)). body("entity.evidence[0].curie", is(reference2)). body("entity.internal", is(false)). @@ -150,14 +150,14 @@ public void constructGenomicEntityAssociationBulkUploadUpdateCheckFields() throw RestAssured.given(). when(). - get(constructGetEndpoint + constructModEntityId). + get(constructGetEndpoint + constructPrimaryExternalId). then(). statusCode(200). body("entity.constructGenomicEntityAssociations", hasSize(1)); RestAssured.given(). when(). - get(geneGetEndpoint + geneModEntityId). + get(geneGetEndpoint + genePrimaryExternalId). then(). statusCode(200). body("entity.constructGenomicEntityAssociations", hasSize(1)); diff --git a/src/test/java/org/alliancegenome/curation_api/SequenceTargetingReagentGeneAssociationBulkUploadFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/SequenceTargetingReagentGeneAssociationBulkUploadFmsITCase.java index 2c6881666..40ee15612 100644 --- a/src/test/java/org/alliancegenome/curation_api/SequenceTargetingReagentGeneAssociationBulkUploadFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/SequenceTargetingReagentGeneAssociationBulkUploadFmsITCase.java @@ -35,7 +35,7 @@ public class SequenceTargetingReagentGeneAssociationBulkUploadFmsITCase extends private VocabularyTerm relation; private String relationName = "targets"; private String geneCurie = "GENETEST:Gene0001"; - private String sqtrModEntityId = "ZFIN:ZDB-TALEN-180503-1"; + private String sqtrPrimaryExternalId = "ZFIN:ZDB-TALEN-180503-1"; private final String sqtrGeneAssociationGetEndpoint = "/api/sqtrgeneassociation/findBy"; private final String sqtrGeneAssociationTestFilePath = "src/test/resources/bulk/fms/SA01_sequencetargetingreagent_gene_association/"; @@ -48,7 +48,7 @@ private void loadRequiredEntities() throws Exception { Vocabulary noteTypeVocab = getVocabulary("construct_relation"); relation = getVocabularyTerm(noteTypeVocab, relationName); gene = getGene(geneCurie); - sqtr = getSequenceTargetingReagent(sqtrModEntityId); + sqtr = getSequenceTargetingReagent(sqtrPrimaryExternalId); } @Test @@ -65,11 +65,11 @@ public void sqtrGeneAssociationBulkUploadCheckFields() throws Exception { statusCode(200). body("entity.relation.name", is(relationName)). body("entity.sequenceTargetingReagentGeneAssociationObject.primaryExternalId", is(geneCurie)). - body("entity.sequenceTargetingReagentAssociationSubject.primaryExternalId", is(sqtrModEntityId)); + body("entity.sequenceTargetingReagentAssociationSubject.primaryExternalId", is(sqtrPrimaryExternalId)); RestAssured.given(). when(). - get(sqtrGetEndpoint + sqtrModEntityId). + get(sqtrGetEndpoint + sqtrPrimaryExternalId). then(). statusCode(200). body("entity.sequenceTargetingReagentGeneAssociations", hasSize(1)). From c675ef65a986d908a1e27c0ecbd2e166f82fa3b8 Mon Sep 17 00:00:00 2001 From: Mark Quinton-Tulloch Date: Fri, 10 Jan 2025 13:41:20 +0000 Subject: [PATCH 4/9] Data provider updates --- src/main/cliapp/src/constants/FilterFields.js | 30 +- src/main/cliapp/src/constants/SortFields.js | 4 +- .../AffectedGenomicModelTable.js | 2 +- .../allelesPage/AlleleDetailPage.js | 2 +- .../containers/allelesPage/AllelesTable.js | 2 +- .../constructsPage/ConstructsTable.js | 2 +- .../__tests__/ConstructsTable.test.js | 4 +- .../DiseaseAnnotationsTable.js | 20 +- .../NewAnnotationForm.js | 16 +- .../mockData/mockData.js | 4 +- .../src/containers/genesPage/GenesTable.js | 2 +- .../PhenotypeAnnotationsTable.js | 7 +- .../containers/speciesPage/SpeciesTable.js | 8 +- .../containers/variantsPage/VariantsTable.js | 4 +- .../cliapp/src/service/TableStateService.js | 42 +-- .../constants/LinkMLSchemaConstants.java | 2 +- .../crud/DataProviderCrudController.java | 38 --- .../curation_api/dao/DataProviderDAO.java | 74 ----- .../crud/DataProviderCrudInterface.java | 29 -- .../model/entities/Annotation.java | 23 +- .../model/entities/BiologicalEntity.java | 3 +- .../model/entities/Chromosome.java | 15 +- .../model/entities/DataProvider.java | 49 --- .../model/entities/DiseaseAnnotation.java | 65 ++-- .../model/entities/ExpressionAnnotation.java | 2 +- .../entities/GeneExpressionAnnotation.java | 1 + .../entities/GeneExpressionExperiment.java | 1 + .../HTPExpressionDatasetAnnotation.java | 26 +- .../HTPExpressionDatasetSampleAnnotation.java | 17 +- .../model/entities/PhenotypeAnnotation.java | 3 +- .../curation_api/model/entities/Reagent.java | 1 + .../curation_api/model/entities/Species.java | 21 +- ...gmSequenceTargetingReagentAssociation.java | 2 +- .../model/entities/base/SubmittedObject.java | 19 +- .../services/AssemblyComponentService.java | 4 +- .../services/DataProviderService.java | 81 ----- .../GeneExpressionExperimentService.java | 21 +- .../GeneOntologyAnnotationService.java | 9 - .../curation_api/services/GeneService.java | 12 +- .../services/GenomeAssemblyService.java | 4 +- .../curation_api/services/Gff3Service.java | 1 - .../services/OrganizationService.java | 28 +- .../annotations/AnnotationUniqueIdHelper.java | 8 +- .../validation/AnnotationValidator.java | 78 +++-- .../validation/DataProviderValidator.java | 114 ------- .../DiseaseAnnotationValidator.java | 52 ++-- .../services/validation/ReagentValidator.java | 41 +-- .../base/SubmittedObjectValidator.java | 84 ++++-- .../dto/AGMDiseaseAnnotationDTOValidator.java | 2 +- .../AlleleDiseaseAnnotationDTOValidator.java | 2 +- .../dto/AnnotationDTOValidator.java | 22 +- .../dto/DataProviderDTOValidator.java | 61 ---- .../dto/DiseaseAnnotationDTOValidator.java | 42 ++- .../GeneDiseaseAnnotationDTOValidator.java | 2 +- .../validation/dto/Gff3DtoValidator.java | 6 +- .../validation/dto/ReagentDTOValidator.java | 14 +- ...rgetingReagentAssociationDTOValidator.java | 4 +- .../AlleleGeneAssociationDTOValidator.java | 4 +- .../AlleleVariantAssociationDTOValidator.java | 4 +- ...tGenomicEntityAssociationDTOValidator.java | 2 +- .../validation/dto/base/BaseDTOValidator.java | 55 +++- ...neExpressionAnnotationFmsDTOValidator.java | 43 ++- .../fms/GeneInteractionFmsDTOValidator.java | 4 +- ...ssionDatasetAnnotationFmsDTOValidator.java | 8 +- ...atasetSampleAnnotationFmsDTOValidator.java | 7 +- .../PhenotypeAnnotationFmsDTOValidator.java | 9 +- ...quenceTargetingReagentFmsDTOValidator.java | 6 +- .../dto/fms/VariantFmsDTOValidator.java | 6 +- .../v0.38.0.21__linkml_v2_9_1_update.sql | 23 -- .../v0.38.0.24__linkml_v2_9_1_update.sql | 282 ++++++++++++++++++ .../AffectedGenomicModelITCase.java | 31 +- .../curation_api/AgmBulkUploadITCase.java | 44 +-- .../AgmStrAssociationBulkUploadITCase.java | 4 +- .../curation_api/AlleleBulkUploadITCase.java | 21 +- .../curation_api/AlleleITCase.java | 33 +- .../BiogridOrcBulkUploadFmsITCase.java | 4 +- .../ConstructBulkUploadITCase.java | 18 +- .../curation_api/ConstructITCase.java | 33 +- .../DiseaseAnnotationBulkUploadITCase.java | 106 +++---- .../curation_api/DiseaseAnnotationITCase.java | 202 +++++-------- .../ExpressionBulkUploadFmsITCase.java | 44 +-- .../curation_api/GeneBulkUploadITCase.java | 22 +- .../curation_api/GeneITCase.java | 33 +- .../GeneInteractionBulkUploadFmsITCase.java | 6 +- .../curation_api/Gff3BulkUploadITCase.java | 8 +- .../ParalogyBulkUploadFmsITCase.java | 4 +- ...henotypeAnnotationBulkUploadFmsITCase.java | 4 +- .../curation_api/VariantBulkUploadITCase.java | 19 +- .../curation_api/VariantFmsITCase.java | 8 +- .../curation_api/VariantITCase.java | 33 +- .../curation_api/base/BaseITCase.java | 39 +-- .../MN_01_no_non_required_fields_level_1.json | 8 +- ...E_01_update_empty_non_required_fields.json | 8 +- .../MN_01_no_non_required_fields_level_1.json | 8 +- ...update_no_non_required_fields_level_1.json | 8 +- .../03_agm/MN_01_no_non_required_fields.json | 8 +- .../UM_01_update_no_non_required_fields.json | 8 +- ...update_no_non_required_fields_level_2.json | 8 +- ...update_no_non_required_fields_level_2.json | 8 +- 99 files changed, 1232 insertions(+), 1233 deletions(-) delete mode 100644 src/main/java/org/alliancegenome/curation_api/controllers/crud/DataProviderCrudController.java delete mode 100644 src/main/java/org/alliancegenome/curation_api/dao/DataProviderDAO.java delete mode 100644 src/main/java/org/alliancegenome/curation_api/interfaces/crud/DataProviderCrudInterface.java delete mode 100644 src/main/java/org/alliancegenome/curation_api/model/entities/DataProvider.java delete mode 100644 src/main/java/org/alliancegenome/curation_api/services/DataProviderService.java delete mode 100644 src/main/java/org/alliancegenome/curation_api/services/validation/DataProviderValidator.java delete mode 100644 src/main/java/org/alliancegenome/curation_api/services/validation/dto/DataProviderDTOValidator.java delete mode 100644 src/main/resources/db/migration/v0.38.0.21__linkml_v2_9_1_update.sql create mode 100644 src/main/resources/db/migration/v0.38.0.24__linkml_v2_9_1_update.sql diff --git a/src/main/cliapp/src/constants/FilterFields.js b/src/main/cliapp/src/constants/FilterFields.js index 922c5302e..73c956b35 100644 --- a/src/main/cliapp/src/constants/FilterFields.js +++ b/src/main/cliapp/src/constants/FilterFields.js @@ -13,7 +13,7 @@ export const FIELD_SETS = Object.freeze({ }, agmAggregationFieldSet: { filterName: 'alleleAggregationFilter', - fields: ['dataProvider.sourceOrganization.abbreviation'], + fields: ['dataProvider.abbreviation'], }, agmSecondaryIdsFieldSet: { filterName: 'agmSecondaryIdsFilter', @@ -21,7 +21,7 @@ export const FIELD_SETS = Object.freeze({ }, alleleAggregationFieldSet: { filterName: 'alleleAggregationFilter', - fields: ['dataProvider.sourceOrganization.abbreviation'], + fields: ['dataProvider.abbreviation'], }, alleleFunctionalImpactsFieldSet: { filterName: 'alleleFunctionalImpactsFilter', @@ -176,7 +176,7 @@ export const FIELD_SETS = Object.freeze({ }, constructAggregationFieldSet: { filterName: 'constructAggregationFilter', - fields: ['dataProvider.sourceOrganization.abbreviation'], + fields: ['dataProvider.abbreviation'], }, constructComponentsFieldSet: { filterName: 'constructComponentsFilter', @@ -224,9 +224,9 @@ export const FIELD_SETS = Object.freeze({ dataProviderFieldSet: { filterName: 'dataProviderFilter', fields: [ - 'dataProvider.sourceOrganization.abbreviation', - 'dataProvider.sourceOrganization.fullName', - 'dataProvider.sourceOrganization.shortName', + 'dataProvider.abbreviation', + 'dataProvider.fullName', + 'dataProvider.shortName', ], }, dataCreatedFieldSet: { @@ -245,8 +245,8 @@ export const FIELD_SETS = Object.freeze({ 'annotationType.name', 'diseaseGeneticModifierRelation.name', 'diseaseQualifiers.name', - 'dataProvider.sourceOrganization.abbreviation', - 'secondaryDataProvider.sourceOrganization.abbreviation', + 'dataProvider.abbreviation', + 'secondaryDataProvider.abbreviation', 'evidenceCodes.abbreviation', ], }, @@ -288,7 +288,7 @@ export const FIELD_SETS = Object.freeze({ }, geneAggregationFieldSet: { filterName: 'geneAggregationFilter', - fields: ['dataProvider.sourceOrganization.abbreviation'], + fields: ['dataProvider.abbreviation'], }, geneAssociationSubjectFieldSet: { filterName: 'geneAssociationSubjectFilter', @@ -532,7 +532,7 @@ export const FIELD_SETS = Object.freeze({ }, paAggregationFieldSet: { filterName: 'paAggregationFilter', - fields: ['relation.name', 'dataProvider.sourceOrganization.abbreviation'], + fields: ['relation.name', 'dataProvider.abbreviation'], }, paConditionRelationsSummaryFieldSet: { filterName: 'paConditionRelationsFilter', @@ -579,9 +579,9 @@ export const FIELD_SETS = Object.freeze({ secondaryDataProviderFieldSet: { filterName: 'secondaryDataProviderFilter', fields: [ - 'secondaryDataProvider.sourceOrganization.abbreviation', - 'secondaryDataProvider.sourceOrganization.fullName', - 'secondaryDataProvider.sourceOrganization.shortName', + 'secondaryDataProvider.abbreviation', + 'secondaryDataProvider.fullName', + 'secondaryDataProvider.shortName', ], }, secondaryIdsFieldSet: { @@ -631,7 +631,7 @@ export const FIELD_SETS = Object.freeze({ }, speciesAggregationFieldSet: { filterName: 'speciesAggregationFilter', - fields: ['dataProvider.sourceOrganization.abbreviation'], + fields: ['dataProvider.abbreviation'], }, speciesAssemblyFieldSet: { filterName: 'speciesAssemblyFilter', @@ -667,7 +667,7 @@ export const FIELD_SETS = Object.freeze({ }, variantAggregationFieldSet: { filterName: 'variantAggregationFilter', - fields: ['variantStatus.name', 'dataProvider.sourceOrganization.abbreviation'], + fields: ['variantStatus.name', 'dataProvider.abbreviation'], }, variantStatusFieldSet: { filterName: 'variantStatusFilter', diff --git a/src/main/cliapp/src/constants/SortFields.js b/src/main/cliapp/src/constants/SortFields.js index ae4e6fe1e..1bdca0d17 100644 --- a/src/main/cliapp/src/constants/SortFields.js +++ b/src/main/cliapp/src/constants/SortFields.js @@ -26,8 +26,8 @@ export const SORT_FIELDS = Object.freeze([ 'assertedGenes.geneSymbol.displayText', 'inferredAllele.alleleSymbol.displayText', 'assertedAllele.alleleSymbol.displayText', - 'dataProvider.sourceOrganization.abbreviation', - 'secondaryDataProvider.sourceOrganization.abbreviation', + 'dataProvider.abbreviation', + 'secondaryDataProvider.abbreviation', 'updatedBy.uniqueId', 'dateUpdated', 'createdBy.uniqueId', diff --git a/src/main/cliapp/src/containers/affectedGenomicModelPage/AffectedGenomicModelTable.js b/src/main/cliapp/src/containers/affectedGenomicModelPage/AffectedGenomicModelTable.js index ce1edfddb..c31dc040e 100644 --- a/src/main/cliapp/src/containers/affectedGenomicModelPage/AffectedGenomicModelTable.js +++ b/src/main/cliapp/src/containers/affectedGenomicModelPage/AffectedGenomicModelTable.js @@ -107,7 +107,7 @@ export const AffectedGenomicModelTable = () => { filterConfig: FILTER_CONFIGS.taxonFilterConfig, }, { - field: 'dataProvider.sourceOrganization.abbreviation', + field: 'dataProvider.abbreviation', header: 'Data Provider', sortable: true, filterConfig: FILTER_CONFIGS.agmDataProviderFilterConfig, diff --git a/src/main/cliapp/src/containers/allelesPage/AlleleDetailPage.js b/src/main/cliapp/src/containers/allelesPage/AlleleDetailPage.js index 621b9163e..26aee2657 100644 --- a/src/main/cliapp/src/containers/allelesPage/AlleleDetailPage.js +++ b/src/main/cliapp/src/containers/allelesPage/AlleleDetailPage.js @@ -311,7 +311,7 @@ export default function AlleleDetailPage() { { editor: relatedNotesEditor, }, { - field: 'dataProvider.sourceOrganization.abbreviation', + field: 'dataProvider.abbreviation', header: 'Data Provider', sortable: true, filterConfig: FILTER_CONFIGS.alleleDataProviderFilterConfig, diff --git a/src/main/cliapp/src/containers/constructsPage/ConstructsTable.js b/src/main/cliapp/src/containers/constructsPage/ConstructsTable.js index 6caafaa2c..0e78aed7b 100644 --- a/src/main/cliapp/src/containers/constructsPage/ConstructsTable.js +++ b/src/main/cliapp/src/containers/constructsPage/ConstructsTable.js @@ -249,7 +249,7 @@ export const ConstructsTable = () => { filterConfig: FILTER_CONFIGS.referencesFilterConfig, }, { - field: 'dataProvider.sourceOrganization.abbreviation', + field: 'dataProvider.abbreviation', header: 'Data Provider', sortable: { isInEditMode }, filterConfig: FILTER_CONFIGS.constructDataProviderFilterConfig, diff --git a/src/main/cliapp/src/containers/constructsPage/__tests__/ConstructsTable.test.js b/src/main/cliapp/src/containers/constructsPage/__tests__/ConstructsTable.test.js index 226042644..be745f5a2 100644 --- a/src/main/cliapp/src/containers/constructsPage/__tests__/ConstructsTable.test.js +++ b/src/main/cliapp/src/containers/constructsPage/__tests__/ConstructsTable.test.js @@ -51,7 +51,7 @@ describe('', () => { ); - const modEntityTd = await result.findByText(/WB:WBCnstr00000001/i); + const primaryExternalIdTd = await result.findByText(/WB:WBCnstr00000001/i); const referencesTd = await result.findByText(/PMID:17486083/i); const updatedByCreatedByArray = await result.findAllByText('WB:curator'); const dateCreatedTd = await result.findByText(/2010-01-02T00:00:00Z/i); @@ -63,7 +63,7 @@ describe('', () => { const constructGenomicComponentTd = await result.findByText(/lin-17/i); await waitFor(() => { - expect(modEntityTd).toBeInTheDocument(); + expect(primaryExternalIdTd).toBeInTheDocument(); expect(nameTd).toBeInTheDocument(); expect(symbolTd).toBeInTheDocument(); expect(synonymTd).toBeInTheDocument(); diff --git a/src/main/cliapp/src/containers/diseaseAnnotationsPage/DiseaseAnnotationsTable.js b/src/main/cliapp/src/containers/diseaseAnnotationsPage/DiseaseAnnotationsTable.js index bdfcb0391..46d75998c 100644 --- a/src/main/cliapp/src/containers/diseaseAnnotationsPage/DiseaseAnnotationsTable.js +++ b/src/main/cliapp/src/containers/diseaseAnnotationsPage/DiseaseAnnotationsTable.js @@ -576,7 +576,13 @@ export const DiseaseAnnotationsTable = () => { }; const sgdStrainBackgroundSearch = (event, setFiltered, setQuery) => { - const autocompleteFields = ['name', 'curie', 'primaryExternalId', 'modInternalId', 'crossReferences.referencedCurie']; + const autocompleteFields = [ + 'name', + 'curie', + 'primaryExternalId', + 'modInternalId', + 'crossReferences.referencedCurie', + ]; const endpoint = 'agm'; const filterName = 'sgdStrainBackgroundFilter'; const filter = buildAutocompleteFilter(event, autocompleteFields); @@ -628,7 +634,13 @@ export const DiseaseAnnotationsTable = () => { }; const geneticModifierAgmsSearch = (event, setFiltered, setInputValue) => { - const autocompleteFields = ['name', 'curie', 'primaryExternalId', 'modInternalId', 'crossReferences.referencedCurie']; + const autocompleteFields = [ + 'name', + 'curie', + 'primaryExternalId', + 'modInternalId', + 'crossReferences.referencedCurie', + ]; const endpoint = 'agm'; const filterName = 'geneticModifierAgmsFilter'; const filter = buildAutocompleteFilter(event, autocompleteFields); @@ -1332,13 +1344,13 @@ export const DiseaseAnnotationsTable = () => { editor: (props) => assertedAlleleEditorTemplate(props), }, { - field: 'dataProvider.sourceOrganization.abbreviation', + field: 'dataProvider.abbreviation', header: 'Data Provider', sortable: true, filterConfig: FILTER_CONFIGS.diseaseDataProviderFilterConfig, }, { - field: 'secondaryDataProvider.sourceOrganization.abbreviation', + field: 'secondaryDataProvider.abbreviation', header: 'Secondary Data Provider', sortable: true, filterConfig: FILTER_CONFIGS.secondaryDataProviderFilterConfig, diff --git a/src/main/cliapp/src/containers/diseaseAnnotationsPage/NewAnnotationForm.js b/src/main/cliapp/src/containers/diseaseAnnotationsPage/NewAnnotationForm.js index a78a4a322..3eb1258db 100644 --- a/src/main/cliapp/src/containers/diseaseAnnotationsPage/NewAnnotationForm.js +++ b/src/main/cliapp/src/containers/diseaseAnnotationsPage/NewAnnotationForm.js @@ -221,7 +221,13 @@ export const NewAnnotationForm = ({ }; const sgdStrainBackgroundSearch = (event, setFiltered, setQuery) => { - const autocompleteFields = ['name', 'curie', 'primaryExternalId', 'modInternalId', 'crossReferences.referencedCurie']; + const autocompleteFields = [ + 'name', + 'curie', + 'primaryExternalId', + 'modInternalId', + 'crossReferences.referencedCurie', + ]; const endpoint = 'agm'; const filterName = 'sgdStrainBackgroundFilter'; const filter = buildAutocompleteFilter(event, autocompleteFields); @@ -237,7 +243,13 @@ export const NewAnnotationForm = ({ }; const geneticModifierAgmsSearch = (event, setFiltered, setQuery) => { - const autocompleteFields = ['primaryExternalId', 'modInternalId', 'name', 'curie', 'crossReferences.referencedCurie']; + const autocompleteFields = [ + 'primaryExternalId', + 'modInternalId', + 'name', + 'curie', + 'crossReferences.referencedCurie', + ]; const endpoint = 'agm'; const filterName = 'geneticModifierAgmsFilter'; const filter = buildAutocompleteFilter(event, autocompleteFields); diff --git a/src/main/cliapp/src/containers/diseaseAnnotationsPage/mockData/mockData.js b/src/main/cliapp/src/containers/diseaseAnnotationsPage/mockData/mockData.js index 357fc0ca7..63e0693ae 100644 --- a/src/main/cliapp/src/containers/diseaseAnnotationsPage/mockData/mockData.js +++ b/src/main/cliapp/src/containers/diseaseAnnotationsPage/mockData/mockData.js @@ -59,7 +59,9 @@ export const data = { name: 'SGD Strain Background test', }, diseaseGeneticModifierAgms: [{ name: 'DGM AGM test', primaryExternalId: 'WB:DGM1' }], - diseaseGeneticModifierAlleles: [{ primaryExternalId: 'WB:DGM2', alleleSymbol: { displayText: 'DGM Allele test' } }], + diseaseGeneticModifierAlleles: [ + { primaryExternalId: 'WB:DGM2', alleleSymbol: { displayText: 'DGM Allele test' } }, + ], diseaseGeneticModifierGenes: [{ primaryExternalId: 'WB:DGM3', geneSymbol: { displayText: 'DGM Gene test' } }], diseaseQualifiers: [{ name: 'disease qualifiers test' }], dateCreated: '2017-06-08T14:15:35Z', diff --git a/src/main/cliapp/src/containers/genesPage/GenesTable.js b/src/main/cliapp/src/containers/genesPage/GenesTable.js index 3b0e5b282..d04150477 100644 --- a/src/main/cliapp/src/containers/genesPage/GenesTable.js +++ b/src/main/cliapp/src/containers/genesPage/GenesTable.js @@ -316,7 +316,7 @@ export const GenesTable = () => { editor: relatedNotesEditor, }, { - field: 'dataProvider.sourceOrganization.abbreviation', + field: 'dataProvider.abbreviation', header: 'Data Provider', sortable: true, filterConfig: FILTER_CONFIGS.geneDataProviderFilterConfig, diff --git a/src/main/cliapp/src/containers/phenotypeAnnotationsPage/PhenotypeAnnotationsTable.js b/src/main/cliapp/src/containers/phenotypeAnnotationsPage/PhenotypeAnnotationsTable.js index 377768413..39d0e38c5 100644 --- a/src/main/cliapp/src/containers/phenotypeAnnotationsPage/PhenotypeAnnotationsTable.js +++ b/src/main/cliapp/src/containers/phenotypeAnnotationsPage/PhenotypeAnnotationsTable.js @@ -41,7 +41,10 @@ export const PhenotypeAnnotationsTable = () => { const sortMapping = { 'phenotypeAnnotationObject.name': ['phenotypeAnnotationObject.curie', 'phenotypeAnnotationObject.namespace'], - 'phenotypeAnnotationSubject.symbol': ['phenotypeAnnotationSubject.name', 'phenotypeAnnotationSubject.primaryExternalId'], + 'phenotypeAnnotationSubject.symbol': [ + 'phenotypeAnnotationSubject.name', + 'phenotypeAnnotationSubject.primaryExternalId', + ], 'sgdStrainBackground.name': ['sgdStrainBackground.primaryExternalId'], }; @@ -154,7 +157,7 @@ export const PhenotypeAnnotationsTable = () => { filterConfig: FILTER_CONFIGS.assertedAlleleFilterConfig, }, { - field: 'dataProvider.sourceOrganization.abbreviation', + field: 'dataProvider.abbreviation', header: 'Data Provider', sortable: true, filterConfig: FILTER_CONFIGS.phenotypeDataProviderFilterConfig, diff --git a/src/main/cliapp/src/containers/speciesPage/SpeciesTable.js b/src/main/cliapp/src/containers/speciesPage/SpeciesTable.js index 20f817cb8..d48b5d7d9 100644 --- a/src/main/cliapp/src/containers/speciesPage/SpeciesTable.js +++ b/src/main/cliapp/src/containers/speciesPage/SpeciesTable.js @@ -58,18 +58,12 @@ export const SpeciesTable = () => { filterConfig: FILTER_CONFIGS.speciesCommonNameFilterConfig, }, { - field: 'dataProvider.sourceOrganization.abbreviation', + field: 'dataProvider.abbreviation', header: 'Data Provider', sortable: true, filter: true, filterConfig: FILTER_CONFIGS.speciesDataProviderFilterConfig, }, - /*{ - field: "dataProvider.sourceOrganization.abbreviation", - header: "Data Provider Abbreviation", - sortable: true, - //filterConfig: FILTER_CONFIGS.geneDataProviderFilterConfig - },*/ { field: 'phylogeneticOrder', header: 'Phylogenetic Order', diff --git a/src/main/cliapp/src/containers/variantsPage/VariantsTable.js b/src/main/cliapp/src/containers/variantsPage/VariantsTable.js index 111a6ced5..fb719f5a8 100644 --- a/src/main/cliapp/src/containers/variantsPage/VariantsTable.js +++ b/src/main/cliapp/src/containers/variantsPage/VariantsTable.js @@ -235,10 +235,10 @@ export const VariantsTable = () => { body: (rowData) => , }, { - field: 'dataProvider.sourceOrganization.abbreviation', + field: 'dataProvider.abbreviation', header: 'Data Provider', sortable: true, - body: (rowData) => , + body: (rowData) => , filterConfig: FILTER_CONFIGS.variantDataProviderFilterConfig, }, { diff --git a/src/main/cliapp/src/service/TableStateService.js b/src/main/cliapp/src/service/TableStateService.js index 9d7529b70..3a0dbe74b 100644 --- a/src/main/cliapp/src/service/TableStateService.js +++ b/src/main/cliapp/src/service/TableStateService.js @@ -43,9 +43,9 @@ const modTableSettings = { ], filters: { dataProviderFilter: { - 'dataProvider.sourceOrganization.abbreviation': { queryString: 'RGD', tokenOperator: 'AND' }, - 'dataProvider.sourceOrganization.fullName': { queryString: 'RGD', tokenOperator: 'AND' }, - 'dataProvider.sourceOrganization.shortName': { queryString: 'RGD', tokenOperator: 'AND' }, + 'dataProvider.abbreviation': { queryString: 'RGD', tokenOperator: 'AND' }, + 'dataProvider.fullName': { queryString: 'RGD', tokenOperator: 'AND' }, + 'dataProvider.shortName': { queryString: 'RGD', tokenOperator: 'AND' }, }, obsoleteFilter: { obsolete: { queryString: 'false' }, @@ -92,9 +92,9 @@ const modTableSettings = { ], filters: { dataProviderFilter: { - 'dataProvider.sourceOrganization.abbreviation': { queryString: 'SGD', tokenOperator: 'AND' }, - 'dataProvider.sourceOrganization.fullName': { queryString: 'SGD', tokenOperator: 'AND' }, - 'dataProvider.sourceOrganization.shortName': { queryString: 'SGD', tokenOperator: 'AND' }, + 'dataProvider.abbreviation': { queryString: 'SGD', tokenOperator: 'AND' }, + 'dataProvider.fullName': { queryString: 'SGD', tokenOperator: 'AND' }, + 'dataProvider.shortName': { queryString: 'SGD', tokenOperator: 'AND' }, }, obsoleteFilter: { obsolete: { queryString: 'false' }, @@ -152,9 +152,9 @@ const modTableSettings = { ], filters: { dataProviderFilter: { - 'dataProvider.sourceOrganization.abbreviation': { queryString: 'WB', tokenOperator: 'AND' }, - 'dataProvider.sourceOrganization.fullName': { queryString: 'WB', tokenOperator: 'AND' }, - 'dataProvider.sourceOrganization.shortName': { queryString: 'WB', tokenOperator: 'AND' }, + 'dataProvider.abbreviation': { queryString: 'WB', tokenOperator: 'AND' }, + 'dataProvider.fullName': { queryString: 'WB', tokenOperator: 'AND' }, + 'dataProvider.shortName': { queryString: 'WB', tokenOperator: 'AND' }, }, obsoleteFilter: { obsolete: { queryString: 'false' }, @@ -205,9 +205,9 @@ const modTableSettings = { ], filters: { dataProviderFilter: { - 'dataProvider.sourceOrganization.abbreviation': { queryString: 'FB', tokenOperator: 'AND' }, - 'dataProvider.sourceOrganization.fullName': { queryString: 'FB', tokenOperator: 'AND' }, - 'dataProvider.sourceOrganization.shortName': { queryString: 'FB', tokenOperator: 'AND' }, + 'dataProvider.abbreviation': { queryString: 'FB', tokenOperator: 'AND' }, + 'dataProvider.fullName': { queryString: 'FB', tokenOperator: 'AND' }, + 'dataProvider.shortName': { queryString: 'FB', tokenOperator: 'AND' }, }, obsoleteFilter: { obsolete: { queryString: 'false' }, @@ -242,9 +242,9 @@ const modTableSettings = { selectedFormFields: ['Subject', 'Disease Relation', 'Disease', 'Reference', 'Evidence Code', 'Experiments'], filters: { dataProviderFilter: { - 'dataProvider.sourceOrganization.abbreviation': { queryString: 'ZFIN', tokenOperator: 'AND' }, - 'dataProvider.sourceOrganization.fullName': { queryString: 'ZFIN', tokenOperator: 'AND' }, - 'dataProvider.sourceOrganization.shortName': { queryString: 'ZFIN', tokenOperator: 'AND' }, + 'dataProvider.abbreviation': { queryString: 'ZFIN', tokenOperator: 'AND' }, + 'dataProvider.fullName': { queryString: 'ZFIN', tokenOperator: 'AND' }, + 'dataProvider.shortName': { queryString: 'ZFIN', tokenOperator: 'AND' }, }, obsoleteFilter: { obsolete: { queryString: 'false' }, @@ -285,9 +285,9 @@ const modTableSettings = { ], filters: { dataProviderFilter: { - 'dataProvider.sourceOrganization.abbreviation': { queryString: 'ZFIN', tokenOperator: 'AND' }, - 'dataProvider.sourceOrganization.fullName': { queryString: 'ZFIN', tokenOperator: 'AND' }, - 'dataProvider.sourceOrganization.shortName': { queryString: 'ZFIN', tokenOperator: 'AND' }, + 'dataProvider.abbreviation': { queryString: 'ZFIN', tokenOperator: 'AND' }, + 'dataProvider.fullName': { queryString: 'ZFIN', tokenOperator: 'AND' }, + 'dataProvider.shortName': { queryString: 'ZFIN', tokenOperator: 'AND' }, }, obsoleteFilter: { obsolete: { queryString: 'false' }, @@ -332,9 +332,9 @@ const modTableSettings = { ], filters: { dataProviderFilter: { - 'dataProvider.sourceOrganization.abbreviation': { queryString: 'MGI', tokenOperator: 'AND' }, - 'dataProvider.sourceOrganization.fullName': { queryString: 'MGI', tokenOperator: 'AND' }, - 'dataProvider.sourceOrganization.shortName': { queryString: 'MGI', tokenOperator: 'AND' }, + 'dataProvider.abbreviation': { queryString: 'MGI', tokenOperator: 'AND' }, + 'dataProvider.fullName': { queryString: 'MGI', tokenOperator: 'AND' }, + 'dataProvider.shortName': { queryString: 'MGI', tokenOperator: 'AND' }, }, obsoleteFilter: { obsolete: { queryString: 'false' }, diff --git a/src/main/java/org/alliancegenome/curation_api/constants/LinkMLSchemaConstants.java b/src/main/java/org/alliancegenome/curation_api/constants/LinkMLSchemaConstants.java index 92cb9891d..802dda389 100644 --- a/src/main/java/org/alliancegenome/curation_api/constants/LinkMLSchemaConstants.java +++ b/src/main/java/org/alliancegenome/curation_api/constants/LinkMLSchemaConstants.java @@ -5,7 +5,7 @@ public class LinkMLSchemaConstants { private LinkMLSchemaConstants() { // Hidden from view, as it is a utility class } - public static final String LATEST_RELEASE = "2.8.1"; + public static final String LATEST_RELEASE = "2.9.1"; public static final String MIN_ONTOLOGY_RELEASE = "1.2.4"; public static final String MAX_ONTOLOGY_RELEASE = LATEST_RELEASE; diff --git a/src/main/java/org/alliancegenome/curation_api/controllers/crud/DataProviderCrudController.java b/src/main/java/org/alliancegenome/curation_api/controllers/crud/DataProviderCrudController.java deleted file mode 100644 index 00b25012f..000000000 --- a/src/main/java/org/alliancegenome/curation_api/controllers/crud/DataProviderCrudController.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.alliancegenome.curation_api.controllers.crud; - -import jakarta.annotation.PostConstruct; -import jakarta.enterprise.context.RequestScoped; -import jakarta.inject.Inject; -import org.alliancegenome.curation_api.controllers.base.BaseEntityCrudController; -import org.alliancegenome.curation_api.dao.DataProviderDAO; -import org.alliancegenome.curation_api.interfaces.crud.DataProviderCrudInterface; -import org.alliancegenome.curation_api.model.entities.DataProvider; -import org.alliancegenome.curation_api.response.ObjectResponse; -import org.alliancegenome.curation_api.services.DataProviderService; - -@RequestScoped -public class DataProviderCrudController extends BaseEntityCrudController implements DataProviderCrudInterface { - - @Inject - DataProviderService dataProviderService; - - @Override - @PostConstruct - protected void init() { - setService(dataProviderService); - } - - @Override - public ObjectResponse update(DataProvider entity) { - return dataProviderService.upsert(entity); - } - - @Override - public ObjectResponse create(DataProvider entity) { - return dataProviderService.upsert(entity); - } - - public ObjectResponse validate(DataProvider entity) { - return dataProviderService.validate(entity); - } -} diff --git a/src/main/java/org/alliancegenome/curation_api/dao/DataProviderDAO.java b/src/main/java/org/alliancegenome/curation_api/dao/DataProviderDAO.java deleted file mode 100644 index bbef29e34..000000000 --- a/src/main/java/org/alliancegenome/curation_api/dao/DataProviderDAO.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.alliancegenome.curation_api.dao; - -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.inject.Inject; -import jakarta.transaction.Transactional; -import org.alliancegenome.curation_api.dao.base.BaseSQLDAO; -import org.alliancegenome.curation_api.model.entities.CrossReference; -import org.alliancegenome.curation_api.model.entities.DataProvider; -import org.alliancegenome.curation_api.model.entities.Organization; -import org.alliancegenome.curation_api.model.entities.ResourceDescriptorPage; -import org.alliancegenome.curation_api.model.input.Pagination; -import org.alliancegenome.curation_api.response.SearchResponse; - -import java.util.HashMap; -import java.util.List; - -@ApplicationScoped -public class DataProviderDAO extends BaseSQLDAO { - - @Inject - CrossReferenceDAO crossReferenceDAO; - - private HashMap dataProviderCache = new HashMap<>(); - - protected DataProviderDAO() { - super(DataProvider.class); - } - - @Transactional - public DataProvider getOrCreateDataProvider(Organization sourceOrganization) { - - if (dataProviderCache.containsKey(sourceOrganization.getAbbreviation())) { - return dataProviderCache.get(sourceOrganization.getAbbreviation()); - } - - HashMap params = new HashMap<>(); - params.put("sourceOrganization.abbreviation", sourceOrganization.getAbbreviation()); - params.put("crossReference.referencedCurie", sourceOrganization.getAbbreviation()); - - SearchResponse orgResponse = findByParams(params); - if (orgResponse != null && orgResponse.getSingleResult() != null) { - DataProvider member = orgResponse.getSingleResult(); - if (member.getSourceOrganization() != null && member.getCrossReference() != null) { - dataProviderCache.put(sourceOrganization.getAbbreviation(), member); - return member; - } - } else { - DataProvider dataProvider = new DataProvider(); - - dataProvider.setSourceOrganization(sourceOrganization); - - CrossReference xref = new CrossReference(); - xref.setDisplayName(sourceOrganization.getAbbreviation()); - xref.setReferencedCurie(sourceOrganization.getAbbreviation()); - xref.setResourceDescriptorPage(sourceOrganization.getHomepageResourceDescriptorPage()); - dataProvider.setCrossReference(crossReferenceDAO.persist(xref)); - - DataProvider dp = persist(dataProvider); - return dp; - } - - return null; - } - - public List getAllDataProvider(Organization sourceOrganization, ResourceDescriptorPage page) { - HashMap params = new HashMap<>(); - params.put("sourceOrganization.abbreviation", sourceOrganization.getAbbreviation()); - params.put("crossReference.resourceDescriptorPage.name", page.getName()); - Pagination pagination = new Pagination(); - pagination.setLimit(10_000_000); - SearchResponse orgResponse = findByParams(pagination, params); - return orgResponse.getResults(); - } -} diff --git a/src/main/java/org/alliancegenome/curation_api/interfaces/crud/DataProviderCrudInterface.java b/src/main/java/org/alliancegenome/curation_api/interfaces/crud/DataProviderCrudInterface.java deleted file mode 100644 index d02bf8305..000000000 --- a/src/main/java/org/alliancegenome/curation_api/interfaces/crud/DataProviderCrudInterface.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.alliancegenome.curation_api.interfaces.crud; - -import org.alliancegenome.curation_api.interfaces.base.BaseIdCrudInterface; -import org.alliancegenome.curation_api.model.entities.DataProvider; -import org.alliancegenome.curation_api.response.ObjectResponse; -import org.alliancegenome.curation_api.view.View; -import org.eclipse.microprofile.openapi.annotations.tags.Tag; - -import com.fasterxml.jackson.annotation.JsonView; - -import jakarta.ws.rs.Consumes; -import jakarta.ws.rs.POST; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.MediaType; - -@Path("/dataprovider") -@Tag(name = "CRUD - Data Providers") -@Produces(MediaType.APPLICATION_JSON) -@Consumes(MediaType.APPLICATION_JSON) -public interface DataProviderCrudInterface extends BaseIdCrudInterface { - - @POST - @Path("/validate") - @JsonView(View.FieldsOnly.class) - ObjectResponse validate(DataProvider entity); - -} - diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java index 81ba7abfd..548a3bb21 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java @@ -7,6 +7,8 @@ import org.alliancegenome.curation_api.model.entities.base.AuditedObject; import org.alliancegenome.curation_api.view.View; import org.eclipse.microprofile.openapi.annotations.media.Schema; +import org.hibernate.annotations.Fetch; +import org.hibernate.annotations.FetchMode; import org.hibernate.search.engine.backend.types.Aggregable; import org.hibernate.search.engine.backend.types.Searchable; import org.hibernate.search.engine.backend.types.Sortable; @@ -27,6 +29,7 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.MappedSuperclass; import jakarta.persistence.OneToMany; +import jakarta.persistence.OneToOne; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -36,7 +39,7 @@ @EqualsAndHashCode(onlyExplicitlyIncluded = true, callSuper = true) @ToString(callSuper = true) @Schema(name = "annotation", description = "POJO that represents an annotation") -@AGRCurationSchemaVersion(min = "1.9.0", max = LinkMLSchemaConstants.LATEST_RELEASE, dependencies = { AuditedObject.class }) +@AGRCurationSchemaVersion(min = "2.9.0", max = LinkMLSchemaConstants.LATEST_RELEASE, dependencies = { AuditedObject.class }) public class Annotation extends SingleReferenceAssociation { @FullTextField(analyzer = "autocompleteAnalyzer", searchAnalyzer = "autocompleteSearchAnalyzer") @@ -98,11 +101,21 @@ public class Annotation extends SingleReferenceAssociation { ) private List relatedNotes; - @IndexedEmbedded(includePaths = {"sourceOrganization.abbreviation", "sourceOrganization.fullName", "sourceOrganization.shortName", "crossReference.displayName", "crossReference.referencedCurie", - "sourceOrganization.abbreviation_keyword", "sourceOrganization.fullName_keyword", "sourceOrganization.shortName_keyword", "crossReference.displayName_keyword", "crossReference.referencedCurie_keyword"}) + @IndexedEmbedded(includePaths = { + "abbreviation", "fullName", "shortName", + "abbreviation_keyword", "fullName_keyword", "shortName_keyword" + }) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne - @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) - protected DataProvider dataProvider; + @Fetch(FetchMode.SELECT) + @JsonView({ View.FieldsOnly.class }) + protected Organization dataProvider; + + @IndexedEmbedded(includePaths = {"displayName", "referencedCurie", "displayName_keyword", "referencedCurie_keyword"}) + @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) + @OneToOne(orphanRemoval = true) + @Fetch(FetchMode.SELECT) + @JsonView({ View.FieldsOnly.class }) + private CrossReference dataProviderCrossReference; } diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/BiologicalEntity.java b/src/main/java/org/alliancegenome/curation_api/model/entities/BiologicalEntity.java index 96cf4bedc..2f89345f3 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/BiologicalEntity.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/BiologicalEntity.java @@ -54,7 +54,8 @@ @Index(name = "biologicalentity_updatedby_index", columnList = "updatedBy_id"), @Index(name = "biologicalentity_primaryExternalId_index", columnList = "primaryExternalId"), @Index(name = "biologicalentity_modinternalid_index", columnList = "modinternalid"), - @Index(name = "biologicalentity_dataprovider_index", columnList = "dataprovider_id") + @Index(name = "biologicalentity_dataprovider_index", columnList = "dataprovider_id"), + @Index(name = "biologicalentity_dataprovidercrossreference_index", columnList = "dataprovidercrossreference_id") }, uniqueConstraints = { @UniqueConstraint(name = "biologicalentity_curie_uk", columnNames = "curie"), diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Chromosome.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Chromosome.java index 721165d9f..ad2148496 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/Chromosome.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Chromosome.java @@ -21,6 +21,7 @@ import jakarta.persistence.Entity; import jakarta.persistence.Index; import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; import lombok.Data; @@ -37,6 +38,7 @@ @Index(name = "chromosome_taxon_index", columnList = "taxon_id"), @Index(name = "chromosome_name_index", columnList = "name"), @Index(name = "chromosome_dataprovider_index", columnList = "dataprovider_id"), + @Index(name = "chromosome_dataprovidercrossreference_index", columnList = "dataprovidercrossreference_id"), @Index(name = "chromosome_createdby_index", columnList = "createdby_id"), @Index(name = "chromosome_updatedby_index", columnList = "updatedby_id") }, @@ -53,14 +55,21 @@ public class Chromosome extends AuditedObject { private NCBITaxonTerm taxon; @IndexedEmbedded(includePaths = { - "sourceOrganization.abbreviation", "sourceOrganization.fullName", "sourceOrganization.shortName", "crossReference.displayName", "crossReference.referencedCurie", - "sourceOrganization.abbreviation_keyword", "sourceOrganization.fullName_keyword", "sourceOrganization.shortName_keyword", "crossReference.displayName_keyword", "crossReference.referencedCurie_keyword" + "abbreviation", "fullName", "shortName", + "abbreviation_keyword", "fullName_keyword", "shortName_keyword" }) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @Fetch(FetchMode.SELECT) @JsonView({ View.FieldsOnly.class }) - private DataProvider dataProvider; + private Organization dataProvider; + + @IndexedEmbedded(includePaths = {"displayName", "referencedCurie", "displayName_keyword", "referencedCurie_keyword"}) + @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) + @OneToOne(orphanRemoval = true) + @Fetch(FetchMode.SELECT) + @JsonView({ View.FieldsOnly.class }) + private CrossReference dataProviderCrossReference; @FullTextField(analyzer = "autocompleteAnalyzer", searchAnalyzer = "autocompleteSearchAnalyzer") @KeywordField(name = "name_keyword", aggregable = Aggregable.YES, sortable = Sortable.YES, searchable = Searchable.YES, normalizer = "sortNormalizer") diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/DataProvider.java b/src/main/java/org/alliancegenome/curation_api/model/entities/DataProvider.java deleted file mode 100644 index f257facaa..000000000 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/DataProvider.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.alliancegenome.curation_api.model.entities; - -import org.alliancegenome.curation_api.constants.LinkMLSchemaConstants; -import org.alliancegenome.curation_api.interfaces.AGRCurationSchemaVersion; -import org.alliancegenome.curation_api.model.entities.base.AuditedObject; -import org.alliancegenome.curation_api.view.View; -import org.eclipse.microprofile.openapi.annotations.media.Schema; -import org.hibernate.search.mapper.pojo.automaticindexing.ReindexOnUpdate; -import org.hibernate.search.mapper.pojo.mapping.definition.annotation.IndexedEmbedded; -import org.hibernate.search.mapper.pojo.mapping.definition.annotation.IndexingDependency; - -import com.fasterxml.jackson.annotation.JsonView; - -import jakarta.persistence.CascadeType; -import jakarta.persistence.Entity; -import jakarta.persistence.Index; -import jakarta.persistence.OneToOne; -import jakarta.persistence.Table; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -@Entity -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -@Schema(name = "DataProvider", description = "POJO that represents the data provider") -@AGRCurationSchemaVersion(min = "1.6.0", max = LinkMLSchemaConstants.LATEST_RELEASE, dependencies = { AuditedObject.class }) -@Table(indexes = { - @Index(name = "dataprovider_createdby_index", columnList = "createdBy_id"), - @Index(name = "dataprovider_updatedby_index", columnList = "updatedBy_id"), - @Index(name = "dataprovider_crossreference_index", columnList = "crossreference_id"), - @Index(name = "dataprovider_sourceorganization_index", columnList = "sourceorganization_id") -}) -public class DataProvider extends AuditedObject { - - @IndexedEmbedded(includeDepth = 1) - @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) - @OneToOne - @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) - private Organization sourceOrganization; - - @IndexedEmbedded(includeDepth = 1) - @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) - @OneToOne(cascade = CascadeType.ALL, orphanRemoval = true) - @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) - private CrossReference crossReference; - -} diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/DiseaseAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/DiseaseAnnotation.java index ae883cbfa..73938c3cd 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/DiseaseAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/DiseaseAnnotation.java @@ -1,13 +1,9 @@ package org.alliancegenome.curation_api.model.entities; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonSubTypes.Type; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonView; -import jakarta.persistence.*; -import lombok.Data; -import lombok.EqualsAndHashCode; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + import org.alliancegenome.curation_api.constants.LinkMLSchemaConstants; import org.alliancegenome.curation_api.interfaces.AGRCurationSchemaVersion; import org.alliancegenome.curation_api.model.bridges.BooleanValueBridge; @@ -16,6 +12,8 @@ import org.alliancegenome.curation_api.view.View; import org.apache.commons.collections4.CollectionUtils; import org.eclipse.microprofile.openapi.annotations.media.Schema; +import org.hibernate.annotations.Fetch; +import org.hibernate.annotations.FetchMode; import org.hibernate.search.engine.backend.types.Aggregable; import org.hibernate.search.engine.backend.types.Searchable; import org.hibernate.search.engine.backend.types.Sortable; @@ -26,9 +24,26 @@ import org.hibernate.search.mapper.pojo.mapping.definition.annotation.IndexingDependency; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.KeywordField; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonSubTypes.Type; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonView; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Index; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; +import jakarta.persistence.Transient; +import lombok.Data; +import lombok.EqualsAndHashCode; @Inheritance(strategy = InheritanceType.JOINED) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @@ -40,7 +55,7 @@ @Entity @Data @EqualsAndHashCode(onlyExplicitlyIncluded = true, callSuper = true) -@AGRCurationSchemaVersion(min = "2.8.0", max = LinkMLSchemaConstants.LATEST_RELEASE, dependencies = {Annotation.class}) +@AGRCurationSchemaVersion(min = "2.9.0", max = LinkMLSchemaConstants.LATEST_RELEASE, dependencies = {Annotation.class}) @Schema(name = "Disease_Annotation", description = "Annotation class representing a disease annotation") @Table(indexes = { @Index(name = "DiseaseAnnotation_internal_index", columnList = "internal"), @@ -55,11 +70,13 @@ @Index(name = "DiseaseAnnotation_updatedBy_index", columnList = "updatedBy_id"), @Index(name = "DiseaseAnnotation_singleReference_index", columnList = "singleReference_id"), @Index(name = "DiseaseAnnotation_dataProvider_index", columnList = "dataProvider_id"), + @Index(name = "DiseaseAnnotation_dataProviderCrossReference_index", columnList = "dataProviderCrossReference_id"), @Index(name = "DiseaseAnnotation_annotationType_index", columnList = "annotationType_id"), @Index(name = "DiseaseAnnotation_diseaseGeneticModifierRelation_index", columnList = "diseaseGeneticModifierRelation_id"), @Index(name = "DiseaseAnnotation_geneticSex_index", columnList = "geneticSex_id"), @Index(name = "DiseaseAnnotation_relation_index", columnList = "relation_id"), - @Index(name = "DiseaseAnnotation_secondaryDataProvider_index", columnList = "secondaryDataProvider_id") + @Index(name = "DiseaseAnnotation_secondaryDataProvider_index", columnList = "secondaryDataProvider_id"), + @Index(name = "DiseaseAnnotation_secondaryDataProviderCrossReference_index", columnList = "secondaryDataProviderCrossReference_id") }) public abstract class DiseaseAnnotation extends Annotation { @@ -144,12 +161,22 @@ public abstract class DiseaseAnnotation extends Annotation { @JsonView({View.FieldsOnly.class, View.ForPublic.class}) private VocabularyTerm geneticSex; - @IndexedEmbedded(includePaths = {"sourceOrganization.abbreviation", "sourceOrganization.fullName", "sourceOrganization.shortName", "crossReference.displayName", "crossReference.referencedCurie", - "sourceOrganization.abbreviation_keyword", "sourceOrganization.fullName_keyword", "sourceOrganization.shortName_keyword", "crossReference.displayName_keyword", "crossReference.referencedCurie_keyword"}) + @IndexedEmbedded(includePaths = { + "abbreviation", "fullName", "shortName", + "abbreviation_keyword", "fullName_keyword", "shortName_keyword" + }) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne - @JsonView({View.FieldsOnly.class, View.ForPublic.class}) - private DataProvider secondaryDataProvider; + @Fetch(FetchMode.SELECT) + @JsonView({ View.FieldsOnly.class }) + private Organization secondaryDataProvider; + + @IndexedEmbedded(includePaths = {"displayName", "referencedCurie", "displayName_keyword", "referencedCurie_keyword"}) + @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) + @OneToOne(orphanRemoval = true) + @Fetch(FetchMode.SELECT) + @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) + private CrossReference secondaryDataProviderCrossReference; @IndexedEmbedded(includePaths = { "curie", "primaryExternalId", "modInternalId", "curie_keyword", "primaryExternalId_keyword", "modInternalId_keyword", @@ -244,10 +271,10 @@ public List getDiseaseGeneticModifiers() { @Transient @JsonIgnore public String getDataProviderString() { - StringBuilder builder = new StringBuilder(dataProvider.getSourceOrganization().getAbbreviation()); + StringBuilder builder = new StringBuilder(dataProvider.getAbbreviation()); if (secondaryDataProvider != null) { builder.append(" via "); - builder.append(secondaryDataProvider.getSourceOrganization().getAbbreviation()); + builder.append(secondaryDataProvider.getAbbreviation()); } return builder.toString(); } diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/ExpressionAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/ExpressionAnnotation.java index 0700dd185..b9c2200d0 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/ExpressionAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/ExpressionAnnotation.java @@ -59,6 +59,6 @@ public abstract class ExpressionAnnotation extends Annotation { @Transient @JsonIgnore public String getDataProviderString() { - return dataProvider.getSourceOrganization().getAbbreviation(); + return dataProvider.getAbbreviation(); } } diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionAnnotation.java index 5c1dc57db..0f6d87607 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionAnnotation.java @@ -39,6 +39,7 @@ @Index(name = "GeneExpressionAnnotation_updatedBy_index", columnList = "updatedBy_id"), @Index(name = "GeneExpressionAnnotation_singleReference_index", columnList = "singleReference_id"), @Index(name = "GeneExpressionAnnotation_dataProvider_index", columnList = "dataProvider_id"), + @Index(name = "GeneExpressionAnnotation_dataProviderCrossReference_index", columnList = "dataProviderCrossReference_id"), @Index(name = "GeneExpressionAnnotation_expressionPattern_index", columnList = "expressionPattern_id"), @Index(name = "GeneExpressionAnnotation_relation_index", columnList = "relation_id"), @Index(name = "GeneExpressionAnnotation_expressionAnnotationSubject_index", columnList = "expressionAnnotationSubject_id"), diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionExperiment.java b/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionExperiment.java index 3d340b6cd..f8c65d3ba 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionExperiment.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/GeneExpressionExperiment.java @@ -23,6 +23,7 @@ @Index(name = "geneexpressionexperiment_entityassayedused_index", columnList = "entityassayed_id"), @Index(name = "geneexpressionexperiment_expressionassayused_index", columnList = "expressionassayused_id"), @Index(name = "geneexpressionexperiment_dataprovider_index", columnList = "dataprovider_id"), + @Index(name = "geneexpressionexperiment_dataprovidercrossreference_index", columnList = "dataprovidercrossreference_id"), @Index(name = "geneexpressionexperiment_internal_index", columnList = "internal"), @Index(name = "geneexpressionexperiment_obsolete_index", columnList = "obsolete"), @Index(name = "geneexpressionexperiment_createdby_index", columnList = "createdby_id"), diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetAnnotation.java index c0956e3ed..a897f17c2 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetAnnotation.java @@ -24,7 +24,14 @@ import com.fasterxml.jackson.annotation.JsonView; -import jakarta.persistence.*; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.Index; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; @@ -34,11 +41,12 @@ @EqualsAndHashCode(onlyExplicitlyIncluded = true, callSuper = true) @ToString(callSuper = true) @Schema(name = "HTPExpressionDatasetAnnotation", description = "POJO that represents the HighThroughputExpressionDatasetAnnotation") -@AGRCurationSchemaVersion(min = "2.6.2", max = LinkMLSchemaConstants.LATEST_RELEASE, dependencies = { AuditedObject.class }) +@AGRCurationSchemaVersion(min = "2.9.0", max = LinkMLSchemaConstants.LATEST_RELEASE, dependencies = { AuditedObject.class }) @Table(indexes = { @Index(name = "htpdatasetannotation_htpExpressionDataset_index", columnList = "htpExpressionDataset_id"), @Index(name = "htpdatasetannotation_relatednote_index", columnList = "relatednote_id"), @Index(name = "htpdatasetannotation_dataprovider_index", columnList = "dataprovider_id"), + @Index(name = "htpdatasetannotation_dataprovidercrossreference_index", columnList = "dataprovidercrossreference_id"), @Index(name = "htpdatasetannotation_createdby_index", columnList = "createdby_id"), @Index(name = "htpdatasetannotation_updatedby_index", columnList = "updatedby_id") }) @@ -96,12 +104,20 @@ public class HTPExpressionDatasetAnnotation extends AuditedObject { List categoryTags; @IndexedEmbedded(includePaths = { - "sourceOrganization.abbreviation", "sourceOrganization.fullName", "sourceOrganization.shortName", "crossReference.displayName", "crossReference.referencedCurie", - "sourceOrganization.abbreviation_keyword", "sourceOrganization.fullName_keyword", "sourceOrganization.shortName_keyword", "crossReference.displayName_keyword", "crossReference.referencedCurie_keyword" + "abbreviation", "fullName", "shortName", + "abbreviation_keyword", "fullName_keyword", "shortName_keyword" }) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne + @Fetch(FetchMode.SELECT) @JsonView({ View.FieldsOnly.class }) - DataProvider dataProvider; + protected Organization dataProvider; + + @IndexedEmbedded(includePaths = {"displayName", "referencedCurie", "displayName_keyword", "referencedCurie_keyword"}) + @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) + @OneToOne(orphanRemoval = true) + @Fetch(FetchMode.SELECT) + @JsonView({ View.FieldsOnly.class }) + private CrossReference dataProviderCrossReference; } \ No newline at end of file diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetSampleAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetSampleAnnotation.java index 25e663f00..1924f78b4 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetSampleAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetSampleAnnotation.java @@ -34,7 +34,7 @@ @EqualsAndHashCode(onlyExplicitlyIncluded = true, callSuper = true) @ToString(callSuper = true) @Schema(name = "HTPExpressionDatasetSampleAnnotation", description = "POJO that represents the HighThroughputExpressionDatasetSampleAnnotation") -@AGRCurationSchemaVersion(min = "2.7.0", max = LinkMLSchemaConstants.LATEST_RELEASE, dependencies = { AuditedObject.class }) +@AGRCurationSchemaVersion(min = "2.9.0", max = LinkMLSchemaConstants.LATEST_RELEASE, dependencies = { AuditedObject.class }) @Table(indexes = { @Index(name = "htpdatasample_htpExpressionSample_index", columnList = "htpExpressionSample_id"), @Index(name = "htpdatasample_htpExpressionSampleType_index", columnList = "htpExpressionSampleType_id"), @@ -46,6 +46,7 @@ @Index(name = "htpdatasample_sequencingFormat_index", columnList = "sequencingFormat_id"), @Index(name = "htpdatasample_taxon_index", columnList = "taxon_id"), @Index(name = "htpdatasample_dataprovider_index", columnList = "dataprovider_id"), + @Index(name = "htpdatasample_dataprovidercrossreference_index", columnList = "dataprovidercrossreference_id"), @Index(name = "htpdatasample_createdby_index", columnList = "createdby_id"), @Index(name = "htpdatasample_updatedby_index", columnList = "updatedby_id") }) @@ -94,13 +95,21 @@ public class HTPExpressionDatasetSampleAnnotation extends AuditedObject { private MicroarraySampleDetails microarraySampleDetails; @IndexedEmbedded(includePaths = { - "sourceOrganization.abbreviation", "sourceOrganization.fullName", "sourceOrganization.shortName", "crossReference.displayName", "crossReference.referencedCurie", - "sourceOrganization.abbreviation_keyword", "sourceOrganization.fullName_keyword", "sourceOrganization.shortName_keyword", "crossReference.displayName_keyword", "crossReference.referencedCurie_keyword" + "abbreviation", "fullName", "shortName", + "abbreviation_keyword", "fullName_keyword", "shortName_keyword" }) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne + @Fetch(FetchMode.SELECT) @JsonView({ View.FieldsOnly.class }) - DataProvider dataProvider; + protected Organization dataProvider; + + @IndexedEmbedded(includePaths = {"displayName", "referencedCurie", "displayName_keyword", "referencedCurie_keyword"}) + @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) + @OneToOne(orphanRemoval = true) + @Fetch(FetchMode.SELECT) + @JsonView({ View.FieldsOnly.class }) + private CrossReference dataProviderCrossReference; @IndexedEmbedded(includePaths = {"name", "name_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/PhenotypeAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/PhenotypeAnnotation.java index c3df7e2a4..02d45677d 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/PhenotypeAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/PhenotypeAnnotation.java @@ -57,6 +57,7 @@ @Index(name = "PhenotypeAnnotation_updatedBy_index", columnList = "updatedBy_id"), @Index(name = "PhenotypeAnnotation_singleReference_index", columnList = "singleReference_id"), @Index(name = "PhenotypeAnnotation_dataProvider_index", columnList = "dataProvider_id"), + @Index(name = "PhenotypeAnnotation_dataProviderCrossReference_index", columnList = "dataProviderCrossReference_id"), @Index(name = "PhenotypeAnnotation_crossReference_index", columnList = "crossReference_id"), @Index(name = "PhenotypeAnnotation_relation_index", columnList = "relation_id") }) @@ -105,6 +106,6 @@ public abstract class PhenotypeAnnotation extends Annotation { @Transient @JsonIgnore public String getDataProviderString() { - return dataProvider.getSourceOrganization().getAbbreviation(); + return dataProvider.getAbbreviation(); } } diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Reagent.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Reagent.java index 06fba36c9..ba729780e 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/Reagent.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Reagent.java @@ -41,6 +41,7 @@ @Table(indexes = { @Index(name = "reagent_uniqueid_index", columnList = "uniqueid"), @Index(name = "reagent_dataprovider_index", columnList = "dataprovider_id"), + @Index(name = "reagent_dataprovidercrossreference_index", columnList = "dataprovidercrossreference_id"), @Index(name = "reagent_curie_index", columnList = "curie"), @Index(name = "reagent_primaryexternalid_index", columnList = "primaryexternalid"), @Index(name = "reagent_modinternalid_index", columnList = "modinternalid"), diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Species.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Species.java index 065853fc4..7a233b619 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/Species.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Species.java @@ -42,7 +42,9 @@ @ToString(callSuper = true) @Table(indexes = { @Index(name = "species_createdby_index", columnList = "createdBy_id"), - @Index(name = "species_updatedby_index", columnList = "updatedBy_id") + @Index(name = "species_updatedby_index", columnList = "updatedBy_id"), + @Index(name = "species_dataprovider_index", columnList = "dataProvider_id"), + @Index(name = "species_dataprovidercrossreference_index", columnList = "dataProviderCrossReference_id") }) @AGRCurationSchemaVersion(min = "2.0.0", max = LinkMLSchemaConstants.LATEST_RELEASE, dependencies = { AuditedObject.class }) public class Species extends AuditedObject { @@ -76,11 +78,22 @@ public class Species extends AuditedObject { @JoinTable(indexes = @Index(name = "species_commonnames_species_id_index", columnList = "species_id")) private List commonNames; - @IndexedEmbedded(includeDepth = 2) + @IndexedEmbedded(includePaths = { + "abbreviation", "fullName", "shortName", + "abbreviation_keyword", "fullName_keyword", "shortName_keyword" + }) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) - @OneToOne + @ManyToOne + @Fetch(FetchMode.SELECT) + @JsonView({ View.FieldsOnly.class }) + protected Organization dataProvider; + + @IndexedEmbedded(includePaths = {"displayName", "referencedCurie", "displayName_keyword", "referencedCurie_keyword"}) + @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) + @OneToOne(orphanRemoval = true) + @Fetch(FetchMode.SELECT) @JsonView({ View.FieldsOnly.class }) - private DataProvider dataProvider; + private CrossReference dataProviderCrossReference; @GenericField(aggregable = Aggregable.YES, sortable = Sortable.YES, searchable = Searchable.YES) @JsonView(View.FieldsOnly.class) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/agmAssociations/AgmSequenceTargetingReagentAssociation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/agmAssociations/AgmSequenceTargetingReagentAssociation.java index 8ee4731dd..15b071f7c 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/associations/agmAssociations/AgmSequenceTargetingReagentAssociation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/associations/agmAssociations/AgmSequenceTargetingReagentAssociation.java @@ -46,7 +46,7 @@ public class AgmSequenceTargetingReagentAssociation extends Association { @IndexedEmbedded(includePaths = { "curie", "name", "curie_keyword", "name_keyword", - "modEntityId", "modEntityId_keyword", "modInternalId", "modInternalId_keyword" }) + "primaryExternalId", "perimaryExternalId_keyword", "modInternalId", "modInternalId_keyword" }) @ManyToOne @JsonView({ View.FieldsOnly.class }) @JsonIgnoreProperties({"agmSequenceTargetingReagentAssociations", "constructGenomicEntityAssociations"}) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/base/SubmittedObject.java b/src/main/java/org/alliancegenome/curation_api/model/entities/base/SubmittedObject.java index dc44d71ae..9215305c1 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/base/SubmittedObject.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/base/SubmittedObject.java @@ -2,7 +2,8 @@ import org.alliancegenome.curation_api.constants.LinkMLSchemaConstants; import org.alliancegenome.curation_api.interfaces.AGRCurationSchemaVersion; -import org.alliancegenome.curation_api.model.entities.DataProvider; +import org.alliancegenome.curation_api.model.entities.CrossReference; +import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.view.View; import org.apache.commons.lang3.StringUtils; import org.eclipse.microprofile.openapi.annotations.media.Schema; @@ -22,6 +23,7 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.MappedSuperclass; +import jakarta.persistence.OneToOne; import jakarta.persistence.Transient; import lombok.Data; import lombok.EqualsAndHashCode; @@ -31,7 +33,7 @@ @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -@AGRCurationSchemaVersion(min = "2.0.0", max = LinkMLSchemaConstants.LATEST_RELEASE, dependencies = { CurieObject.class }) +@AGRCurationSchemaVersion(min = "2.9.0", max = LinkMLSchemaConstants.LATEST_RELEASE, dependencies = { CurieObject.class }) @Schema(name = "SubmittedObject", description = "POJO that represents the SubmittedObject") public class SubmittedObject extends CurieObject { @@ -46,14 +48,21 @@ public class SubmittedObject extends CurieObject { private String modInternalId; @IndexedEmbedded(includePaths = { - "sourceOrganization.abbreviation", "sourceOrganization.fullName", "sourceOrganization.shortName", "crossReference.displayName", "crossReference.referencedCurie", - "sourceOrganization.abbreviation_keyword", "sourceOrganization.fullName_keyword", "sourceOrganization.shortName_keyword", "crossReference.displayName_keyword", "crossReference.referencedCurie_keyword" + "abbreviation", "fullName", "shortName", + "abbreviation_keyword", "fullName_keyword", "shortName_keyword" }) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @Fetch(FetchMode.SELECT) @JsonView({ View.FieldsOnly.class }) - private DataProvider dataProvider; + private Organization dataProvider; + + @IndexedEmbedded(includePaths = {"displayName", "referencedCurie", "displayName_keyword", "referencedCurie_keyword"}) + @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) + @OneToOne(orphanRemoval = true) + @Fetch(FetchMode.SELECT) + @JsonView({ View.FieldsOnly.class }) + private CrossReference dataProviderCrossReference; @Transient @JsonIgnore diff --git a/src/main/java/org/alliancegenome/curation_api/services/AssemblyComponentService.java b/src/main/java/org/alliancegenome/curation_api/services/AssemblyComponentService.java index 0956adfc0..074938113 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/AssemblyComponentService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/AssemblyComponentService.java @@ -29,7 +29,7 @@ public class AssemblyComponentService extends BaseEntityCrudService assemblyComponentCacheMap = new HashMap<>(); @@ -79,7 +79,7 @@ private AssemblyComponent findAssemblyComponentOrCreateDB(String name, String as GenomeAssembly genomeAssembly = genomeAssemblyService.getOrCreate(assemblyId, dataProvider); assemblyComponent.setGenomeAssembly(genomeAssembly); assemblyComponent.setTaxon(ncbiTaxonTermService.getByCurie(taxonCurie).getEntity()); - assemblyComponent.setDataProvider(dataProviderService.getDefaultDataProvider(dataProvider.sourceOrganization)); + assemblyComponent.setDataProvider(organizationService.getByAbbr(dataProvider.sourceOrganization).getEntity()); String primaryExternalId = ChromosomeAccessionEnum.getChromosomeAccession(name, assemblyId); assemblyComponent.setPrimaryExternalId(primaryExternalId); return assemblyComponentDAO.persist(assemblyComponent); diff --git a/src/main/java/org/alliancegenome/curation_api/services/DataProviderService.java b/src/main/java/org/alliancegenome/curation_api/services/DataProviderService.java deleted file mode 100644 index e29933a36..000000000 --- a/src/main/java/org/alliancegenome/curation_api/services/DataProviderService.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.alliancegenome.curation_api.services; - -import org.alliancegenome.curation_api.auth.AuthenticatedUser; -import org.alliancegenome.curation_api.dao.CrossReferenceDAO; -import org.alliancegenome.curation_api.dao.DataProviderDAO; -import org.alliancegenome.curation_api.dao.GeneDAO; -import org.alliancegenome.curation_api.dao.OrganizationDAO; -import org.alliancegenome.curation_api.dao.SpeciesDAO; -import org.alliancegenome.curation_api.model.entities.AllianceMember; -import org.alliancegenome.curation_api.model.entities.DataProvider; -import org.alliancegenome.curation_api.model.entities.Person; -import org.alliancegenome.curation_api.response.ObjectResponse; -import org.alliancegenome.curation_api.services.base.BaseEntityCrudService; -import org.alliancegenome.curation_api.services.validation.DataProviderValidator; - -import jakarta.annotation.PostConstruct; -import jakarta.enterprise.context.RequestScoped; -import jakarta.inject.Inject; -import jakarta.transaction.Transactional; - -@RequestScoped -public class DataProviderService extends BaseEntityCrudService { - - @Inject - @AuthenticatedUser - protected Person authenticatedPerson; - @Inject - SpeciesDAO speciesDAO; - @Inject - DataProviderDAO dataProviderDAO; - @Inject - CrossReferenceDAO crossReferenceDAO; - @Inject - ResourceDescriptorPageService resourceDescriptorPageService; - @Inject - OrganizationDAO organizationDAO; - @Inject - GeneDAO geneDAO; - @Inject - DataProviderValidator dataProviderValidator; - - @Override - @PostConstruct - protected void init() { - setSQLDao(dataProviderDAO); - } - - @Transactional - public DataProvider createAffiliatedModDataProvider() { - AllianceMember member = authenticatedPerson.getAllianceMember(); - if (member == null) { - return getAllianceDataProvider(); - } else { - return dataProviderDAO.getOrCreateDataProvider(member); - } - } - - public DataProvider getAllianceDataProvider() { - return getDefaultDataProvider("Alliance"); - } - - @Transactional - public DataProvider getDefaultDataProvider(String sourceOrganizationAbbreviation) { - return dataProviderDAO.getOrCreateDataProvider(organizationDAO.getOrCreateOrganization(sourceOrganizationAbbreviation)); - } - - @Transactional - public ObjectResponse upsert(DataProvider uiEntity) { - ObjectResponse response = dataProviderValidator.validateDataProvider(uiEntity, null, true); - if (response.getEntity() == null) { - return response; - } - return new ObjectResponse<>(response.getEntity()); - } - - public ObjectResponse validate(DataProvider uiEntity) { - return dataProviderValidator.validateDataProvider(uiEntity, null, true); - } - - -} diff --git a/src/main/java/org/alliancegenome/curation_api/services/GeneExpressionExperimentService.java b/src/main/java/org/alliancegenome/curation_api/services/GeneExpressionExperimentService.java index 4d1a8514f..786580276 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/GeneExpressionExperimentService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/GeneExpressionExperimentService.java @@ -1,10 +1,11 @@ package org.alliancegenome.curation_api.services; -import jakarta.annotation.PostConstruct; -import jakarta.enterprise.context.RequestScoped; -import jakarta.inject.Inject; -import jakarta.transaction.Transactional; -import lombok.extern.jbosslog.JBossLog; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + import org.alliancegenome.curation_api.constants.EntityFieldConstants; import org.alliancegenome.curation_api.dao.GeneExpressionAnnotationDAO; import org.alliancegenome.curation_api.dao.GeneExpressionExperimentDAO; @@ -17,9 +18,11 @@ import org.alliancegenome.curation_api.services.ontology.MmoTermService; import org.apache.commons.lang.StringUtils; -import java.util.*; +import jakarta.annotation.PostConstruct; +import jakarta.enterprise.context.RequestScoped; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; -@JBossLog @RequestScoped public class GeneExpressionExperimentService extends BaseEntityCrudService { @@ -28,7 +31,7 @@ public class GeneExpressionExperimentService extends BaseEntityCrudService geneExpr geneExpressionExperiment = new GeneExpressionExperiment(); geneExpressionExperiment.setUniqueId(experimentId); } - geneExpressionExperiment.setDataProvider(dataProviderService.getDefaultDataProvider(dataProvider.sourceOrganization)); + geneExpressionExperiment.setDataProvider(organizationService.getByAbbr(dataProvider.sourceOrganization).getEntity()); geneExpressionExperiment.setEntityAssayed(geneService.findByIdentifierString(geneId)); geneExpressionExperiment.setSingleReference(referenceService.getByCurie(referenceId).getEntity()); geneExpressionExperiment.setExpressionAssayUsed(mmoTermService.findByCurie(assayId)); diff --git a/src/main/java/org/alliancegenome/curation_api/services/GeneOntologyAnnotationService.java b/src/main/java/org/alliancegenome/curation_api/services/GeneOntologyAnnotationService.java index 2c7575e7f..32936a5c5 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/GeneOntologyAnnotationService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/GeneOntologyAnnotationService.java @@ -14,7 +14,6 @@ import org.alliancegenome.curation_api.model.ingest.dto.GeneOntologyAnnotationDTO; import org.alliancegenome.curation_api.response.ObjectResponse; import org.alliancegenome.curation_api.services.base.BaseEntityCrudService; -import org.alliancegenome.curation_api.services.validation.DataProviderValidator; import org.apache.commons.collections.CollectionUtils; import java.util.ArrayList; @@ -28,10 +27,8 @@ public class GeneOntologyAnnotationService extends BaseEntityCrudService species; public static final String RESOURCE_DESCRIPTOR_PREFIX = "ENSEMBL"; public static final String RESOURCE_DESCRIPTOR_PAGE_NAME = "default"; - // Map accessionGeneMap = new HashMap<>(); Map goTermMap = new HashMap<>(); - HashMap dataProviderMap = new HashMap<>(); private Map gafMap = new HashMap<>(); @@ -46,8 +43,6 @@ public class GeneOntologyAnnotationService extends BaseEntityCrudService validate(DataProvider uiEntity) { - return dataProviderValidator.validateDataProvider(uiEntity, null, true); - } - public Map getGafMap(Organization organization) { if (gafMap.size() > 0) { diff --git a/src/main/java/org/alliancegenome/curation_api/services/GeneService.java b/src/main/java/org/alliancegenome/curation_api/services/GeneService.java index 5476c1bba..14d47eb99 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/GeneService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/GeneService.java @@ -146,12 +146,12 @@ public void addBiogridXref(String entrezId, BackendBulkDataProvider dataProvider if (searchResponse != null) { // Need to check that returned gene belongs to MOD corresponding to taxon for (Gene searchResult : searchResponse.getResults()) { - String resultDataProviderCoreGenus = BackendBulkDataProvider.getCoreGenus(searchResult.getDataProvider().getSourceOrganization().getAbbreviation()); + String resultDataProviderCoreGenus = BackendBulkDataProvider.getCoreGenus(searchResult.getDataProvider().getAbbreviation()); if (taxon.getName().startsWith(resultDataProviderCoreGenus + " ")) { allianceGene = searchResult; break; } - if (StringUtils.equals(taxon.getCurie(), "NCBITaxon:9606") && StringUtils.equals(searchResult.getDataProvider().getSourceOrganization().getAbbreviation(), "RGD")) { + if (StringUtils.equals(taxon.getCurie(), "NCBITaxon:9606") && StringUtils.equals(searchResult.getDataProvider().getAbbreviation(), "RGD")) { allianceGene = searchResult; break; } @@ -181,12 +181,12 @@ public void addGeoXref(String entrezId, BackendBulkDataProvider dataProvider) th if (searchResponse != null) { // Need to check that returned gene belongs to MOD corresponding to taxon for (Gene searchResult : searchResponse.getResults()) { - String resultDataProviderCoreGenus = BackendBulkDataProvider.getCoreGenus(searchResult.getDataProvider().getSourceOrganization().getAbbreviation()); + String resultDataProviderCoreGenus = BackendBulkDataProvider.getCoreGenus(searchResult.getDataProvider().getAbbreviation()); if (taxon.getName().startsWith(resultDataProviderCoreGenus + " ")) { allianceGene = searchResult; break; } - if (StringUtils.equals(taxon.getCurie(), "NCBITaxon:9606") && StringUtils.equals(searchResult.getDataProvider().getSourceOrganization().getAbbreviation(), "RGD")) { + if (StringUtils.equals(taxon.getCurie(), "NCBITaxon:9606") && StringUtils.equals(searchResult.getDataProvider().getAbbreviation(), "RGD")) { allianceGene = searchResult; break; } @@ -242,12 +242,12 @@ public void addExpressionAtlasXref(String identifier, BackendBulkDataProvider da if (searchResponse != null) { // Need to check that returned gene belongs to MOD corresponding to taxon for (Gene searchResult : searchResponse.getResults()) { - String resultDataProviderCoreGenus = BackendBulkDataProvider.getCoreGenus(searchResult.getDataProvider().getSourceOrganization().getAbbreviation()); + String resultDataProviderCoreGenus = BackendBulkDataProvider.getCoreGenus(searchResult.getDataProvider().getAbbreviation()); if (taxon.getName().startsWith(resultDataProviderCoreGenus + " ")) { allianceGene = searchResult; break; } - if (StringUtils.equals(taxon.getCurie(), "NCBITaxon:9606") && StringUtils.equals(searchResult.getDataProvider().getSourceOrganization().getAbbreviation(), "RGD")) { + if (StringUtils.equals(taxon.getCurie(), "NCBITaxon:9606") && StringUtils.equals(searchResult.getDataProvider().getAbbreviation(), "RGD")) { allianceGene = searchResult; break; } diff --git a/src/main/java/org/alliancegenome/curation_api/services/GenomeAssemblyService.java b/src/main/java/org/alliancegenome/curation_api/services/GenomeAssemblyService.java index 6047a4967..d073d98ea 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/GenomeAssemblyService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/GenomeAssemblyService.java @@ -22,7 +22,7 @@ public class GenomeAssemblyService extends BaseEntityCrudService { @Inject GenomeAssemblyDAO genomeAssemblyDAO; - @Inject DataProviderService dataProviderService; + @Inject OrganizationService organizationService; @Inject NcbiTaxonTermService ncbiTaxonTermService; @Override @@ -43,7 +43,7 @@ public GenomeAssembly getOrCreate(String assemblyName, BackendBulkDataProvider d if (resp == null || resp.getSingleResult() == null) { GenomeAssembly assembly = new GenomeAssembly(); assembly.setPrimaryExternalId(assemblyName); - assembly.setDataProvider(dataProviderService.getDefaultDataProvider(dataProvider.sourceOrganization)); + assembly.setDataProvider(organizationService.getByAbbr(dataProvider.sourceOrganization).getEntity()); assembly.setTaxon(ncbiTaxonTermService.getByCurie(dataProvider.canonicalTaxonCurie).getEntity()); return genomeAssemblyDAO.persist(assembly); diff --git a/src/main/java/org/alliancegenome/curation_api/services/Gff3Service.java b/src/main/java/org/alliancegenome/curation_api/services/Gff3Service.java index 53992dc80..d39060411 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/Gff3Service.java +++ b/src/main/java/org/alliancegenome/curation_api/services/Gff3Service.java @@ -59,7 +59,6 @@ public class Gff3Service { @Inject TranscriptGeneAssociationService transcriptGeneService; @Inject TranscriptCodingSequenceAssociationService transcriptCdsService; @Inject TranscriptExonAssociationService transcriptExonService; - @Inject DataProviderService dataProviderService; @Inject NcbiTaxonTermService ncbiTaxonTermService; @Inject Gff3DtoValidator gff3DtoValidator; @Inject GeneService geneService; diff --git a/src/main/java/org/alliancegenome/curation_api/services/OrganizationService.java b/src/main/java/org/alliancegenome/curation_api/services/OrganizationService.java index 672c720e9..ec13927fc 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/OrganizationService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/OrganizationService.java @@ -1,21 +1,28 @@ package org.alliancegenome.curation_api.services; -import io.quarkus.logging.Log; -import jakarta.annotation.PostConstruct; -import jakarta.enterprise.context.RequestScoped; -import jakarta.inject.Inject; +import java.util.Date; +import java.util.HashMap; + +import org.alliancegenome.curation_api.auth.AuthenticatedUser; import org.alliancegenome.curation_api.dao.OrganizationDAO; +import org.alliancegenome.curation_api.model.entities.AllianceMember; import org.alliancegenome.curation_api.model.entities.Organization; +import org.alliancegenome.curation_api.model.entities.Person; import org.alliancegenome.curation_api.response.ObjectResponse; import org.alliancegenome.curation_api.response.SearchResponse; import org.alliancegenome.curation_api.services.base.BaseEntityCrudService; -import java.util.Date; -import java.util.HashMap; +import io.quarkus.logging.Log; +import jakarta.annotation.PostConstruct; +import jakarta.enterprise.context.RequestScoped; +import jakarta.inject.Inject; @RequestScoped public class OrganizationService extends BaseEntityCrudService { + @Inject + @AuthenticatedUser + protected Person authenticatedPerson; @Inject OrganizationDAO organizationDAO; @@ -79,5 +86,14 @@ public ObjectResponse getByAbbr(String abbr) { response.setEntity(org); return response; } + + public Organization getAffiliatedModDataProvider() { + AllianceMember member = authenticatedPerson.getAllianceMember(); + if (member != null) { + return member; + } + + return organizationDAO.getOrCreateOrganization("Alliance"); + } } diff --git a/src/main/java/org/alliancegenome/curation_api/services/helpers/annotations/AnnotationUniqueIdHelper.java b/src/main/java/org/alliancegenome/curation_api/services/helpers/annotations/AnnotationUniqueIdHelper.java index 55482f8c5..f589f6357 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/helpers/annotations/AnnotationUniqueIdHelper.java +++ b/src/main/java/org/alliancegenome/curation_api/services/helpers/annotations/AnnotationUniqueIdHelper.java @@ -116,8 +116,12 @@ public static String getDiseaseAnnotationUniqueId(DiseaseAnnotation annotation) if (CollectionUtils.isNotEmpty(annotation.getConditionRelations())) { uniqueId.addList(annotation.getConditionRelations().stream().map(condition -> { UniqueIdGeneratorHelper gen = new UniqueIdGeneratorHelper(); - gen.add(condition.getConditionRelationType().getName()); - gen.add(condition.getConditions().stream().map(AnnotationUniqueIdHelper::getExperimentalConditionUniqueId).collect(Collectors.joining(DELIMITER))); + if (condition.getConditionRelationType() != null) { + gen.add(condition.getConditionRelationType().getName()); + } + if (CollectionUtils.isNotEmpty(condition.getConditions())) { + gen.add(condition.getConditions().stream().map(AnnotationUniqueIdHelper::getExperimentalConditionUniqueId).collect(Collectors.joining(DELIMITER))); + } return gen.getUniqueId(); }).collect(Collectors.toList())); } diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/AnnotationValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/AnnotationValidator.java index 0fec62daa..010ec06a6 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/AnnotationValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/AnnotationValidator.java @@ -11,19 +11,22 @@ import org.alliancegenome.curation_api.constants.ValidationConstants; import org.alliancegenome.curation_api.dao.AnnotationDAO; import org.alliancegenome.curation_api.dao.ConditionRelationDAO; +import org.alliancegenome.curation_api.dao.CrossReferenceDAO; import org.alliancegenome.curation_api.dao.NoteDAO; +import org.alliancegenome.curation_api.dao.OrganizationDAO; import org.alliancegenome.curation_api.model.entities.Annotation; import org.alliancegenome.curation_api.model.entities.ConditionRelation; -import org.alliancegenome.curation_api.model.entities.DataProvider; +import org.alliancegenome.curation_api.model.entities.CrossReference; import org.alliancegenome.curation_api.model.entities.Note; +import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.Reference; import org.alliancegenome.curation_api.response.ObjectResponse; import org.alliancegenome.curation_api.response.SearchResponse; -import org.alliancegenome.curation_api.services.DataProviderService; +import org.alliancegenome.curation_api.services.CrossReferenceService; +import org.alliancegenome.curation_api.services.OrganizationService; import org.alliancegenome.curation_api.services.helpers.notes.NoteIdentityHelper; import org.alliancegenome.curation_api.services.validation.base.AuditedObjectValidator; import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import jakarta.inject.Inject; @@ -36,38 +39,67 @@ public class AnnotationValidator extends AuditedObjectValidator { @Inject ConditionRelationValidator conditionRelationValidator; @Inject ConditionRelationDAO conditionRelationDAO; @Inject AnnotationDAO annotationDAO; - @Inject DataProviderService dataProviderService; - @Inject DataProviderValidator dataProviderValidator; + @Inject OrganizationDAO organizationDAO; + @Inject OrganizationService organizationService; + @Inject CrossReferenceDAO crossReferenceDAO; + @Inject CrossReferenceService crossReferenceService; + @Inject CrossReferenceValidator crossReferenceValidator; - public DataProvider validateDataProvider(Annotation uiEntity, Annotation dbEntity) { + public Organization validateDataProvider(Annotation uiEntity, Annotation dbEntity) { String field = "dataProvider"; if (uiEntity.getDataProvider() == null) { if (dbEntity.getId() == null) { - uiEntity.setDataProvider(dataProviderService.createAffiliatedModDataProvider()); - } - if (uiEntity.getDataProvider() == null) { + return organizationDAO.getOrCreateOrganization("Alliance"); + } else { addMessageResponse(field, ValidationConstants.REQUIRED_MESSAGE); return null; } } - - DataProvider uiDataProvider = uiEntity.getDataProvider(); - DataProvider dbDataProvider = dbEntity.getDataProvider(); - - ObjectResponse dpResponse = dataProviderValidator.validateDataProvider(uiDataProvider, dbDataProvider, false); - if (dpResponse.hasErrors()) { - addMessageResponse(field, dpResponse.errorMessagesString()); + + Organization dataProvider = null; + if (uiEntity.getDataProvider().getId() != null) { + dataProvider = organizationService.getById(uiEntity.getDataProvider().getId()).getEntity(); + } else if (StringUtils.isNotBlank(uiEntity.getDataProvider().getAbbreviation())) { + dataProvider = organizationService.getByAbbr(uiEntity.getDataProvider().getAbbreviation()).getEntity(); + } + + if (dataProvider == null) { + addMessageResponse(field, ValidationConstants.INVALID_MESSAGE); return null; } - DataProvider validatedDataProvider = dpResponse.getEntity(); - if (validatedDataProvider.getObsolete() && (dbDataProvider == null || !validatedDataProvider.getId().equals(dbDataProvider.getId()))) { + if (dataProvider.getObsolete() && (dbEntity.getDataProvider() == null || !dataProvider.getId().equals(dbEntity.getDataProvider().getId()))) { addMessageResponse(field, ValidationConstants.OBSOLETE_MESSAGE); return null; } - return validatedDataProvider; + return dataProvider; + } + + protected CrossReference validateDataProviderCrossReference(CrossReference uiXref, CrossReference dbXref) { + CrossReference xref = null; + String dbXrefUniqueId = null; + String uiXrefUniqueId = null; + if (dbXref != null) { + dbXrefUniqueId = crossReferenceService.getCrossReferenceUniqueId(dbXref); + } + + if (uiXref != null) { + ObjectResponse xrefResponse = crossReferenceValidator.validateCrossReference(uiXref, false); + if (xrefResponse.hasErrors()) { + addMessageResponse("crossReference", xrefResponse.errorMessagesString()); + } else { + uiXrefUniqueId = crossReferenceService.getCrossReferenceUniqueId(xrefResponse.getEntity()); + if (dbXrefUniqueId == null || !dbXrefUniqueId.equals(uiXrefUniqueId)) { + xref = crossReferenceDAO.persist(xrefResponse.getEntity()); + } else if (dbXrefUniqueId != null && dbXrefUniqueId.equals(uiXrefUniqueId)) { + xref = crossReferenceService.updateCrossReference(dbXref, uiXref); + } + } + } + + return xref; } public List validateRelatedNotes(Annotation uiEntity, Annotation dbEntity, String noteTypeSet) { @@ -168,7 +200,7 @@ public List validateConditionRelations(Annotation uiEntity, A public Reference validateSingleReference(Annotation uiEntity, Annotation dbEntity) { String field = "singleReference"; - if (ObjectUtils.isEmpty(uiEntity.getSingleReference()) || StringUtils.isBlank(uiEntity.getSingleReference().getCurie())) { + if (uiEntity.getSingleReference() == null || StringUtils.isBlank(uiEntity.getSingleReference().getCurie())) { addMessageResponse(field, ValidationConstants.REQUIRED_MESSAGE); return null; } @@ -193,7 +225,7 @@ public Annotation validateCommonAnnotationFields(Annotation uiEntity, Annotation newEntity = true; } dbEntity = validateAuditedObjectFields(uiEntity, dbEntity, newEntity); - + String primaryExternalId = StringUtils.isNotBlank(uiEntity.getPrimaryExternalId()) ? uiEntity.getPrimaryExternalId() : null; dbEntity.setPrimaryExternalId(primaryExternalId); @@ -203,8 +235,10 @@ public Annotation validateCommonAnnotationFields(Annotation uiEntity, Annotation Reference singleReference = validateSingleReference(uiEntity, dbEntity); dbEntity.setSingleReference(singleReference); - DataProvider dataProvider = validateDataProvider(uiEntity, dbEntity); + Organization dataProvider = validateDataProvider(uiEntity, dbEntity); dbEntity.setDataProvider(dataProvider); + + CrossReference dataProviderCrossReference = validateDataProviderCrossReference(uiEntity.getDataProviderCrossReference(), dbEntity.getDataProviderCrossReference()); List conditionRelations = validateConditionRelations(uiEntity, dbEntity); dbEntity.setConditionRelations(conditionRelations); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/DataProviderValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/DataProviderValidator.java deleted file mode 100644 index 8132d9541..000000000 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/DataProviderValidator.java +++ /dev/null @@ -1,114 +0,0 @@ -package org.alliancegenome.curation_api.services.validation; - -import org.alliancegenome.curation_api.constants.ValidationConstants; -import org.alliancegenome.curation_api.dao.CrossReferenceDAO; -import org.alliancegenome.curation_api.dao.DataProviderDAO; -import org.alliancegenome.curation_api.exceptions.ApiErrorException; -import org.alliancegenome.curation_api.model.entities.CrossReference; -import org.alliancegenome.curation_api.model.entities.DataProvider; -import org.alliancegenome.curation_api.model.entities.Organization; -import org.alliancegenome.curation_api.response.ObjectResponse; -import org.alliancegenome.curation_api.services.CrossReferenceService; -import org.alliancegenome.curation_api.services.OrganizationService; -import org.alliancegenome.curation_api.services.validation.base.AuditedObjectValidator; - -import jakarta.enterprise.context.RequestScoped; -import jakarta.inject.Inject; - -@RequestScoped -public class DataProviderValidator extends AuditedObjectValidator { - - @Inject DataProviderDAO dataProviderDAO; - @Inject OrganizationService organizationService; - @Inject CrossReferenceValidator crossReferenceValidator; - @Inject CrossReferenceService crossReferenceService; - @Inject CrossReferenceDAO crossReferenceDAO; - - public ObjectResponse validateDataProvider(DataProvider uiEntity, DataProvider dbEntity, Boolean throwError) { - response = new ObjectResponse<>(uiEntity); - String errorTitle = "Could not create/update DataProvider: [" + uiEntity.getId() + "]"; - - if (dbEntity == null) { - dbEntity = new DataProvider(); - } - - Boolean newEntity = true; - if (uiEntity.getId() != null) { - dbEntity = dataProviderDAO.find(uiEntity.getId()); - newEntity = false; - } else { - dbEntity = new DataProvider(); - } - - dbEntity = validateAuditedObjectFields(uiEntity, dbEntity, newEntity); - - Organization sourceOrganization = validateSourceOrganization(uiEntity, dbEntity); - dbEntity.setSourceOrganization(sourceOrganization); - - String dbXrefUniqueId = null; - String uiXrefUniqueId = null; - Long dbXrefId = null; - if (dbEntity.getCrossReference() != null) { - dbXrefUniqueId = crossReferenceService.getCrossReferenceUniqueId(dbEntity.getCrossReference()); - dbXrefId = dbEntity.getCrossReference().getId(); - } - - if (uiEntity.getCrossReference() != null) { - ObjectResponse xrefResponse = crossReferenceValidator.validateCrossReference(uiEntity.getCrossReference(), false); - if (xrefResponse.hasErrors()) { - addMessageResponse("crossReference", xrefResponse.errorMessagesString()); - } else { - uiXrefUniqueId = crossReferenceService.getCrossReferenceUniqueId(xrefResponse.getEntity()); - if (dbXrefUniqueId == null || !dbXrefUniqueId.equals(uiXrefUniqueId)) { - dbEntity.setCrossReference(crossReferenceDAO.persist(xrefResponse.getEntity())); - } else if (dbXrefUniqueId != null && dbXrefUniqueId.equals(uiXrefUniqueId)) { - dbEntity.setCrossReference(crossReferenceService.updateCrossReference(dbEntity.getCrossReference(), uiEntity.getCrossReference())); - } - } - } else { - dbEntity.setCrossReference(null); - } - - if (response.hasErrors()) { - if (throwError) { - response.setErrorMessage(errorTitle); - throw new ApiErrorException(response); - } - return response; - } else { - if (dbXrefId != null && (uiXrefUniqueId == null || !dbXrefUniqueId.equals(uiXrefUniqueId))) { - crossReferenceDAO.remove(dbXrefId); - } - - if (dbEntity.getId() == null) { - dbEntity = dataProviderDAO.persist(dbEntity); - } - } - - response.setEntity(dbEntity); - - return response; - } - - private Organization validateSourceOrganization(DataProvider uiEntity, DataProvider dbEntity) { - String field = "sourceOrganization"; - - if (uiEntity.getSourceOrganization() == null) { - addMessageResponse(field, ValidationConstants.REQUIRED_MESSAGE); - return null; - } - - Organization sourceOrganization = organizationService.getById(uiEntity.getSourceOrganization().getId()).getEntity(); - if (sourceOrganization == null) { - addMessageResponse(field, ValidationConstants.INVALID_MESSAGE); - return null; - } - - if (sourceOrganization.getObsolete() && (dbEntity.getSourceOrganization() == null || !sourceOrganization.getId().equals(dbEntity.getSourceOrganization().getId()))) { - addMessageResponse(field, ValidationConstants.OBSOLETE_MESSAGE); - return null; - } - - return sourceOrganization; - } -} \ No newline at end of file diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/DiseaseAnnotationValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/DiseaseAnnotationValidator.java index 5a93cd1c3..3df3c26fc 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/DiseaseAnnotationValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/DiseaseAnnotationValidator.java @@ -11,23 +11,23 @@ import org.alliancegenome.curation_api.dao.AlleleDAO; import org.alliancegenome.curation_api.dao.DiseaseAnnotationDAO; import org.alliancegenome.curation_api.dao.GeneDAO; +import org.alliancegenome.curation_api.dao.OrganizationDAO; import org.alliancegenome.curation_api.dao.ontology.EcoTermDAO; import org.alliancegenome.curation_api.model.entities.AffectedGenomicModel; import org.alliancegenome.curation_api.model.entities.Allele; -import org.alliancegenome.curation_api.model.entities.DataProvider; +import org.alliancegenome.curation_api.model.entities.CrossReference; import org.alliancegenome.curation_api.model.entities.DiseaseAnnotation; import org.alliancegenome.curation_api.model.entities.Gene; +import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.VocabularyTerm; import org.alliancegenome.curation_api.model.entities.ontology.DOTerm; import org.alliancegenome.curation_api.model.entities.ontology.ECOTerm; -import org.alliancegenome.curation_api.response.ObjectResponse; import org.alliancegenome.curation_api.response.SearchResponse; -import org.alliancegenome.curation_api.services.DataProviderService; +import org.alliancegenome.curation_api.services.OrganizationService; import org.alliancegenome.curation_api.services.VocabularyTermService; import org.alliancegenome.curation_api.services.helpers.annotations.AnnotationUniqueIdHelper; import org.alliancegenome.curation_api.services.ontology.DoTermService; import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import jakarta.inject.Inject; @@ -41,12 +41,12 @@ public class DiseaseAnnotationValidator extends AnnotationValidator { @Inject AffectedGenomicModelDAO agmDAO; @Inject VocabularyTermService vocabularyTermService; @Inject DiseaseAnnotationDAO diseaseAnnotationDAO; - @Inject DataProviderService dataProviderService; - @Inject DataProviderValidator dataProviderValidator; + @Inject OrganizationDAO organizationDAO; + @Inject OrganizationService organizationService; public DOTerm validateObjectOntologyTerm(DiseaseAnnotation uiEntity, DiseaseAnnotation dbEntity) { String field = "diseaseAnnotationObject"; - if (ObjectUtils.isEmpty(uiEntity.getDiseaseAnnotationObject())) { + if (uiEntity.getDiseaseAnnotationObject() == null) { addMessageResponse(field, ValidationConstants.REQUIRED_MESSAGE); return null; } @@ -148,38 +148,37 @@ public List validateWith(DiseaseAnnotation uiEntity, DiseaseAnnotation dbE return validWithGenes; } - public DataProvider validateSecondaryDataProvider(DiseaseAnnotation uiEntity, DiseaseAnnotation dbEntity) { + public Organization validateSecondaryDataProvider(DiseaseAnnotation uiEntity, DiseaseAnnotation dbEntity) { String field = "secondaryDataProvider"; if (uiEntity.getSecondaryDataProvider() == null) { if (dbEntity.getId() == null) { - uiEntity.setSecondaryDataProvider(dataProviderService.getAllianceDataProvider()); - if (uiEntity.getSecondaryDataProvider() == null) { - return null; - } + return organizationDAO.getOrCreateOrganization("Alliance"); } else { return null; } } - - DataProvider uiDataProvider = uiEntity.getSecondaryDataProvider(); - DataProvider dbDataProvider = dbEntity.getSecondaryDataProvider(); - - ObjectResponse dpResponse = dataProviderValidator.validateDataProvider(uiDataProvider, dbDataProvider, false); - if (dpResponse.hasErrors()) { - addMessageResponse(field, dpResponse.errorMessagesString()); + + Organization secondaryDataProvider = null; + if (uiEntity.getSecondaryDataProvider().getId() != null) { + secondaryDataProvider = organizationService.getById(uiEntity.getSecondaryDataProvider().getId()).getEntity(); + } else if (StringUtils.isNotBlank(uiEntity.getSecondaryDataProvider().getAbbreviation())) { + secondaryDataProvider = organizationService.getByAbbr(uiEntity.getSecondaryDataProvider().getAbbreviation()).getEntity(); + } + + if (secondaryDataProvider == null) { + addMessageResponse(field, ValidationConstants.INVALID_MESSAGE); return null; } - DataProvider validatedDataProvider = dpResponse.getEntity(); - if (validatedDataProvider.getObsolete() && (dbDataProvider == null || !validatedDataProvider.getId().equals(dbDataProvider.getId()))) { + if (secondaryDataProvider.getObsolete() && (dbEntity.getSecondaryDataProvider() == null || !secondaryDataProvider.getId().equals(dbEntity.getSecondaryDataProvider().getId()))) { addMessageResponse(field, ValidationConstants.OBSOLETE_MESSAGE); return null; } - return validatedDataProvider; + return secondaryDataProvider; } - + public List validateDiseaseGeneticModifierGenes(DiseaseAnnotation uiEntity, DiseaseAnnotation dbEntity) { if (CollectionUtils.isEmpty(uiEntity.getDiseaseGeneticModifierGenes())) { return null; @@ -393,9 +392,12 @@ public DiseaseAnnotation validateCommonDiseaseAnnotationFields(DiseaseAnnotation VocabularyTerm geneticSex = validateGeneticSex(uiEntity, dbEntity); dbEntity.setGeneticSex(geneticSex); - DataProvider secondaryDataProvider = validateSecondaryDataProvider(uiEntity, dbEntity); + Organization secondaryDataProvider = validateSecondaryDataProvider(uiEntity, dbEntity); dbEntity.setSecondaryDataProvider(secondaryDataProvider); - + + CrossReference secondaryDataProviderCrossReference = validateDataProviderCrossReference(uiEntity.getSecondaryDataProviderCrossReference(), dbEntity.getSecondaryDataProviderCrossReference()); + dbEntity.setDataProviderCrossReference(secondaryDataProviderCrossReference); + List diseaseGeneticModifierGenes = validateDiseaseGeneticModifierGenes(uiEntity, dbEntity); List diseaseGeneticModifierAlleles = validateDiseaseGeneticModifierAlleles(uiEntity, dbEntity); List diseaseGeneticModifierAgms = validateDiseaseGeneticModifierAgms(uiEntity, dbEntity); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/ReagentValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/ReagentValidator.java index 97511bdaa..8211fb70a 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/ReagentValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/ReagentValidator.java @@ -3,10 +3,10 @@ import java.util.List; import org.alliancegenome.curation_api.constants.ValidationConstants; -import org.alliancegenome.curation_api.model.entities.DataProvider; +import org.alliancegenome.curation_api.dao.OrganizationDAO; +import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.Reagent; -import org.alliancegenome.curation_api.response.ObjectResponse; -import org.alliancegenome.curation_api.services.DataProviderService; +import org.alliancegenome.curation_api.services.OrganizationService; import org.alliancegenome.curation_api.services.ontology.NcbiTaxonTermService; import org.alliancegenome.curation_api.services.validation.base.SubmittedObjectValidator; import org.apache.commons.collections.CollectionUtils; @@ -17,8 +17,8 @@ public class ReagentValidator extends SubmittedObjectValidator { @Inject NcbiTaxonTermService ncbiTaxonTermService; - @Inject DataProviderService dataProviderService; - @Inject DataProviderValidator dataProviderValidator; + @Inject OrganizationService organizationService; + @Inject OrganizationDAO organizationDAO; public Reagent validateCommonReagentFields(Reagent uiEntity, Reagent dbEntity) { @@ -37,40 +37,41 @@ public Reagent validateCommonReagentFields(Reagent uiEntity, Reagent dbEntity) { List secondaryIds = CollectionUtils.isNotEmpty(uiEntity.getSecondaryIdentifiers()) ? uiEntity.getSecondaryIdentifiers() : null; dbEntity.setSecondaryIdentifiers(secondaryIds); - DataProvider dataProvider = validateDataProvider(uiEntity, dbEntity); + Organization dataProvider = validateDataProvider(uiEntity, dbEntity); dbEntity.setDataProvider(dataProvider); return dbEntity; } - public DataProvider validateDataProvider(Reagent uiEntity, Reagent dbEntity) { + public Organization validateDataProvider(Reagent uiEntity, Reagent dbEntity) { String field = "dataProvider"; if (uiEntity.getDataProvider() == null) { if (dbEntity.getId() == null) { - uiEntity.setDataProvider(dataProviderService.createAffiliatedModDataProvider()); - } - if (uiEntity.getDataProvider() == null) { + return organizationDAO.getOrCreateOrganization("Alliance"); + } else { addMessageResponse(field, ValidationConstants.REQUIRED_MESSAGE); return null; } } - - DataProvider uiDataProvider = uiEntity.getDataProvider(); - DataProvider dbDataProvider = dbEntity.getDataProvider(); - - ObjectResponse dpResponse = dataProviderValidator.validateDataProvider(uiDataProvider, dbDataProvider, false); - if (dpResponse.hasErrors()) { - addMessageResponse(field, dpResponse.errorMessagesString()); + + Organization dataProvider = null; + if (uiEntity.getDataProvider().getId() != null) { + dataProvider = organizationService.getById(uiEntity.getDataProvider().getId()).getEntity(); + } else if (StringUtils.isNotBlank(uiEntity.getDataProvider().getAbbreviation())) { + dataProvider = organizationService.getByAbbr(uiEntity.getDataProvider().getAbbreviation()).getEntity(); + } + + if (dataProvider == null) { + addMessageResponse(field, ValidationConstants.INVALID_MESSAGE); return null; } - DataProvider validatedDataProvider = dpResponse.getEntity(); - if (validatedDataProvider.getObsolete() && (dbDataProvider == null || !validatedDataProvider.getId().equals(dbDataProvider.getId()))) { + if (dataProvider.getObsolete() && (dbEntity.getDataProvider() == null || !dataProvider.getId().equals(dbEntity.getDataProvider().getId()))) { addMessageResponse(field, ValidationConstants.OBSOLETE_MESSAGE); return null; } - return validatedDataProvider; + return dataProvider; } } diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/base/SubmittedObjectValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/base/SubmittedObjectValidator.java index 8a36c77bd..97a24608f 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/base/SubmittedObjectValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/base/SubmittedObjectValidator.java @@ -1,19 +1,27 @@ package org.alliancegenome.curation_api.services.validation.base; import org.alliancegenome.curation_api.constants.ValidationConstants; -import org.alliancegenome.curation_api.model.entities.DataProvider; +import org.alliancegenome.curation_api.dao.CrossReferenceDAO; +import org.alliancegenome.curation_api.dao.OrganizationDAO; +import org.alliancegenome.curation_api.model.entities.CrossReference; +import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.base.SubmittedObject; import org.alliancegenome.curation_api.response.ObjectResponse; -import org.alliancegenome.curation_api.services.DataProviderService; -import org.alliancegenome.curation_api.services.validation.DataProviderValidator; +import org.alliancegenome.curation_api.services.CrossReferenceService; +import org.alliancegenome.curation_api.services.OrganizationService; +import org.alliancegenome.curation_api.services.validation.CrossReferenceValidator; +import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import jakarta.inject.Inject; public class SubmittedObjectValidator extends AuditedObjectValidator { - @Inject DataProviderService dataProviderService; - @Inject DataProviderValidator dataProviderValidator; + @Inject CrossReferenceService crossReferenceService; + @Inject CrossReferenceValidator crossReferenceValidator; + @Inject CrossReferenceDAO crossReferenceDAO; + @Inject OrganizationService organizationService; + @Inject OrganizationDAO organizationDAO; public E validateSubmittedObjectFields(E uiEntity, E dbEntity) { String curie = handleStringField(uiEntity.getCurie()); @@ -25,9 +33,12 @@ public E validateSubmittedObjectFields(E uiEntity, E dbEntity) { String modInternalId = validateModInternalId(uiEntity); dbEntity.setModInternalId(modInternalId); - DataProvider dataProvider = validateDataProvider(uiEntity, dbEntity); + Organization dataProvider = validateDataProvider(uiEntity, dbEntity); dbEntity.setDataProvider(dataProvider); - + + CrossReference dataProviderXref = validateDataProviderCrossReference(uiEntity.getDataProviderCrossReference(), dbEntity.getDataProviderCrossReference()); + dbEntity.setDataProviderCrossReference(dataProviderXref); + return dbEntity; } @@ -51,33 +62,60 @@ public String validateModInternalId(E uiEntity) { return modInternalId; } - public DataProvider validateDataProvider(E uiEntity, E dbEntity) { + public Organization validateDataProvider(E uiEntity, E dbEntity) { String field = "dataProvider"; - if (uiEntity.getDataProvider() == null) { - if (dbEntity.getDataProvider() == null) { - uiEntity.setDataProvider(dataProviderService.createAffiliatedModDataProvider()); - } - if (uiEntity.getDataProvider() == null) { + + if (ObjectUtils.isEmpty(uiEntity.getDataProvider())) { + if (dbEntity.getId() == null) { + return organizationDAO.getOrCreateOrganization("Alliance"); + } else { addMessageResponse(field, ValidationConstants.REQUIRED_MESSAGE); return null; } } - - DataProvider uiDataProvider = uiEntity.getDataProvider(); - DataProvider dbDataProvider = dbEntity.getDataProvider(); - - ObjectResponse dpResponse = dataProviderValidator.validateDataProvider(uiDataProvider, dbDataProvider, false); - if (dpResponse.hasErrors()) { - addMessageResponse(field, dpResponse.errorMessagesString()); + + Organization dataProvider = null; + if (uiEntity.getDataProvider().getId() != null) { + dataProvider = organizationService.getById(uiEntity.getDataProvider().getId()).getEntity(); + } else if (StringUtils.isNotBlank(uiEntity.getDataProvider().getAbbreviation())) { + dataProvider = organizationService.getByAbbr(uiEntity.getDataProvider().getAbbreviation()).getEntity(); + } + + if (dataProvider == null) { + addMessageResponse(field, ValidationConstants.INVALID_MESSAGE); return null; } - DataProvider validatedDataProvider = dpResponse.getEntity(); - if (validatedDataProvider.getObsolete() && (dbDataProvider == null || !validatedDataProvider.getId().equals(dbDataProvider.getId()))) { + if (dataProvider.getObsolete() && (dbEntity.getDataProvider() == null || !dataProvider.getId().equals(dbEntity.getDataProvider().getId()))) { addMessageResponse(field, ValidationConstants.OBSOLETE_MESSAGE); return null; } - return validatedDataProvider; + return dataProvider; + } + + protected CrossReference validateDataProviderCrossReference(CrossReference uiXref, CrossReference dbXref) { + CrossReference xref = null; + String dbXrefUniqueId = null; + String uiXrefUniqueId = null; + if (dbXref != null) { + dbXrefUniqueId = crossReferenceService.getCrossReferenceUniqueId(dbXref); + } + + if (ObjectUtils.isNotEmpty(uiXref)) { + ObjectResponse xrefResponse = crossReferenceValidator.validateCrossReference(uiXref, false); + if (xrefResponse.hasErrors()) { + addMessageResponse("crossReference", xrefResponse.errorMessagesString()); + } else { + uiXrefUniqueId = crossReferenceService.getCrossReferenceUniqueId(xrefResponse.getEntity()); + if (dbXrefUniqueId == null || !dbXrefUniqueId.equals(uiXrefUniqueId)) { + xref = crossReferenceDAO.persist(xrefResponse.getEntity()); + } else if (dbXrefUniqueId != null && dbXrefUniqueId.equals(uiXrefUniqueId)) { + xref = crossReferenceService.updateCrossReference(dbXref, uiXref); + } + } + } + + return xref; } } diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AGMDiseaseAnnotationDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AGMDiseaseAnnotationDTOValidator.java index d8812d921..0ff451b5a 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AGMDiseaseAnnotationDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AGMDiseaseAnnotationDTOValidator.java @@ -75,7 +75,7 @@ public AGMDiseaseAnnotation validateAGMDiseaseAnnotationDTO(AGMDiseaseAnnotation if (dataProvider != null && (dataProvider.name().equals("RGD") || dataProvider.name().equals("HUMAN")) - && (!agm.getTaxon().getCurie().equals(dataProvider.canonicalTaxonCurie) || !dataProvider.sourceOrganization.equals(agm.getDataProvider().getSourceOrganization().getAbbreviation()))) { + && (!agm.getTaxon().getCurie().equals(dataProvider.canonicalTaxonCurie) || !dataProvider.sourceOrganization.equals(agm.getDataProvider().getAbbreviation()))) { adaResponse.addErrorMessage("agm_identifier", ValidationConstants.INVALID_MESSAGE + " (" + dto.getAgmIdentifier() + ") for " + dataProvider.name() + " load"); } } diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AlleleDiseaseAnnotationDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AlleleDiseaseAnnotationDTOValidator.java index ce5040175..c569a8531 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AlleleDiseaseAnnotationDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AlleleDiseaseAnnotationDTOValidator.java @@ -67,7 +67,7 @@ public AlleleDiseaseAnnotation validateAlleleDiseaseAnnotationDTO(AlleleDiseaseA if (dataProvider != null && (dataProvider.name().equals("RGD") || dataProvider.name().equals("HUMAN")) - && (!allele.getTaxon().getCurie().equals(dataProvider.canonicalTaxonCurie) || !dataProvider.sourceOrganization.equals(allele.getDataProvider().getSourceOrganization().getAbbreviation()))) { + && (!allele.getTaxon().getCurie().equals(dataProvider.canonicalTaxonCurie) || !dataProvider.sourceOrganization.equals(allele.getDataProvider().getAbbreviation()))) { adaResponse.addErrorMessage("allele_identifier", ValidationConstants.INVALID_MESSAGE + " (" + dto.getAlleleIdentifier() + ") for " + dataProvider.name() + " load"); } } diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AnnotationDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AnnotationDTOValidator.java index c55e44572..fc555488d 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AnnotationDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/AnnotationDTOValidator.java @@ -8,9 +8,14 @@ import org.alliancegenome.curation_api.constants.ValidationConstants; import org.alliancegenome.curation_api.dao.AnnotationDAO; import org.alliancegenome.curation_api.dao.ConditionRelationDAO; -import org.alliancegenome.curation_api.dao.DataProviderDAO; +import org.alliancegenome.curation_api.dao.CrossReferenceDAO; import org.alliancegenome.curation_api.dao.NoteDAO; -import org.alliancegenome.curation_api.model.entities.*; +import org.alliancegenome.curation_api.model.entities.Annotation; +import org.alliancegenome.curation_api.model.entities.ConditionRelation; +import org.alliancegenome.curation_api.model.entities.CrossReference; +import org.alliancegenome.curation_api.model.entities.Note; +import org.alliancegenome.curation_api.model.entities.Organization; +import org.alliancegenome.curation_api.model.entities.Reference; import org.alliancegenome.curation_api.model.ingest.dto.AnnotationDTO; import org.alliancegenome.curation_api.model.ingest.dto.ConditionRelationDTO; import org.alliancegenome.curation_api.response.ObjectResponse; @@ -19,6 +24,7 @@ import org.alliancegenome.curation_api.services.validation.dto.base.BaseDTOValidator; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.ImmutablePair; import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Inject; @@ -32,8 +38,7 @@ public class AnnotationDTOValidator extends BaseDTOValidator { @Inject ConditionRelationDAO conditionRelationDAO; @Inject ConditionRelationDTOValidator conditionRelationDtoValidator; @Inject NoteDTOValidator noteDtoValidator; - @Inject DataProviderDTOValidator dataProviderDtoValidator; - @Inject DataProviderDAO dataProviderDAO; + @Inject CrossReferenceDAO crossReferenceDAO; public ObjectResponse validateAnnotationDTO(E annotation, D dto, String noteTypeSet) { ObjectResponse annotResponse = validateAuditedObjectDTO(annotation, dto); @@ -45,11 +50,16 @@ public ObjectResponse validat if (dto.getDataProviderDto() == null) { annotResponse.addErrorMessage("data_provider_dto", ValidationConstants.REQUIRED_MESSAGE); } else { - ObjectResponse dpResponse = dataProviderDtoValidator.validateDataProviderDTO(dto.getDataProviderDto(), annotation.getDataProvider()); + ObjectResponse> dpResponse = validateDataProviderDTO(dto.getDataProviderDto(), annotation.getDataProviderCrossReference()); if (dpResponse.hasErrors()) { annotResponse.addErrorMessage("data_provider_dto", dpResponse.errorMessagesString()); } else { - annotation.setDataProvider(dataProviderDAO.persist(dpResponse.getEntity())); + annotation.setDataProvider(dpResponse.getEntity().getLeft()); + if (dpResponse.getEntity().getRight() != null) { + annotation.setDataProviderCrossReference(crossReferenceDAO.persist(dpResponse.getEntity().getRight())); + } else { + annotation.setDataProviderCrossReference(null); + } } } diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/DataProviderDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/DataProviderDTOValidator.java deleted file mode 100644 index 9b761ff72..000000000 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/DataProviderDTOValidator.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.alliancegenome.curation_api.services.validation.dto; - -import org.alliancegenome.curation_api.constants.ValidationConstants; -import org.alliancegenome.curation_api.dao.ResourceDescriptorPageDAO; -import org.alliancegenome.curation_api.model.entities.CrossReference; -import org.alliancegenome.curation_api.model.entities.DataProvider; -import org.alliancegenome.curation_api.model.entities.Organization; -import org.alliancegenome.curation_api.model.ingest.dto.DataProviderDTO; -import org.alliancegenome.curation_api.response.ObjectResponse; -import org.alliancegenome.curation_api.services.CrossReferenceService; -import org.alliancegenome.curation_api.services.OrganizationService; -import org.alliancegenome.curation_api.services.validation.dto.base.BaseDTOValidator; -import org.apache.commons.lang3.StringUtils; - -import jakarta.enterprise.context.RequestScoped; -import jakarta.inject.Inject; - -@RequestScoped -public class DataProviderDTOValidator extends BaseDTOValidator { - - @Inject OrganizationService organizationService; - @Inject ResourceDescriptorPageDAO resourceDescriptorPageDAO; - @Inject CrossReferenceService crossReferenceService; - @Inject CrossReferenceDTOValidator crossReferenceDtoValidator; - - public ObjectResponse validateDataProviderDTO(DataProviderDTO dto, DataProvider dbEntity) { - if (dbEntity == null) { - dbEntity = new DataProvider(); - } - - ObjectResponse dpResponse = validateAuditedObjectDTO(dbEntity, dto); - - dbEntity = dpResponse.getEntity(); - - if (StringUtils.isBlank(dto.getSourceOrganizationAbbreviation())) { - dpResponse.addErrorMessage("source_organization_abbreviation", ValidationConstants.REQUIRED_MESSAGE); - } else { - ObjectResponse soResponse = organizationService.getByAbbr(dto.getSourceOrganizationAbbreviation()); - if (soResponse == null || soResponse.getEntity() == null) { - dpResponse.addErrorMessage("source_organization_abbreviation", ValidationConstants.INVALID_MESSAGE + " (" + dto.getSourceOrganizationAbbreviation() + ")"); - } else { - dbEntity.setSourceOrganization(soResponse.getEntity()); - } - } - - if (dto.getCrossReferenceDto() != null) { - ObjectResponse crResponse = crossReferenceDtoValidator.validateCrossReferenceDTO(dto.getCrossReferenceDto(), dbEntity.getCrossReference()); - if (crResponse.hasErrors()) { - dpResponse.addErrorMessage("cross_reference_dto", crResponse.errorMessagesString()); - } else { - dbEntity.setCrossReference(crResponse.getEntity()); - } - } else { - dbEntity.setCrossReference(null); - } - dpResponse.setEntity(dbEntity); - - return dpResponse; - } - -} diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/DiseaseAnnotationDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/DiseaseAnnotationDTOValidator.java index 59f6552fb..51b27ee32 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/DiseaseAnnotationDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/DiseaseAnnotationDTOValidator.java @@ -1,12 +1,19 @@ package org.alliancegenome.curation_api.services.validation.dto; -import jakarta.enterprise.context.RequestScoped; -import jakarta.inject.Inject; +import java.util.ArrayList; +import java.util.List; + import org.alliancegenome.curation_api.constants.OntologyConstants; import org.alliancegenome.curation_api.constants.ValidationConstants; import org.alliancegenome.curation_api.constants.VocabularyConstants; -import org.alliancegenome.curation_api.dao.DataProviderDAO; -import org.alliancegenome.curation_api.model.entities.*; +import org.alliancegenome.curation_api.model.entities.AffectedGenomicModel; +import org.alliancegenome.curation_api.model.entities.Allele; +import org.alliancegenome.curation_api.model.entities.BiologicalEntity; +import org.alliancegenome.curation_api.model.entities.CrossReference; +import org.alliancegenome.curation_api.model.entities.DiseaseAnnotation; +import org.alliancegenome.curation_api.model.entities.Gene; +import org.alliancegenome.curation_api.model.entities.Organization; +import org.alliancegenome.curation_api.model.entities.VocabularyTerm; import org.alliancegenome.curation_api.model.entities.ontology.DOTerm; import org.alliancegenome.curation_api.model.entities.ontology.ECOTerm; import org.alliancegenome.curation_api.model.ingest.dto.DiseaseAnnotationDTO; @@ -19,9 +26,10 @@ import org.alliancegenome.curation_api.services.ontology.EcoTermService; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.ImmutablePair; -import java.util.ArrayList; -import java.util.List; +import jakarta.enterprise.context.RequestScoped; +import jakarta.inject.Inject; @RequestScoped public class DiseaseAnnotationDTOValidator extends AnnotationDTOValidator { @@ -38,10 +46,6 @@ public class DiseaseAnnotationDTOValidator extends AnnotationDTOValidator { GeneService geneService; @Inject BiologicalEntityService biologicalEntityService; - @Inject - DataProviderDTOValidator dataProviderDtoValidator; - @Inject - DataProviderDAO dataProviderDAO; public ObjectResponse validateDiseaseAnnotationDTO(E annotation, D dto) { ObjectResponse daResponse = validateAnnotationDTO(annotation, dto, VocabularyConstants.DISEASE_ANNOTATION_NOTE_TYPES_VOCABULARY_TERM_SET); @@ -99,16 +103,22 @@ public ObjectRespo annotation.setWith(null); } - DataProvider secondaryDataProvider = null; - if (dto.getSecondaryDataProviderDto() != null) { - ObjectResponse dpResponse = dataProviderDtoValidator.validateDataProviderDTO(dto.getSecondaryDataProviderDto(), annotation.getSecondaryDataProvider()); + if (dto.getSecondaryDataProviderDto() == null) { + annotation.setSecondaryDataProvider(null); + annotation.setSecondaryDataProviderCrossReference(null); + } else { + ObjectResponse> dpResponse = validateDataProviderDTO(dto.getSecondaryDataProviderDto(), annotation.getSecondaryDataProviderCrossReference()); if (dpResponse.hasErrors()) { - daResponse.addErrorMessage("secondary_data_provider_dto", dpResponse.errorMessagesString()); + daResponse.addErrorMessage("data_provider_dto", dpResponse.errorMessagesString()); } else { - secondaryDataProvider = dataProviderDAO.persist(dpResponse.getEntity()); + annotation.setSecondaryDataProvider(dpResponse.getEntity().getLeft()); + if (dpResponse.getEntity().getRight() != null) { + annotation.setSecondaryDataProviderCrossReference(crossReferenceDAO.persist(dpResponse.getEntity().getRight())); + } else { + annotation.setSecondaryDataProviderCrossReference(null); + } } } - annotation.setSecondaryDataProvider(secondaryDataProvider); if (CollectionUtils.isNotEmpty(dto.getDiseaseQualifierNames())) { List diseaseQualifiers = new ArrayList<>(); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/GeneDiseaseAnnotationDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/GeneDiseaseAnnotationDTOValidator.java index 3cc48b120..24dfd5b76 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/GeneDiseaseAnnotationDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/GeneDiseaseAnnotationDTOValidator.java @@ -60,7 +60,7 @@ public GeneDiseaseAnnotation validateGeneDiseaseAnnotationDTO(GeneDiseaseAnnotat if (dataProvider != null && (dataProvider.name().equals("RGD") || dataProvider.name().equals("HUMAN")) && !gene.getTaxon().getCurie().equals(dataProvider.canonicalTaxonCurie) - || !dataProvider.sourceOrganization.equals(gene.getDataProvider().getSourceOrganization().getAbbreviation())) { + || !dataProvider.sourceOrganization.equals(gene.getDataProvider().getAbbreviation())) { gdaResponse.addErrorMessage("gene_curie", ValidationConstants.INVALID_MESSAGE + " (" + dto.getGeneIdentifier() + ") for " + dataProvider.name() + " load"); } } diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/Gff3DtoValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/Gff3DtoValidator.java index b856cd886..37048efce 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/Gff3DtoValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/Gff3DtoValidator.java @@ -41,9 +41,9 @@ import org.alliancegenome.curation_api.response.ObjectResponse; import org.alliancegenome.curation_api.response.SearchResponse; import org.alliancegenome.curation_api.services.AssemblyComponentService; -import org.alliancegenome.curation_api.services.DataProviderService; import org.alliancegenome.curation_api.services.GeneService; import org.alliancegenome.curation_api.services.Gff3Service; +import org.alliancegenome.curation_api.services.OrganizationService; import org.alliancegenome.curation_api.services.VocabularyTermService; import org.alliancegenome.curation_api.services.helpers.gff3.Gff3UniqueIdHelper; import org.alliancegenome.curation_api.services.ontology.NcbiTaxonTermService; @@ -68,11 +68,11 @@ public class Gff3DtoValidator { @Inject TranscriptCodingSequenceAssociationDAO transcriptCdsDAO; @Inject CodingSequenceGenomicLocationAssociationDAO cdsLocationDAO; @Inject AssemblyComponentService assemblyComponentService; - @Inject DataProviderService dataProviderService; @Inject NcbiTaxonTermService ncbiTaxonTermService; @Inject SoTermDAO soTermDAO; @Inject Gff3Service gff3Service; @Inject VocabularyTermService vocabularyTermService; + @Inject OrganizationService organizationService; @Transactional public void validateExonEntry(Gff3DTO dto, Map attributes, List idsAdded, BackendBulkDataProvider dataProvider) throws ValidationException { @@ -195,7 +195,7 @@ public void validateTranscriptEntry(Gff3DTO dto, Map attributes, private ObjectResponse validateGenomicEntity(E entity, Gff3DTO dto, Map attributes, BackendBulkDataProvider dataProvider) { ObjectResponse geResponse = new ObjectResponse(); - entity.setDataProvider(dataProviderService.getDefaultDataProvider(dataProvider.sourceOrganization)); + entity.setDataProvider(organizationService.getByAbbr(dataProvider.sourceOrganization).getEntity()); entity.setTaxon(ncbiTaxonTermService.getByCurie(dataProvider.canonicalTaxonCurie).getEntity()); geResponse.setEntity(entity); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/ReagentDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/ReagentDTOValidator.java index 91a9bc1ac..140c023fa 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/ReagentDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/ReagentDTOValidator.java @@ -1,11 +1,13 @@ package org.alliancegenome.curation_api.services.validation.dto; import org.alliancegenome.curation_api.constants.ValidationConstants; -import org.alliancegenome.curation_api.model.entities.DataProvider; +import org.alliancegenome.curation_api.model.entities.CrossReference; +import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.Reagent; import org.alliancegenome.curation_api.model.ingest.dto.ReagentDTO; import org.alliancegenome.curation_api.response.ObjectResponse; import org.alliancegenome.curation_api.services.ontology.NcbiTaxonTermService; +import org.apache.commons.lang3.tuple.ImmutablePair; import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Inject; @@ -14,7 +16,6 @@ public class ReagentDTOValidator extends AnnotationDTOValidator { @Inject NcbiTaxonTermService ncbiTaxonTermService; - @Inject DataProviderDTOValidator dataProviderDtoValidator; public ObjectResponse validateReagentDTO(E reagent, D dto) { ObjectResponse reagentResponse = validateAuditedObjectDTO(reagent, dto); @@ -28,11 +29,16 @@ public ObjectResponse validateReage if (dto.getDataProviderDto() == null) { reagentResponse.addErrorMessage("data_provider_dto", ValidationConstants.REQUIRED_MESSAGE); } else { - ObjectResponse dpResponse = dataProviderDtoValidator.validateDataProviderDTO(dto.getDataProviderDto(), reagent.getDataProvider()); + ObjectResponse> dpResponse = validateDataProviderDTO(dto.getDataProviderDto(), reagent.getDataProviderCrossReference()); if (dpResponse.hasErrors()) { reagentResponse.addErrorMessage("data_provider_dto", dpResponse.errorMessagesString()); } else { - reagent.setDataProvider(dataProviderDAO.persist(dpResponse.getEntity())); + reagent.setDataProvider(dpResponse.getEntity().getLeft()); + if (dpResponse.getEntity().getRight() != null) { + reagent.setDataProviderCrossReference(crossReferenceDAO.persist(dpResponse.getEntity().getRight())); + } else { + reagent.setDataProviderCrossReference(null); + } } } diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/agmAssociations/AgmSequenceTargetingReagentAssociationDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/agmAssociations/AgmSequenceTargetingReagentAssociationDTOValidator.java index 6e961518e..be1b05ac8 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/agmAssociations/AgmSequenceTargetingReagentAssociationDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/agmAssociations/AgmSequenceTargetingReagentAssociationDTOValidator.java @@ -90,7 +90,7 @@ public AgmSequenceTargetingReagentAssociation validateAgmSequenceTargetingReagen AffectedGenomicModel subject = agmService.findByIdentifierString(dto.getAgmSubjectIdentifier()); if (subject == null) { asaResponse.addErrorMessage("agm_identifier", ValidationConstants.INVALID_MESSAGE + " (" + dto.getAgmSubjectIdentifier() + ")"); - } else if (beDataProvider != null && !subject.getDataProvider().getSourceOrganization().getAbbreviation().equals(beDataProvider.sourceOrganization)) { + } else if (beDataProvider != null && !subject.getDataProvider().getAbbreviation().equals(beDataProvider.sourceOrganization)) { asaResponse.addErrorMessage("agm_identifier", ValidationConstants.INVALID_MESSAGE + " for " + beDataProvider.name() + " load (" + dto.getAgmSubjectIdentifier() + ")"); } else { association.setAgmAssociationSubject(subject); @@ -102,7 +102,7 @@ public AgmSequenceTargetingReagentAssociation validateAgmSequenceTargetingReagen SequenceTargetingReagent object = strService.findByIdentifierString(dto.getSequenceTargetingReagentIdentifier()); if (object == null) { asaResponse.addErrorMessage("str_identifier", ValidationConstants.INVALID_MESSAGE + " (" + dto.getSequenceTargetingReagentIdentifier() + ")"); - } else if (beDataProvider != null && !object.getDataProvider().getSourceOrganization().getAbbreviation().equals(beDataProvider.sourceOrganization)) { + } else if (beDataProvider != null && !object.getDataProvider().getAbbreviation().equals(beDataProvider.sourceOrganization)) { asaResponse.addErrorMessage("str_identifier", ValidationConstants.INVALID_MESSAGE + " for " + beDataProvider.name() + " load (" + dto.getSequenceTargetingReagentIdentifier() + ")"); } else { association.setAgmSequenceTargetingReagentAssociationObject(object); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/alleleAssociations/AlleleGeneAssociationDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/alleleAssociations/AlleleGeneAssociationDTOValidator.java index 6351aa369..6b1976a50 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/alleleAssociations/AlleleGeneAssociationDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/alleleAssociations/AlleleGeneAssociationDTOValidator.java @@ -90,7 +90,7 @@ public AlleleGeneAssociation validateAlleleGeneAssociationDTO(AlleleGeneAssociat Allele subject = alleleService.findByIdentifierString(dto.getAlleleIdentifier()); if (subject == null) { agaResponse.addErrorMessage("allele_identifier", ValidationConstants.INVALID_MESSAGE + " (" + dto.getAlleleIdentifier() + ")"); - } else if (beDataProvider != null && !subject.getDataProvider().getSourceOrganization().getAbbreviation().equals(beDataProvider.sourceOrganization)) { + } else if (beDataProvider != null && !subject.getDataProvider().getAbbreviation().equals(beDataProvider.sourceOrganization)) { agaResponse.addErrorMessage("allele_identifier", ValidationConstants.INVALID_MESSAGE + " for " + beDataProvider.name() + " load (" + dto.getAlleleIdentifier() + ")"); } else { association.setAlleleAssociationSubject(subject); @@ -102,7 +102,7 @@ public AlleleGeneAssociation validateAlleleGeneAssociationDTO(AlleleGeneAssociat Gene object = geneService.findByIdentifierString(dto.getGeneIdentifier()); if (object == null) { agaResponse.addErrorMessage("gene_identifier", ValidationConstants.INVALID_MESSAGE + " (" + dto.getGeneIdentifier() + ")"); - } else if (beDataProvider != null && !object.getDataProvider().getSourceOrganization().getAbbreviation().equals(beDataProvider.sourceOrganization)) { + } else if (beDataProvider != null && !object.getDataProvider().getAbbreviation().equals(beDataProvider.sourceOrganization)) { agaResponse.addErrorMessage("gene_identifier", ValidationConstants.INVALID_MESSAGE + " for " + beDataProvider.name() + " load (" + dto.getGeneIdentifier() + ")"); } else { association.setAlleleGeneAssociationObject(object); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/alleleAssociations/AlleleVariantAssociationDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/alleleAssociations/AlleleVariantAssociationDTOValidator.java index 48728f2fe..34dc1b1a8 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/alleleAssociations/AlleleVariantAssociationDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/alleleAssociations/AlleleVariantAssociationDTOValidator.java @@ -90,7 +90,7 @@ public AlleleVariantAssociation validateAlleleVariantAssociationDTO(AlleleVarian Allele subject = alleleService.findByIdentifierString(dto.getAlleleIdentifier()); if (subject == null) { agaResponse.addErrorMessage("allele_identifier", ValidationConstants.INVALID_MESSAGE + " (" + dto.getAlleleIdentifier() + ")"); - } else if (beDataProvider != null && !subject.getDataProvider().getSourceOrganization().getAbbreviation().equals(beDataProvider.sourceOrganization)) { + } else if (beDataProvider != null && !subject.getDataProvider().getAbbreviation().equals(beDataProvider.sourceOrganization)) { agaResponse.addErrorMessage("allele_identifier", ValidationConstants.INVALID_MESSAGE + " for " + beDataProvider.name() + " load (" + dto.getAlleleIdentifier() + ")"); } else { association.setAlleleAssociationSubject(subject); @@ -102,7 +102,7 @@ public AlleleVariantAssociation validateAlleleVariantAssociationDTO(AlleleVarian Variant object = variantService.findByIdentifierString(dto.getVariantIdentifier()); if (object == null) { agaResponse.addErrorMessage("variant_identifier", ValidationConstants.INVALID_MESSAGE + " (" + dto.getVariantIdentifier() + ")"); - } else if (beDataProvider != null && !object.getDataProvider().getSourceOrganization().getAbbreviation().equals(beDataProvider.sourceOrganization)) { + } else if (beDataProvider != null && !object.getDataProvider().getAbbreviation().equals(beDataProvider.sourceOrganization)) { agaResponse.addErrorMessage("variant_identifier", ValidationConstants.INVALID_MESSAGE + " for " + beDataProvider.name() + " load (" + dto.getVariantIdentifier() + ")"); } else { association.setAlleleVariantAssociationObject(object); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/constructAssociations/ConstructGenomicEntityAssociationDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/constructAssociations/ConstructGenomicEntityAssociationDTOValidator.java index 39b11c42e..3d00410e9 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/constructAssociations/ConstructGenomicEntityAssociationDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/associations/constructAssociations/ConstructGenomicEntityAssociationDTOValidator.java @@ -55,7 +55,7 @@ public ConstructGenomicEntityAssociation validateConstructGenomicEntityAssociati if (construct == null) { assocResponse.addErrorMessage("construct_identifier", ValidationConstants.INVALID_MESSAGE); } else { - if (beDataProvider != null && !construct.getDataProvider().getSourceOrganization().getAbbreviation().equals(beDataProvider.sourceOrganization)) { + if (beDataProvider != null && !construct.getDataProvider().getAbbreviation().equals(beDataProvider.sourceOrganization)) { assocResponse.addErrorMessage("construct_identifier", ValidationConstants.INVALID_MESSAGE + " for " + beDataProvider.name() + " load"); return null; } diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/base/BaseDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/base/BaseDTOValidator.java index 644288f4a..c61bfadd1 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/base/BaseDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/base/BaseDTOValidator.java @@ -7,33 +7,35 @@ import java.util.List; import org.alliancegenome.curation_api.constants.ValidationConstants; -import org.alliancegenome.curation_api.dao.DataProviderDAO; +import org.alliancegenome.curation_api.dao.CrossReferenceDAO; import org.alliancegenome.curation_api.enums.BackendBulkDataProvider; import org.alliancegenome.curation_api.model.entities.BiologicalEntity; import org.alliancegenome.curation_api.model.entities.CrossReference; -import org.alliancegenome.curation_api.model.entities.DataProvider; import org.alliancegenome.curation_api.model.entities.GenomicEntity; +import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.Person; import org.alliancegenome.curation_api.model.entities.base.AuditedObject; import org.alliancegenome.curation_api.model.entities.ontology.MITerm; import org.alliancegenome.curation_api.model.entities.ontology.NCBITaxonTerm; import org.alliancegenome.curation_api.model.ingest.dto.BiologicalEntityDTO; import org.alliancegenome.curation_api.model.ingest.dto.CrossReferenceDTO; +import org.alliancegenome.curation_api.model.ingest.dto.DataProviderDTO; import org.alliancegenome.curation_api.model.ingest.dto.GenomicEntityDTO; import org.alliancegenome.curation_api.model.ingest.dto.NoteDTO; import org.alliancegenome.curation_api.model.ingest.dto.base.AuditedObjectDTO; import org.alliancegenome.curation_api.response.ObjectResponse; import org.alliancegenome.curation_api.services.CrossReferenceService; -import org.alliancegenome.curation_api.services.DataProviderService; +import org.alliancegenome.curation_api.services.OrganizationService; import org.alliancegenome.curation_api.services.PersonService; import org.alliancegenome.curation_api.services.helpers.interactions.InteractionStringHelper; import org.alliancegenome.curation_api.services.ontology.MiTermService; import org.alliancegenome.curation_api.services.ontology.NcbiTaxonTermService; import org.alliancegenome.curation_api.services.validation.dto.CrossReferenceDTOValidator; -import org.alliancegenome.curation_api.services.validation.dto.DataProviderDTOValidator; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.ImmutablePair; +import io.quarkus.logging.Log; import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Inject; @@ -42,10 +44,9 @@ public class BaseDTOValidator { @Inject PersonService personService; @Inject NcbiTaxonTermService ncbiTaxonTermService; - @Inject DataProviderService dataProviderService; - @Inject DataProviderDTOValidator dataProviderDtoValidator; - @Inject DataProviderDAO dataProviderDAO; + @Inject OrganizationService organizationService; @Inject CrossReferenceDTOValidator crossReferenceDtoValidator; + @Inject CrossReferenceDAO crossReferenceDAO; @Inject CrossReferenceService crossReferenceService; @Inject MiTermService miTermService; @@ -157,14 +158,16 @@ public ObjectRespons if (dto.getDataProviderDto() == null) { beResponse.addErrorMessage("data_provider_dto", ValidationConstants.REQUIRED_MESSAGE); } else { - ObjectResponse dpResponse = dataProviderDtoValidator.validateDataProviderDTO(dto.getDataProviderDto(), entity.getDataProvider()); + ObjectResponse> dpResponse = validateDataProviderDTO(dto.getDataProviderDto(), entity.getDataProviderCrossReference()); if (dpResponse.hasErrors()) { beResponse.addErrorMessage("data_provider_dto", dpResponse.errorMessagesString()); } else { - if (beDataProvider != null && !dpResponse.getEntity().getSourceOrganization().getAbbreviation().equals(beDataProvider.sourceOrganization)) { - beResponse.addErrorMessage("data_provider_dto - source_organization_dto - abbreviation", ValidationConstants.INVALID_MESSAGE + " (" + dpResponse.getEntity().getSourceOrganization().getAbbreviation() + ") for " + beDataProvider.name() + " load"); + entity.setDataProvider(dpResponse.getEntity().getLeft()); + if (dpResponse.getEntity().getRight() != null) { + entity.setDataProviderCrossReference(crossReferenceDAO.persist(dpResponse.getEntity().getRight())); + } else { + entity.setDataProviderCrossReference(null); } - entity.setDataProvider(dataProviderDAO.persist(dpResponse.getEntity())); } } @@ -226,4 +229,34 @@ public List handleStringListField(List list) { return list; } + + public ObjectResponse> validateDataProviderDTO(DataProviderDTO dto, CrossReference dbDataProviderXref) { + ObjectResponse> dpResponse = new ObjectResponse>(); + + Organization dataProvider = null; + CrossReference dataProviderXref = null; + if (StringUtils.isBlank(dto.getSourceOrganizationAbbreviation())) { + dpResponse.addErrorMessage("source_organization_abbreviation", ValidationConstants.REQUIRED_MESSAGE); + } else { + ObjectResponse soResponse = organizationService.getByAbbr(dto.getSourceOrganizationAbbreviation()); + if (soResponse == null || soResponse.getEntity() == null) { + dpResponse.addErrorMessage("source_organization_abbreviation", ValidationConstants.INVALID_MESSAGE + " (" + dto.getSourceOrganizationAbbreviation() + ")"); + } else { + dataProvider = soResponse.getEntity(); + } + } + + if (dto.getCrossReferenceDto() != null) { + ObjectResponse crResponse = crossReferenceDtoValidator.validateCrossReferenceDTO(dto.getCrossReferenceDto(), dbDataProviderXref); + if (crResponse.hasErrors()) { + dpResponse.addErrorMessage("cross_reference_dto", crResponse.errorMessagesString()); + } else { + dataProviderXref = crResponse.getEntity(); + } + } + dpResponse.setEntity(new ImmutablePair(dataProvider, dataProviderXref)); + + return dpResponse; + } + } diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/GeneExpressionAnnotationFmsDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/GeneExpressionAnnotationFmsDTOValidator.java index 89d849ac1..f3cb7bdf2 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/GeneExpressionAnnotationFmsDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/GeneExpressionAnnotationFmsDTOValidator.java @@ -1,33 +1,54 @@ package org.alliancegenome.curation_api.services.validation.dto.fms; -import jakarta.enterprise.context.RequestScoped; -import jakarta.inject.Inject; +import java.time.OffsetDateTime; +import java.time.format.DateTimeParseException; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + import org.alliancegenome.curation_api.constants.ValidationConstants; import org.alliancegenome.curation_api.constants.VocabularyConstants; import org.alliancegenome.curation_api.dao.GeneExpressionAnnotationDAO; import org.alliancegenome.curation_api.enums.BackendBulkDataProvider; import org.alliancegenome.curation_api.exceptions.ObjectValidationException; import org.alliancegenome.curation_api.exceptions.ValidationException; -import org.alliancegenome.curation_api.model.entities.*; -import org.alliancegenome.curation_api.model.entities.ontology.*; +import org.alliancegenome.curation_api.model.entities.AnatomicalSite; +import org.alliancegenome.curation_api.model.entities.ExpressionPattern; +import org.alliancegenome.curation_api.model.entities.Gene; +import org.alliancegenome.curation_api.model.entities.GeneExpressionAnnotation; +import org.alliancegenome.curation_api.model.entities.Reference; +import org.alliancegenome.curation_api.model.entities.TemporalContext; +import org.alliancegenome.curation_api.model.entities.VocabularyTerm; +import org.alliancegenome.curation_api.model.entities.ontology.AnatomicalTerm; +import org.alliancegenome.curation_api.model.entities.ontology.GOTerm; +import org.alliancegenome.curation_api.model.entities.ontology.MMOTerm; +import org.alliancegenome.curation_api.model.entities.ontology.OntologyTerm; +import org.alliancegenome.curation_api.model.entities.ontology.StageTerm; +import org.alliancegenome.curation_api.model.entities.ontology.UBERONTerm; import org.alliancegenome.curation_api.model.ingest.dto.fms.GeneExpressionFmsDTO; import org.alliancegenome.curation_api.model.ingest.dto.fms.UberonSlimTermDTO; import org.alliancegenome.curation_api.model.ingest.dto.fms.WhenExpressedFmsDTO; import org.alliancegenome.curation_api.model.ingest.dto.fms.WhereExpressedFmsDTO; import org.alliancegenome.curation_api.response.ObjectResponse; import org.alliancegenome.curation_api.response.SearchResponse; -import org.alliancegenome.curation_api.services.DataProviderService; import org.alliancegenome.curation_api.services.GeneService; +import org.alliancegenome.curation_api.services.OrganizationService; import org.alliancegenome.curation_api.services.ReferenceService; import org.alliancegenome.curation_api.services.VocabularyTermService; import org.alliancegenome.curation_api.services.helpers.annotations.GeneExpressionAnnotationUniqueIdHelper; -import org.alliancegenome.curation_api.services.ontology.*; +import org.alliancegenome.curation_api.services.ontology.AnatomicalTermService; +import org.alliancegenome.curation_api.services.ontology.GoTermService; +import org.alliancegenome.curation_api.services.ontology.MmoTermService; +import org.alliancegenome.curation_api.services.ontology.OntologyTermService; +import org.alliancegenome.curation_api.services.ontology.StageTermService; +import org.alliancegenome.curation_api.services.ontology.UberonTermService; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.ObjectUtils; -import java.time.OffsetDateTime; -import java.time.format.DateTimeParseException; -import java.util.*; +import jakarta.enterprise.context.RequestScoped; +import jakarta.inject.Inject; @RequestScoped public class GeneExpressionAnnotationFmsDTOValidator { @@ -37,7 +58,7 @@ public class GeneExpressionAnnotationFmsDTOValidator { @Inject ReferenceService referenceService; @Inject GeneExpressionAnnotationUniqueIdHelper geneExpressionAnnotationUniqueIdHelper; @Inject GeneExpressionAnnotationDAO geneExpressionAnnotationDAO; - @Inject DataProviderService dataProviderService; + @Inject OrganizationService organizationService; @Inject VocabularyTermService vocabularyTermService; @Inject AnatomicalTermService anatomicalTermService; @Inject GoTermService goTermService; @@ -122,7 +143,7 @@ public GeneExpressionAnnotation validateAnnotation(GeneExpressionFmsDTO geneExpr geneExpressionAnnotation.getExpressionPattern().setWhenExpressed(temporalContext); } - geneExpressionAnnotation.setDataProvider(dataProviderService.getDefaultDataProvider(dataProvider.sourceOrganization)); + geneExpressionAnnotation.setDataProvider(organizationService.getByAbbr(dataProvider.sourceOrganization).getEntity()); geneExpressionAnnotation.setRelation(vocabularyTermService.getTermInVocabulary(VocabularyConstants.GENE_EXPRESSION_VOCABULARY, VocabularyConstants.GENE_EXPRESSION_RELATION_TERM).getEntity()); geneExpressionAnnotation.setObsolete(false); geneExpressionAnnotation.setInternal(false); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/GeneInteractionFmsDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/GeneInteractionFmsDTOValidator.java index b55d77315..7edf37ebb 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/GeneInteractionFmsDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/GeneInteractionFmsDTOValidator.java @@ -201,12 +201,12 @@ protected ObjectResponse findAllianceGene(String psiMiTabIdentifier, Strin if (searchResponse != null) { // Need to check that returned gene belongs to MOD corresponding to taxon for (Gene searchResult : searchResponse.getResults()) { - String resultDataProviderCoreGenus = BackendBulkDataProvider.getCoreGenus(searchResult.getDataProvider().getSourceOrganization().getAbbreviation()); + String resultDataProviderCoreGenus = BackendBulkDataProvider.getCoreGenus(searchResult.getDataProvider().getAbbreviation()); if (taxon.getName().startsWith(resultDataProviderCoreGenus + " ")) { allianceGene = searchResult; break; } - if (StringUtils.equals(taxonCurie, "NCBITaxon:9606") && StringUtils.equals(searchResult.getDataProvider().getSourceOrganization().getAbbreviation(), "RGD")) { + if (StringUtils.equals(taxonCurie, "NCBITaxon:9606") && StringUtils.equals(searchResult.getDataProvider().getAbbreviation(), "RGD")) { allianceGene = searchResult; break; } diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/HTPExpressionDatasetAnnotationFmsDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/HTPExpressionDatasetAnnotationFmsDTOValidator.java index 60733d14c..cd9fd6690 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/HTPExpressionDatasetAnnotationFmsDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/HTPExpressionDatasetAnnotationFmsDTOValidator.java @@ -15,14 +15,14 @@ import org.alliancegenome.curation_api.model.entities.HTPExpressionDatasetAnnotation; import org.alliancegenome.curation_api.model.entities.Note; import org.alliancegenome.curation_api.model.entities.Reference; -import org.alliancegenome.curation_api.model.input.Pagination; import org.alliancegenome.curation_api.model.entities.VocabularyTerm; import org.alliancegenome.curation_api.model.ingest.dto.fms.HTPExpressionDatasetAnnotationFmsDTO; import org.alliancegenome.curation_api.model.ingest.dto.fms.PublicationFmsDTO; +import org.alliancegenome.curation_api.model.input.Pagination; import org.alliancegenome.curation_api.response.ObjectResponse; import org.alliancegenome.curation_api.response.SearchResponse; -import org.alliancegenome.curation_api.services.DataProviderService; import org.alliancegenome.curation_api.services.ExternalDataBaseEntityService; +import org.alliancegenome.curation_api.services.OrganizationService; import org.alliancegenome.curation_api.services.ReferenceService; import org.alliancegenome.curation_api.services.VocabularyTermService; import org.apache.commons.collections.CollectionUtils; @@ -40,7 +40,7 @@ public class HTPExpressionDatasetAnnotationFmsDTOValidator { @Inject ReferenceService referenceService; @Inject VocabularyTermService vocabularyTermService; @Inject ExternalDataBaseEntityFmsDTOValidator externalDataBaseEntityFmsDtoValidator; - @Inject DataProviderService dataProviderService; + @Inject OrganizationService organizationService; @Transactional public HTPExpressionDatasetAnnotation validateHTPExpressionDatasetAnnotationFmsDTO(HTPExpressionDatasetAnnotationFmsDTO dto, BackendBulkDataProvider backendBulkDataProvider) throws ValidationException { @@ -164,7 +164,7 @@ public HTPExpressionDatasetAnnotation validateHTPExpressionDatasetAnnotationFmsD htpannotation.setRelatedNote(null); } - htpannotation.setDataProvider(dataProviderService.getDefaultDataProvider(backendBulkDataProvider.sourceOrganization)); + htpannotation.setDataProvider(organizationService.getByAbbr(backendBulkDataProvider.sourceOrganization).getEntity()); if (htpAnnotationResponse.hasErrors()) { throw new ObjectValidationException(dto, htpAnnotationResponse.errorMessagesString()); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/HTPExpressionDatasetSampleAnnotationFmsDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/HTPExpressionDatasetSampleAnnotationFmsDTOValidator.java index be5cbcf1c..1e1d47bc0 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/HTPExpressionDatasetSampleAnnotationFmsDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/HTPExpressionDatasetSampleAnnotationFmsDTOValidator.java @@ -34,14 +34,15 @@ import org.alliancegenome.curation_api.response.SearchResponse; import org.alliancegenome.curation_api.services.AffectedGenomicModelService; import org.alliancegenome.curation_api.services.AlleleService; -import org.alliancegenome.curation_api.services.DataProviderService; import org.alliancegenome.curation_api.services.ExternalDataBaseEntityService; +import org.alliancegenome.curation_api.services.OrganizationService; import org.alliancegenome.curation_api.services.VocabularyTermService; import org.alliancegenome.curation_api.services.ontology.MmoTermService; import org.alliancegenome.curation_api.services.ontology.NcbiTaxonTermService; import org.alliancegenome.curation_api.services.ontology.ObiTermService; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang.StringUtils; + import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Inject; import jakarta.transaction.Transactional; @@ -54,7 +55,7 @@ public class HTPExpressionDatasetSampleAnnotationFmsDTOValidator { @Inject HTPExpressionDatasetSampleAnnotationDAO htpExpressionDatasetSampleAnnotationDAO; @Inject VocabularyTermService vocabularyTermService; @Inject ExternalDataBaseEntityService externalDataBaseEntityService; - @Inject DataProviderService dataProviderService; + @Inject OrganizationService organizationService; @Inject ObiTermService obiTermService; @Inject MmoTermService mmoTermService; @Inject AlleleService alleleService; @@ -269,7 +270,7 @@ public HTPExpressionDatasetSampleAnnotation validateHTPExpressionDatasetSampleAn htpSampleAnnotation.setRelatedNotes(relatedNotes); } - htpSampleAnnotation.setDataProvider(dataProviderService.getDefaultDataProvider(backendBulkDataProvider.sourceOrganization)); + htpSampleAnnotation.setDataProvider(organizationService.getByAbbr(backendBulkDataProvider.sourceOrganization).getEntity()); if (htpSampleAnnotationResponse.hasErrors()) { throw new ObjectValidationException(dto, htpSampleAnnotationResponse.errorMessagesString()); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/PhenotypeAnnotationFmsDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/PhenotypeAnnotationFmsDTOValidator.java index 511c87a2d..71ecb721d 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/PhenotypeAnnotationFmsDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/PhenotypeAnnotationFmsDTOValidator.java @@ -26,13 +26,12 @@ import org.alliancegenome.curation_api.model.ingest.dto.fms.PhenotypeTermIdentifierFmsDTO; import org.alliancegenome.curation_api.response.ObjectResponse; import org.alliancegenome.curation_api.response.SearchResponse; -import org.alliancegenome.curation_api.services.DataProviderService; +import org.alliancegenome.curation_api.services.OrganizationService; import org.alliancegenome.curation_api.services.ReferenceService; import org.alliancegenome.curation_api.services.ResourceDescriptorPageService; import org.alliancegenome.curation_api.services.VocabularyTermService; import org.alliancegenome.curation_api.services.ontology.PhenotypeTermService; import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import jakarta.enterprise.context.RequestScoped; @@ -45,7 +44,7 @@ public class PhenotypeAnnotationFmsDTOValidator { @Inject PhenotypeTermService phenotypeTermService; @Inject ConditionRelationFmsDTOValidator conditionRelationFmsDtoValidator; @Inject ConditionRelationDAO conditionRelationDAO; - @Inject DataProviderService dataProviderService; + @Inject OrganizationService organizationService; @Inject VocabularyTermService vocabularyTermService; @Inject ResourceDescriptorPageService resourceDescriptorPageService; @@ -88,7 +87,7 @@ public ObjectResponse validatePhenotypeAnnota annotation.setConditionRelations(null); } - annotation.setDataProvider(dataProviderService.getDefaultDataProvider(beDataProvider.sourceOrganization)); + annotation.setDataProvider(organizationService.getByAbbr(beDataProvider.sourceOrganization).getEntity()); annotation.setRelation(vocabularyTermService.getTermInVocabulary(VocabularyConstants.PHENOTYPE_RELATION_VOCABULARY, "has_phenotype").getEntity()); CrossReference evidenceXref = null; @@ -129,7 +128,7 @@ public ObjectResponse validateReference(PhenotypeFmsDTO dto) { ObjectResponse refResponse = new ObjectResponse<>(); Reference reference = null; - if (ObjectUtils.isEmpty(dto.getEvidence())) { + if (dto.getEvidence() == null) { refResponse.addErrorMessage("evidence", ValidationConstants.REQUIRED_MESSAGE); } else { if (StringUtils.isBlank(dto.getEvidence().getPublicationId())) { diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/SequenceTargetingReagentFmsDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/SequenceTargetingReagentFmsDTOValidator.java index b964fc2d9..69540e1a3 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/SequenceTargetingReagentFmsDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/SequenceTargetingReagentFmsDTOValidator.java @@ -10,8 +10,8 @@ import org.alliancegenome.curation_api.model.ingest.dto.fms.SequenceTargetingReagentFmsDTO; import org.alliancegenome.curation_api.response.ObjectResponse; import org.alliancegenome.curation_api.response.SearchResponse; -import org.alliancegenome.curation_api.services.DataProviderService; import org.alliancegenome.curation_api.services.GeneService; +import org.alliancegenome.curation_api.services.OrganizationService; import org.alliancegenome.curation_api.services.SequenceTargetingReagentService; import org.alliancegenome.curation_api.services.VocabularyTermService; import org.alliancegenome.curation_api.services.ontology.NcbiTaxonTermService; @@ -23,7 +23,7 @@ @RequestScoped public class SequenceTargetingReagentFmsDTOValidator { - @Inject DataProviderService dataProviderService; + @Inject OrganizationService organizationService; @Inject GeneService geneService; @@ -87,7 +87,7 @@ public SequenceTargetingReagent validateSQTRFmsDTO(SequenceTargetingReagentFmsDT } if (beDataProvider != null) { - sqtr.setDataProvider(dataProviderService.getDefaultDataProvider(beDataProvider.sourceOrganization)); + sqtr.setDataProvider(organizationService.getByAbbr(beDataProvider.sourceOrganization).getEntity()); } if (sqtrResponse.hasErrors()) { diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/VariantFmsDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/VariantFmsDTOValidator.java index c0fa83ef2..e8f4d1717 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/VariantFmsDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/fms/VariantFmsDTOValidator.java @@ -31,7 +31,7 @@ import org.alliancegenome.curation_api.response.SearchResponse; import org.alliancegenome.curation_api.services.AlleleService; import org.alliancegenome.curation_api.services.CrossReferenceService; -import org.alliancegenome.curation_api.services.DataProviderService; +import org.alliancegenome.curation_api.services.OrganizationService; import org.alliancegenome.curation_api.services.VocabularyTermService; import org.alliancegenome.curation_api.services.VocabularyTermSetService; import org.alliancegenome.curation_api.services.associations.alleleAssociations.AlleleVariantAssociationService; @@ -60,7 +60,7 @@ public class VariantFmsDTOValidator { @Inject AlleleVariantAssociationDAO alleleVariantAssociationDAO; @Inject AlleleVariantAssociationService alleleVariantAssociationService; @Inject SoTermService soTermService; - @Inject DataProviderService dataProviderService; + @Inject OrganizationService organizationService; @Inject NcbiTaxonTermService ncbiTaxonTermService; @Inject VocabularyTermService vocabularyTermService; @Inject VocabularyTermSetService vocabularyTermSetService; @@ -121,7 +121,7 @@ public Long validateVariant(VariantFmsDTO dto, List idsAdded, BackendBulkD variant.setModInternalId(modInternalId); variant.setVariantType(variantType); - variant.setDataProvider(dataProviderService.getDefaultDataProvider(dataProvider.name())); + variant.setDataProvider(organizationService.getByAbbr(dataProvider.name()).getEntity()); variant.setTaxon(ncbiTaxonTermService.getByCurie(dataProvider.canonicalTaxonCurie).getEntity()); SOTerm consequence = null; diff --git a/src/main/resources/db/migration/v0.38.0.21__linkml_v2_9_1_update.sql b/src/main/resources/db/migration/v0.38.0.21__linkml_v2_9_1_update.sql deleted file mode 100644 index 9e30ab079..000000000 --- a/src/main/resources/db/migration/v0.38.0.21__linkml_v2_9_1_update.sql +++ /dev/null @@ -1,23 +0,0 @@ -ALTER TABLE biologicalentity RENAME COLUMN modentityid TO primaryexternalid; -ALTER TABLE diseaseannotation RENAME COLUMN modentityid TO primaryexternalid; -ALTER TABLE geneexpressionannotation RENAME COLUMN modentityid TO primaryexternalid; -ALTER TABLE geneexpressionexperiment RENAME COLUMN modentityid TO primaryexternalid; -ALTER TABLE phenotypeannotation RENAME COLUMN modentityid TO primaryexternalid; -ALTER TABLE person RENAME COLUMN modentityid TO primaryexternalid; -ALTER TABLE reagent RENAME COLUMN modentityid TO primaryexternalid; - -ALTER INDEX biologicalentity_modentityid_index RENAME TO biologicalentity_primaryexternalid_index; -ALTER INDEX diseaseannotation_modentityid_index RENAME TO diseaseannotation_primaryexternalid_index; -ALTER INDEX geneexpressionannotation_modentityid_index RENAME TO geneexpressionannotation_primaryexternalid_index; -ALTER INDEX geneexpressionexperiment_modentityid_index RENAME TO geneexpressionexperiment_primaryexternalid_index; -ALTER INDEX phenotypeannotation_modentityid_index RENAME TO phenotypeannotation_primaryexternalid_index; -ALTER INDEX reagent_modentityid_index RENAME TO reagent_primaryexternalid_index; - -ALTER TABLE biologicalentity RENAME CONSTRAINT biologicalentity_modentityid_uk TO biologicalentity_primaryexternalid_uk; -ALTER TABLE person RENAME CONSTRAINT uk_9omqedixfrwkqq9bdts63g65u TO person_primaryexternalid_uk; -ALTER TABLE reagent RENAME CONSTRAINT reagent_modentityid_uk TO reagent_primaryexternalid_uk; - -ALTER TABLE diseaseannotation ADD CONSTRAINT diseaseannotation_primaryexternalid_uk UNIQUE (primaryexternalid); -ALTER TABLE geneexpressionannotation ADD CONSTRAINT geneexpressionannotation_primaryexternalid_uk UNIQUE (primaryexternalid); -ALTER TABLE geneexpressionexperiment ADD CONSTRAINT geneexpressionexperiment_primaryexternalid_uk UNIQUE (primaryexternalid); -ALTER TABLE phenotypeannotation ADD CONSTRAINT phenotypeannotation_primaryexternalid_uk UNIQUE (primaryexternalid); \ No newline at end of file diff --git a/src/main/resources/db/migration/v0.38.0.24__linkml_v2_9_1_update.sql b/src/main/resources/db/migration/v0.38.0.24__linkml_v2_9_1_update.sql new file mode 100644 index 000000000..8eb7db570 --- /dev/null +++ b/src/main/resources/db/migration/v0.38.0.24__linkml_v2_9_1_update.sql @@ -0,0 +1,282 @@ +-- Switch modEntityId to primaryExternalId +ALTER TABLE biologicalentity RENAME COLUMN modentityid TO primaryexternalid; +ALTER TABLE diseaseannotation RENAME COLUMN modentityid TO primaryexternalid; +ALTER TABLE geneexpressionannotation RENAME COLUMN modentityid TO primaryexternalid; +ALTER TABLE geneexpressionexperiment RENAME COLUMN modentityid TO primaryexternalid; +ALTER TABLE phenotypeannotation RENAME COLUMN modentityid TO primaryexternalid; +ALTER TABLE person RENAME COLUMN modentityid TO primaryexternalid; +ALTER TABLE reagent RENAME COLUMN modentityid TO primaryexternalid; + +ALTER INDEX biologicalentity_modentityid_index RENAME TO biologicalentity_primaryexternalid_index; +ALTER INDEX diseaseannotation_modentityid_index RENAME TO diseaseannotation_primaryexternalid_index; +ALTER INDEX geneexpressionannotation_modentityid_index RENAME TO geneexpressionannotation_primaryexternalid_index; +ALTER INDEX geneexpressionexperiment_modentityid_index RENAME TO geneexpressionexperiment_primaryexternalid_index; +ALTER INDEX phenotypeannotation_modentityid_index RENAME TO phenotypeannotation_primaryexternalid_index; +ALTER INDEX reagent_modentityid_index RENAME TO reagent_primaryexternalid_index; + +ALTER TABLE biologicalentity RENAME CONSTRAINT biologicalentity_modentityid_uk TO biologicalentity_primaryexternalid_uk; +ALTER TABLE person RENAME CONSTRAINT uk_9omqedixfrwkqq9bdts63g65u TO person_primaryexternalid_uk; +ALTER TABLE reagent RENAME CONSTRAINT reagent_modentityid_uk TO reagent_primaryexternalid_uk; + +ALTER TABLE diseaseannotation ADD CONSTRAINT diseaseannotation_primaryexternalid_uk UNIQUE (primaryexternalid); +ALTER TABLE geneexpressionannotation ADD CONSTRAINT geneexpressionannotation_primaryexternalid_uk UNIQUE (primaryexternalid); +ALTER TABLE geneexpressionexperiment ADD CONSTRAINT geneexpressionexperiment_primaryexternalid_uk UNIQUE (primaryexternalid); +ALTER TABLE phenotypeannotation ADD CONSTRAINT phenotypeannotation_primaryexternalid_uk UNIQUE (primaryexternalid); + +--Update data provider for diseaseannotation table +ALTER TABLE diseaseannotation ADD newdataprovider_id bigint; +ALTER TABLE diseaseannotation ADD dataprovidercrossreference_id bigint; +ALTER TABLE diseaseannotation ADD newsecondarydataprovider_id bigint; +ALTER TABLE diseaseannotation ADD secondarydataprovidercrossreference_id bigint; + +UPDATE diseaseannotation da + SET newdataprovider_id = dp.sourceorganization_id + FROM dataprovider dp + WHERE dp.id = da.dataprovider_id; + +UPDATE diseaseannotation da + SET dataprovidercrossreference_id = dp.crossreference_id + FROM dataprovider dp + WHERE dp.id = da.dataprovider_id; + +UPDATE diseaseannotation da + SET newsecondarydataprovider_id = dp.sourceorganization_id + FROM dataprovider dp + WHERE dp.id = da.secondarydataprovider_id; + +UPDATE diseaseannotation da + SET secondarydataprovidercrossreference_id = dp.crossreference_id + FROM dataprovider dp + WHERE dp.id = da.secondarydataprovider_id; + +ALTER TABLE diseaseannotation DROP COLUMN dataprovider_id; +ALTER TABLE diseaseannotation DROP COLUMN secondarydataprovider_id; + +ALTER TABLE diseaseannotation RENAME COLUMN newdataprovider_id TO dataprovider_id; +ALTER TABLE diseaseannotation RENAME COLUMN newsecondarydataprovider_id TO secondarydataprovider_id; + +ALTER TABLE diseaseannotation ADD CONSTRAINT diseaseannotation_dataprovider_id_fk FOREIGN KEY (dataprovider_id) REFERENCES organization(id); +ALTER TABLE diseaseannotation ADD CONSTRAINT diseaseannotation_dataprovidercrossreference_id_fk FOREIGN KEY (dataprovidercrossreference_id) REFERENCES crossreference(id); +ALTER TABLE diseaseannotation ADD CONSTRAINT diseaseannotation_secondarydataprovider_id_fk FOREIGN KEY (secondarydataprovider_id) REFERENCES organization(id); +ALTER TABLE diseaseannotation ADD CONSTRAINT diseaseannotation_secondarydataprovidercrossreference_id_fk FOREIGN KEY (secondarydataprovidercrossreference_id) REFERENCES crossreference(id); + +CREATE INDEX diseaseannotation_dataprovider_index ON diseaseannotation USING btree (dataprovider_id); +CREATE INDEX diseaseannotation_secondarydataprovider_index ON diseaseannotation USING btree (secondarydataprovider_id); +CREATE INDEX diseaseannotation_dataprovidercrossreference_index ON diseaseannotation USING btree (dataprovidercrossreference_id); +CREATE INDEX diseaseannotation_secondarydataprovidercrossreference_index ON diseaseannotation USING btree (secondarydataprovidercrossreference_id); + +--Update data provider for biologicalentity table +ALTER TABLE biologicalentity ADD newdataprovider_id bigint; +ALTER TABLE biologicalentity ADD dataprovidercrossreference_id bigint; + +UPDATE biologicalentity be + SET newdataprovider_id = dp.sourceorganization_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +UPDATE biologicalentity be + SET dataprovidercrossreference_id = dp.crossreference_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +ALTER TABLE biologicalentity DROP COLUMN dataprovider_id; + +ALTER TABLE biologicalentity RENAME COLUMN newdataprovider_id TO dataprovider_id; + +ALTER TABLE biologicalentity ADD CONSTRAINT biologicalentity_dataprovider_id_fk FOREIGN KEY (dataprovider_id) REFERENCES organization(id); +ALTER TABLE biologicalentity ADD CONSTRAINT biologicalentity_dataprovidercrossreference_id_fk FOREIGN KEY (dataprovidercrossreference_id) REFERENCES crossreference(id); + +CREATE INDEX biologicalentity_dataprovider_index ON biologicalentity USING btree (dataprovider_id); +CREATE INDEX biologicalentity_dataprovidercrossreference_index ON biologicalentity USING btree (dataprovidercrossreference_id); + +--Update data provider for geneexpressionannotation table +ALTER TABLE geneexpressionannotation ADD newdataprovider_id bigint; +ALTER TABLE geneexpressionannotation ADD dataprovidercrossreference_id bigint; + +UPDATE geneexpressionannotation be + SET newdataprovider_id = dp.sourceorganization_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +UPDATE geneexpressionannotation be + SET dataprovidercrossreference_id = dp.crossreference_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +ALTER TABLE geneexpressionannotation DROP COLUMN dataprovider_id; + +ALTER TABLE geneexpressionannotation RENAME COLUMN newdataprovider_id TO dataprovider_id; + +ALTER TABLE geneexpressionannotation ADD CONSTRAINT geneexpressionannotation_dataprovider_id_fk FOREIGN KEY (dataprovider_id) REFERENCES organization(id); +ALTER TABLE geneexpressionannotation ADD CONSTRAINT geneexpressionannotation_dataprovidercrossreference_id_fk FOREIGN KEY (dataprovidercrossreference_id) REFERENCES crossreference(id); + +CREATE INDEX geneexpressionannotation_dataprovider_index ON geneexpressionannotation USING btree (dataprovider_id); +CREATE INDEX geneexpressionannotation_dataprovidercrossreference_index ON geneexpressionannotation USING btree (dataprovidercrossreference_id); + +--Update data provider for geneexpressionexperiment table +ALTER TABLE geneexpressionexperiment ADD newdataprovider_id bigint; +ALTER TABLE geneexpressionexperiment ADD dataprovidercrossreference_id bigint; + +UPDATE geneexpressionexperiment be + SET newdataprovider_id = dp.sourceorganization_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +UPDATE geneexpressionexperiment be + SET dataprovidercrossreference_id = dp.crossreference_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +ALTER TABLE geneexpressionexperiment DROP COLUMN dataprovider_id; + +ALTER TABLE geneexpressionexperiment RENAME COLUMN newdataprovider_id TO dataprovider_id; + +ALTER TABLE geneexpressionexperiment ADD CONSTRAINT geneexpressionexperiment_dataprovider_id_fk FOREIGN KEY (dataprovider_id) REFERENCES organization(id); +ALTER TABLE geneexpressionexperiment ADD CONSTRAINT geneexpressionexperiment_dataprovidercrossreference_id_fk FOREIGN KEY (dataprovidercrossreference_id) REFERENCES crossreference(id); + +CREATE INDEX geneexpressionexperiment_dataprovider_index ON geneexpressionexperiment USING btree (dataprovider_id); +CREATE INDEX geneexpressionexperiment_dataprovidercrossreference_index ON geneexpressionexperiment USING btree (dataprovidercrossreference_id); + +--Update data provider for htpexpressiondatasetannotation table +ALTER TABLE htpexpressiondatasetannotation ADD newdataprovider_id bigint; +ALTER TABLE htpexpressiondatasetannotation ADD dataprovidercrossreference_id bigint; + +UPDATE htpexpressiondatasetannotation be + SET newdataprovider_id = dp.sourceorganization_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +UPDATE htpexpressiondatasetannotation be + SET dataprovidercrossreference_id = dp.crossreference_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +ALTER TABLE htpexpressiondatasetannotation DROP COLUMN dataprovider_id; + +ALTER TABLE htpexpressiondatasetannotation RENAME COLUMN newdataprovider_id TO dataprovider_id; + +ALTER TABLE htpexpressiondatasetannotation ADD CONSTRAINT htpexpressiondatasetannotation_dataprovider_id_fk FOREIGN KEY (dataprovider_id) REFERENCES organization(id); +ALTER TABLE htpexpressiondatasetannotation ADD CONSTRAINT htpexpressiondatasetannotation_dataprovidercrossreference_id_fk FOREIGN KEY (dataprovidercrossreference_id) REFERENCES crossreference(id); + +CREATE INDEX htpexpressiondatasetannotation_dataprovider_index ON htpexpressiondatasetannotation USING btree (dataprovider_id); +CREATE INDEX htpexpressiondatasetannotation_dataprovidercrossreference_index ON htpexpressiondatasetannotation USING btree (dataprovidercrossreference_id); + +--Update data provider for htpexpressiondatasetsampleannotation table +ALTER TABLE htpexpressiondatasetsampleannotation ADD newdataprovider_id bigint; +ALTER TABLE htpexpressiondatasetsampleannotation ADD dataprovidercrossreference_id bigint; + +UPDATE htpexpressiondatasetsampleannotation be + SET newdataprovider_id = dp.sourceorganization_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +UPDATE htpexpressiondatasetsampleannotation be + SET dataprovidercrossreference_id = dp.crossreference_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +ALTER TABLE htpexpressiondatasetsampleannotation DROP COLUMN dataprovider_id; + +ALTER TABLE htpexpressiondatasetsampleannotation RENAME COLUMN newdataprovider_id TO dataprovider_id; + +ALTER TABLE htpexpressiondatasetsampleannotation ADD CONSTRAINT htpexpressiondatasetsampleannotation_dataprovider_id_fk FOREIGN KEY (dataprovider_id) REFERENCES organization(id); +ALTER TABLE htpexpressiondatasetsampleannotation ADD CONSTRAINT htpexpressiondatasetsampleannotation_dataprovidercrossreference_id_fk FOREIGN KEY (dataprovidercrossreference_id) REFERENCES crossreference(id); + +CREATE INDEX htpexpressiondatasetsampleannotation_dataprovider_index ON htpexpressiondatasetsampleannotation USING btree (dataprovider_id); +CREATE INDEX htpexpressiondatasetsampleannotation_dataprovidercrossreference_index ON htpexpressiondatasetsampleannotation USING btree (dataprovidercrossreference_id); + +--Update data provider for phenotypeannotation table +ALTER TABLE phenotypeannotation ADD newdataprovider_id bigint; +ALTER TABLE phenotypeannotation ADD dataprovidercrossreference_id bigint; + +UPDATE phenotypeannotation be + SET newdataprovider_id = dp.sourceorganization_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +UPDATE phenotypeannotation be + SET dataprovidercrossreference_id = dp.crossreference_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +ALTER TABLE phenotypeannotation DROP COLUMN dataprovider_id; + +ALTER TABLE phenotypeannotation RENAME COLUMN newdataprovider_id TO dataprovider_id; + +ALTER TABLE phenotypeannotation ADD CONSTRAINT phenotypeannotation_dataprovider_id_fk FOREIGN KEY (dataprovider_id) REFERENCES organization(id); +ALTER TABLE phenotypeannotation ADD CONSTRAINT phenotypeannotation_dataprovidercrossreference_id_fk FOREIGN KEY (dataprovidercrossreference_id) REFERENCES crossreference(id); + +CREATE INDEX phenotypeannotation_dataprovider_index ON phenotypeannotation USING btree (dataprovider_id); +CREATE INDEX phenotypeannotation_dataprovidercrossreference_index ON phenotypeannotation USING btree (dataprovidercrossreference_id); + +--Update data provider for reagent table +ALTER TABLE reagent ADD newdataprovider_id bigint; +ALTER TABLE reagent ADD dataprovidercrossreference_id bigint; + +UPDATE reagent be + SET newdataprovider_id = dp.sourceorganization_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +UPDATE reagent be + SET dataprovidercrossreference_id = dp.crossreference_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +ALTER TABLE reagent DROP COLUMN dataprovider_id; + +ALTER TABLE reagent RENAME COLUMN newdataprovider_id TO dataprovider_id; + +ALTER TABLE reagent ADD CONSTRAINT reagent_dataprovider_id_fk FOREIGN KEY (dataprovider_id) REFERENCES organization(id); +ALTER TABLE reagent ADD CONSTRAINT reagent_dataprovidercrossreference_id_fk FOREIGN KEY (dataprovidercrossreference_id) REFERENCES crossreference(id); + +CREATE INDEX reagent_dataprovider_index ON reagent USING btree (dataprovider_id); +CREATE INDEX reagent_dataprovidercrossreference_index ON reagent USING btree (dataprovidercrossreference_id); + +--Update data provider for species table +ALTER TABLE species ADD newdataprovider_id bigint; +ALTER TABLE species ADD dataprovidercrossreference_id bigint; + +UPDATE species be + SET newdataprovider_id = dp.sourceorganization_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +UPDATE species be + SET dataprovidercrossreference_id = dp.crossreference_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +ALTER TABLE species DROP COLUMN dataprovider_id; + +ALTER TABLE species RENAME COLUMN newdataprovider_id TO dataprovider_id; + +ALTER TABLE species ADD CONSTRAINT species_dataprovider_id_fk FOREIGN KEY (dataprovider_id) REFERENCES organization(id); +ALTER TABLE species ADD CONSTRAINT species_dataprovidercrossreference_id_fk FOREIGN KEY (dataprovidercrossreference_id) REFERENCES crossreference(id); + +CREATE INDEX species_dataprovider_index ON species USING btree (dataprovider_id); +CREATE INDEX species_dataprovidercrossreference_index ON species USING btree (dataprovidercrossreference_id); + +--Update data provider for chromosome table +ALTER TABLE chromosome ADD newdataprovider_id bigint; +ALTER TABLE chromosome ADD dataprovidercrossreference_id bigint; + +UPDATE chromosome be + SET newdataprovider_id = dp.sourceorganization_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +UPDATE chromosome be + SET dataprovidercrossreference_id = dp.crossreference_id + FROM dataprovider dp + WHERE dp.id = be.dataprovider_id; + +ALTER TABLE chromosome DROP COLUMN dataprovider_id; + +ALTER TABLE chromosome RENAME COLUMN newdataprovider_id TO dataprovider_id; + +ALTER TABLE chromosome ADD CONSTRAINT chromosome_dataprovider_id_fk FOREIGN KEY (dataprovider_id) REFERENCES organization(id); +ALTER TABLE chromosome ADD CONSTRAINT chromosome_dataprovidercrossreference_id_fk FOREIGN KEY (dataprovidercrossreference_id) REFERENCES crossreference(id); + +CREATE INDEX chromosome_dataprovider_index ON chromosome USING btree (dataprovider_id); +CREATE INDEX chromosome_dataprovidercrossreference_index ON chromosome USING btree (dataprovidercrossreference_id); \ No newline at end of file diff --git a/src/test/java/org/alliancegenome/curation_api/AffectedGenomicModelITCase.java b/src/test/java/org/alliancegenome/curation_api/AffectedGenomicModelITCase.java index 01cac47a9..5979100c1 100644 --- a/src/test/java/org/alliancegenome/curation_api/AffectedGenomicModelITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/AffectedGenomicModelITCase.java @@ -12,7 +12,6 @@ import org.alliancegenome.curation_api.constants.ValidationConstants; import org.alliancegenome.curation_api.constants.VocabularyConstants; import org.alliancegenome.curation_api.model.entities.AffectedGenomicModel; -import org.alliancegenome.curation_api.model.entities.DataProvider; import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.Person; import org.alliancegenome.curation_api.model.entities.Vocabulary; @@ -49,9 +48,9 @@ public class AffectedGenomicModelITCase extends BaseITCase { private VocabularyTerm subtype; private VocabularyTerm subtype2; private VocabularyTerm obsoleteSubtype; - private DataProvider dataProvider; - private DataProvider dataProvider2; - private DataProvider obsoleteDataProvider; + private Organization dataProvider; + private Organization dataProvider2; + private Organization obsoleteDataProvider; private Organization nonPersistedOrganization; private void loadRequiredEntities() { @@ -65,9 +64,9 @@ private void loadRequiredEntities() { subtype2 = getVocabularyTerm(subtypeVocabulary, "genotype"); obsoleteSubtype = createVocabularyTerm(subtypeVocabulary, "obsolete", true); obsoleteTaxon = getNCBITaxonTerm("NCBITaxon:0000"); - dataProvider = createDataProvider("TEST", false); - dataProvider2 = createDataProvider("TEST2", false); - obsoleteDataProvider = createDataProvider("ODP", true); + dataProvider = getOrganization("TEST"); + dataProvider2 = getOrganization("TEST2"); + obsoleteDataProvider = getOrganization("ODP"); nonPersistedOrganization = new Organization(); nonPersistedOrganization.setAbbreviation("INV"); } @@ -110,7 +109,7 @@ public void createValidAGM() { body("entity.dateCreated", is(datetime.toString())). body("entity.createdBy.uniqueId", is("Local|Dev User|test@alliancegenome.org")). body("entity.updatedBy.uniqueId", is("Local|Dev User|test@alliancegenome.org")). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider.getSourceOrganization().getAbbreviation())); + body("entity.dataProvider.abbreviation", is(dataProvider.getAbbreviation())); } @Test @@ -148,7 +147,7 @@ public void editAGM() { body("entity.dateCreated", is(datetime2.toString())). body("entity.createdBy.uniqueId", is(person.getUniqueId())). body("entity.updatedBy.uniqueId", is("Local|Dev User|test@alliancegenome.org")). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2.getSourceOrganization().getAbbreviation())); + body("entity.dataProvider.abbreviation", is(dataProvider2.getAbbreviation())); } @Test @@ -250,14 +249,12 @@ public void createAGMWithInvalidFields() { nonPersistedTaxon.setCurie("NCBITaxon:Invalid"); VocabularyTerm nonPersistedTerm = new VocabularyTerm(); nonPersistedTerm.setName("invalid"); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); AffectedGenomicModel agm = new AffectedGenomicModel(); agm.setPrimaryExternalId("AGM:0008"); agm.setTaxon(nonPersistedTaxon); agm.setSubtype(nonPersistedTerm); - agm.setDataProvider(invalidDataProvider); + agm.setDataProvider(nonPersistedOrganization); RestAssured.given(). contentType("application/json"). @@ -269,7 +266,7 @@ public void createAGMWithInvalidFields() { body("errorMessages", is(aMapWithSize(3))). body("errorMessages.taxon", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.subtype", is(ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)); + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)); } @Test @@ -279,13 +276,11 @@ public void editAGMWithInvalidFields() { nonPersistedTaxon.setCurie("NCBITaxon:Invalid"); VocabularyTerm nonPersistedTerm = new VocabularyTerm(); nonPersistedTerm.setName("invalid"); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); AffectedGenomicModel agm = getAffectedGenomicModel(AGM); agm.setTaxon(nonPersistedTaxon); agm.setSubtype(nonPersistedTerm); - agm.setDataProvider(invalidDataProvider); + agm.setDataProvider(nonPersistedOrganization); RestAssured.given(). contentType("application/json"). @@ -297,7 +292,7 @@ public void editAGMWithInvalidFields() { body("errorMessages", is(aMapWithSize(3))). body("errorMessages.taxon", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.subtype", is(ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)); + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)); } @Test @@ -348,6 +343,7 @@ public void editAGMWithObsoleteFields() { public void editAGMWithNullNonRequiredFields() { AffectedGenomicModel agm = getAffectedGenomicModel(AGM); agm.setName(null); + agm.setDataProviderCrossReference(null); RestAssured.given(). contentType("application/json"). @@ -362,6 +358,7 @@ public void editAGMWithNullNonRequiredFields() { get("/api/agm/" + AGM). then(). statusCode(200). + body("entity", not(hasKey("dataProviderCrossReference"))). body("entity", not(hasKey("name"))); } diff --git a/src/test/java/org/alliancegenome/curation_api/AgmBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/AgmBulkUploadITCase.java index f95f906f2..b5dac66ab 100644 --- a/src/test/java/org/alliancegenome/curation_api/AgmBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/AgmBulkUploadITCase.java @@ -1,18 +1,27 @@ package org.alliancegenome.curation_api; +import static org.hamcrest.Matchers.hasKey; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.not; + +import java.time.OffsetDateTime; +import java.util.List; + +import org.alliancegenome.curation_api.base.BaseITCase; +import org.alliancegenome.curation_api.resources.TestContainerResource; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.MethodOrderer; +import org.junit.jupiter.api.Order; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.api.TestMethodOrder; + import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusIntegrationTest; import io.restassured.RestAssured; import io.restassured.config.HttpClientConfig; import io.restassured.config.RestAssuredConfig; -import org.alliancegenome.curation_api.base.BaseITCase; -import org.alliancegenome.curation_api.resources.TestContainerResource; -import org.junit.jupiter.api.*; - -import java.time.OffsetDateTime; -import java.util.List; - -import static org.hamcrest.Matchers.*; @QuarkusIntegrationTest @@ -65,10 +74,10 @@ public void agmBulkUploadCheckFields() throws Exception { body("entity.agmSecondaryIds[0].obsolete", is(true)). body("entity.dateCreated", is(OffsetDateTime.parse("2022-03-09T22:10:12Z").toString())). body("entity.dateUpdated", is(OffsetDateTime.parse("2022-03-10T22:10:12Z").toString())). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider)). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST:0001")). - body("entity.dataProvider.crossReference.displayName", is("TEST:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")); + body("entity.dataProvider.abbreviation", is(dataProvider)). + body("entity.dataProviderCrossReference.referencedCurie", is("TEST:0001")). + body("entity.dataProviderCrossReference.displayName", is("TEST:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")); } @Test @@ -92,10 +101,10 @@ public void agmBulkUploadUpdateCheckFields() throws Exception { body("entity.dateCreated", is(OffsetDateTime.parse("2022-03-19T22:10:12Z").toString())). body("entity.dateUpdated", is(OffsetDateTime.parse("2022-03-20T22:10:12Z").toString())). body("entity.synonyms", is(List.of("Syn 1", "Syn 2"))). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProviderRGD)). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST2:0001")). - body("entity.dataProvider.crossReference.displayName", is("TEST2:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage2")); + body("entity.dataProvider.abbreviation", is(dataProviderRGD)). + body("entity.dataProviderCrossReference.referencedCurie", is("TEST2:0001")). + body("entity.dataProviderCrossReference.displayName", is("TEST2:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage2")); } @Test @@ -155,7 +164,8 @@ public void agmBulkUploadUpdateMissingNonRequiredFields() throws Exception { body("entity", not(hasKey("dateCreated"))). body("entity", not(hasKey("synonyms"))). body("entity", not(hasKey("agmSecondaryIds"))). - body("entity", not(hasKey("dateUpdated"))); + body("entity", not(hasKey("dateUpdated"))). + body("entity", not(hasKey("dataProviderCrossReference"))); } @Test diff --git a/src/test/java/org/alliancegenome/curation_api/AgmStrAssociationBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/AgmStrAssociationBulkUploadITCase.java index 6729f705d..5d8ed5f92 100644 --- a/src/test/java/org/alliancegenome/curation_api/AgmStrAssociationBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/AgmStrAssociationBulkUploadITCase.java @@ -9,7 +9,7 @@ import org.alliancegenome.curation_api.base.BaseITCase; import org.alliancegenome.curation_api.model.entities.AffectedGenomicModel; -import org.alliancegenome.curation_api.model.entities.DataProvider; +import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.SequenceTargetingReagent; import org.alliancegenome.curation_api.resources.TestContainerResource; import org.junit.jupiter.api.BeforeEach; @@ -56,7 +56,7 @@ public void init() { private final String strGetEndpoint = "/api/sqtr/"; private void loadRequiredEntities() throws Exception { - DataProvider dataProvider = createDataProvider("ZFIN", false); + Organization dataProvider = getOrganization("ZFIN"); agm = createAffectedGenomicModel(agmCurie, "test name", "NCBITaxon:7955", "fish", false, dataProvider); str = getSequenceTargetingReagent(strCurie); } diff --git a/src/test/java/org/alliancegenome/curation_api/AlleleBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/AlleleBulkUploadITCase.java index 217e6a45b..eaeec642d 100644 --- a/src/test/java/org/alliancegenome/curation_api/AlleleBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/AlleleBulkUploadITCase.java @@ -194,10 +194,10 @@ public void alleleBulkUploadCheckFields() throws Exception { body("entity.alleleNomenclatureEvents[0].updatedBy.uniqueId", is("ALLELETEST:Person0002")). body("entity.alleleNomenclatureEvents[0].dateCreated", is(OffsetDateTime.parse("2022-03-09T22:10:12Z").toString())). body("entity.alleleNomenclatureEvents[0].dateUpdated", is(OffsetDateTime.parse("2022-03-10T22:10:12Z").toString())). - body("entity.dataProvider.sourceOrganization.abbreviation", is(requiredDataProvider)). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST:0001")). - body("entity.dataProvider.crossReference.displayName", is("TEST:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")); + body("entity.dataProvider.abbreviation", is(requiredDataProvider)). + body("entity.dataProviderCrossReference.referencedCurie", is("TEST:0001")). + body("entity.dataProviderCrossReference.displayName", is("TEST:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")); } @Test @@ -332,10 +332,10 @@ public void alleleBulkUploadUpdateCheckFields() throws Exception { body("entity.alleleNomenclatureEvents[0].updatedBy.uniqueId", is("ALLELETEST:Person0001")). body("entity.alleleNomenclatureEvents[0].dateCreated", is(OffsetDateTime.parse("2022-03-19T22:10:12Z").toString())). body("entity.alleleNomenclatureEvents[0].dateUpdated", is(OffsetDateTime.parse("2022-03-20T22:10:12Z").toString())). - body("entity.dataProvider.sourceOrganization.abbreviation", is(requiredDataProviderRGD)). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST2:0001")). - body("entity.dataProvider.crossReference.displayName", is("TEST2:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage2")); + body("entity.dataProvider.abbreviation", is(requiredDataProviderRGD)). + body("entity.dataProviderCrossReference.referencedCurie", is("TEST2:0001")). + body("entity.dataProviderCrossReference.displayName", is("TEST2:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage2")); } @Test @@ -466,7 +466,8 @@ public void alleleBulkUploadUpdateMissingNonRequiredFields() throws Exception { body("entity", not(hasKey("alleleFunctionalImpacts"))). body("entity", not(hasKey("alleleGermlineTransmissionStatus"))). body("entity", not(hasKey("alleleDatabaseStatus"))). - body("entity", not(hasKey("alleleNomenclatureEvents"))); + body("entity", not(hasKey("alleleNomenclatureEvents"))). + body("entity", not(hasKey("dataProviderCrossReference"))); } @Test @@ -549,7 +550,7 @@ public void alleleBulkUploadUpdateMissingNonRequiredFieldsLevel2() throws Except @Test @Order(8) - public void alleleBulkUploadUpdateEmptyNonRequiredFieldsLevel() throws Exception { + public void alleleBulkUploadUpdateEmptyNonRequiredFields() throws Exception { checkSuccessfulBulkLoad(alleleBulkPostEndpoint, alleleTestFilePath + "AF_01_all_fields.json"); checkSuccessfulBulkLoad(alleleBulkPostEndpoint, alleleTestFilePath + "UE_01_update_empty_non_required_fields.json"); diff --git a/src/test/java/org/alliancegenome/curation_api/AlleleITCase.java b/src/test/java/org/alliancegenome/curation_api/AlleleITCase.java index eb1c0e8f2..3131244e1 100644 --- a/src/test/java/org/alliancegenome/curation_api/AlleleITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/AlleleITCase.java @@ -13,7 +13,6 @@ import org.alliancegenome.curation_api.constants.ValidationConstants; import org.alliancegenome.curation_api.constants.VocabularyConstants; import org.alliancegenome.curation_api.model.entities.Allele; -import org.alliancegenome.curation_api.model.entities.DataProvider; import org.alliancegenome.curation_api.model.entities.Gene; import org.alliancegenome.curation_api.model.entities.InformationContentEntity; import org.alliancegenome.curation_api.model.entities.Note; @@ -124,9 +123,9 @@ public class AlleleITCase extends BaseITCase { private AlleleFunctionalImpactSlotAnnotation alleleFunctionalImpact; private AlleleDatabaseStatusSlotAnnotation alleleDatabaseStatus; private AlleleNomenclatureEventSlotAnnotation alleleNomenclatureEvent; - private DataProvider dataProvider; - private DataProvider dataProvider2; - private DataProvider obsoleteDataProvider; + private Organization dataProvider; + private Organization dataProvider2; + private Organization obsoleteDataProvider; private Organization nonPersistedOrganization; private Gene gene; private Gene gene2; @@ -200,9 +199,9 @@ private void loadRequiredEntities() { alleleSecondaryId = createAlleleSecondaryIdSlotAnnotation(List.of(reference), "TEST:Secondary"); alleleFunctionalImpact = createAlleleFunctionalImpactSlotAnnotation(List.of(reference), List.of(hypermorphicFunctionalImpact), mpTerm, "Phenotype statement"); alleleNomenclatureEvent = createAlleleNomenclatureEventSlotAnnotation(List.of(reference), dataMergedEvent); - dataProvider = createDataProvider("TEST", false); - dataProvider2 = createDataProvider("TEST2", false); - obsoleteDataProvider = createDataProvider("ODP", true); + dataProvider = getOrganization("TEST"); + dataProvider2 = getOrganization("TEST2"); + obsoleteDataProvider = getOrganization("ODP"); nonPersistedOrganization = new Organization(); nonPersistedOrganization.setAbbreviation("INV"); VocabularyTerm symbolNameType = getVocabularyTerm(nameTypeVocabulary, "nomenclature_symbol"); @@ -303,7 +302,7 @@ public void createValidAllele() { body("entity.alleleFunctionalImpacts[0].phenotypeStatement", is("Phenotype statement")). body("entity.alleleNomenclatureEvents[0].evidence[0].curie", is(reference.getCurie())). body("entity.alleleNomenclatureEvents[0].nomenclatureEvent.name", is(dataMergedEvent.getName())). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider.getSourceOrganization().getAbbreviation())); + body("entity.dataProvider.abbreviation", is(dataProvider.getAbbreviation())); } @Test @@ -458,7 +457,7 @@ public void editAllele() { body("entity.alleleFunctionalImpacts[0].phenotypeStatement", is("Edited phenotype statement")). body("entity.alleleNomenclatureEvents[0].evidence[0].curie", is(reference2.getCurie())). body("entity.alleleNomenclatureEvents[0].nomenclatureEvent.name", is(symbolUpdatedEvent.getName())). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2.getSourceOrganization().getAbbreviation())); + body("entity.dataProvider.abbreviation", is(dataProvider2.getAbbreviation())); } @Test @@ -808,8 +807,6 @@ public void createAlleleWithInvalidFields() { nonPersistedSoTerm.setCurie("SO:Invalid"); MPTerm nonPersistedMpTerm = new MPTerm(); nonPersistedMpTerm.setCurie("MP:Invalid"); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); Note invalidNote = new Note(); invalidNote.setNoteType(dominantInheritanceMode); @@ -823,7 +820,7 @@ public void createAlleleWithInvalidFields() { allele.setReferences(List.of(nonPersistedReference)); allele.setIsExtinct(false); allele.setDateCreated(datetime); - allele.setDataProvider(invalidDataProvider); + allele.setDataProvider(nonPersistedOrganization); allele.setRelatedNotes(List.of(invalidNote)); AlleleMutationTypeSlotAnnotation invalidMutationType = createAlleleMutationTypeSlotAnnotation(List.of(nonPersistedReference), List.of(nonPersistedSoTerm)); @@ -879,7 +876,7 @@ public void createAlleleWithInvalidFields() { "nameType - " + ValidationConstants.INVALID_MESSAGE, "synonymScope - " + ValidationConstants.INVALID_MESSAGE)))). body("errorMessages.alleleSecondaryIds", is("evidence - " + ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.alleleFunctionalImpacts", is(String.join(" | ", List.of( "evidence - " + ValidationConstants.INVALID_MESSAGE, "functionalImpacts - " + ValidationConstants.INVALID_MESSAGE, @@ -909,8 +906,6 @@ public void editAlleleWithInvalidFields() { nonPersistedSoTerm.setCurie("SO:Invalid"); MPTerm nonPersistedMpTerm = new MPTerm(); nonPersistedMpTerm.setCurie("MP:Invalid"); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); Allele allele = getAllele(ALLELE); allele.setTaxon(nonPersistedTaxon); @@ -918,7 +913,7 @@ public void editAlleleWithInvalidFields() { allele.setReferences(List.of(nonPersistedReference)); allele.setIsExtinct(false); allele.setDateCreated(datetime); - allele.setDataProvider(invalidDataProvider); + allele.setDataProvider(nonPersistedOrganization); AlleleMutationTypeSlotAnnotation invalidMutationType = allele.getAlleleMutationTypes().get(0); invalidMutationType.setEvidence(List.of(nonPersistedReference)); @@ -1002,7 +997,7 @@ public void editAlleleWithInvalidFields() { "nameType - " + ValidationConstants.INVALID_MESSAGE, "synonymScope - " + ValidationConstants.INVALID_MESSAGE)))). body("errorMessages.alleleSecondaryIds", is("evidence - " + ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.alleleFunctionalImpacts", is(String.join(" | ", List.of( "evidence - " + ValidationConstants.INVALID_MESSAGE, "functionalImpacts - " + ValidationConstants.INVALID_MESSAGE, @@ -1340,6 +1335,7 @@ public void editAlleleWithNullNonRequiredFieldsLevel1() { allele.setAlleleDatabaseStatus(null); allele.setAlleleNomenclatureEvents(null); allele.setRelatedNotes(null); + allele.setDataProviderCrossReference(null); RestAssured.given(). contentType("application/json"). @@ -1367,7 +1363,8 @@ public void editAlleleWithNullNonRequiredFieldsLevel1() { body("entity", not(hasKey("alleleGermlineTransmissionStatus"))). body("entity", not(hasKey("alleleDatabaseStatus"))). body("entity", not(hasKey("alleleNomenclatureEvents"))). - body("entity", not(hasKey("relatedNotes"))); + body("entity", not(hasKey("relatedNotes"))). + body("entity", not(hasKey("dataProviderCrossReference"))); } @Test diff --git a/src/test/java/org/alliancegenome/curation_api/BiogridOrcBulkUploadFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/BiogridOrcBulkUploadFmsITCase.java index b1af4d731..973830636 100644 --- a/src/test/java/org/alliancegenome/curation_api/BiogridOrcBulkUploadFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/BiogridOrcBulkUploadFmsITCase.java @@ -5,7 +5,7 @@ import org.alliancegenome.curation_api.base.BaseITCase; import org.alliancegenome.curation_api.constants.VocabularyConstants; -import org.alliancegenome.curation_api.model.entities.DataProvider; +import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.ResourceDescriptor; import org.alliancegenome.curation_api.model.entities.ResourceDescriptorPage; import org.alliancegenome.curation_api.model.entities.Vocabulary; @@ -50,7 +50,7 @@ public void init() { private void loadRequiredEntities() throws Exception { Vocabulary nameTypeVocabulary = getVocabulary(VocabularyConstants.NAME_TYPE_VOCABULARY); VocabularyTerm symbolTerm = getVocabularyTerm(nameTypeVocabulary, "nomenclature_symbol"); - DataProvider dataProvider = createDataProvider("WB", false); + Organization dataProvider = getOrganization("WB"); createGeneWithXref("WB:XrefTest01", "NCBITaxon:6239", symbolTerm, false, dataProvider, "NCBI_Gene:108101"); createGeneWithXref("WB:XrefTest02", "NCBITaxon:6239", symbolTerm, false, dataProvider, "NCBI_Gene:100001"); ResourceDescriptor rd = createResourceDescriptor("NCBI_Gene"); diff --git a/src/test/java/org/alliancegenome/curation_api/ConstructBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/ConstructBulkUploadITCase.java index 8fd9b2fd7..d566b0a3e 100644 --- a/src/test/java/org/alliancegenome/curation_api/ConstructBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/ConstructBulkUploadITCase.java @@ -149,10 +149,10 @@ public void constructBulkUploadCheckFields() throws Exception { body("entity.constructComponents[0].relatedNotes[0].updatedBy.uniqueId", is("CONSTRUCTTEST:Person0002")). body("entity.constructComponents[0].relatedNotes[0].dateCreated", is(OffsetDateTime.parse("2022-03-09T22:10:12Z").toString())). body("entity.constructComponents[0].relatedNotes[0].dateUpdated", is(OffsetDateTime.parse("2022-03-10T22:10:12Z").toString())). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider)). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST:0001")). - body("entity.dataProvider.crossReference.displayName", is("TEST:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")); + body("entity.dataProvider.abbreviation", is(dataProvider)). + body("entity.dataProviderCrossReference.referencedCurie", is("TEST:0001")). + body("entity.dataProviderCrossReference.displayName", is("TEST:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")); } @Test @@ -234,10 +234,10 @@ public void constructBulkUploadUpdateFields() throws Exception { body("entity.constructComponents[0].relatedNotes[0].updatedBy.uniqueId", is("CONSTRUCTTEST:Person0001")). body("entity.constructComponents[0].relatedNotes[0].dateCreated", is(OffsetDateTime.parse("2022-03-19T22:10:12Z").toString())). body("entity.constructComponents[0].relatedNotes[0].dateUpdated", is(OffsetDateTime.parse("2022-03-20T22:10:12Z").toString())). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2)). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST2:0001")). - body("entity.dataProvider.crossReference.displayName", is("TEST2:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage2")); + body("entity.dataProvider.abbreviation", is(dataProvider2)). + body("entity.dataProviderCrossReference.referencedCurie", is("TEST2:0001")). + body("entity.dataProviderCrossReference.displayName", is("TEST2:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage2")); } @Test @@ -373,7 +373,7 @@ public void constructBulkUploadUpdateMissingNonRequiredFieldsLevel2() throws Exc body("entity.constructComponents[0]", not(hasKey("dateCreated"))). body("entity.constructComponents[0]", not(hasKey("dateUpdated"))). body("entity.constructComponents[0]", not(hasKey("relatedNotes"))). - body("entity.dataProvider", not(hasKey("crossReferences"))); + body("entity", not(hasKey("dataProviderCrossReference"))); } @Test diff --git a/src/test/java/org/alliancegenome/curation_api/ConstructITCase.java b/src/test/java/org/alliancegenome/curation_api/ConstructITCase.java index ab39aa230..0efdfd571 100644 --- a/src/test/java/org/alliancegenome/curation_api/ConstructITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/ConstructITCase.java @@ -13,7 +13,6 @@ import org.alliancegenome.curation_api.constants.ValidationConstants; import org.alliancegenome.curation_api.constants.VocabularyConstants; import org.alliancegenome.curation_api.model.entities.Construct; -import org.alliancegenome.curation_api.model.entities.DataProvider; import org.alliancegenome.curation_api.model.entities.Gene; import org.alliancegenome.curation_api.model.entities.InformationContentEntity; import org.alliancegenome.curation_api.model.entities.Note; @@ -66,9 +65,9 @@ public class ConstructITCase extends BaseITCase { private Note relatedNote2; private OffsetDateTime datetime; private OffsetDateTime datetime2; - private DataProvider dataProvider; - private DataProvider dataProvider2; - private DataProvider obsoleteDataProvider; + private Organization dataProvider; + private Organization dataProvider2; + private Organization obsoleteDataProvider; private Person person; private Vocabulary nameTypeVocabulary; private Vocabulary synonymScopeVocabulary; @@ -113,9 +112,9 @@ private void loadRequiredEntities() { datetime = OffsetDateTime.parse("2022-03-09T22:10:12+00:00"); datetime2 = OffsetDateTime.parse("2022-04-10T22:10:11+00:00"); obsoleteReference = createReference("AGRKB:000020000", true); - dataProvider = createDataProvider("CNST_TEST", false); - dataProvider2 = createDataProvider("CNST_TEST2", false); - obsoleteDataProvider = createDataProvider("CNST_ODP", true); + dataProvider = createOrganization("CNST_TEST", false); + dataProvider2 = createOrganization("CNST_TEST2", false); + obsoleteDataProvider = createOrganization("CNST_ODP", true); person = createPerson("TEST:ConstructPerson0001"); nameTypeVocabulary = getVocabulary(VocabularyConstants.NAME_TYPE_VOCABULARY); synonymScopeVocabulary = getVocabulary(VocabularyConstants.SYNONYM_SCOPE_VOCABULARY); @@ -192,7 +191,7 @@ public void createValidConstruct() { body("entity.dateCreated", is(datetime.toString())). body("entity.createdBy.uniqueId", is("Local|Dev User|test@alliancegenome.org")). body("entity.updatedBy.uniqueId", is("Local|Dev User|test@alliancegenome.org")). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider.getSourceOrganization().getAbbreviation())). + body("entity.dataProvider.abbreviation", is(dataProvider.getAbbreviation())). body("entity.constructComponents", hasSize(1)). body("entity.constructComponents[0].componentSymbol", is("cc1")). body("entity.constructComponents[0].relation.name", is(isRegulatedByRelation.getName())). @@ -280,7 +279,7 @@ public void editConstruct() { body("entity.dateCreated", is(datetime2.toString())). body("entity.createdBy.uniqueId", is(person.getUniqueId())). body("entity.updatedBy.uniqueId", is("Local|Dev User|test@alliancegenome.org")). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2.getSourceOrganization().getAbbreviation())). + body("entity.dataProvider.abbreviation", is(dataProvider2.getAbbreviation())). body("entity.constructSymbol.displayText", is(editedSymbol.getDisplayText())). body("entity.constructSymbol.formatText", is(editedSymbol.getFormatText())). body("entity.constructSymbol.nameType.name", is(editedSymbol.getNameType().getName())). @@ -527,8 +526,6 @@ public void createConstructWithInvalidFields() { nonPersistedReference.setCurie("AGRKB:Invalid"); Organization nonPersistedOrganization = new Organization(); nonPersistedOrganization.setAbbreviation("INV"); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); Note invalidNote = new Note(); invalidNote.setNoteType(alleleNoteType); @@ -545,7 +542,7 @@ public void createConstructWithInvalidFields() { construct.setPrimaryExternalId("Construct:0009"); construct.setReferences(List.of(nonPersistedReference)); construct.setDateCreated(datetime); - construct.setDataProvider(invalidDataProvider); + construct.setDataProvider(nonPersistedOrganization); construct.setConstructComponents(List.of(invalidComponent)); construct.setConstructSymbol(invalidSymbol); construct.setConstructFullName(invalidFullName); @@ -559,7 +556,7 @@ public void createConstructWithInvalidFields() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(6))). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.references", is("curie - " + ValidationConstants.INVALID_MESSAGE)). body("errorMessages.constructComponents", is(String.join(" | ", List.of( "evidence - " + ValidationConstants.INVALID_MESSAGE, @@ -592,8 +589,6 @@ public void editConstructWithInvalidFields() { nonPersistedReference.setCurie("AGRKB:Invalid"); Organization nonPersistedOrganization = new Organization(); nonPersistedOrganization.setAbbreviation("INV"); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); Note invalidNote = new Note(); invalidNote.setNoteType(alleleNoteType); @@ -602,7 +597,7 @@ public void editConstructWithInvalidFields() { Construct construct = getConstruct(CONSTRUCT); construct.setReferences(List.of(nonPersistedReference)); - construct.setDataProvider(invalidDataProvider); + construct.setDataProvider(nonPersistedOrganization); ConstructComponentSlotAnnotation component = construct.getConstructComponents().get(0); component.setRelation(alleleNoteType); component.setEvidence(List.of(nonPersistedReference)); @@ -633,7 +628,7 @@ public void editConstructWithInvalidFields() { then(). statusCode(400). body("errorMessages", is(aMapWithSize(6))). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.references", is("curie - " + ValidationConstants.INVALID_MESSAGE)). body("errorMessages.constructComponents", is(String.join(" | ", List.of( "evidence - " + ValidationConstants.INVALID_MESSAGE, @@ -842,6 +837,7 @@ public void editConstructWithNullNonRequiredFieldsLevel1() { construct.setConstructFullName(null); construct.setConstructSynonyms(null); construct.setSecondaryIdentifiers(null); + construct.setDataProviderCrossReference(null); RestAssured.given(). contentType("application/json"). @@ -860,7 +856,8 @@ public void editConstructWithNullNonRequiredFieldsLevel1() { body("entity", not(hasKey("constructFullName"))). body("entity", not(hasKey("constructSynonyms"))). body("entity", not(hasKey("references"))). - body("entity", not(hasKey("secondaryIdentifiers"))); + body("entity", not(hasKey("secondaryIdentifiers"))). + body("entity", not(hasKey("dataProviderCrossReference"))); } @Test diff --git a/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationBulkUploadITCase.java index aada65f0f..4b54d03f9 100644 --- a/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationBulkUploadITCase.java @@ -11,7 +11,7 @@ import org.alliancegenome.curation_api.base.BaseITCase; import org.alliancegenome.curation_api.constants.OntologyConstants; import org.alliancegenome.curation_api.constants.VocabularyConstants; -import org.alliancegenome.curation_api.model.entities.DataProvider; +import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.Vocabulary; import org.alliancegenome.curation_api.model.entities.VocabularyTerm; import org.alliancegenome.curation_api.resources.TestContainerResource; @@ -134,8 +134,8 @@ private void loadRequiredEntities() throws Exception { createAnatomicalTerm(anatomyTerm2, "Test AnatomicalTerm 2"); Vocabulary nameTypeVocabulary = getVocabulary(VocabularyConstants.NAME_TYPE_VOCABULARY); VocabularyTerm symbolTerm = getVocabularyTerm(nameTypeVocabulary, "nomenclature_symbol"); - DataProvider dataProvider = createDataProvider("WB", false); - DataProvider ratDataProvider = createDataProvider("RGD", false); + Organization dataProvider = getOrganization("WB"); + Organization ratDataProvider = getOrganization("RGD"); createGenes(List.of(gene, gene2), "NCBITaxon:6239", symbolTerm, false, dataProvider); createGenes(List.of(withGene, withGene2), "NCBITaxon:9606", symbolTerm, false, dataProvider); createGenes(List.of(ratGene), "NCBITaxon:10116", symbolTerm, false, ratDataProvider); @@ -256,14 +256,14 @@ public void geneDiseaseAnnotationBulkUploadCheckFields() throws Exception { body("entity.sgdStrainBackground.primaryExternalId", is(sgdBackgroundStrain)). body("entity.evidenceCodes", hasSize(1)). body("entity.evidenceCodes[0].curie", is(ecoTerm)). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider)). - body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider2)). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST:0001")). - body("entity.dataProvider.crossReference.displayName", is("TEST:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")). - body("entity.secondaryDataProvider.crossReference.referencedCurie", is("TEST:0002")). - body("entity.secondaryDataProvider.crossReference.displayName", is("TEST:0002")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")); + body("entity.dataProvider.abbreviation", is(dataProvider)). + body("entity.secondaryDataProvider.abbreviation", is(dataProvider2)). + body("entity.dataProviderCrossReference.referencedCurie", is("TEST:0001")). + body("entity.dataProviderCrossReference.displayName", is("TEST:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")). + body("entity.secondaryDataProviderCrossReference.referencedCurie", is("TEST:0002")). + body("entity.secondaryDataProviderCrossReference.displayName", is("TEST:0002")). + body("entity.secondaryDataProviderCrossReference.resourceDescriptorPage.name", is("homepage")); } @Test @@ -338,16 +338,16 @@ public void alleleDiseaseAnnotationBulkUploadCheckFields() throws Exception { body("entity.diseaseQualifiers[0].name", is(diseaseQualifier)). body("entity.evidenceCodes", hasSize(1)). body("entity.evidenceCodes[0].curie", is(ecoTerm)). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider)). - body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider2)). + body("entity.dataProvider.abbreviation", is(dataProvider)). + body("entity.secondaryDataProvider.abbreviation", is(dataProvider2)). body("entity.inferredGene.primaryExternalId", is(gene)). body("entity.assertedGenes[0].primaryExternalId", is(gene2)). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST:0001")). - body("entity.dataProvider.crossReference.displayName", is("TEST:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")). - body("entity.secondaryDataProvider.crossReference.referencedCurie", is("TEST:0002")). - body("entity.secondaryDataProvider.crossReference.displayName", is("TEST:0002")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")); + body("entity.dataProviderCrossReference.referencedCurie", is("TEST:0001")). + body("entity.dataProviderCrossReference.displayName", is("TEST:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")). + body("entity.secondaryDataProviderCrossReference.referencedCurie", is("TEST:0002")). + body("entity.secondaryDataProviderCrossReference.displayName", is("TEST:0002")). + body("entity.secondaryDataProviderCrossReference.resourceDescriptorPage.name", is("homepage"));; } @Test @@ -421,18 +421,18 @@ public void agmDiseaseAnnotationBulkUploadCheckFields() throws Exception { body("entity.diseaseQualifiers[0].name", is(diseaseQualifier)). body("entity.evidenceCodes", hasSize(1)). body("entity.evidenceCodes[0].curie", is(ecoTerm)). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider)). - body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider2)). + body("entity.dataProvider.abbreviation", is(dataProvider)). + body("entity.secondaryDataProvider.abbreviation", is(dataProvider2)). body("entity.inferredGene.primaryExternalId", is(gene)). body("entity.assertedGenes[0].primaryExternalId", is(gene2)). body("entity.inferredAllele.primaryExternalId", is(allele)). body("entity.assertedAllele.primaryExternalId", is(allele2)). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST:0001")). - body("entity.dataProvider.crossReference.displayName", is("TEST:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")). - body("entity.secondaryDataProvider.crossReference.referencedCurie", is("TEST:0002")). - body("entity.secondaryDataProvider.crossReference.displayName", is("TEST:0002")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")); + body("entity.dataProviderCrossReference.referencedCurie", is("TEST:0001")). + body("entity.dataProviderCrossReference.displayName", is("TEST:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")). + body("entity.secondaryDataProviderCrossReference.referencedCurie", is("TEST:0002")). + body("entity.secondaryDataProviderCrossReference.displayName", is("TEST:0002")). + body("entity.secondaryDataProviderCrossReference.resourceDescriptorPage.name", is("homepage"));; } @Test @@ -508,14 +508,14 @@ public void geneDiseaseAnnotationBulkUploadUpdateCheckFields() throws Exception body("entity.sgdStrainBackground.primaryExternalId", is(sgdBackgroundStrain2)). body("entity.evidenceCodes", hasSize(1)). body("entity.evidenceCodes[0].curie", is(ecoTerm2)). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2)). - body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider)). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST:0002")). - body("entity.dataProvider.crossReference.displayName", is("TEST:0002")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")). - body("entity.secondaryDataProvider.crossReference.referencedCurie", is("TEST:0001")). - body("entity.secondaryDataProvider.crossReference.displayName", is("TEST:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")); + body("entity.dataProvider.abbreviation", is(dataProvider2)). + body("entity.secondaryDataProvider.abbreviation", is(dataProvider)). + body("entity.dataProviderCrossReference.referencedCurie", is("TEST:0002")). + body("entity.dataProviderCrossReference.displayName", is("TEST:0002")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")). + body("entity.secondaryDataProviderCrossReference.referencedCurie", is("TEST:0001")). + body("entity.secondaryDataProviderCrossReference.displayName", is("TEST:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")); } @Test @@ -589,16 +589,16 @@ public void alleleDiseaseAnnotationBulkUploadUpdateCheckFields() throws Exceptio body("entity.diseaseQualifiers[0].name", is(diseaseQualifier2)). body("entity.evidenceCodes", hasSize(1)). body("entity.evidenceCodes[0].curie", is(ecoTerm2)). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2)). - body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider)). + body("entity.dataProvider.abbreviation", is(dataProvider2)). + body("entity.secondaryDataProvider.abbreviation", is(dataProvider)). body("entity.inferredGene.primaryExternalId", is(gene2)). body("entity.assertedGenes[0].primaryExternalId", is(gene)). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST:0002")). - body("entity.dataProvider.crossReference.displayName", is("TEST:0002")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")). - body("entity.secondaryDataProvider.crossReference.referencedCurie", is("TEST:0001")). - body("entity.secondaryDataProvider.crossReference.displayName", is("TEST:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")); + body("entity.dataProviderCrossReference.referencedCurie", is("TEST:0002")). + body("entity.dataProviderCrossReference.displayName", is("TEST:0002")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")). + body("entity.secondaryDataProviderCrossReference.referencedCurie", is("TEST:0001")). + body("entity.secondaryDataProviderCrossReference.displayName", is("TEST:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")); } @Test @@ -673,18 +673,18 @@ public void agmDiseaseAnnotationBulkUploadUpdateCheckFields() throws Exception { body("entity.diseaseQualifiers[0].name", is(diseaseQualifier2)). body("entity.evidenceCodes", hasSize(1)). body("entity.evidenceCodes[0].curie", is(ecoTerm2)). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2)). - body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider)). + body("entity.dataProvider.abbreviation", is(dataProvider2)). + body("entity.secondaryDataProvider.abbreviation", is(dataProvider)). body("entity.inferredGene.primaryExternalId", is(gene2)). body("entity.assertedGenes[0].primaryExternalId", is(gene)). body("entity.inferredAllele.primaryExternalId", is(allele2)). body("entity.assertedAllele.primaryExternalId", is(allele)). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST:0002")). - body("entity.dataProvider.crossReference.displayName", is("TEST:0002")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")). - body("entity.secondaryDataProvider.crossReference.referencedCurie", is("TEST:0001")). - body("entity.secondaryDataProvider.crossReference.displayName", is("TEST:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")); + body("entity.dataProviderCrossReference.referencedCurie", is("TEST:0002")). + body("entity.dataProviderCrossReference.displayName", is("TEST:0002")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")). + body("entity.secondaryDataProviderCrossReference.referencedCurie", is("TEST:0001")). + body("entity.secondaryDataProviderCrossReference.displayName", is("TEST:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")); } @Test @@ -942,8 +942,8 @@ public void diseaseAnnotationUpdateMissingNonRequiredFieldsLevel2() throws Excep body("entity.relatedNotes[0]", not(hasKey("dateCreated"))). body("entity.relatedNotes[0]", not(hasKey("dateUpdated"))). body("entity.relatedNotes[0]", not(hasKey("evidence"))). - body("entity.dataProvider", not(hasKey("crossReference"))). - body("entity.secondaryDataProvider", not(hasKey("crossReference"))); + body("entity", not(hasKey("dataProviderCrossReference"))). + body("entity", not(hasKey("secondaryDataProviderCrossReference"))); } @Test diff --git a/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationITCase.java b/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationITCase.java index e3ba2507a..35e649fe3 100644 --- a/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationITCase.java @@ -17,7 +17,6 @@ import org.alliancegenome.curation_api.model.entities.Allele; import org.alliancegenome.curation_api.model.entities.AlleleDiseaseAnnotation; import org.alliancegenome.curation_api.model.entities.ConditionRelation; -import org.alliancegenome.curation_api.model.entities.DataProvider; import org.alliancegenome.curation_api.model.entities.ExperimentalCondition; import org.alliancegenome.curation_api.model.entities.Gene; import org.alliancegenome.curation_api.model.entities.GeneDiseaseAnnotation; @@ -115,8 +114,9 @@ public class DiseaseAnnotationITCase extends BaseITCase { private Reference reference; private Reference reference2; private Reference obsoleteReference; - private DataProvider dataProvider; - private DataProvider dataProvider2; + private Organization dataProvider; + private Organization dataProvider2; + private Organization obsoleteDataProvider; private Vocabulary nameTypeVocabulary; private VocabularyTerm symbolNameType; private DOTerm nonPersistedDoTerm; @@ -194,8 +194,9 @@ private void loadRequiredEntities() throws Exception { conditionRelationType2 = getVocabularyTerm(conditionRelationTypeVocabulary, "induced_by"); obsoleteConditionRelationType = createVocabularyTerm(conditionRelationTypeVocabulary, "obsolete_relation_type", true); conditionRelation = createConditionRelation("test_handle", reference, conditionRelationType, List.of(experimentalCondition)); - dataProvider = createDataProvider("WB", false); - dataProvider2 = createDataProvider("RGD", false); + dataProvider = getOrganization("WB"); + dataProvider2 = getOrganization("RGD"); + obsoleteDataProvider = getOrganization("ODP"); nonPersistedDoTerm = new DOTerm(); nonPersistedDoTerm.setCurie("DO:Invalid"); @@ -287,8 +288,8 @@ public void createGeneDiseaseAnnotation() throws Exception { body("entity.conditionRelations[0].conditionRelationType.name", is(conditionRelation.getConditionRelationType().getName())). body("entity.conditionRelations[0].conditions[0].conditionSummary", is(conditionRelation.getConditions().get(0).getConditionSummary())). body("entity.conditionRelations[0].internal", is(false)). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider.getSourceOrganization().getAbbreviation())). - body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider2.getSourceOrganization().getAbbreviation())); + body("entity.dataProvider.abbreviation", is(dataProvider.getAbbreviation())). + body("entity.secondaryDataProvider.abbreviation", is(dataProvider2.getAbbreviation())); } @Test @@ -361,8 +362,8 @@ public void createAlleleDiseaseAnnotation() { body("entity.conditionRelations[0].conditionRelationType.name", is(conditionRelation.getConditionRelationType().getName())). body("entity.conditionRelations[0].conditions[0].conditionSummary", is(conditionRelation.getConditions().get(0).getConditionSummary())). body("entity.conditionRelations[0].internal", is(false)). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider.getSourceOrganization().getAbbreviation())). - body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider2.getSourceOrganization().getAbbreviation())). + body("entity.dataProvider.abbreviation", is(dataProvider.getAbbreviation())). + body("entity.secondaryDataProvider.abbreviation", is(dataProvider2.getAbbreviation())). body("entity.inferredGene.primaryExternalId", is(gene.getPrimaryExternalId())). body("entity.assertedGenes", hasSize(1)). body("entity.assertedGenes[0].primaryExternalId", is(gene2.getPrimaryExternalId())); @@ -440,8 +441,8 @@ public void createAgmDiseaseAnnotation() { body("entity.conditionRelations[0].conditionRelationType.name", is(conditionRelation.getConditionRelationType().getName())). body("entity.conditionRelations[0].conditions[0].conditionSummary", is(conditionRelation.getConditions().get(0).getConditionSummary())). body("entity.conditionRelations[0].internal", is(false)). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider.getSourceOrganization().getAbbreviation())). - body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider2.getSourceOrganization().getAbbreviation())). + body("entity.dataProvider.abbreviation", is(dataProvider.getAbbreviation())). + body("entity.secondaryDataProvider.abbreviation", is(dataProvider2.getAbbreviation())). body("entity.inferredGene.primaryExternalId", is(gene.getPrimaryExternalId())). body("entity.assertedGenes", hasSize(1)). body("entity.assertedGenes[0].primaryExternalId", is(gene2.getPrimaryExternalId())). @@ -533,8 +534,8 @@ public void editGeneDiseaseAnnotation() { body("entity.conditionRelations[0].conditionRelationType.name", is(editedRelation.getConditionRelationType().getName())). body("entity.conditionRelations[0].conditions[0].conditionSummary", is(editedRelation.getConditions().get(0).getConditionSummary())). body("entity.conditionRelations[0].internal", is(true)). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2.getSourceOrganization().getAbbreviation())). - body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider.getSourceOrganization().getAbbreviation())); + body("entity.dataProvider.abbreviation", is(dataProvider2.getAbbreviation())). + body("entity.secondaryDataProvider.abbreviation", is(dataProvider.getAbbreviation())); } @Test @@ -620,8 +621,8 @@ public void editAlleleDiseaseAnnotation() { body("entity.conditionRelations[0].conditionRelationType.name", is(editedRelation.getConditionRelationType().getName())). body("entity.conditionRelations[0].conditions[0].conditionSummary", is(editedRelation.getConditions().get(0).getConditionSummary())). body("entity.conditionRelations[0].internal", is(true)). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2.getSourceOrganization().getAbbreviation())). - body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider.getSourceOrganization().getAbbreviation())). + body("entity.dataProvider.abbreviation", is(dataProvider2.getAbbreviation())). + body("entity.secondaryDataProvider.abbreviation", is(dataProvider.getAbbreviation())). body("entity.inferredGene.primaryExternalId", is(gene2.getPrimaryExternalId())). body("entity.assertedGenes", hasSize(1)). body("entity.assertedGenes[0].primaryExternalId", is(gene.getPrimaryExternalId())); @@ -713,8 +714,8 @@ public void editAgmDiseaseAnnotation() { body("entity.conditionRelations[0].conditionRelationType.name", is(editedRelation.getConditionRelationType().getName())). body("entity.conditionRelations[0].conditions[0].conditionSummary", is(editedRelation.getConditions().get(0).getConditionSummary())). body("entity.conditionRelations[0].internal", is(true)). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2.getSourceOrganization().getAbbreviation())). - body("entity.secondaryDataProvider.sourceOrganization.abbreviation", is(dataProvider.getSourceOrganization().getAbbreviation())). + body("entity.dataProvider.abbreviation", is(dataProvider2.getAbbreviation())). + body("entity.secondaryDataProvider.abbreviation", is(dataProvider.getAbbreviation())). body("entity.inferredGene.primaryExternalId", is(gene2.getPrimaryExternalId())). body("entity.assertedGenes", hasSize(1)). body("entity.assertedGenes[0].primaryExternalId", is(gene.getPrimaryExternalId())). @@ -874,9 +875,6 @@ public void createGeneDiseaseAnnotationWithMissingRequiredFieldsLevel2() { diseaseAnnotation.setDiseaseAnnotationObject(doTerm); diseaseAnnotation.setEvidenceCodes(List.of(ecoTerm)); - DataProvider newDataProvider = new DataProvider(); - diseaseAnnotation.setDataProvider(newDataProvider); - diseaseAnnotation.setSecondaryDataProvider(newDataProvider); ConditionRelation newRelation = new ConditionRelation(); diseaseAnnotation.setConditionRelations(List.of(newRelation)); Note newNote = new Note(); @@ -889,15 +887,13 @@ public void createGeneDiseaseAnnotationWithMissingRequiredFieldsLevel2() { post("/api/gene-disease-annotation"). then(). statusCode(400). - body("errorMessages", is(aMapWithSize(4))). + body("errorMessages", is(aMapWithSize(2))). body("errorMessages.conditionRelations", is(String.join(" | ", List.of( "conditionRelationType - " + ValidationConstants.REQUIRED_MESSAGE, "conditions - " + ValidationConstants.REQUIRED_MESSAGE)))). body("errorMessages.relatedNotes", is(String.join(" | ", List.of( "freeText - " + ValidationConstants.REQUIRED_MESSAGE, - "noteType - " + ValidationConstants.REQUIRED_MESSAGE)))). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.REQUIRED_MESSAGE)). - body("errorMessages.secondaryDataProvider", is("sourceOrganization - " + ValidationConstants.REQUIRED_MESSAGE)); + "noteType - " + ValidationConstants.REQUIRED_MESSAGE)))); } @Test @@ -911,9 +907,6 @@ public void createAlleleDiseaseAnnotationWithMissingRequiredFieldsLevel2() { diseaseAnnotation.setDiseaseAnnotationObject(doTerm); diseaseAnnotation.setEvidenceCodes(List.of(ecoTerm)); - DataProvider newDataProvider = new DataProvider(); - diseaseAnnotation.setDataProvider(newDataProvider); - diseaseAnnotation.setSecondaryDataProvider(newDataProvider); ConditionRelation newRelation = new ConditionRelation(); diseaseAnnotation.setConditionRelations(List.of(newRelation)); Note newNote = new Note(); @@ -926,15 +919,13 @@ public void createAlleleDiseaseAnnotationWithMissingRequiredFieldsLevel2() { post("/api/allele-disease-annotation"). then(). statusCode(400). - body("errorMessages", is(aMapWithSize(4))). + body("errorMessages", is(aMapWithSize(2))). body("errorMessages.conditionRelations", is(String.join(" | ", List.of( "conditionRelationType - " + ValidationConstants.REQUIRED_MESSAGE, "conditions - " + ValidationConstants.REQUIRED_MESSAGE)))). body("errorMessages.relatedNotes", is(String.join(" | ", List.of( "freeText - " + ValidationConstants.REQUIRED_MESSAGE, - "noteType - " + ValidationConstants.REQUIRED_MESSAGE)))). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.REQUIRED_MESSAGE)). - body("errorMessages.secondaryDataProvider", is("sourceOrganization - " + ValidationConstants.REQUIRED_MESSAGE)); + "noteType - " + ValidationConstants.REQUIRED_MESSAGE)))); } @Test @@ -948,9 +939,6 @@ public void createAgmDiseaseAnnotationWithMissingRequiredFieldsLevel2() { diseaseAnnotation.setDiseaseAnnotationObject(doTerm); diseaseAnnotation.setEvidenceCodes(List.of(ecoTerm)); - DataProvider newDataProvider = new DataProvider(); - diseaseAnnotation.setDataProvider(newDataProvider); - diseaseAnnotation.setSecondaryDataProvider(newDataProvider); ConditionRelation newRelation = new ConditionRelation(); diseaseAnnotation.setConditionRelations(List.of(newRelation)); Note newNote = new Note(); @@ -963,15 +951,13 @@ public void createAgmDiseaseAnnotationWithMissingRequiredFieldsLevel2() { post("/api/agm-disease-annotation"). then(). statusCode(400). - body("errorMessages", is(aMapWithSize(4))). + body("errorMessages", is(aMapWithSize(2))). body("errorMessages.conditionRelations", is(String.join(" | ", List.of( "conditionRelationType - " + ValidationConstants.REQUIRED_MESSAGE, "conditions - " + ValidationConstants.REQUIRED_MESSAGE)))). body("errorMessages.relatedNotes", is(String.join(" | ", List.of( "freeText - " + ValidationConstants.REQUIRED_MESSAGE, - "noteType - " + ValidationConstants.REQUIRED_MESSAGE)))). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.REQUIRED_MESSAGE)). - body("errorMessages.secondaryDataProvider", is("sourceOrganization - " + ValidationConstants.REQUIRED_MESSAGE)); + "noteType - " + ValidationConstants.REQUIRED_MESSAGE)))); } @Test @@ -989,12 +975,6 @@ public void editGeneDiseaseAnnotationWithMissingRequiredFieldsLevel2() { editedNote.setFreeText(null); diseaseAnnotation.setRelatedNotes(List.of(editedNote)); - DataProvider editedDataProvider = diseaseAnnotation.getDataProvider(); - editedDataProvider.setSourceOrganization(null); - diseaseAnnotation.setDataProvider(editedDataProvider); - DataProvider editedSecondaryDataProvider = diseaseAnnotation.getSecondaryDataProvider(); - editedSecondaryDataProvider.setSourceOrganization(null); - diseaseAnnotation.setSecondaryDataProvider(editedSecondaryDataProvider); RestAssured.given(). contentType("application/json"). @@ -1003,15 +983,13 @@ public void editGeneDiseaseAnnotationWithMissingRequiredFieldsLevel2() { put("/api/gene-disease-annotation"). then(). statusCode(400). - body("errorMessages", is(aMapWithSize(4))). + body("errorMessages", is(aMapWithSize(2))). body("errorMessages.conditionRelations", is(String.join(" | ", List.of( "conditionRelationType - " + ValidationConstants.REQUIRED_MESSAGE, "conditions - " + ValidationConstants.REQUIRED_MESSAGE)))). body("errorMessages.relatedNotes", is(String.join(" | ", List.of( "freeText - " + ValidationConstants.REQUIRED_MESSAGE, - "noteType - " + ValidationConstants.REQUIRED_MESSAGE)))). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.REQUIRED_MESSAGE)). - body("errorMessages.secondaryDataProvider", is("sourceOrganization - " + ValidationConstants.REQUIRED_MESSAGE)); + "noteType - " + ValidationConstants.REQUIRED_MESSAGE)))); } @Test @@ -1029,13 +1007,6 @@ public void editAlleleDiseaseAnnotationWithMissingRequiredFieldsLevel2() { editedNote.setFreeText(null); diseaseAnnotation.setRelatedNotes(List.of(editedNote)); - DataProvider editedDataProvider = diseaseAnnotation.getDataProvider(); - editedDataProvider.setSourceOrganization(null); - diseaseAnnotation.setDataProvider(editedDataProvider); - DataProvider editedSecondaryDataProvider = diseaseAnnotation.getSecondaryDataProvider(); - editedSecondaryDataProvider.setSourceOrganization(null); - diseaseAnnotation.setSecondaryDataProvider(editedSecondaryDataProvider); - RestAssured.given(). contentType("application/json"). body(diseaseAnnotation). @@ -1043,15 +1014,13 @@ public void editAlleleDiseaseAnnotationWithMissingRequiredFieldsLevel2() { put("/api/allele-disease-annotation"). then(). statusCode(400). - body("errorMessages", is(aMapWithSize(4))). + body("errorMessages", is(aMapWithSize(2))). body("errorMessages.conditionRelations", is(String.join(" | ", List.of( "conditionRelationType - " + ValidationConstants.REQUIRED_MESSAGE, "conditions - " + ValidationConstants.REQUIRED_MESSAGE)))). body("errorMessages.relatedNotes", is(String.join(" | ", List.of( "freeText - " + ValidationConstants.REQUIRED_MESSAGE, - "noteType - " + ValidationConstants.REQUIRED_MESSAGE)))). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.REQUIRED_MESSAGE)). - body("errorMessages.secondaryDataProvider", is("sourceOrganization - " + ValidationConstants.REQUIRED_MESSAGE)); + "noteType - " + ValidationConstants.REQUIRED_MESSAGE)))); } @Test @@ -1069,13 +1038,6 @@ public void editAgmDiseaseAnnotationWithMissingRequiredFieldsLevel2() { editedNote.setFreeText(null); diseaseAnnotation.setRelatedNotes(List.of(editedNote)); - DataProvider editedDataProvider = diseaseAnnotation.getDataProvider(); - editedDataProvider.setSourceOrganization(null); - diseaseAnnotation.setDataProvider(editedDataProvider); - DataProvider editedSecondaryDataProvider = diseaseAnnotation.getSecondaryDataProvider(); - editedSecondaryDataProvider.setSourceOrganization(null); - diseaseAnnotation.setSecondaryDataProvider(editedSecondaryDataProvider); - RestAssured.given(). contentType("application/json"). body(diseaseAnnotation). @@ -1083,15 +1045,13 @@ public void editAgmDiseaseAnnotationWithMissingRequiredFieldsLevel2() { put("/api/agm-disease-annotation"). then(). statusCode(400). - body("errorMessages", is(aMapWithSize(4))). + body("errorMessages", is(aMapWithSize(2))). body("errorMessages.conditionRelations", is(String.join(" | ", List.of( "conditionRelationType - " + ValidationConstants.REQUIRED_MESSAGE, "conditions - " + ValidationConstants.REQUIRED_MESSAGE)))). body("errorMessages.relatedNotes", is(String.join(" | ", List.of( "freeText - " + ValidationConstants.REQUIRED_MESSAGE, - "noteType - " + ValidationConstants.REQUIRED_MESSAGE)))). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.REQUIRED_MESSAGE)). - body("errorMessages.secondaryDataProvider", is("sourceOrganization - " + ValidationConstants.REQUIRED_MESSAGE)); + "noteType - " + ValidationConstants.REQUIRED_MESSAGE)))); } @Test @@ -1244,10 +1204,8 @@ public void createGeneDiseaseAnnotationWithInvalidFields() { GeneDiseaseAnnotation diseaseAnnotation = new GeneDiseaseAnnotation(); diseaseAnnotation.setRelation(agmRelation); diseaseAnnotation.setDiseaseAnnotationObject(nonPersistedDoTerm); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); - diseaseAnnotation.setDataProvider(invalidDataProvider); - diseaseAnnotation.setSecondaryDataProvider(invalidDataProvider); + diseaseAnnotation.setDataProvider(nonPersistedOrganization); + diseaseAnnotation.setSecondaryDataProvider(nonPersistedOrganization); diseaseAnnotation.setDiseaseAnnotationSubject(nonPersistedGene); diseaseAnnotation.setEvidenceCodes(List.of(nonPersistedEcoTerm)); diseaseAnnotation.setSingleReference(nonPersistedReference); @@ -1284,8 +1242,8 @@ public void createGeneDiseaseAnnotationWithInvalidFields() { body("errorMessages.diseaseAnnotationSubject", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.diseaseAnnotationObject", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.relation", is(ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.secondaryDataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.secondaryDataProvider", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.evidenceCodes", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.singleReference", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.sgdStrainBackground", is(ValidationConstants.INVALID_MESSAGE)). @@ -1312,10 +1270,8 @@ public void createAlleleDiseaseAnnotationWithInvalidFields() { AlleleDiseaseAnnotation diseaseAnnotation = new AlleleDiseaseAnnotation(); diseaseAnnotation.setRelation(agmRelation); diseaseAnnotation.setDiseaseAnnotationObject(nonPersistedDoTerm); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); - diseaseAnnotation.setDataProvider(invalidDataProvider); - diseaseAnnotation.setSecondaryDataProvider(invalidDataProvider); + diseaseAnnotation.setDataProvider(nonPersistedOrganization); + diseaseAnnotation.setSecondaryDataProvider(nonPersistedOrganization); diseaseAnnotation.setDiseaseAnnotationSubject(nonPersistedAllele); diseaseAnnotation.setEvidenceCodes(List.of(nonPersistedEcoTerm)); diseaseAnnotation.setSingleReference(nonPersistedReference); @@ -1353,8 +1309,8 @@ public void createAlleleDiseaseAnnotationWithInvalidFields() { body("errorMessages.diseaseAnnotationSubject", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.diseaseAnnotationObject", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.relation", is(ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.secondaryDataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.secondaryDataProvider", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.evidenceCodes", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.singleReference", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.with", is(ValidationConstants.INVALID_MESSAGE)). @@ -1382,10 +1338,8 @@ public void createAgmDiseaseAnnotationWithInvalidFields() { AGMDiseaseAnnotation diseaseAnnotation = new AGMDiseaseAnnotation(); diseaseAnnotation.setRelation(geneRelation); diseaseAnnotation.setDiseaseAnnotationObject(nonPersistedDoTerm); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); - diseaseAnnotation.setDataProvider(invalidDataProvider); - diseaseAnnotation.setSecondaryDataProvider(invalidDataProvider); + diseaseAnnotation.setDataProvider(nonPersistedOrganization); + diseaseAnnotation.setSecondaryDataProvider(nonPersistedOrganization); diseaseAnnotation.setDiseaseAnnotationSubject(nonPersistedAgm); diseaseAnnotation.setEvidenceCodes(List.of(nonPersistedEcoTerm)); diseaseAnnotation.setSingleReference(nonPersistedReference); @@ -1425,8 +1379,8 @@ public void createAgmDiseaseAnnotationWithInvalidFields() { body("errorMessages.diseaseAnnotationSubject", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.diseaseAnnotationObject", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.relation", is(ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.secondaryDataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.secondaryDataProvider", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.evidenceCodes", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.singleReference", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.with", is(ValidationConstants.INVALID_MESSAGE)). @@ -1456,10 +1410,8 @@ public void editGeneDiseaseAnnotationWithInvalidFields() { GeneDiseaseAnnotation diseaseAnnotation = getGeneDiseaseAnnotation(GENE_DISEASE_ANNOTATION); diseaseAnnotation.setRelation(agmRelation); diseaseAnnotation.setDiseaseAnnotationObject(nonPersistedDoTerm); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); - diseaseAnnotation.setDataProvider(invalidDataProvider); - diseaseAnnotation.setSecondaryDataProvider(invalidDataProvider); + diseaseAnnotation.setDataProvider(nonPersistedOrganization); + diseaseAnnotation.setSecondaryDataProvider(nonPersistedOrganization); diseaseAnnotation.setDiseaseAnnotationSubject(nonPersistedGene); diseaseAnnotation.setEvidenceCodes(List.of(nonPersistedEcoTerm)); diseaseAnnotation.setSingleReference(nonPersistedReference); @@ -1495,8 +1447,8 @@ public void editGeneDiseaseAnnotationWithInvalidFields() { body("errorMessages.diseaseAnnotationSubject", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.diseaseAnnotationObject", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.relation", is(ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.secondaryDataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.secondaryDataProvider", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.evidenceCodes", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.singleReference", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.sgdStrainBackground", is(ValidationConstants.INVALID_MESSAGE)). @@ -1523,10 +1475,8 @@ public void editAlleleDiseaseAnnotationWithInvalidFields() { AlleleDiseaseAnnotation diseaseAnnotation = getAlleleDiseaseAnnotation(ALLELE_DISEASE_ANNOTATION); diseaseAnnotation.setRelation(agmRelation); diseaseAnnotation.setDiseaseAnnotationObject(nonPersistedDoTerm); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); - diseaseAnnotation.setDataProvider(invalidDataProvider); - diseaseAnnotation.setSecondaryDataProvider(invalidDataProvider); + diseaseAnnotation.setDataProvider(nonPersistedOrganization); + diseaseAnnotation.setSecondaryDataProvider(nonPersistedOrganization); diseaseAnnotation.setDiseaseAnnotationSubject(nonPersistedAllele); diseaseAnnotation.setEvidenceCodes(List.of(nonPersistedEcoTerm)); diseaseAnnotation.setSingleReference(nonPersistedReference); @@ -1563,8 +1513,8 @@ public void editAlleleDiseaseAnnotationWithInvalidFields() { body("errorMessages.diseaseAnnotationSubject", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.diseaseAnnotationObject", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.relation", is(ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.secondaryDataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.secondaryDataProvider", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.evidenceCodes", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.singleReference", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.with", is(ValidationConstants.INVALID_MESSAGE)). @@ -1592,10 +1542,8 @@ public void editAgmDiseaseAnnotationWithInvalidFields() { AGMDiseaseAnnotation diseaseAnnotation = getAgmDiseaseAnnotation(AGM_DISEASE_ANNOTATION); diseaseAnnotation.setRelation(geneRelation); diseaseAnnotation.setDiseaseAnnotationObject(nonPersistedDoTerm); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); - diseaseAnnotation.setDataProvider(invalidDataProvider); - diseaseAnnotation.setSecondaryDataProvider(invalidDataProvider); + diseaseAnnotation.setDataProvider(nonPersistedOrganization); + diseaseAnnotation.setSecondaryDataProvider(nonPersistedOrganization); diseaseAnnotation.setDiseaseAnnotationSubject(nonPersistedAgm); diseaseAnnotation.setEvidenceCodes(List.of(nonPersistedEcoTerm)); diseaseAnnotation.setSingleReference(nonPersistedReference); @@ -1634,8 +1582,8 @@ public void editAgmDiseaseAnnotationWithInvalidFields() { body("errorMessages.diseaseAnnotationSubject", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.diseaseAnnotationObject", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.relation", is(ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.secondaryDataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.secondaryDataProvider", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.evidenceCodes", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.singleReference", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.with", is(ValidationConstants.INVALID_MESSAGE)). @@ -1666,8 +1614,8 @@ public void createGeneDiseaseAnnotationWithObsoleteFields() { GeneDiseaseAnnotation diseaseAnnotation = new GeneDiseaseAnnotation(); diseaseAnnotation.setRelation(obsoleteGeneRelation); diseaseAnnotation.setDiseaseAnnotationObject(obsoleteDoTerm); - diseaseAnnotation.setDataProvider(dataProvider); - diseaseAnnotation.setSecondaryDataProvider(dataProvider); + diseaseAnnotation.setDataProvider(obsoleteDataProvider); + diseaseAnnotation.setSecondaryDataProvider(obsoleteDataProvider); diseaseAnnotation.setDiseaseAnnotationSubject(obsoleteGene); diseaseAnnotation.setEvidenceCodes(List.of(obsoleteEcoTerm)); diseaseAnnotation.setSingleReference(obsoleteReference); @@ -1731,8 +1679,8 @@ public void createAlleleDiseaseAnnotationWithObsoleteFields() { AlleleDiseaseAnnotation diseaseAnnotation = new AlleleDiseaseAnnotation(); diseaseAnnotation.setRelation(obsoleteAlleleRelation); diseaseAnnotation.setDiseaseAnnotationObject(obsoleteDoTerm); - diseaseAnnotation.setDataProvider(dataProvider); - diseaseAnnotation.setSecondaryDataProvider(dataProvider); + diseaseAnnotation.setDataProvider(obsoleteDataProvider); + diseaseAnnotation.setSecondaryDataProvider(obsoleteDataProvider); diseaseAnnotation.setDiseaseAnnotationSubject(obsoleteAllele); diseaseAnnotation.setEvidenceCodes(List.of(obsoleteEcoTerm)); diseaseAnnotation.setSingleReference(obsoleteReference); @@ -1798,8 +1746,8 @@ public void createAgmDiseaseAnnotationWithObsoleteFields() { AGMDiseaseAnnotation diseaseAnnotation = new AGMDiseaseAnnotation(); diseaseAnnotation.setRelation(obsoleteAgmRelation); diseaseAnnotation.setDiseaseAnnotationObject(obsoleteDoTerm); - diseaseAnnotation.setDataProvider(dataProvider); - diseaseAnnotation.setSecondaryDataProvider(dataProvider); + diseaseAnnotation.setDataProvider(obsoleteDataProvider); + diseaseAnnotation.setSecondaryDataProvider(obsoleteDataProvider); diseaseAnnotation.setDiseaseAnnotationSubject(obsoleteAgm); diseaseAnnotation.setEvidenceCodes(List.of(obsoleteEcoTerm)); diseaseAnnotation.setSingleReference(obsoleteReference); @@ -1871,8 +1819,8 @@ public void editGeneDiseaseAnnotationWithObsoleteFields() { GeneDiseaseAnnotation diseaseAnnotation = getGeneDiseaseAnnotation(GENE_DISEASE_ANNOTATION); diseaseAnnotation.setRelation(obsoleteGeneRelation); diseaseAnnotation.setDiseaseAnnotationObject(obsoleteDoTerm); - diseaseAnnotation.setDataProvider(dataProvider); - diseaseAnnotation.setSecondaryDataProvider(dataProvider2); + diseaseAnnotation.setDataProvider(obsoleteDataProvider); + diseaseAnnotation.setSecondaryDataProvider(obsoleteDataProvider); diseaseAnnotation.setDiseaseAnnotationSubject(obsoleteGene); diseaseAnnotation.setEvidenceCodes(List.of(obsoleteEcoTerm)); diseaseAnnotation.setSingleReference(obsoleteReference); @@ -1934,8 +1882,8 @@ public void editAlleleDiseaseAnnotationWithObsoleteFields() { AlleleDiseaseAnnotation diseaseAnnotation = getAlleleDiseaseAnnotation(ALLELE_DISEASE_ANNOTATION); diseaseAnnotation.setRelation(obsoleteAlleleRelation); diseaseAnnotation.setDiseaseAnnotationObject(obsoleteDoTerm); - diseaseAnnotation.setDataProvider(dataProvider); - diseaseAnnotation.setSecondaryDataProvider(dataProvider2); + diseaseAnnotation.setDataProvider(obsoleteDataProvider); + diseaseAnnotation.setSecondaryDataProvider(obsoleteDataProvider); diseaseAnnotation.setDiseaseAnnotationSubject(obsoleteAllele); diseaseAnnotation.setEvidenceCodes(List.of(obsoleteEcoTerm)); diseaseAnnotation.setSingleReference(obsoleteReference); @@ -1999,8 +1947,8 @@ public void editAgmDiseaseAnnotationWithObsoleteFields() { AGMDiseaseAnnotation diseaseAnnotation = getAgmDiseaseAnnotation(AGM_DISEASE_ANNOTATION); diseaseAnnotation.setRelation(obsoleteAgmRelation); diseaseAnnotation.setDiseaseAnnotationObject(obsoleteDoTerm); - diseaseAnnotation.setDataProvider(dataProvider); - diseaseAnnotation.setSecondaryDataProvider(dataProvider2); + diseaseAnnotation.setDataProvider(obsoleteDataProvider); + diseaseAnnotation.setSecondaryDataProvider(obsoleteDataProvider); diseaseAnnotation.setDiseaseAnnotationSubject(obsoleteAgm); diseaseAnnotation.setEvidenceCodes(List.of(obsoleteEcoTerm)); diseaseAnnotation.setSingleReference(obsoleteReference); @@ -2314,6 +2262,8 @@ public void editGeneDiseaseAnnotationWithNullNonRequiredFieldsLevel() { diseaseAnnotation.setDiseaseGeneticModifierRelation(null); diseaseAnnotation.setConditionRelations(null); diseaseAnnotation.setRelatedNotes(null); + diseaseAnnotation.setDataProviderCrossReference(null); + diseaseAnnotation.setSecondaryDataProviderCrossReference(null); RestAssured.given(). contentType("application/json"). @@ -2340,7 +2290,9 @@ public void editGeneDiseaseAnnotationWithNullNonRequiredFieldsLevel() { body("entity", not(hasKey("diseaseGeneticModifierGenes"))). body("entity", not(hasKey("diseaseGeneticModifierRelation"))). body("entity", not(hasKey("conditionRelations"))). - body("entity", not(hasKey("relatedNotes"))); + body("entity", not(hasKey("relatedNotes"))). + body("entity", not(hasKey("dataProviderCrossReference"))). + body("entity", not(hasKey("secondaryDataProviderCrossReference"))); } @Test @@ -2361,6 +2313,8 @@ public void editAlleleDiseaseAnnotationWithNullNonRequiredFieldsLevel() { diseaseAnnotation.setRelatedNotes(null); diseaseAnnotation.setInferredGene(null); diseaseAnnotation.setAssertedGenes(null); + diseaseAnnotation.setDataProviderCrossReference(null); + diseaseAnnotation.setSecondaryDataProviderCrossReference(null); RestAssured.given(). contentType("application/json"). @@ -2388,7 +2342,9 @@ public void editAlleleDiseaseAnnotationWithNullNonRequiredFieldsLevel() { body("entity", not(hasKey("conditionRelations"))). body("entity", not(hasKey("relatedNotes"))). body("entity", not(hasKey("inferredGene"))). - body("entity", not(hasKey("assertedGenes"))); + body("entity", not(hasKey("assertedGenes"))). + body("entity", not(hasKey("dataProviderCrossReference"))). + body("entity", not(hasKey("secondaryDataProviderCrossReference"))); } @Test @@ -2411,6 +2367,8 @@ public void editAgmDiseaseAnnotationWithNullNonRequiredFieldsLevel() { diseaseAnnotation.setAssertedGenes(null); diseaseAnnotation.setInferredAllele(null); diseaseAnnotation.setAssertedAllele(null); + diseaseAnnotation.setDataProviderCrossReference(null); + diseaseAnnotation.setSecondaryDataProviderCrossReference(null); RestAssured.given(). contentType("application/json"). @@ -2440,7 +2398,9 @@ public void editAgmDiseaseAnnotationWithNullNonRequiredFieldsLevel() { body("entity", not(hasKey("inferredGene"))). body("entity", not(hasKey("assertedGenes"))). body("entity", not(hasKey("inferredAllele"))). - body("entity", not(hasKey("assertedAllele"))); + body("entity", not(hasKey("assertedAllele"))). + body("entity", not(hasKey("dataProviderCrossReference"))). + body("entity", not(hasKey("secondaryDataProviderCrossReference"))); } @Test diff --git a/src/test/java/org/alliancegenome/curation_api/ExpressionBulkUploadFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/ExpressionBulkUploadFmsITCase.java index 7ca667368..98f5eeb93 100644 --- a/src/test/java/org/alliancegenome/curation_api/ExpressionBulkUploadFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/ExpressionBulkUploadFmsITCase.java @@ -1,23 +1,34 @@ package org.alliancegenome.curation_api; -import io.quarkus.test.common.QuarkusTestResource; -import io.quarkus.test.junit.QuarkusIntegrationTest; -import io.restassured.RestAssured; -import io.restassured.config.HttpClientConfig; -import io.restassured.config.RestAssuredConfig; -import org.alliancegenome.curation_api.base.BaseITCase; -import org.alliancegenome.curation_api.constants.VocabularyConstants; -import org.alliancegenome.curation_api.model.entities.*; -import org.alliancegenome.curation_api.model.entities.ontology.GOTerm; -import org.alliancegenome.curation_api.resources.TestContainerResource; -import org.junit.jupiter.api.*; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.Matchers.is; +import org.alliancegenome.curation_api.base.BaseITCase; +import org.alliancegenome.curation_api.constants.VocabularyConstants; +import org.alliancegenome.curation_api.model.entities.Organization; +import org.alliancegenome.curation_api.model.entities.ResourceDescriptor; +import org.alliancegenome.curation_api.model.entities.Vocabulary; +import org.alliancegenome.curation_api.model.entities.VocabularyTerm; +import org.alliancegenome.curation_api.model.entities.VocabularyTermSet; +import org.alliancegenome.curation_api.model.entities.ontology.GOTerm; +import org.alliancegenome.curation_api.resources.TestContainerResource; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.MethodOrderer; +import org.junit.jupiter.api.Order; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.api.TestMethodOrder; + +import io.quarkus.test.common.QuarkusTestResource; +import io.quarkus.test.junit.QuarkusIntegrationTest; +import io.restassured.RestAssured; +import io.restassured.config.HttpClientConfig; +import io.restassured.config.RestAssuredConfig; @QuarkusIntegrationTest @@ -84,7 +95,7 @@ public void expressionBulkUploadAllFields() throws Exception { .statusCode(200) .body("totalResults", is(1)) .body("results", hasSize(1)) - .body("results[0].dataProvider.sourceOrganization.abbreviation", is("ZFIN")) + .body("results[0].dataProvider.abbreviation", is("ZFIN")) .body("results[0].uniqueId", is(experimentUniqueIdExpected)) .body("results[0].expressionAnnotations.size()", is(1)) .body("results[0].entityAssayed.primaryExternalId", is(gene)) @@ -103,7 +114,7 @@ public void expressionBulkUploadAllFields() throws Exception { .body("totalResults", is(1)) .body("results", hasSize(1)) .body("results[0].dateCreated", is("2024-01-17T15:31:34Z")) - .body("results[0].dataProvider.sourceOrganization.abbreviation", is("ZFIN")) + .body("results[0].dataProvider.abbreviation", is("ZFIN")) .body("results[0].expressionAnnotationSubject.primaryExternalId", is(gene)) .body("results[0].expressionAssayUsed.curie", is(mmoTerm)) .body("results[0].whereExpressedStatement", is("trunk")) @@ -178,7 +189,7 @@ public void expressionBulkUploadInvalidFields() throws Exception { } private void loadRequiredEntities() throws Exception { - DataProvider dataProvider = createDataProvider("ZFIN", false); + Organization dataProvider = getOrganization("ZFIN"); Vocabulary vocabulary1 = getVocabulary(VocabularyConstants.NAME_TYPE_VOCABULARY); VocabularyTerm symbolTerm = getVocabularyTerm(vocabulary1, "nomenclature_symbol"); createGene(gene, taxon, symbolTerm, false, dataProvider); @@ -191,7 +202,6 @@ private void loadRequiredEntities() throws Exception { Vocabulary vocabulary2 = createVocabulary(VocabularyConstants.GENE_EXPRESSION_VOCABULARY, false); createVocabularyTerm(vocabulary2, VocabularyConstants.GENE_EXPRESSION_RELATION_TERM, false); Vocabulary stageUberonTermVocabulary = getVocabulary(VocabularyConstants.STAGE_UBERON_SLIM_TERMS); - Vocabulary spatialExpressionQualifierVocabulary = getVocabulary(VocabularyConstants.SPATIAL_EXPRESSION_QUALIFIERS); VocabularyTermSet anatatomicalStructureQualifierTermset = getVocabularyTermSet(VocabularyConstants.ANATOMICAL_STRUCTURE_QUALIFIER); VocabularyTermSet anatatomicalSubstructureQualifierTermset = getVocabularyTermSet(VocabularyConstants.ANATOMICAL_SUBSTRUCTURE_QUALIFIER); VocabularyTermSet cellularComponentQualifierTermset = getVocabularyTermSet(VocabularyConstants.CELLULAR_COMPONENT_QUALIFIER); diff --git a/src/test/java/org/alliancegenome/curation_api/GeneBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/GeneBulkUploadITCase.java index 39924d0ec..cc50542ec 100644 --- a/src/test/java/org/alliancegenome/curation_api/GeneBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/GeneBulkUploadITCase.java @@ -153,10 +153,10 @@ public void geneBulkUploadCheckFields() throws Exception { body("entity.geneSecondaryIds[0].updatedBy.uniqueId", is("GENETEST:Person0002")). body("entity.geneSecondaryIds[0].dateCreated", is(OffsetDateTime.parse("2022-03-09T22:10:12Z").toString())). body("entity.geneSecondaryIds[0].dateUpdated", is(OffsetDateTime.parse("2022-03-10T22:10:12Z").toString())). - body("entity.dataProvider.sourceOrganization.abbreviation", is(requiredDataProvider)). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST:0001")). - body("entity.dataProvider.crossReference.displayName", is("TEST:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")). + body("entity.dataProvider.abbreviation", is(requiredDataProvider)). + body("entity.dataProviderCrossReference.referencedCurie", is("TEST:0001")). + body("entity.dataProviderCrossReference.displayName", is("TEST:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")). body("entity.crossReferences", hasSize(1)). body("entity.crossReferences[0].referencedCurie", is("TEST:Xref01")). body("entity.crossReferences[0].displayName", is("TEST:Xref01Display")). @@ -249,10 +249,10 @@ public void geneBulkUploadUpdateFields() throws Exception { body("entity.geneSecondaryIds[0].updatedBy.uniqueId", is("GENETEST:Person0001")). body("entity.geneSecondaryIds[0].dateCreated", is(OffsetDateTime.parse("2022-03-19T22:10:12Z").toString())). body("entity.geneSecondaryIds[0].dateUpdated", is(OffsetDateTime.parse("2022-03-20T22:10:12Z").toString())). - body("entity.dataProvider.sourceOrganization.abbreviation", is(requiredDataProvider2)). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST2:0001")). - body("entity.dataProvider.crossReference.displayName", is("TEST2:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage2")). + body("entity.dataProvider.abbreviation", is(requiredDataProvider2)). + body("entity.dataProviderCrossReference.referencedCurie", is("TEST2:0001")). + body("entity.dataProviderCrossReference.displayName", is("TEST2:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage2")). body("entity.crossReferences", hasSize(1)). body("entity.crossReferences[0].referencedCurie", is("TEST2:Xref02")). body("entity.crossReferences[0].displayName", is("TEST2:Xref02Display")). @@ -426,7 +426,8 @@ public void geneBulkUploadUpdateMissingNonRequiredFieldsLevel2() throws Exceptio body("entity.geneSecondaryIds[0]", not(hasKey("createdBy"))). body("entity.geneSecondaryIds[0]", not(hasKey("updatedBy"))). body("entity.geneSecondaryIds[0]", not(hasKey("dateCreated"))). - body("entity.geneSecondaryIds[0]", not(hasKey("dateUpdated"))); + body("entity.geneSecondaryIds[0]", not(hasKey("dateUpdated"))). + body("entity", not(hasKey("dataProviderCrossReference"))); } @Test @@ -483,7 +484,8 @@ public void geneBulkUploadUpdateEmptyNonRequiredFields() throws Exception { body("entity.geneSecondaryIds[0]", not(hasKey("createdBy"))). body("entity.geneSecondaryIds[0]", not(hasKey("updatedBy"))). body("entity.geneSecondaryIds[0]", not(hasKey("dateCreated"))). - body("entity.geneSecondaryIds[0]", not(hasKey("dateUpdated"))); + body("entity.geneSecondaryIds[0]", not(hasKey("dateUpdated"))). + body("entity", not(hasKey("dataProviderCrossReference"))); } @Test diff --git a/src/test/java/org/alliancegenome/curation_api/GeneITCase.java b/src/test/java/org/alliancegenome/curation_api/GeneITCase.java index 9e5382cf4..d82c0376a 100644 --- a/src/test/java/org/alliancegenome/curation_api/GeneITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/GeneITCase.java @@ -11,7 +11,6 @@ import org.alliancegenome.curation_api.base.BaseITCase; import org.alliancegenome.curation_api.constants.ValidationConstants; import org.alliancegenome.curation_api.constants.VocabularyConstants; -import org.alliancegenome.curation_api.model.entities.DataProvider; import org.alliancegenome.curation_api.model.entities.Gene; import org.alliancegenome.curation_api.model.entities.InformationContentEntity; import org.alliancegenome.curation_api.model.entities.Organization; @@ -77,9 +76,9 @@ public class GeneITCase extends BaseITCase { private GeneSynonymSlotAnnotation geneSynonym; private GeneSystematicNameSlotAnnotation geneSystematicName; private GeneSecondaryIdSlotAnnotation geneSecondaryId; - private DataProvider dataProvider; - private DataProvider dataProvider2; - private DataProvider obsoleteDataProvider; + private Organization dataProvider; + private Organization dataProvider2; + private Organization obsoleteDataProvider; private Organization nonPersistedOrganization; private void loadRequiredEntities() { @@ -113,9 +112,9 @@ private void loadRequiredEntities() { geneSynonym = createGeneSynonymSlotAnnotation(List.of(reference), "Gene test synonym 1", symbolNameType, exactSynonymScope, "https://test.org"); geneSystematicName = createGeneSystematicNameSlotAnnotation(List.of(reference), "GT.1", systematicNameType, exactSynonymScope, "https://test.org"); geneSecondaryId = createGeneSecondaryIdSlotAnnotation(List.of(reference), "SecondaryTest"); - dataProvider = createDataProvider("TEST", false); - dataProvider2 = createDataProvider("TEST2", false); - obsoleteDataProvider = createDataProvider("ODP", true); + dataProvider = createOrganization("TEST", false); + dataProvider2 = createOrganization("TEST2", false); + obsoleteDataProvider = createOrganization("ODP", true); nonPersistedOrganization = new Organization(); nonPersistedOrganization.setAbbreviation("INV"); @@ -185,7 +184,7 @@ public void createValidGene() { body("entity.geneSystematicName.evidence[0].curie", is(geneSystematicName.getEvidence().get(0).getCurie())). body("entity.geneSecondaryIds[0].secondaryId", is(geneSecondaryId.getSecondaryId())). body("entity.geneSecondaryIds[0].evidence[0].curie", is(geneSecondaryId.getEvidence().get(0).getCurie())). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider.getSourceOrganization().getAbbreviation())); + body("entity.dataProvider.abbreviation", is(dataProvider.getAbbreviation())); } @Test @@ -285,7 +284,7 @@ public void editGene() { body("entity.geneSystematicName.evidence[0].curie", is(editedSystematicName.getEvidence().get(0).getCurie())). body("entity.geneSecondaryIds[0].secondaryId", is(editedSecondaryId.getSecondaryId())). body("entity.geneSecondaryIds[0].evidence[0].curie", is(editedSecondaryId.getEvidence().get(0).getCurie())). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2.getSourceOrganization().getAbbreviation())); + body("entity.dataProvider.abbreviation", is(dataProvider2.getAbbreviation())); } @Test @@ -595,14 +594,12 @@ public void createGeneWithInvalidFields() { nonPersistedReference.setCurie("AGRKB:Invalid"); SOTerm nonPersistedSoTerm = new SOTerm(); nonPersistedSoTerm.setCurie("SO:Invalid"); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); Gene gene = new Gene(); gene.setPrimaryExternalId("GENE:0012"); gene.setTaxon(nonPersistedTaxon); gene.setGeneType(nonPersistedSoTerm); - gene.setDataProvider(invalidDataProvider); + gene.setDataProvider(nonPersistedOrganization); GeneSymbolSlotAnnotation invalidSymbol = createGeneSymbolSlotAnnotation(List.of(nonPersistedReference), "Test symbol", fullNameType, fullNameType, "https://test.org"); GeneFullNameSlotAnnotation invalidFullName = createGeneFullNameSlotAnnotation(List.of(nonPersistedReference), "Test name", symbolNameType, fullNameType, "https://test.org"); @@ -643,7 +640,7 @@ public void createGeneWithInvalidFields() { "nameType - " + ValidationConstants.INVALID_MESSAGE, "synonymScope - " + ValidationConstants.INVALID_MESSAGE)))). body("errorMessages.geneSecondaryIds", is("evidence - " + ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)); + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)); } @Test @@ -655,13 +652,11 @@ public void editGeneWithInvalidFields() { nonPersistedReference.setCurie("AGRKB:Invalid"); SOTerm nonPersistedSoTerm = new SOTerm(); nonPersistedSoTerm.setCurie("SO:Invalid"); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); Gene gene = getGene(GENE); gene.setTaxon(nonPersistedTaxon); gene.setGeneType(nonPersistedSoTerm); - gene.setDataProvider(invalidDataProvider); + gene.setDataProvider(nonPersistedOrganization); GeneSymbolSlotAnnotation invalidSymbol = gene.getGeneSymbol(); invalidSymbol.setEvidence(List.of(nonPersistedReference)); @@ -715,7 +710,7 @@ public void editGeneWithInvalidFields() { "nameType - " + ValidationConstants.INVALID_MESSAGE, "synonymScope - " + ValidationConstants.INVALID_MESSAGE)))). body("errorMessages.geneSecondaryIds", is("evidence - " + ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)); + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)); } @Test @@ -908,6 +903,7 @@ public void editGeneWithNullNonRequiredFieldsLevel1() { gene.setGeneSynonyms(null); gene.setGeneSystematicName(null); gene.setGeneSecondaryIds(null); + gene.setDataProviderCrossReference(null); RestAssured.given(). contentType("application/json"). @@ -925,7 +921,8 @@ public void editGeneWithNullNonRequiredFieldsLevel1() { body("entity", not(hasKey("geneFullName"))). body("entity", not(hasKey("geneSynonyms"))). body("entity", not(hasKey("geneSystematicName"))). - body("entity", not(hasKey("geneSecondaryIds"))); + body("entity", not(hasKey("geneSecondaryIds"))). + body("entity", not(hasKey("dataProviderCrossReference"))); } @Test diff --git a/src/test/java/org/alliancegenome/curation_api/GeneInteractionBulkUploadFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/GeneInteractionBulkUploadFmsITCase.java index 8dfeb183d..7d989fa8c 100644 --- a/src/test/java/org/alliancegenome/curation_api/GeneInteractionBulkUploadFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/GeneInteractionBulkUploadFmsITCase.java @@ -9,7 +9,7 @@ import org.alliancegenome.curation_api.base.BaseITCase; import org.alliancegenome.curation_api.constants.VocabularyConstants; -import org.alliancegenome.curation_api.model.entities.DataProvider; +import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.ResourceDescriptor; import org.alliancegenome.curation_api.model.entities.Vocabulary; import org.alliancegenome.curation_api.model.entities.VocabularyTerm; @@ -76,8 +76,8 @@ public void init() { private void loadRequiredEntities() throws Exception { Vocabulary nameTypeVocabulary = getVocabulary(VocabularyConstants.NAME_TYPE_VOCABULARY); VocabularyTerm symbolTerm = getVocabularyTerm(nameTypeVocabulary, "nomenclature_symbol"); - DataProvider dataProvider = createDataProvider("WB", false); - DataProvider dataProvider2 = createDataProvider("RGD", false); + Organization dataProvider = getOrganization("WB"); + Organization dataProvider2 = getOrganization("RGD"); createGenes(List.of(gene1, gene2), "NCBITaxon:6239", symbolTerm, false, dataProvider); createGeneWithXref(gene3, "NCBITaxon:6239", symbolTerm, false, dataProvider, gene3xref); createGeneWithXref(gene4, "NCBITaxon:9606", symbolTerm, false, dataProvider2, gene4xref); diff --git a/src/test/java/org/alliancegenome/curation_api/Gff3BulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/Gff3BulkUploadITCase.java index b53c98399..610f89bc0 100644 --- a/src/test/java/org/alliancegenome/curation_api/Gff3BulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/Gff3BulkUploadITCase.java @@ -83,7 +83,7 @@ public void gff3DataBulkUploadTranscriptEntity() throws Exception { body("entity.name", is("Y74C9A.2a.1")). body("entity.transcriptId", is("WB:Y74C9A.2a.1")). body("entity.taxon.curie", is("NCBITaxon:6239")). - body("entity.dataProvider.sourceOrganization.abbreviation", is("WB")). + body("entity.dataProvider.abbreviation", is("WB")). body("entity.transcriptType.curie", is("SO:0000234")). body("entity.transcriptGenomicLocationAssociations", hasSize(1)). body("entity.transcriptGenomicLocationAssociations[0].relation.name", is("located_on")). @@ -118,7 +118,7 @@ public void gff3DataBulkUploadExonEntity() throws Exception { statusCode(200). body("entity.uniqueId", is(exonUniqueId)). body("entity.taxon.curie", is("NCBITaxon:6239")). - body("entity.dataProvider.sourceOrganization.abbreviation", is("WB")). + body("entity.dataProvider.abbreviation", is("WB")). body("entity.exonGenomicLocationAssociations", hasSize(1)). body("entity.exonGenomicLocationAssociations[0].relation.name", is("located_on")). body("entity.exonGenomicLocationAssociations[0].exonGenomicLocationAssociationObject.name", is("I")). @@ -156,7 +156,7 @@ public void gff3DataBulkUploadCodingSequenceEntity() throws Exception { statusCode(200). body("entity.uniqueId", is(cdsUniqueId)). body("entity.taxon.curie", is("NCBITaxon:6239")). - body("entity.dataProvider.sourceOrganization.abbreviation", is("WB")). + body("entity.dataProvider.abbreviation", is("WB")). body("entity.codingSequenceGenomicLocationAssociations", hasSize(1)). body("entity.codingSequenceGenomicLocationAssociations[0].relation.name", is("located_on")). body("entity.codingSequenceGenomicLocationAssociations[0].codingSequenceGenomicLocationAssociationObject.name", is("I")). @@ -198,7 +198,7 @@ public void gff3DataBulkUploadUpdateTranscriptEntity() throws Exception { body("entity.name", is("Y74C9A.2a.1")). body("entity.transcriptId", is("RefSeq:Y74C9A.2a.1")). body("entity.taxon.curie", is("NCBITaxon:6239")). - body("entity.dataProvider.sourceOrganization.abbreviation", is("WB")). + body("entity.dataProvider.abbreviation", is("WB")). body("entity.transcriptType.curie", is("SO:0001035")). body("entity.transcriptGenomicLocationAssociations", hasSize(1)). body("entity.transcriptGenomicLocationAssociations[0].relation.name", is("located_on")). diff --git a/src/test/java/org/alliancegenome/curation_api/ParalogyBulkUploadFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/ParalogyBulkUploadFmsITCase.java index 4ef2e4361..fabfe9c47 100644 --- a/src/test/java/org/alliancegenome/curation_api/ParalogyBulkUploadFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/ParalogyBulkUploadFmsITCase.java @@ -9,7 +9,7 @@ import org.alliancegenome.curation_api.base.BaseITCase; import org.alliancegenome.curation_api.constants.VocabularyConstants; -import org.alliancegenome.curation_api.model.entities.DataProvider; +import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.Vocabulary; import org.alliancegenome.curation_api.model.entities.VocabularyTerm; import org.alliancegenome.curation_api.resources.TestContainerResource; @@ -52,7 +52,7 @@ public void init() { private void loadRequiredEntities() throws Exception { Vocabulary nameTypeVocabulary = getVocabulary(VocabularyConstants.NAME_TYPE_VOCABULARY); VocabularyTerm symbolTerm = getVocabularyTerm(nameTypeVocabulary, "nomenclature_symbol"); - DataProvider dataProvider = createDataProvider("WB", false); + Organization dataProvider = getOrganization("WB"); createGenes(List.of(gene1, gene2), "NCBITaxon:6239", symbolTerm, false, dataProvider); } diff --git a/src/test/java/org/alliancegenome/curation_api/PhenotypeAnnotationBulkUploadFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/PhenotypeAnnotationBulkUploadFmsITCase.java index bb1a13fd3..a36a1808f 100644 --- a/src/test/java/org/alliancegenome/curation_api/PhenotypeAnnotationBulkUploadFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/PhenotypeAnnotationBulkUploadFmsITCase.java @@ -10,7 +10,7 @@ import org.alliancegenome.curation_api.constants.VocabularyConstants; import org.alliancegenome.curation_api.model.entities.AGMPhenotypeAnnotation; import org.alliancegenome.curation_api.model.entities.AllelePhenotypeAnnotation; -import org.alliancegenome.curation_api.model.entities.DataProvider; +import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.ResourceDescriptor; import org.alliancegenome.curation_api.model.entities.Vocabulary; import org.alliancegenome.curation_api.model.entities.VocabularyTerm; @@ -79,7 +79,7 @@ private void loadRequiredEntities() throws Exception { createAnatomicalTerm(anatomyTerm, "Test AnatomicalTerm"); Vocabulary nameTypeVocabulary = getVocabulary(VocabularyConstants.NAME_TYPE_VOCABULARY); VocabularyTerm symbolTerm = getVocabularyTerm(nameTypeVocabulary, "nomenclature_symbol"); - DataProvider dataProvider = createDataProvider("WB", false); + Organization dataProvider = getOrganization("WB"); createGene(gene, "NCBITaxon:6239", symbolTerm, false, dataProvider); createAllele(allele, "TestAllele", "NCBITaxon:6239", symbolTerm, false, dataProvider); createAllele(allele2, "TestAllele2", "NCBITaxon:6239", symbolTerm, false, dataProvider); diff --git a/src/test/java/org/alliancegenome/curation_api/VariantBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/VariantBulkUploadITCase.java index acac0008d..bb5bf7591 100644 --- a/src/test/java/org/alliancegenome/curation_api/VariantBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/VariantBulkUploadITCase.java @@ -104,10 +104,10 @@ public void variantBulkUploadCheckFields() throws Exception { body("entity.relatedNotes[0].freeText", is("Test note")). body("entity.relatedNotes[0].noteType.name", is(noteType)). body("entity.relatedNotes[0].references[0].curie", is(reference)). - body("entity.dataProvider.sourceOrganization.abbreviation", is("WB")). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST:0001")). - body("entity.dataProvider.crossReference.displayName", is("TEST:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage")); + body("entity.dataProvider.abbreviation", is("WB")). + body("entity.dataProviderCrossReference.referencedCurie", is("TEST:0001")). + body("entity.dataProviderCrossReference.displayName", is("TEST:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")); } @Test @@ -141,10 +141,10 @@ public void variantBulkUploadUpdateCheckFields() throws Exception { body("entity.relatedNotes[0].freeText", is("Test note 2")). body("entity.relatedNotes[0].noteType.name", is(noteType2)). body("entity.relatedNotes[0].references[0].curie", is(reference2)). - body("entity.dataProvider.sourceOrganization.abbreviation", is("RGD")). - body("entity.dataProvider.crossReference.referencedCurie", is("TEST2:0001")). - body("entity.dataProvider.crossReference.displayName", is("TEST2:0001")). - body("entity.dataProvider.crossReference.resourceDescriptorPage.name", is("homepage2")); + body("entity.dataProvider.abbreviation", is("RGD")). + body("entity.dataProviderCrossReference.referencedCurie", is("TEST2:0001")). + body("entity.dataProviderCrossReference.displayName", is("TEST2:0001")). + body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage2")); } @Test @@ -231,7 +231,8 @@ public void variantBulkUploadUpdateMissingNonRequiredFieldsLevel2() throws Excep body("entity.relatedNotes[0]", not(hasKey("createdBy"))). body("entity.relatedNotes[0]", not(hasKey("updatedBy"))). body("entity.relatedNotes[0]", not(hasKey("dateCreated"))). - body("entity.relatedNotes[0]", not(hasKey("dateUpdated"))); + body("entity.relatedNotes[0]", not(hasKey("dateUpdated"))). + body("entity", not(hasKey("dataProviderCrossReference"))); } @Test diff --git a/src/test/java/org/alliancegenome/curation_api/VariantFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/VariantFmsITCase.java index 223be879a..af305b774 100644 --- a/src/test/java/org/alliancegenome/curation_api/VariantFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/VariantFmsITCase.java @@ -8,7 +8,7 @@ import org.alliancegenome.curation_api.base.BaseITCase; import org.alliancegenome.curation_api.constants.VocabularyConstants; -import org.alliancegenome.curation_api.model.entities.DataProvider; +import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.Vocabulary; import org.alliancegenome.curation_api.model.entities.VocabularyTerm; import org.alliancegenome.curation_api.resources.TestContainerResource; @@ -65,7 +65,7 @@ private void loadRequiredEntities() throws Exception { createSoTerm("SO:0001578", "stop_lost", false); Vocabulary nameTypeVocabulary = getVocabulary(VocabularyConstants.NAME_TYPE_VOCABULARY); VocabularyTerm symbolTerm = getVocabularyTerm(nameTypeVocabulary, "nomenclature_symbol"); - DataProvider dataProvider = createDataProvider("WB", false); + Organization dataProvider = getOrganization("WB"); createAllele(allele, "TestAlleleWithVariant", "NCBITaxon:6239", symbolTerm, false, dataProvider); createAllele(allele2, "TestAlleleWithVariant2", "NCBITaxon:6239", symbolTerm, false, dataProvider); @@ -90,7 +90,7 @@ public void variantFmsBulkUpload() throws Exception { statusCode(200). body("entity.modInternalId", is(variantId)). body("entity.taxon.curie", is("NCBITaxon:6239")). - body("entity.dataProvider.sourceOrganization.abbreviation", is("WB")). + body("entity.dataProvider.abbreviation", is("WB")). body("entity.variantType.curie", is("SO:1000002")). body("entity.synonyms", is(List.of("Syn 1", "Syn 2"))). body("entity.sourceGeneralConsequence.curie", is("SO:0001587")). @@ -132,7 +132,7 @@ public void variantFmsBulkUploadUpdate() throws Exception { statusCode(200). body("entity.modInternalId", is(variantId)). body("entity.taxon.curie", is("NCBITaxon:6239")). - body("entity.dataProvider.sourceOrganization.abbreviation", is("WB")). + body("entity.dataProvider.abbreviation", is("WB")). body("entity.variantType.curie", is("SO:1000008")). body("entity.synonyms", is(List.of("Syn 3", "Syn 4"))). body("entity.sourceGeneralConsequence.curie", is("SO:0001578")). diff --git a/src/test/java/org/alliancegenome/curation_api/VariantITCase.java b/src/test/java/org/alliancegenome/curation_api/VariantITCase.java index 67d9809ae..3d40fbe69 100644 --- a/src/test/java/org/alliancegenome/curation_api/VariantITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/VariantITCase.java @@ -12,7 +12,6 @@ import org.alliancegenome.curation_api.base.BaseITCase; import org.alliancegenome.curation_api.constants.ValidationConstants; import org.alliancegenome.curation_api.constants.VocabularyConstants; -import org.alliancegenome.curation_api.model.entities.DataProvider; import org.alliancegenome.curation_api.model.entities.Note; import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.Person; @@ -67,9 +66,9 @@ public class VariantITCase extends BaseITCase { private SOTerm sgcTerm2; private SOTerm obsoleteSoTerm; private Note relatedNote; - private DataProvider dataProvider; - private DataProvider dataProvider2; - private DataProvider obsoleteDataProvider; + private Organization dataProvider; + private Organization dataProvider2; + private Organization obsoleteDataProvider; private Organization nonPersistedOrganization; @@ -97,9 +96,9 @@ private void loadRequiredEntities() { sgcTerm2 = getSoTerm("SO:SGC002"); obsoleteSoTerm = getSoTerm("SO:00000"); relatedNote = createNote(noteType, "Test text", false, reference); - dataProvider = createDataProvider("VARTEST", false); - dataProvider2 = createDataProvider("VARTEST2", false); - obsoleteDataProvider = createDataProvider("VARODP", true); + dataProvider = createOrganization("VARTEST", false); + dataProvider2 = createOrganization("VARTEST2", false); + obsoleteDataProvider = createOrganization("VARODP", true); nonPersistedOrganization = new Organization(); nonPersistedOrganization.setAbbreviation("INV"); } @@ -147,7 +146,7 @@ public void createValidVariant() { body("entity.relatedNotes[0].freeText", is(relatedNote.getFreeText())). body("entity.relatedNotes[0].internal", is(false)). body("entity.relatedNotes[0].references[0].curie", is(reference.getCurie())). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider.getSourceOrganization().getAbbreviation())); + body("entity.dataProvider.abbreviation", is(dataProvider.getAbbreviation())); } @Test @@ -201,7 +200,7 @@ public void editVariant() { body("entity.relatedNotes[0].freeText", is(editedNote.getFreeText())). body("entity.relatedNotes[0].internal", is(true)). body("entity.relatedNotes[0].references[0].curie", is(reference2.getCurie())). - body("entity.dataProvider.sourceOrganization.abbreviation", is(dataProvider2.getSourceOrganization().getAbbreviation())); + body("entity.dataProvider.abbreviation", is(dataProvider2.getAbbreviation())); } @Test @@ -393,8 +392,6 @@ public void createVariantWithInvalidFields() { nonPersistedTaxon.setCurie("NCBITaxon:Invalid"); SOTerm nonPersistedSoTerm = new SOTerm(); nonPersistedSoTerm.setCurie("SO:Invalid"); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); Reference nonPersistedReference = new Reference(); nonPersistedReference.setCurie("AGRKB:Invalid"); @@ -410,7 +407,7 @@ public void createVariantWithInvalidFields() { variant.setVariantStatus(noteType); variant.setSourceGeneralConsequence(nonPersistedSoTerm); variant.setDateCreated(datetime); - variant.setDataProvider(invalidDataProvider); + variant.setDataProvider(nonPersistedOrganization); variant.setRelatedNotes(List.of(invalidNote)); RestAssured.given(). @@ -425,7 +422,7 @@ public void createVariantWithInvalidFields() { body("errorMessages.variantType", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.variantStatus", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.sourceGeneralConsequence", is(ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.relatedNotes", is(String.join(" | ", List.of( "noteType - " + ValidationConstants.INVALID_MESSAGE, "references - " + ValidationConstants.INVALID_MESSAGE)))); @@ -438,8 +435,6 @@ public void editVariantWithInvalidFields() { nonPersistedTaxon.setCurie("NCBITaxon:Invalid"); SOTerm nonPersistedSoTerm = new SOTerm(); nonPersistedSoTerm.setCurie("SO:Invalid"); - DataProvider invalidDataProvider = new DataProvider(); - invalidDataProvider.setSourceOrganization(nonPersistedOrganization); Reference nonPersistedReference = new Reference(); nonPersistedReference.setCurie("AGRKB:Invalid"); @@ -449,7 +444,7 @@ public void editVariantWithInvalidFields() { variant.setVariantStatus(noteType); variant.setSourceGeneralConsequence(nonPersistedSoTerm); variant.setDateCreated(datetime); - variant.setDataProvider(invalidDataProvider); + variant.setDataProvider(nonPersistedOrganization); Note invalidNote = variant.getRelatedNotes().get(0); invalidNote.setReferences(List.of(nonPersistedReference)); @@ -468,7 +463,7 @@ public void editVariantWithInvalidFields() { body("errorMessages.variantType", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.variantStatus", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.sourceGeneralConsequence", is(ValidationConstants.INVALID_MESSAGE)). - body("errorMessages.dataProvider", is("sourceOrganization - " + ValidationConstants.INVALID_MESSAGE)). + body("errorMessages.dataProvider", is(ValidationConstants.INVALID_MESSAGE)). body("errorMessages.relatedNotes", is(String.join(" | ", List.of( "noteType - " + ValidationConstants.INVALID_MESSAGE, "references - " + ValidationConstants.INVALID_MESSAGE)))); @@ -578,6 +573,7 @@ public void editVariantWithNullNonRequiredFieldsLevel1() { variant.setSourceGeneralConsequence(null); variant.setDateCreated(null); variant.setRelatedNotes(null); + variant.setDataProviderCrossReference(null); RestAssured.given(). contentType("application/json"). @@ -595,7 +591,8 @@ public void editVariantWithNullNonRequiredFieldsLevel1() { body("entity", not(hasKey("variantStatus"))). body("entity", not(hasKey("sourceGeneralConsequence"))). body("entity", not(hasKey("dateCreated"))). - body("entity", not(hasKey("relatedNotes"))); + body("entity", not(hasKey("relatedNotes"))). + body("entity", not(hasKey("dataProviderCrossReference"))); } @Test diff --git a/src/test/java/org/alliancegenome/curation_api/base/BaseITCase.java b/src/test/java/org/alliancegenome/curation_api/base/BaseITCase.java index d458c426c..ca2df2f1c 100644 --- a/src/test/java/org/alliancegenome/curation_api/base/BaseITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/base/BaseITCase.java @@ -23,7 +23,6 @@ import org.alliancegenome.curation_api.model.entities.ConditionRelation; import org.alliancegenome.curation_api.model.entities.Construct; import org.alliancegenome.curation_api.model.entities.CrossReference; -import org.alliancegenome.curation_api.model.entities.DataProvider; import org.alliancegenome.curation_api.model.entities.ExperimentalCondition; import org.alliancegenome.curation_api.model.entities.Gene; import org.alliancegenome.curation_api.model.entities.GeneDiseaseAnnotation; @@ -172,7 +171,7 @@ public AffectedGenomicModel createAffectedGenomicModel(String primaryExternalId, return createAffectedGenomicModel(primaryExternalId, name, taxonCurie, subtypeName, obsolete, null); } - public AffectedGenomicModel createAffectedGenomicModel(String primaryExternalId, String name, String taxonCurie, String subtypeName, Boolean obsolete, DataProvider dataProvider) { + public AffectedGenomicModel createAffectedGenomicModel(String primaryExternalId, String name, String taxonCurie, String subtypeName, Boolean obsolete, Organization dataProvider) { Vocabulary subtypeVocabulary = getVocabulary(VocabularyConstants.AGM_SUBTYPE_VOCABULARY); VocabularyTerm subtype = getVocabularyTerm(subtypeVocabulary, subtypeName); @@ -199,7 +198,7 @@ public Allele createAllele(String primaryExternalId, String taxonCurie, Vocabula return createAllele(primaryExternalId, primaryExternalId, taxonCurie, symbolNameTerm, obsolete, null); } - public Allele createAllele(String primaryExternalId, String symbol, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, DataProvider dataProvider) { + public Allele createAllele(String primaryExternalId, String symbol, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, Organization dataProvider) { Allele allele = new Allele(); allele.setPrimaryExternalId(primaryExternalId); allele.setTaxon(getNCBITaxonTerm(taxonCurie)); @@ -244,7 +243,7 @@ public AnatomicalTerm createAnatomicalTerm(String curie, String name) throws Exc return response.getEntity(); } - public AssemblyComponent createAssemblyComponent(String primaryExternalId, String name, GenomeAssembly assembly, DataProvider dataProvider) throws Exception { + public AssemblyComponent createAssemblyComponent(String primaryExternalId, String name, GenomeAssembly assembly, Organization dataProvider) throws Exception { AssemblyComponent assemblyComponent = new AssemblyComponent(); assemblyComponent.setPrimaryExternalId(primaryExternalId); assemblyComponent.setName(name); @@ -362,27 +361,6 @@ public Construct createConstruct(String primaryExternalId, Boolean obsolete, Voc return response.getEntity(); } - public DataProvider createDataProvider(String organizationAbbreviation, Boolean obsolete) { - DataProvider dataProvider = new DataProvider(); - Organization sourceOrganization = getOrganization(organizationAbbreviation); - if (sourceOrganization == null) { - sourceOrganization = createOrganization(organizationAbbreviation, false); - } - dataProvider.setSourceOrganization(sourceOrganization); - dataProvider.setObsolete(obsolete); - - ObjectResponse response = RestAssured.given(). - contentType("application/json"). - body(dataProvider). - when(). - post("/api/dataprovider"). - then(). - statusCode(200). - extract().body().as(getObjectResponseTypeRefDataProvider()); - - return response.getEntity(); - } - public DOTerm createDoTerm(String curie, String name) { return createDoTerm(curie, name, false); } @@ -471,11 +449,11 @@ public Gene createGene(String primaryExternalId, String taxonCurie, VocabularyTe return createGene(primaryExternalId, taxonCurie, symbolNameTerm, obsolete, null); } - public Gene createGene(String primaryExternalId, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, DataProvider dataProvider) { + public Gene createGene(String primaryExternalId, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, Organization dataProvider) { return createGeneWithXref(primaryExternalId, taxonCurie, symbolNameTerm, obsolete, dataProvider, null); } - public List createGenes(List primaryExternalIds, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, DataProvider dataProvider) { + public List createGenes(List primaryExternalIds, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, Organization dataProvider) { List geneList = new ArrayList<>(); for (String primaryExternalId : primaryExternalIds) { geneList.add(createGene(primaryExternalId, taxonCurie, symbolNameTerm, obsolete, dataProvider)); @@ -484,7 +462,7 @@ public List createGenes(List primaryExternalIds, String taxonCurie return geneList; } - public Gene createGeneWithXref(String primaryExternalId, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, DataProvider dataProvider, String xrefCurie) { + public Gene createGeneWithXref(String primaryExternalId, String taxonCurie, VocabularyTerm symbolNameTerm, Boolean obsolete, Organization dataProvider, String xrefCurie) { Gene gene = new Gene(); gene.setPrimaryExternalId(primaryExternalId); gene.setTaxon(getNCBITaxonTerm(taxonCurie)); @@ -1263,11 +1241,6 @@ private TypeRef> getObjectResponseTypeRefCrossRef }; } - private TypeRef> getObjectResponseTypeRefDataProvider() { - return new TypeRef>() { - }; - } - private TypeRef> getObjectResponseTypeRefDOTerm() { return new TypeRef>() { }; diff --git a/src/test/resources/bulk/01_gene/MN_01_no_non_required_fields_level_1.json b/src/test/resources/bulk/01_gene/MN_01_no_non_required_fields_level_1.json index ee7cce9f2..bcd58c62e 100644 --- a/src/test/resources/bulk/01_gene/MN_01_no_non_required_fields_level_1.json +++ b/src/test/resources/bulk/01_gene/MN_01_no_non_required_fields_level_1.json @@ -21,13 +21,7 @@ "data_provider_dto": { "internal": false, "obsolete": false, - "source_organization_abbreviation": "WB", - "cross_reference_dto": { - "referenced_curie": "TEST:0001", - "page_area": "homepage", - "display_name": "TEST:0001", - "prefix": "TEST" - } + "source_organization_abbreviation": "WB" }, "gene_type_curie": "SO:0001217" } diff --git a/src/test/resources/bulk/01_gene/UE_01_update_empty_non_required_fields.json b/src/test/resources/bulk/01_gene/UE_01_update_empty_non_required_fields.json index 2595fe65c..9f56fac85 100644 --- a/src/test/resources/bulk/01_gene/UE_01_update_empty_non_required_fields.json +++ b/src/test/resources/bulk/01_gene/UE_01_update_empty_non_required_fields.json @@ -90,13 +90,7 @@ "data_provider_dto": { "internal": false, "obsolete": false, - "source_organization_abbreviation": "WB", - "cross_reference_dto": { - "referenced_curie": "TEST:0001", - "page_area": "homepage", - "display_name": "TEST:0001", - "prefix": "TEST" - } + "source_organization_abbreviation": "WB" }, "cross_reference_dtos": [], "gene_type_curie": "SO:0001217" diff --git a/src/test/resources/bulk/02_allele/MN_01_no_non_required_fields_level_1.json b/src/test/resources/bulk/02_allele/MN_01_no_non_required_fields_level_1.json index 8cec83a36..21fc1c924 100644 --- a/src/test/resources/bulk/02_allele/MN_01_no_non_required_fields_level_1.json +++ b/src/test/resources/bulk/02_allele/MN_01_no_non_required_fields_level_1.json @@ -21,13 +21,7 @@ "data_provider_dto": { "internal": false, "obsolete": false, - "source_organization_abbreviation": "WB", - "cross_reference_dto": { - "referenced_curie": "TEST:0001", - "page_area": "homepage", - "display_name": "TEST:0001", - "prefix": "TEST" - } + "source_organization_abbreviation": "WB" } } ] diff --git a/src/test/resources/bulk/02_allele/UM_01_update_no_non_required_fields_level_1.json b/src/test/resources/bulk/02_allele/UM_01_update_no_non_required_fields_level_1.json index bdac084e3..b11d61935 100644 --- a/src/test/resources/bulk/02_allele/UM_01_update_no_non_required_fields_level_1.json +++ b/src/test/resources/bulk/02_allele/UM_01_update_no_non_required_fields_level_1.json @@ -21,13 +21,7 @@ "data_provider_dto": { "internal": false, "obsolete": false, - "source_organization_abbreviation": "WB", - "cross_reference_dto": { - "referenced_curie": "TEST:0001", - "page_area": "homepage", - "display_name": "TEST:0001", - "prefix": "TEST" - } + "source_organization_abbreviation": "WB" } } ] diff --git a/src/test/resources/bulk/03_agm/MN_01_no_non_required_fields.json b/src/test/resources/bulk/03_agm/MN_01_no_non_required_fields.json index 293620d35..f86507a88 100644 --- a/src/test/resources/bulk/03_agm/MN_01_no_non_required_fields.json +++ b/src/test/resources/bulk/03_agm/MN_01_no_non_required_fields.json @@ -6,13 +6,7 @@ "data_provider_dto": { "internal": false, "obsolete": false, - "source_organization_abbreviation": "WB", - "cross_reference_dto": { - "referenced_curie": "TEST:0001", - "page_area": "homepage", - "display_name": "TEST:0001", - "prefix": "TEST" - } + "source_organization_abbreviation": "WB" } } ] diff --git a/src/test/resources/bulk/03_agm/UM_01_update_no_non_required_fields.json b/src/test/resources/bulk/03_agm/UM_01_update_no_non_required_fields.json index 2735e42e4..cc043bd7c 100644 --- a/src/test/resources/bulk/03_agm/UM_01_update_no_non_required_fields.json +++ b/src/test/resources/bulk/03_agm/UM_01_update_no_non_required_fields.json @@ -6,13 +6,7 @@ "data_provider_dto": { "internal": false, "obsolete": false, - "source_organization_abbreviation": "WB", - "cross_reference_dto": { - "referenced_curie": "TEST:0001", - "page_area": "homepage", - "display_name": "TEST:0001", - "prefix": "TEST" - } + "source_organization_abbreviation": "WB" } } ] diff --git a/src/test/resources/bulk/05_construct/UM_02_update_no_non_required_fields_level_2.json b/src/test/resources/bulk/05_construct/UM_02_update_no_non_required_fields_level_2.json index d85fbd349..d9570e32d 100644 --- a/src/test/resources/bulk/05_construct/UM_02_update_no_non_required_fields_level_2.json +++ b/src/test/resources/bulk/05_construct/UM_02_update_no_non_required_fields_level_2.json @@ -36,13 +36,7 @@ "data_provider_dto": { "internal": false, "obsolete": false, - "source_organization_abbreviation": "WB", - "cross_reference_dto": { - "referenced_curie": "TEST:0001", - "page_area": "homepage", - "display_name": "TEST:0001", - "prefix": "TEST" - } + "source_organization_abbreviation": "WB" }, "secondary_identifiers": [ "secondary_test" diff --git a/src/test/resources/bulk/06_variant/UM_02_update_no_non_required_fields_level_2.json b/src/test/resources/bulk/06_variant/UM_02_update_no_non_required_fields_level_2.json index 3ac5f121e..d1dc6783b 100644 --- a/src/test/resources/bulk/06_variant/UM_02_update_no_non_required_fields_level_2.json +++ b/src/test/resources/bulk/06_variant/UM_02_update_no_non_required_fields_level_2.json @@ -12,13 +12,7 @@ "date_created": "2022-03-09T22:10:12+00:00", "date_updated": "2022-03-10T22:10:12+00:00", "data_provider_dto": { - "source_organization_abbreviation": "WB", - "cross_reference_dto": { - "referenced_curie": "TEST:0001", - "page_area": "homepage", - "display_name": "TEST:0001", - "prefix": "TEST" - } + "source_organization_abbreviation": "WB" }, "note_dtos": [ { From 155cc8ff51392defc5d41251012d2e94826b4b79 Mon Sep 17 00:00:00 2001 From: Mark Quinton-Tulloch Date: Mon, 13 Jan 2025 10:52:09 +0000 Subject: [PATCH 5/9] Index rename --- .../model/entities/HTPExpressionDatasetSampleAnnotation.java | 2 +- .../db/migration/v0.38.0.24__linkml_v2_9_1_update.sql | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetSampleAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetSampleAnnotation.java index 1924f78b4..e620bff0a 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetSampleAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/HTPExpressionDatasetSampleAnnotation.java @@ -46,7 +46,7 @@ @Index(name = "htpdatasample_sequencingFormat_index", columnList = "sequencingFormat_id"), @Index(name = "htpdatasample_taxon_index", columnList = "taxon_id"), @Index(name = "htpdatasample_dataprovider_index", columnList = "dataprovider_id"), - @Index(name = "htpdatasample_dataprovidercrossreference_index", columnList = "dataprovidercrossreference_id"), + @Index(name = "htpdatasample_dataproviderxref_index", columnList = "dataprovidercrossreference_id"), @Index(name = "htpdatasample_createdby_index", columnList = "createdby_id"), @Index(name = "htpdatasample_updatedby_index", columnList = "updatedby_id") }) diff --git a/src/main/resources/db/migration/v0.38.0.24__linkml_v2_9_1_update.sql b/src/main/resources/db/migration/v0.38.0.24__linkml_v2_9_1_update.sql index 8eb7db570..13bdb3d73 100644 --- a/src/main/resources/db/migration/v0.38.0.24__linkml_v2_9_1_update.sql +++ b/src/main/resources/db/migration/v0.38.0.24__linkml_v2_9_1_update.sql @@ -180,10 +180,10 @@ ALTER TABLE htpexpressiondatasetsampleannotation DROP COLUMN dataprovider_id; ALTER TABLE htpexpressiondatasetsampleannotation RENAME COLUMN newdataprovider_id TO dataprovider_id; ALTER TABLE htpexpressiondatasetsampleannotation ADD CONSTRAINT htpexpressiondatasetsampleannotation_dataprovider_id_fk FOREIGN KEY (dataprovider_id) REFERENCES organization(id); -ALTER TABLE htpexpressiondatasetsampleannotation ADD CONSTRAINT htpexpressiondatasetsampleannotation_dataprovidercrossreference_id_fk FOREIGN KEY (dataprovidercrossreference_id) REFERENCES crossreference(id); +ALTER TABLE htpexpressiondatasetsampleannotation ADD CONSTRAINT htpexpressiondatasetsampleannotation_dataproviderxref_id_fk FOREIGN KEY (dataprovidercrossreference_id) REFERENCES crossreference(id); CREATE INDEX htpexpressiondatasetsampleannotation_dataprovider_index ON htpexpressiondatasetsampleannotation USING btree (dataprovider_id); -CREATE INDEX htpexpressiondatasetsampleannotation_dataprovidercrossreference_index ON htpexpressiondatasetsampleannotation USING btree (dataprovidercrossreference_id); +CREATE INDEX htpexpressiondatasetsampleannotation_dataproviderxref_index ON htpexpressiondatasetsampleannotation USING btree (dataprovidercrossreference_id); --Update data provider for phenotypeannotation table ALTER TABLE phenotypeannotation ADD newdataprovider_id bigint; From 6fef1713693dd2896347414d93d00d259d955f54 Mon Sep 17 00:00:00 2001 From: Mark Quinton-Tulloch Date: Mon, 13 Jan 2025 11:18:57 +0000 Subject: [PATCH 6/9] Test fix and prettify --- src/main/cliapp/src/constants/FilterFields.js | 12 ++---------- .../curation_api/VariantFmsITCase.java | 2 +- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main/cliapp/src/constants/FilterFields.js b/src/main/cliapp/src/constants/FilterFields.js index 73c956b35..143c88372 100644 --- a/src/main/cliapp/src/constants/FilterFields.js +++ b/src/main/cliapp/src/constants/FilterFields.js @@ -223,11 +223,7 @@ export const FIELD_SETS = Object.freeze({ }, dataProviderFieldSet: { filterName: 'dataProviderFilter', - fields: [ - 'dataProvider.abbreviation', - 'dataProvider.fullName', - 'dataProvider.shortName', - ], + fields: ['dataProvider.abbreviation', 'dataProvider.fullName', 'dataProvider.shortName'], }, dataCreatedFieldSet: { filterName: 'dateCreatedFilter', @@ -578,11 +574,7 @@ export const FIELD_SETS = Object.freeze({ }, secondaryDataProviderFieldSet: { filterName: 'secondaryDataProviderFilter', - fields: [ - 'secondaryDataProvider.abbreviation', - 'secondaryDataProvider.fullName', - 'secondaryDataProvider.shortName', - ], + fields: ['secondaryDataProvider.abbreviation', 'secondaryDataProvider.fullName', 'secondaryDataProvider.shortName'], }, secondaryIdsFieldSet: { filterName: 'secondaryIdsFilter', diff --git a/src/test/java/org/alliancegenome/curation_api/VariantFmsITCase.java b/src/test/java/org/alliancegenome/curation_api/VariantFmsITCase.java index 4c36b9091..895e569ed 100644 --- a/src/test/java/org/alliancegenome/curation_api/VariantFmsITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/VariantFmsITCase.java @@ -236,7 +236,7 @@ public void variantFmsBulkUploadUpdateWithNoReferences() throws Exception { statusCode(200). body("entity.modInternalId", is(variantId)). body("entity.taxon.curie", is("NCBITaxon:6239")). - body("entity.dataProvider.sourceOrganization.abbreviation", is("WB")). + body("entity.dataProvider.abbreviation", is("WB")). body("entity.variantType.curie", is("SO:1000008")). body("entity.synonyms", is(List.of("Syn 3", "Syn 4"))). body("entity.sourceGeneralConsequence.curie", is("SO:0001578")). From b08afb0fcb66ec5674eccf7e907383e2bcf64d06 Mon Sep 17 00:00:00 2001 From: Mark Quinton-Tulloch Date: Mon, 13 Jan 2025 11:26:01 +0000 Subject: [PATCH 7/9] Checkstyle fixes --- .../services/validation/dto/base/BaseDTOValidator.java | 1 - .../curation_api/DiseaseAnnotationBulkUploadITCase.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/base/BaseDTOValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/base/BaseDTOValidator.java index c61bfadd1..ae992a40d 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/dto/base/BaseDTOValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/dto/base/BaseDTOValidator.java @@ -35,7 +35,6 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.ImmutablePair; -import io.quarkus.logging.Log; import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Inject; diff --git a/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationBulkUploadITCase.java b/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationBulkUploadITCase.java index 4b54d03f9..a7b170b26 100644 --- a/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationBulkUploadITCase.java +++ b/src/test/java/org/alliancegenome/curation_api/DiseaseAnnotationBulkUploadITCase.java @@ -347,7 +347,7 @@ public void alleleDiseaseAnnotationBulkUploadCheckFields() throws Exception { body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")). body("entity.secondaryDataProviderCrossReference.referencedCurie", is("TEST:0002")). body("entity.secondaryDataProviderCrossReference.displayName", is("TEST:0002")). - body("entity.secondaryDataProviderCrossReference.resourceDescriptorPage.name", is("homepage"));; + body("entity.secondaryDataProviderCrossReference.resourceDescriptorPage.name", is("homepage")); } @Test @@ -432,7 +432,7 @@ public void agmDiseaseAnnotationBulkUploadCheckFields() throws Exception { body("entity.dataProviderCrossReference.resourceDescriptorPage.name", is("homepage")). body("entity.secondaryDataProviderCrossReference.referencedCurie", is("TEST:0002")). body("entity.secondaryDataProviderCrossReference.displayName", is("TEST:0002")). - body("entity.secondaryDataProviderCrossReference.resourceDescriptorPage.name", is("homepage"));; + body("entity.secondaryDataProviderCrossReference.resourceDescriptorPage.name", is("homepage")); } @Test From 17e414ad7b58e969fdd9ab192a8bc42af6c64291 Mon Sep 17 00:00:00 2001 From: Mark Quinton-Tulloch Date: Mon, 13 Jan 2025 13:15:52 +0000 Subject: [PATCH 8/9] Test updates, fixes, consolidation --- .../allelesPage/mockData/mockData.js | 25 +- .../constructsPage/mockData/mockData.js | 170 +++++----- .../mockData/mockData.js | 166 +++++----- .../containers/genesPage/mockData/mockData.js | 56 ++-- .../mockData/mockData.js | 297 ++++++++---------- .../variantsPage/mockData/mockData.js | 27 +- .../model/entities/Annotation.java | 4 +- .../model/entities/DiseaseAnnotation.java | 2 +- .../services/OrganizationService.java | 5 - .../validation/AnnotationValidator.java | 73 +---- .../DiseaseAnnotationValidator.java | 2 +- .../services/validation/ReagentValidator.java | 61 +--- .../base/AuditedObjectValidator.java | 77 +++++ .../base/SubmittedObjectValidator.java | 81 +---- 14 files changed, 415 insertions(+), 631 deletions(-) diff --git a/src/main/cliapp/src/containers/allelesPage/mockData/mockData.js b/src/main/cliapp/src/containers/allelesPage/mockData/mockData.js index 1ef83fd9d..20c4ca6d1 100644 --- a/src/main/cliapp/src/containers/allelesPage/mockData/mockData.js +++ b/src/main/cliapp/src/containers/allelesPage/mockData/mockData.js @@ -33,23 +33,18 @@ export const data = { dataProvider: { internal: false, obsolete: false, - id: 76151078, - sourceOrganization: { + id: 20308679, + uniqueId: 'FB', + abbreviation: 'FB', + fullName: 'FlyBase', + homepageResourceDescriptorPage: { internal: false, obsolete: false, - id: 20308679, - uniqueId: 'FB', - abbreviation: 'FB', - fullName: 'FlyBase', - homepageResourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.537112Z', - dbDateUpdated: '2023-05-04T22:00:09.35185Z', - id: 41750763, - name: 'homepage', - urlTemplate: 'https://flybase.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.537112Z', + dbDateUpdated: '2023-05-04T22:00:09.35185Z', + id: 41750763, + name: 'homepage', + urlTemplate: 'https://flybase.org/', }, }, references: [ diff --git a/src/main/cliapp/src/containers/constructsPage/mockData/mockData.js b/src/main/cliapp/src/containers/constructsPage/mockData/mockData.js index ef77fdcbf..66ea3dfbd 100644 --- a/src/main/cliapp/src/containers/constructsPage/mockData/mockData.js +++ b/src/main/cliapp/src/containers/constructsPage/mockData/mockData.js @@ -29,43 +29,36 @@ export const data = { dataProvider: { internal: false, obsolete: false, - dbDateCreated: '2023-09-21T17:51:29.404006+01:00', - dbDateUpdated: '2023-09-21T22:32:31.318449+01:00', - id: 133503942, - sourceOrganization: { + id: 20308683, + uniqueId: 'WB', + abbreviation: 'WB', + fullName: 'WormBase', + homepageResourceDescriptorPage: { internal: false, obsolete: false, - id: 20308683, - uniqueId: 'WB', - abbreviation: 'WB', - fullName: 'WormBase', - homepageResourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.609757Z', - dbDateUpdated: '2023-08-27T22:00:03.833696+01:00', - id: 41750788, - name: 'homepage', - urlTemplate: 'https://www.wormbase.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.609757Z', + dbDateUpdated: '2023-08-27T22:00:03.833696+01:00', + id: 41750788, + name: 'homepage', + urlTemplate: 'https://www.wormbase.org/', }, - crossReference: { + }, + dataProviderCrossReference: { + internal: false, + obsolete: false, + dbDateCreated: '2023-09-21T17:51:29.385011+01:00', + dbDateUpdated: '2023-09-21T22:32:31.316107+01:00', + id: 133503941, + referencedCurie: 'WB:WBCnstr00000001', + displayName: 'WBCnstr00000001', + resourceDescriptorPage: { internal: false, obsolete: false, - dbDateCreated: '2023-09-21T17:51:29.385011+01:00', - dbDateUpdated: '2023-09-21T22:32:31.316107+01:00', - id: 133503941, - referencedCurie: 'WB:WBCnstr00000001', - displayName: 'WBCnstr00000001', - resourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.612125Z', - dbDateUpdated: '2023-08-27T22:00:03.835967+01:00', - id: 41750793, - name: 'construct', - urlTemplate: 'https://www.wormbase.org/db/get?name=[%s];class=Construct', - }, + dbDateCreated: '2023-02-20T09:26:39.612125Z', + dbDateUpdated: '2023-08-27T22:00:03.835967+01:00', + id: 41750793, + name: 'construct', + urlTemplate: 'https://www.wormbase.org/db/get?name=[%s];class=Construct', }, }, references: [ @@ -326,43 +319,36 @@ export const data = { dataProvider: { internal: false, obsolete: false, - dbDateCreated: '2023-09-21T17:51:29.404006+01:00', - dbDateUpdated: '2023-09-21T22:32:31.318449+01:00', - id: 133503942, - sourceOrganization: { + id: 20308683, + uniqueId: 'WB', + abbreviation: 'WB', + fullName: 'WormBase', + homepageResourceDescriptorPage: { internal: false, obsolete: false, - id: 20308683, - uniqueId: 'WB', - abbreviation: 'WB', - fullName: 'WormBase', - homepageResourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.609757Z', - dbDateUpdated: '2023-08-27T22:00:03.833696+01:00', - id: 41750788, - name: 'homepage', - urlTemplate: 'https://www.wormbase.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.609757Z', + dbDateUpdated: '2023-08-27T22:00:03.833696+01:00', + id: 41750788, + name: 'homepage', + urlTemplate: 'https://www.wormbase.org/', }, - crossReference: { + }, + dataProviderCrossReference: { + internal: false, + obsolete: false, + dbDateCreated: '2023-09-21T17:51:29.385011+01:00', + dbDateUpdated: '2023-09-21T22:32:31.316107+01:00', + id: 133503941, + referencedCurie: 'WB:WBCnstr00000001', + displayName: 'WBCnstr00000001', + resourceDescriptorPage: { internal: false, obsolete: false, - dbDateCreated: '2023-09-21T17:51:29.385011+01:00', - dbDateUpdated: '2023-09-21T22:32:31.316107+01:00', - id: 133503941, - referencedCurie: 'WB:WBCnstr00000001', - displayName: 'WBCnstr00000001', - resourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.612125Z', - dbDateUpdated: '2023-08-27T22:00:03.835967+01:00', - id: 41750793, - name: 'construct', - urlTemplate: 'https://www.wormbase.org/db/get?name=[%s];class=Construct', - }, + dbDateCreated: '2023-02-20T09:26:39.612125Z', + dbDateUpdated: '2023-08-27T22:00:03.835967+01:00', + id: 41750793, + name: 'construct', + urlTemplate: 'https://www.wormbase.org/db/get?name=[%s];class=Construct', }, }, references: [ @@ -688,42 +674,36 @@ export const data = { dataProvider: { internal: false, obsolete: false, - dbDateUpdated: '2023-10-12T22:30:58.367101+01:00', - id: 75346028, - sourceOrganization: { + id: 20308683, + uniqueId: 'WB', + abbreviation: 'WB', + fullName: 'WormBase', + homepageResourceDescriptorPage: { internal: false, obsolete: false, - id: 20308683, - uniqueId: 'WB', - abbreviation: 'WB', - fullName: 'WormBase', - homepageResourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.609757Z', - dbDateUpdated: '2023-08-27T22:00:03.833696+01:00', - id: 41750788, - name: 'homepage', - urlTemplate: 'https://www.wormbase.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.609757Z', + dbDateUpdated: '2023-08-27T22:00:03.833696+01:00', + id: 41750788, + name: 'homepage', + urlTemplate: 'https://www.wormbase.org/', }, - crossReference: { + }, + dataProviderCrossReference: { + internal: false, + obsolete: false, + dbDateCreated: '2023-06-06T19:44:24.155299+01:00', + dbDateUpdated: '2023-06-06T19:44:24.1553+01:00', + id: 86350879, + referencedCurie: 'WB:WBGene00003006', + displayName: 'WBGene00003006', + resourceDescriptorPage: { internal: false, obsolete: false, - dbDateCreated: '2023-06-06T19:44:24.155299+01:00', - dbDateUpdated: '2023-06-06T19:44:24.1553+01:00', - id: 86350879, - referencedCurie: 'WB:WBGene00003006', - displayName: 'WBGene00003006', - resourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.602562Z', - dbDateUpdated: '2023-08-27T22:00:03.827167+01:00', - id: 41750773, - name: 'gene', - urlTemplate: 'https://www.wormbase.org/db/get?name=[%s];class=Gene', - }, + dbDateCreated: '2023-02-20T09:26:39.602562Z', + dbDateUpdated: '2023-08-27T22:00:03.827167+01:00', + id: 41750773, + name: 'gene', + urlTemplate: 'https://www.wormbase.org/db/get?name=[%s];class=Gene', }, }, geneType: { diff --git a/src/main/cliapp/src/containers/diseaseAnnotationsPage/mockData/mockData.js b/src/main/cliapp/src/containers/diseaseAnnotationsPage/mockData/mockData.js index 63e0693ae..aa6b97a52 100644 --- a/src/main/cliapp/src/containers/diseaseAnnotationsPage/mockData/mockData.js +++ b/src/main/cliapp/src/containers/diseaseAnnotationsPage/mockData/mockData.js @@ -38,9 +38,7 @@ export const data = { }, ], secondaryDataProvider: { - sourceOrganization: { - abbreviation: 'test provider', - }, + abbreviation: 'test provider', }, geneticSex: { name: 'genetic sex test', @@ -155,23 +153,18 @@ export const data = { dataProvider: { internal: false, obsolete: false, - id: 75083698, - sourceOrganization: { + id: 20308680, + uniqueId: 'MGI', + abbreviation: 'MGI', + fullName: 'Mouse Genome Informatics', + homepageResourceDescriptorPage: { internal: false, obsolete: false, - id: 20308680, - uniqueId: 'MGI', - abbreviation: 'MGI', - fullName: 'Mouse Genome Informatics', - homepageResourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.240245Z', - dbDateUpdated: '2023-05-11T22:00:03.831263Z', - id: 41750686, - name: 'homepage', - urlTemplate: 'http://www.informatics.jax.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.240245Z', + dbDateUpdated: '2023-05-11T22:00:03.831263Z', + id: 41750686, + name: 'homepage', + urlTemplate: 'http://www.informatics.jax.org/', }, }, diseaseAnnotationSubject: { @@ -189,42 +182,36 @@ export const data = { dataProvider: { internal: false, obsolete: false, - dbDateUpdated: '2023-05-17T12:33:39.451734Z', - id: 75611693, - sourceOrganization: { + id: 20308680, + uniqueId: 'MGI', + abbreviation: 'MGI', + fullName: 'Mouse Genome Informatics', + homepageResourceDescriptorPage: { internal: false, obsolete: false, - id: 20308680, - uniqueId: 'MGI', - abbreviation: 'MGI', - fullName: 'Mouse Genome Informatics', - homepageResourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.240245Z', - dbDateUpdated: '2023-05-11T22:00:03.831263Z', - id: 41750686, - name: 'homepage', - urlTemplate: 'http://www.informatics.jax.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.240245Z', + dbDateUpdated: '2023-05-11T22:00:03.831263Z', + id: 41750686, + name: 'homepage', + urlTemplate: 'http://www.informatics.jax.org/', }, - crossReference: { + }, + dataProviderCrossReference: { + internal: false, + obsolete: false, + dbDateCreated: '2023-05-17T12:33:39.450658Z', + dbDateUpdated: '2023-05-17T12:33:39.450659Z', + id: 80324218, + referencedCurie: 'MGI:5560505', + displayName: 'MGI:5560505', + resourceDescriptorPage: { internal: false, obsolete: false, - dbDateCreated: '2023-05-17T12:33:39.450658Z', - dbDateUpdated: '2023-05-17T12:33:39.450659Z', - id: 80324218, - referencedCurie: 'MGI:5560505', - displayName: 'MGI:5560505', - resourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.239734Z', - dbDateUpdated: '2023-05-11T22:00:03.830784Z', - id: 41750685, - name: 'genotype', - urlTemplate: 'http://www.informatics.jax.org/allele/genoview/MGI:[%s]', - }, + dbDateCreated: '2023-02-20T09:26:39.239734Z', + dbDateUpdated: '2023-05-11T22:00:03.830784Z', + id: 41750685, + name: 'genotype', + urlTemplate: 'http://www.informatics.jax.org/allele/genoview/MGI:[%s]', }, }, name: 'Rfx3b2b1213Clo/Rfx3b2b1213Clo [background:] C57BL/6J-Rfx3b2b1213Clo', @@ -266,42 +253,36 @@ export const data = { dataProvider: { internal: false, obsolete: false, - dbDateUpdated: '2023-05-17T10:05:06.055328Z', - id: 75132764, - sourceOrganization: { + id: 20308680, + uniqueId: 'MGI', + abbreviation: 'MGI', + fullName: 'Mouse Genome Informatics', + homepageResourceDescriptorPage: { internal: false, obsolete: false, - id: 20308680, - uniqueId: 'MGI', - abbreviation: 'MGI', - fullName: 'Mouse Genome Informatics', - homepageResourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.240245Z', - dbDateUpdated: '2023-05-11T22:00:03.831263Z', - id: 41750686, - name: 'homepage', - urlTemplate: 'http://www.informatics.jax.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.240245Z', + dbDateUpdated: '2023-05-11T22:00:03.831263Z', + id: 41750686, + name: 'homepage', + urlTemplate: 'http://www.informatics.jax.org/', }, - crossReference: { + }, + dataProviderCrossReference: { + internal: false, + obsolete: false, + dbDateCreated: '2023-05-17T10:05:06.054841Z', + dbDateUpdated: '2023-05-17T10:05:06.054842Z', + id: 80081812, + referencedCurie: 'MGI:106582', + displayName: 'MGI:106582', + resourceDescriptorPage: { internal: false, obsolete: false, - dbDateCreated: '2023-05-17T10:05:06.054841Z', - dbDateUpdated: '2023-05-17T10:05:06.054842Z', - id: 80081812, - referencedCurie: 'MGI:106582', - displayName: 'MGI:106582', - resourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.235386Z', - dbDateUpdated: '2023-05-11T22:00:03.81929Z', - id: 41750677, - name: 'gene', - urlTemplate: 'http://www.informatics.jax.org/marker/MGI:[%s]', - }, + dbDateCreated: '2023-02-20T09:26:39.235386Z', + dbDateUpdated: '2023-05-11T22:00:03.81929Z', + id: 41750677, + name: 'gene', + urlTemplate: 'http://www.informatics.jax.org/marker/MGI:[%s]', }, }, geneType: { @@ -370,23 +351,18 @@ export const data = { dataProvider: { internal: false, obsolete: false, - id: 75738124, - sourceOrganization: { + id: 20308680, + uniqueId: 'MGI', + abbreviation: 'MGI', + fullName: 'Mouse Genome Informatics', + homepageResourceDescriptorPage: { internal: false, obsolete: false, - id: 20308680, - uniqueId: 'MGI', - abbreviation: 'MGI', - fullName: 'Mouse Genome Informatics', - homepageResourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.240245Z', - dbDateUpdated: '2023-05-11T22:00:03.831263Z', - id: 41750686, - name: 'homepage', - urlTemplate: 'http://www.informatics.jax.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.240245Z', + dbDateUpdated: '2023-05-11T22:00:03.831263Z', + id: 41750686, + name: 'homepage', + urlTemplate: 'http://www.informatics.jax.org/', }, }, references: [ diff --git a/src/main/cliapp/src/containers/genesPage/mockData/mockData.js b/src/main/cliapp/src/containers/genesPage/mockData/mockData.js index 18fb323ac..3dd4c6655 100644 --- a/src/main/cliapp/src/containers/genesPage/mockData/mockData.js +++ b/src/main/cliapp/src/containers/genesPage/mockData/mockData.js @@ -38,42 +38,36 @@ export const data = { dataProvider: { internal: false, obsolete: false, - dbDateUpdated: '2023-05-16T12:31:21.941183Z', - id: 75799980, - sourceOrganization: { + id: 20308683, + uniqueId: 'WB', + abbreviation: 'WB', + fullName: 'WormBase', + homepageResourceDescriptorPage: { internal: false, obsolete: false, - id: 20308683, - uniqueId: 'WB', - abbreviation: 'WB', - fullName: 'WormBase', - homepageResourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.609757Z', - dbDateUpdated: '2023-05-04T22:00:09.611705Z', - id: 41750788, - name: 'homepage', - urlTemplate: 'https://www.wormbase.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.609757Z', + dbDateUpdated: '2023-05-04T22:00:09.611705Z', + id: 41750788, + name: 'homepage', + urlTemplate: 'https://www.wormbase.org/', }, - crossReference: { + }, + dataProviderCrossReference: { + internal: false, + obsolete: false, + dbDateCreated: '2023-05-16T12:31:21.940625Z', + dbDateUpdated: '2023-05-16T12:31:21.940626Z', + id: 79690913, + referencedCurie: 'WB:WBGene00002975', + displayName: 'WBGene00002975', + resourceDescriptorPage: { internal: false, obsolete: false, - dbDateCreated: '2023-05-16T12:31:21.940625Z', - dbDateUpdated: '2023-05-16T12:31:21.940626Z', - id: 79690913, - referencedCurie: 'WB:WBGene00002975', - displayName: 'WBGene00002975', - resourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.602562Z', - dbDateUpdated: '2023-05-04T22:00:09.592619Z', - id: 41750773, - name: 'gene', - urlTemplate: 'https://www.wormbase.org/db/get?name=[%s];class=Gene', - }, + dbDateCreated: '2023-02-20T09:26:39.602562Z', + dbDateUpdated: '2023-05-04T22:00:09.592619Z', + id: 41750773, + name: 'gene', + urlTemplate: 'https://www.wormbase.org/db/get?name=[%s];class=Gene', }, }, crossReferences: [ diff --git a/src/main/cliapp/src/containers/phenotypeAnnotationsPage/mockData/mockData.js b/src/main/cliapp/src/containers/phenotypeAnnotationsPage/mockData/mockData.js index d649245e4..9fac5155e 100644 --- a/src/main/cliapp/src/containers/phenotypeAnnotationsPage/mockData/mockData.js +++ b/src/main/cliapp/src/containers/phenotypeAnnotationsPage/mockData/mockData.js @@ -94,44 +94,37 @@ export const data = { }, ], dataProvider: { - id: 201422341, + id: 20308685, internal: false, obsolete: false, - dbDateCreated: '2024-03-05T10:31:10.219143Z', - dbDateUpdated: '2024-03-05T10:31:10.21916Z', - sourceOrganization: { - id: 20308685, + abbreviation: 'ZFIN', + fullName: 'Zebrafish Information Network', + homepageResourceDescriptorPage: { + id: 41750742, internal: false, obsolete: false, - abbreviation: 'ZFIN', - fullName: 'Zebrafish Information Network', - homepageResourceDescriptorPage: { - id: 41750742, - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.466873Z', - dbDateUpdated: '2023-08-27T22:00:03.542259Z', - name: 'homepage', - urlTemplate: 'https://zfin.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.466873Z', + dbDateUpdated: '2023-08-27T22:00:03.542259Z', + name: 'homepage', + urlTemplate: 'https://zfin.org/', }, - crossReference: { - id: 201551741, + }, + dataProviderCrossReference: { + id: 201551741, + internal: false, + obsolete: false, + dbDateCreated: '2024-03-05T10:31:10.217464Z', + dbDateUpdated: '2024-03-05T10:31:10.217477Z', + referencedCurie: 'ZFIN', + displayName: 'ZFIN', + resourceDescriptorPage: { + id: 41750742, internal: false, obsolete: false, - dbDateCreated: '2024-03-05T10:31:10.217464Z', - dbDateUpdated: '2024-03-05T10:31:10.217477Z', - referencedCurie: 'ZFIN', - displayName: 'ZFIN', - resourceDescriptorPage: { - id: 41750742, - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.466873Z', - dbDateUpdated: '2023-08-27T22:00:03.542259Z', - name: 'homepage', - urlTemplate: 'https://zfin.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.466873Z', + dbDateUpdated: '2023-08-27T22:00:03.542259Z', + name: 'homepage', + urlTemplate: 'https://zfin.org/', }, }, phenotypeAnnotationObject: 'head decreased size, abnormal', @@ -159,26 +152,19 @@ export const data = { dbDateUpdated: '2024-01-17T17:52:00.624187Z', primaryExternalId: 'ZFIN:ZDB-FISH-150901-427', dataProvider: { - id: 86992863, + id: 20308685, internal: false, obsolete: false, - dbDateCreated: '2023-06-09T13:47:14.455058Z', - dbDateUpdated: '2024-01-17T17:52:00.625242Z', - sourceOrganization: { - id: 20308685, + abbreviation: 'ZFIN', + fullName: 'Zebrafish Information Network', + homepageResourceDescriptorPage: { + id: 41750742, internal: false, obsolete: false, - abbreviation: 'ZFIN', - fullName: 'Zebrafish Information Network', - homepageResourceDescriptorPage: { - id: 41750742, - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.466873Z', - dbDateUpdated: '2023-08-27T22:00:03.542259Z', - name: 'homepage', - urlTemplate: 'https://zfin.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.466873Z', + dbDateUpdated: '2023-08-27T22:00:03.542259Z', + name: 'homepage', + urlTemplate: 'https://zfin.org/', }, }, taxon: { @@ -222,43 +208,37 @@ export const data = { dbDateUpdated: '2024-02-06T11:36:48.627505Z', primaryExternalId: 'MGI:87873', dataProvider: { - id: 75609905, + id: 20308680, internal: false, obsolete: false, - dbDateUpdated: '2024-02-06T11:36:48.627101Z', - sourceOrganization: { - id: 20308680, + abbreviation: 'MGI', + fullName: 'Mouse Genome Informatics', + homepageResourceDescriptorPage: { + id: 41750686, internal: false, obsolete: false, - abbreviation: 'MGI', - fullName: 'Mouse Genome Informatics', - homepageResourceDescriptorPage: { - id: 41750686, - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.240245Z', - dbDateUpdated: '2023-08-27T22:00:02.941675Z', - name: 'homepage', - urlTemplate: 'http://www.informatics.jax.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.240245Z', + dbDateUpdated: '2023-08-27T22:00:02.941675Z', + name: 'homepage', + urlTemplate: 'http://www.informatics.jax.org/', }, - crossReference: { - id: 80163197, + }, + dataProviderCrossReference: { + id: 80163197, + internal: false, + obsolete: false, + dbDateCreated: '2023-05-17T10:39:10.026894Z', + dbDateUpdated: '2023-08-01T16:03:04.292374Z', + referencedCurie: 'MGI:87873', + displayName: 'MGI:87873', + resourceDescriptorPage: { + id: 41750677, internal: false, obsolete: false, - dbDateCreated: '2023-05-17T10:39:10.026894Z', - dbDateUpdated: '2023-08-01T16:03:04.292374Z', - referencedCurie: 'MGI:87873', - displayName: 'MGI:87873', - resourceDescriptorPage: { - id: 41750677, - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.235386Z', - dbDateUpdated: '2023-08-27T22:00:02.93439Z', - name: 'gene', - urlTemplate: 'http://www.informatics.jax.org/marker/MGI:[%s]', - }, + dbDateCreated: '2023-02-20T09:26:39.235386Z', + dbDateUpdated: '2023-08-27T22:00:02.93439Z', + name: 'gene', + urlTemplate: 'http://www.informatics.jax.org/marker/MGI:[%s]', }, }, taxon: { @@ -340,44 +320,37 @@ export const data = { dbDateUpdated: '2024-02-07T09:13:21.51779Z', primaryExternalId: 'MGI:1856658', dataProvider: { - id: 115684900, + id: 20308680, internal: false, obsolete: false, - dbDateCreated: '2023-08-08T03:48:07.793969Z', - dbDateUpdated: '2024-02-07T09:13:21.518281Z', - sourceOrganization: { - id: 20308680, + abbreviation: 'MGI', + fullName: 'Mouse Genome Informatics', + homepageResourceDescriptorPage: { + id: 41750686, internal: false, obsolete: false, - abbreviation: 'MGI', - fullName: 'Mouse Genome Informatics', - homepageResourceDescriptorPage: { - id: 41750686, - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.240245Z', - dbDateUpdated: '2023-08-27T22:00:02.941675Z', - name: 'homepage', - urlTemplate: 'http://www.informatics.jax.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.240245Z', + dbDateUpdated: '2023-08-27T22:00:02.941675Z', + name: 'homepage', + urlTemplate: 'http://www.informatics.jax.org/', }, - crossReference: { - id: 115684899, + }, + dataProviderCrossReference: { + id: 115684899, + internal: false, + obsolete: false, + dbDateCreated: '2023-08-08T03:48:07.793166Z', + dbDateUpdated: '2023-08-12T09:58:57.561821Z', + referencedCurie: 'MGI:1856658', + displayName: 'MGI:1856658', + resourceDescriptorPage: { + id: 41750683, internal: false, obsolete: false, - dbDateCreated: '2023-08-08T03:48:07.793166Z', - dbDateUpdated: '2023-08-12T09:58:57.561821Z', - referencedCurie: 'MGI:1856658', - displayName: 'MGI:1856658', - resourceDescriptorPage: { - id: 41750683, - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.238774Z', - dbDateUpdated: '2023-08-27T22:00:02.93942Z', - name: 'allele', - urlTemplate: 'http://www.informatics.jax.org/allele/MGI:[%s]', - }, + dbDateCreated: '2023-02-20T09:26:39.238774Z', + dbDateUpdated: '2023-08-27T22:00:02.93942Z', + name: 'allele', + urlTemplate: 'http://www.informatics.jax.org/allele/MGI:[%s]', }, }, taxon: { @@ -461,43 +434,37 @@ export const data = { dbDateUpdated: '2024-02-06T11:34:46.000823Z', primaryExternalId: 'MGI:1330812', dataProvider: { - id: 75135599, + id: 20308680, internal: false, obsolete: false, - dbDateUpdated: '2024-02-06T11:34:46.000415Z', - sourceOrganization: { - id: 20308680, + abbreviation: 'MGI', + fullName: 'Mouse Genome Informatics', + homepageResourceDescriptorPage: { + id: 41750686, internal: false, obsolete: false, - abbreviation: 'MGI', - fullName: 'Mouse Genome Informatics', - homepageResourceDescriptorPage: { - id: 41750686, - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.240245Z', - dbDateUpdated: '2023-08-27T22:00:02.941675Z', - name: 'homepage', - urlTemplate: 'http://www.informatics.jax.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.240245Z', + dbDateUpdated: '2023-08-27T22:00:02.941675Z', + name: 'homepage', + urlTemplate: 'http://www.informatics.jax.org/', }, - crossReference: { - id: 80099344, + }, + dataProviderCrossReference: { + id: 80099344, + internal: false, + obsolete: false, + dbDateCreated: '2023-05-17T10:12:22.303899Z', + dbDateUpdated: '2023-08-01T16:06:31.61257Z', + referencedCurie: 'MGI:1330812', + displayName: 'MGI:1330812', + resourceDescriptorPage: { + id: 41750677, internal: false, obsolete: false, - dbDateCreated: '2023-05-17T10:12:22.303899Z', - dbDateUpdated: '2023-08-01T16:06:31.61257Z', - referencedCurie: 'MGI:1330812', - displayName: 'MGI:1330812', - resourceDescriptorPage: { - id: 41750677, - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.235386Z', - dbDateUpdated: '2023-08-27T22:00:02.93439Z', - name: 'gene', - urlTemplate: 'http://www.informatics.jax.org/marker/MGI:[%s]', - }, + dbDateCreated: '2023-02-20T09:26:39.235386Z', + dbDateUpdated: '2023-08-27T22:00:02.93439Z', + name: 'gene', + urlTemplate: 'http://www.informatics.jax.org/marker/MGI:[%s]', }, }, taxon: { @@ -579,43 +546,37 @@ export const data = { dbDateUpdated: '2024-02-06T23:17:33.99865Z', primaryExternalId: 'MGI:1857811', dataProvider: { - id: 75138053, + id: 20308680, internal: false, obsolete: false, - dbDateUpdated: '2024-02-06T23:17:33.999278Z', - sourceOrganization: { - id: 20308680, + abbreviation: 'MGI', + fullName: 'Mouse Genome Informatics', + homepageResourceDescriptorPage: { + id: 41750686, internal: false, obsolete: false, - abbreviation: 'MGI', - fullName: 'Mouse Genome Informatics', - homepageResourceDescriptorPage: { - id: 41750686, - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.240245Z', - dbDateUpdated: '2023-08-27T22:00:02.941675Z', - name: 'homepage', - urlTemplate: 'http://www.informatics.jax.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.240245Z', + dbDateUpdated: '2023-08-27T22:00:02.941675Z', + name: 'homepage', + urlTemplate: 'http://www.informatics.jax.org/', }, - crossReference: { - id: 80439565, + }, + dataProviderCrossReference: { + id: 80439565, + internal: false, + obsolete: false, + dbDateCreated: '2023-05-18T20:53:23.514149Z', + dbDateUpdated: '2023-08-11T14:50:04.487447Z', + referencedCurie: 'MGI:1857811', + displayName: 'MGI:1857811', + resourceDescriptorPage: { + id: 41750683, internal: false, obsolete: false, - dbDateCreated: '2023-05-18T20:53:23.514149Z', - dbDateUpdated: '2023-08-11T14:50:04.487447Z', - referencedCurie: 'MGI:1857811', - displayName: 'MGI:1857811', - resourceDescriptorPage: { - id: 41750683, - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.238774Z', - dbDateUpdated: '2023-08-27T22:00:02.93942Z', - name: 'allele', - urlTemplate: 'http://www.informatics.jax.org/allele/MGI:[%s]', - }, + dbDateCreated: '2023-02-20T09:26:39.238774Z', + dbDateUpdated: '2023-08-27T22:00:02.93942Z', + name: 'allele', + urlTemplate: 'http://www.informatics.jax.org/allele/MGI:[%s]', }, }, taxon: { diff --git a/src/main/cliapp/src/containers/variantsPage/mockData/mockData.js b/src/main/cliapp/src/containers/variantsPage/mockData/mockData.js index 3fcf0ab51..b343d5f49 100644 --- a/src/main/cliapp/src/containers/variantsPage/mockData/mockData.js +++ b/src/main/cliapp/src/containers/variantsPage/mockData/mockData.js @@ -34,25 +34,18 @@ export const data = { dataProvider: { internal: false, obsolete: false, - dbDateCreated: '2023-10-12T13:36:42.79796+01:00', - dbDateUpdated: '2023-10-12T13:36:42.797972+01:00', - id: 135134369, - sourceOrganization: { + id: 20308683, + uniqueId: 'WB', + abbreviation: 'WB', + fullName: 'WormBase', + homepageResourceDescriptorPage: { internal: false, obsolete: false, - id: 20308683, - uniqueId: 'WB', - abbreviation: 'WB', - fullName: 'WormBase', - homepageResourceDescriptorPage: { - internal: false, - obsolete: false, - dbDateCreated: '2023-02-20T09:26:39.609757Z', - dbDateUpdated: '2023-08-27T22:00:03.833696+01:00', - id: 41750788, - name: 'homepage', - urlTemplate: 'https://www.wormbase.org/', - }, + dbDateCreated: '2023-02-20T09:26:39.609757Z', + dbDateUpdated: '2023-08-27T22:00:03.833696+01:00', + id: 41750788, + name: 'homepage', + urlTemplate: 'https://www.wormbase.org/', }, }, variantType: { diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java index 548a3bb21..70dca47e1 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/Annotation.java @@ -108,14 +108,14 @@ public class Annotation extends SingleReferenceAssociation { @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @Fetch(FetchMode.SELECT) - @JsonView({ View.FieldsOnly.class }) + @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) protected Organization dataProvider; @IndexedEmbedded(includePaths = {"displayName", "referencedCurie", "displayName_keyword", "referencedCurie_keyword"}) @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @OneToOne(orphanRemoval = true) @Fetch(FetchMode.SELECT) - @JsonView({ View.FieldsOnly.class }) + @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) private CrossReference dataProviderCrossReference; } diff --git a/src/main/java/org/alliancegenome/curation_api/model/entities/DiseaseAnnotation.java b/src/main/java/org/alliancegenome/curation_api/model/entities/DiseaseAnnotation.java index 73938c3cd..bc3740535 100644 --- a/src/main/java/org/alliancegenome/curation_api/model/entities/DiseaseAnnotation.java +++ b/src/main/java/org/alliancegenome/curation_api/model/entities/DiseaseAnnotation.java @@ -168,7 +168,7 @@ public abstract class DiseaseAnnotation extends Annotation { @IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW) @ManyToOne @Fetch(FetchMode.SELECT) - @JsonView({ View.FieldsOnly.class }) + @JsonView({ View.FieldsOnly.class, View.ForPublic.class }) private Organization secondaryDataProvider; @IndexedEmbedded(includePaths = {"displayName", "referencedCurie", "displayName_keyword", "referencedCurie_keyword"}) diff --git a/src/main/java/org/alliancegenome/curation_api/services/OrganizationService.java b/src/main/java/org/alliancegenome/curation_api/services/OrganizationService.java index ec13927fc..cde9e6828 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/OrganizationService.java +++ b/src/main/java/org/alliancegenome/curation_api/services/OrganizationService.java @@ -3,11 +3,9 @@ import java.util.Date; import java.util.HashMap; -import org.alliancegenome.curation_api.auth.AuthenticatedUser; import org.alliancegenome.curation_api.dao.OrganizationDAO; import org.alliancegenome.curation_api.model.entities.AllianceMember; import org.alliancegenome.curation_api.model.entities.Organization; -import org.alliancegenome.curation_api.model.entities.Person; import org.alliancegenome.curation_api.response.ObjectResponse; import org.alliancegenome.curation_api.response.SearchResponse; import org.alliancegenome.curation_api.services.base.BaseEntityCrudService; @@ -20,9 +18,6 @@ @RequestScoped public class OrganizationService extends BaseEntityCrudService { - @Inject - @AuthenticatedUser - protected Person authenticatedPerson; @Inject OrganizationDAO organizationDAO; diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/AnnotationValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/AnnotationValidator.java index 010ec06a6..aa1cf4d9d 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/AnnotationValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/AnnotationValidator.java @@ -11,9 +11,7 @@ import org.alliancegenome.curation_api.constants.ValidationConstants; import org.alliancegenome.curation_api.dao.AnnotationDAO; import org.alliancegenome.curation_api.dao.ConditionRelationDAO; -import org.alliancegenome.curation_api.dao.CrossReferenceDAO; import org.alliancegenome.curation_api.dao.NoteDAO; -import org.alliancegenome.curation_api.dao.OrganizationDAO; import org.alliancegenome.curation_api.model.entities.Annotation; import org.alliancegenome.curation_api.model.entities.ConditionRelation; import org.alliancegenome.curation_api.model.entities.CrossReference; @@ -22,8 +20,6 @@ import org.alliancegenome.curation_api.model.entities.Reference; import org.alliancegenome.curation_api.response.ObjectResponse; import org.alliancegenome.curation_api.response.SearchResponse; -import org.alliancegenome.curation_api.services.CrossReferenceService; -import org.alliancegenome.curation_api.services.OrganizationService; import org.alliancegenome.curation_api.services.helpers.notes.NoteIdentityHelper; import org.alliancegenome.curation_api.services.validation.base.AuditedObjectValidator; import org.apache.commons.collections.CollectionUtils; @@ -39,69 +35,7 @@ public class AnnotationValidator extends AuditedObjectValidator { @Inject ConditionRelationValidator conditionRelationValidator; @Inject ConditionRelationDAO conditionRelationDAO; @Inject AnnotationDAO annotationDAO; - @Inject OrganizationDAO organizationDAO; - @Inject OrganizationService organizationService; - @Inject CrossReferenceDAO crossReferenceDAO; - @Inject CrossReferenceService crossReferenceService; - @Inject CrossReferenceValidator crossReferenceValidator; - - public Organization validateDataProvider(Annotation uiEntity, Annotation dbEntity) { - String field = "dataProvider"; - - if (uiEntity.getDataProvider() == null) { - if (dbEntity.getId() == null) { - return organizationDAO.getOrCreateOrganization("Alliance"); - } else { - addMessageResponse(field, ValidationConstants.REQUIRED_MESSAGE); - return null; - } - } - - Organization dataProvider = null; - if (uiEntity.getDataProvider().getId() != null) { - dataProvider = organizationService.getById(uiEntity.getDataProvider().getId()).getEntity(); - } else if (StringUtils.isNotBlank(uiEntity.getDataProvider().getAbbreviation())) { - dataProvider = organizationService.getByAbbr(uiEntity.getDataProvider().getAbbreviation()).getEntity(); - } - - if (dataProvider == null) { - addMessageResponse(field, ValidationConstants.INVALID_MESSAGE); - return null; - } - - if (dataProvider.getObsolete() && (dbEntity.getDataProvider() == null || !dataProvider.getId().equals(dbEntity.getDataProvider().getId()))) { - addMessageResponse(field, ValidationConstants.OBSOLETE_MESSAGE); - return null; - } - - return dataProvider; - } - - protected CrossReference validateDataProviderCrossReference(CrossReference uiXref, CrossReference dbXref) { - CrossReference xref = null; - String dbXrefUniqueId = null; - String uiXrefUniqueId = null; - if (dbXref != null) { - dbXrefUniqueId = crossReferenceService.getCrossReferenceUniqueId(dbXref); - } - - if (uiXref != null) { - ObjectResponse xrefResponse = crossReferenceValidator.validateCrossReference(uiXref, false); - if (xrefResponse.hasErrors()) { - addMessageResponse("crossReference", xrefResponse.errorMessagesString()); - } else { - uiXrefUniqueId = crossReferenceService.getCrossReferenceUniqueId(xrefResponse.getEntity()); - if (dbXrefUniqueId == null || !dbXrefUniqueId.equals(uiXrefUniqueId)) { - xref = crossReferenceDAO.persist(xrefResponse.getEntity()); - } else if (dbXrefUniqueId != null && dbXrefUniqueId.equals(uiXrefUniqueId)) { - xref = crossReferenceService.updateCrossReference(dbXref, uiXref); - } - } - } - - return xref; - } - + public List validateRelatedNotes(Annotation uiEntity, Annotation dbEntity, String noteTypeSet) { String field = "relatedNotes"; @@ -235,11 +169,12 @@ public Annotation validateCommonAnnotationFields(Annotation uiEntity, Annotation Reference singleReference = validateSingleReference(uiEntity, dbEntity); dbEntity.setSingleReference(singleReference); - Organization dataProvider = validateDataProvider(uiEntity, dbEntity); + Organization dataProvider = validateDataProvider(uiEntity.getDataProvider(), dbEntity.getDataProvider(), newEntity); dbEntity.setDataProvider(dataProvider); CrossReference dataProviderCrossReference = validateDataProviderCrossReference(uiEntity.getDataProviderCrossReference(), dbEntity.getDataProviderCrossReference()); - + dbEntity.setDataProviderCrossReference(dataProviderCrossReference); + List conditionRelations = validateConditionRelations(uiEntity, dbEntity); dbEntity.setConditionRelations(conditionRelations); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/DiseaseAnnotationValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/DiseaseAnnotationValidator.java index 3df3c26fc..f8124b0bf 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/DiseaseAnnotationValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/DiseaseAnnotationValidator.java @@ -395,7 +395,7 @@ public DiseaseAnnotation validateCommonDiseaseAnnotationFields(DiseaseAnnotation Organization secondaryDataProvider = validateSecondaryDataProvider(uiEntity, dbEntity); dbEntity.setSecondaryDataProvider(secondaryDataProvider); - CrossReference secondaryDataProviderCrossReference = validateDataProviderCrossReference(uiEntity.getSecondaryDataProviderCrossReference(), dbEntity.getSecondaryDataProviderCrossReference()); + CrossReference secondaryDataProviderCrossReference = validateDataProviderCrossReference(uiEntity.getSecondaryDataProviderCrossReference(), dbEntity.getSecondaryDataProviderCrossReference(), true); dbEntity.setDataProviderCrossReference(secondaryDataProviderCrossReference); List diseaseGeneticModifierGenes = validateDiseaseGeneticModifierGenes(uiEntity, dbEntity); diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/ReagentValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/ReagentValidator.java index 8211fb70a..b90a488da 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/ReagentValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/ReagentValidator.java @@ -2,76 +2,19 @@ import java.util.List; -import org.alliancegenome.curation_api.constants.ValidationConstants; -import org.alliancegenome.curation_api.dao.OrganizationDAO; -import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.Reagent; -import org.alliancegenome.curation_api.services.OrganizationService; -import org.alliancegenome.curation_api.services.ontology.NcbiTaxonTermService; import org.alliancegenome.curation_api.services.validation.base.SubmittedObjectValidator; import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.StringUtils; - -import jakarta.inject.Inject; public class ReagentValidator extends SubmittedObjectValidator { - @Inject NcbiTaxonTermService ncbiTaxonTermService; - @Inject OrganizationService organizationService; - @Inject OrganizationDAO organizationDAO; - public Reagent validateCommonReagentFields(Reagent uiEntity, Reagent dbEntity) { - Boolean newEntity = false; - if (dbEntity.getId() == null) { - newEntity = true; - } - dbEntity = (Reagent) validateAuditedObjectFields(uiEntity, dbEntity, newEntity); - - String primaryExternalId = StringUtils.isNotBlank(uiEntity.getPrimaryExternalId()) ? uiEntity.getPrimaryExternalId() : null; - dbEntity.setPrimaryExternalId(primaryExternalId); - - String modInternalId = validateModInternalId(uiEntity); - dbEntity.setModInternalId(modInternalId); + dbEntity = (Reagent) validateSubmittedObjectFields(uiEntity, dbEntity); List secondaryIds = CollectionUtils.isNotEmpty(uiEntity.getSecondaryIdentifiers()) ? uiEntity.getSecondaryIdentifiers() : null; dbEntity.setSecondaryIdentifiers(secondaryIds); - - Organization dataProvider = validateDataProvider(uiEntity, dbEntity); - dbEntity.setDataProvider(dataProvider); - - return dbEntity; - } - - public Organization validateDataProvider(Reagent uiEntity, Reagent dbEntity) { - String field = "dataProvider"; - - if (uiEntity.getDataProvider() == null) { - if (dbEntity.getId() == null) { - return organizationDAO.getOrCreateOrganization("Alliance"); - } else { - addMessageResponse(field, ValidationConstants.REQUIRED_MESSAGE); - return null; - } - } - - Organization dataProvider = null; - if (uiEntity.getDataProvider().getId() != null) { - dataProvider = organizationService.getById(uiEntity.getDataProvider().getId()).getEntity(); - } else if (StringUtils.isNotBlank(uiEntity.getDataProvider().getAbbreviation())) { - dataProvider = organizationService.getByAbbr(uiEntity.getDataProvider().getAbbreviation()).getEntity(); - } - if (dataProvider == null) { - addMessageResponse(field, ValidationConstants.INVALID_MESSAGE); - return null; - } - - if (dataProvider.getObsolete() && (dbEntity.getDataProvider() == null || !dataProvider.getId().equals(dbEntity.getDataProvider().getId()))) { - addMessageResponse(field, ValidationConstants.OBSOLETE_MESSAGE); - return null; - } - - return dataProvider; + return dbEntity; } } diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/base/AuditedObjectValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/base/AuditedObjectValidator.java index a20a97f83..033b419e5 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/base/AuditedObjectValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/base/AuditedObjectValidator.java @@ -4,12 +4,21 @@ import java.util.List; import org.alliancegenome.curation_api.auth.AuthenticatedUser; +import org.alliancegenome.curation_api.constants.ValidationConstants; +import org.alliancegenome.curation_api.dao.CrossReferenceDAO; +import org.alliancegenome.curation_api.dao.OrganizationDAO; +import org.alliancegenome.curation_api.model.entities.CrossReference; import org.alliancegenome.curation_api.model.entities.Note; +import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.Person; import org.alliancegenome.curation_api.model.entities.base.AuditedObject; import org.alliancegenome.curation_api.response.ObjectResponse; +import org.alliancegenome.curation_api.services.CrossReferenceService; +import org.alliancegenome.curation_api.services.OrganizationService; import org.alliancegenome.curation_api.services.PersonService; +import org.alliancegenome.curation_api.services.validation.CrossReferenceValidator; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import jakarta.inject.Inject; @@ -20,6 +29,11 @@ public class AuditedObjectValidator { @AuthenticatedUser protected Person authenticatedPerson; @Inject PersonService personService; + @Inject OrganizationDAO organizationDAO; + @Inject OrganizationService organizationService; + @Inject CrossReferenceDAO crossReferenceDAO; + @Inject CrossReferenceService crossReferenceService; + @Inject CrossReferenceValidator crossReferenceValidator; public ObjectResponse response; @@ -87,4 +101,67 @@ public void convertMapToErrorMessages(String fieldName) { response.convertMapToErrorMessages(fieldName); } + public Organization validateDataProvider(Organization uiDataProvider, Organization dbDataProvider, boolean newEntity) { + String field = "dataProvider"; + + if (uiDataProvider == null) { + if (newEntity) { + return organizationDAO.getOrCreateOrganization("Alliance"); + } else { + addMessageResponse(field, ValidationConstants.REQUIRED_MESSAGE); + return null; + } + } + + Organization dataProvider = null; + if (uiDataProvider.getId() != null) { + dataProvider = organizationService.getById(uiDataProvider.getId()).getEntity(); + } else if (StringUtils.isNotBlank(uiDataProvider.getAbbreviation())) { + dataProvider = organizationService.getByAbbr(uiDataProvider.getAbbreviation()).getEntity(); + } + + if (dataProvider == null) { + addMessageResponse(field, ValidationConstants.INVALID_MESSAGE); + return null; + } + + if (dataProvider.getObsolete() && (dbDataProvider == null || !dataProvider.getId().equals(dbDataProvider.getId()))) { + addMessageResponse(field, ValidationConstants.OBSOLETE_MESSAGE); + return null; + } + + return dataProvider; + } + + protected CrossReference validateDataProviderCrossReference(CrossReference uiXref, CrossReference dbXref) { + return validateDataProviderCrossReference(uiXref, dbXref, false); + } + + protected CrossReference validateDataProviderCrossReference(CrossReference uiXref, CrossReference dbXref, boolean isSecondaryProvider) { + String fieldName = isSecondaryProvider ? "secondaryDataProviderCrossReference" : "dataProviderCrossReference"; + + CrossReference xref = null; + String dbXrefUniqueId = null; + String uiXrefUniqueId = null; + if (dbXref != null) { + dbXrefUniqueId = crossReferenceService.getCrossReferenceUniqueId(dbXref); + } + + if (ObjectUtils.isNotEmpty(uiXref)) { + ObjectResponse xrefResponse = crossReferenceValidator.validateCrossReference(uiXref, false); + if (xrefResponse.hasErrors()) { + addMessageResponse(fieldName, xrefResponse.errorMessagesString()); + } else { + uiXrefUniqueId = crossReferenceService.getCrossReferenceUniqueId(xrefResponse.getEntity()); + if (dbXrefUniqueId == null || !dbXrefUniqueId.equals(uiXrefUniqueId)) { + xref = crossReferenceDAO.persist(xrefResponse.getEntity()); + } else if (dbXrefUniqueId != null && dbXrefUniqueId.equals(uiXrefUniqueId)) { + xref = crossReferenceService.updateCrossReference(dbXref, uiXref); + } + } + } + + return xref; + } + } diff --git a/src/main/java/org/alliancegenome/curation_api/services/validation/base/SubmittedObjectValidator.java b/src/main/java/org/alliancegenome/curation_api/services/validation/base/SubmittedObjectValidator.java index 97a24608f..48b1263c2 100644 --- a/src/main/java/org/alliancegenome/curation_api/services/validation/base/SubmittedObjectValidator.java +++ b/src/main/java/org/alliancegenome/curation_api/services/validation/base/SubmittedObjectValidator.java @@ -1,29 +1,21 @@ package org.alliancegenome.curation_api.services.validation.base; import org.alliancegenome.curation_api.constants.ValidationConstants; -import org.alliancegenome.curation_api.dao.CrossReferenceDAO; -import org.alliancegenome.curation_api.dao.OrganizationDAO; import org.alliancegenome.curation_api.model.entities.CrossReference; import org.alliancegenome.curation_api.model.entities.Organization; import org.alliancegenome.curation_api.model.entities.base.SubmittedObject; -import org.alliancegenome.curation_api.response.ObjectResponse; -import org.alliancegenome.curation_api.services.CrossReferenceService; -import org.alliancegenome.curation_api.services.OrganizationService; -import org.alliancegenome.curation_api.services.validation.CrossReferenceValidator; -import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; -import jakarta.inject.Inject; - public class SubmittedObjectValidator extends AuditedObjectValidator { - @Inject CrossReferenceService crossReferenceService; - @Inject CrossReferenceValidator crossReferenceValidator; - @Inject CrossReferenceDAO crossReferenceDAO; - @Inject OrganizationService organizationService; - @Inject OrganizationDAO organizationDAO; - public E validateSubmittedObjectFields(E uiEntity, E dbEntity) { + Boolean newEntity = false; + if (dbEntity.getId() == null) { + newEntity = true; + } + + dbEntity = (E) validateAuditedObjectFields(uiEntity, dbEntity, newEntity); + String curie = handleStringField(uiEntity.getCurie()); dbEntity.setCurie(curie); @@ -33,7 +25,7 @@ public E validateSubmittedObjectFields(E uiEntity, E dbEntity) { String modInternalId = validateModInternalId(uiEntity); dbEntity.setModInternalId(modInternalId); - Organization dataProvider = validateDataProvider(uiEntity, dbEntity); + Organization dataProvider = validateDataProvider(uiEntity.getDataProvider(), dbEntity.getDataProvider(), newEntity); dbEntity.setDataProvider(dataProvider); CrossReference dataProviderXref = validateDataProviderCrossReference(uiEntity.getDataProviderCrossReference(), dbEntity.getDataProviderCrossReference()); @@ -61,61 +53,4 @@ public String validateModInternalId(E uiEntity) { } return modInternalId; } - - public Organization validateDataProvider(E uiEntity, E dbEntity) { - String field = "dataProvider"; - - if (ObjectUtils.isEmpty(uiEntity.getDataProvider())) { - if (dbEntity.getId() == null) { - return organizationDAO.getOrCreateOrganization("Alliance"); - } else { - addMessageResponse(field, ValidationConstants.REQUIRED_MESSAGE); - return null; - } - } - - Organization dataProvider = null; - if (uiEntity.getDataProvider().getId() != null) { - dataProvider = organizationService.getById(uiEntity.getDataProvider().getId()).getEntity(); - } else if (StringUtils.isNotBlank(uiEntity.getDataProvider().getAbbreviation())) { - dataProvider = organizationService.getByAbbr(uiEntity.getDataProvider().getAbbreviation()).getEntity(); - } - - if (dataProvider == null) { - addMessageResponse(field, ValidationConstants.INVALID_MESSAGE); - return null; - } - - if (dataProvider.getObsolete() && (dbEntity.getDataProvider() == null || !dataProvider.getId().equals(dbEntity.getDataProvider().getId()))) { - addMessageResponse(field, ValidationConstants.OBSOLETE_MESSAGE); - return null; - } - - return dataProvider; - } - - protected CrossReference validateDataProviderCrossReference(CrossReference uiXref, CrossReference dbXref) { - CrossReference xref = null; - String dbXrefUniqueId = null; - String uiXrefUniqueId = null; - if (dbXref != null) { - dbXrefUniqueId = crossReferenceService.getCrossReferenceUniqueId(dbXref); - } - - if (ObjectUtils.isNotEmpty(uiXref)) { - ObjectResponse xrefResponse = crossReferenceValidator.validateCrossReference(uiXref, false); - if (xrefResponse.hasErrors()) { - addMessageResponse("crossReference", xrefResponse.errorMessagesString()); - } else { - uiXrefUniqueId = crossReferenceService.getCrossReferenceUniqueId(xrefResponse.getEntity()); - if (dbXrefUniqueId == null || !dbXrefUniqueId.equals(uiXrefUniqueId)) { - xref = crossReferenceDAO.persist(xrefResponse.getEntity()); - } else if (dbXrefUniqueId != null && dbXrefUniqueId.equals(uiXrefUniqueId)) { - xref = crossReferenceService.updateCrossReference(dbXref, uiXref); - } - } - } - - return xref; - } } From 3332b64c7ea80e54e988b780a6c936b1baf86757 Mon Sep 17 00:00:00 2001 From: Mark Quinton-Tulloch Date: Mon, 13 Jan 2025 13:32:38 +0000 Subject: [PATCH 9/9] Update column headers --- .../affectedGenomicModelPage/AffectedGenomicModelTable.js | 2 +- src/main/cliapp/src/containers/allelesPage/AlleleDetailPage.js | 2 +- src/main/cliapp/src/containers/allelesPage/AllelesTable.js | 2 +- src/main/cliapp/src/containers/allelesPage/mockData/mockData.js | 2 +- .../cliapp/src/containers/constructsPage/ConstructsTable.js | 2 +- .../cliapp/src/containers/constructsPage/mockData/mockData.js | 2 +- src/main/cliapp/src/containers/genesPage/GenesTable.js | 2 +- src/main/cliapp/src/containers/variantsPage/VariantsTable.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/cliapp/src/containers/affectedGenomicModelPage/AffectedGenomicModelTable.js b/src/main/cliapp/src/containers/affectedGenomicModelPage/AffectedGenomicModelTable.js index c31dc040e..4a75b1bea 100644 --- a/src/main/cliapp/src/containers/affectedGenomicModelPage/AffectedGenomicModelTable.js +++ b/src/main/cliapp/src/containers/affectedGenomicModelPage/AffectedGenomicModelTable.js @@ -53,7 +53,7 @@ export const AffectedGenomicModelTable = () => { }, { field: 'primaryExternalId', - header: 'MOD Entity ID', + header: 'Primary External ID', body: (rowData) => , sortable: true, filterConfig: FILTER_CONFIGS.primaryexternalidFilterConfig, diff --git a/src/main/cliapp/src/containers/allelesPage/AlleleDetailPage.js b/src/main/cliapp/src/containers/allelesPage/AlleleDetailPage.js index 26aee2657..b7d78464a 100644 --- a/src/main/cliapp/src/containers/allelesPage/AlleleDetailPage.js +++ b/src/main/cliapp/src/containers/allelesPage/AlleleDetailPage.js @@ -204,7 +204,7 @@ export default function AlleleDetailPage() { { }, { field: 'primaryExternalId', - header: 'MOD Entity ID', + header: 'Primary External ID', body: (rowData) => , sortable: true, filterConfig: FILTER_CONFIGS.primaryexternalidFilterConfig, diff --git a/src/main/cliapp/src/containers/allelesPage/mockData/mockData.js b/src/main/cliapp/src/containers/allelesPage/mockData/mockData.js index 20c4ca6d1..acc17e5a6 100644 --- a/src/main/cliapp/src/containers/allelesPage/mockData/mockData.js +++ b/src/main/cliapp/src/containers/allelesPage/mockData/mockData.js @@ -716,7 +716,7 @@ export const mockSettingsData = { multiSortMeta: [], selectedColumnNames: [ 'Curie', - 'MOD Entity ID', + 'Primary External ID', 'MOD Internal ID', 'Name', 'Symbol', diff --git a/src/main/cliapp/src/containers/constructsPage/ConstructsTable.js b/src/main/cliapp/src/containers/constructsPage/ConstructsTable.js index 0e78aed7b..c4bb927e3 100644 --- a/src/main/cliapp/src/containers/constructsPage/ConstructsTable.js +++ b/src/main/cliapp/src/containers/constructsPage/ConstructsTable.js @@ -150,7 +150,7 @@ export const ConstructsTable = () => { }, { field: 'primaryExternalId', - header: 'MOD Entity ID', + header: 'Primary External ID', sortable: { isInEditMode }, body: (rowData) => , filterConfig: FILTER_CONFIGS.primaryexternalidFilterConfig, diff --git a/src/main/cliapp/src/containers/constructsPage/mockData/mockData.js b/src/main/cliapp/src/containers/constructsPage/mockData/mockData.js index 66ea3dfbd..840dba987 100644 --- a/src/main/cliapp/src/containers/constructsPage/mockData/mockData.js +++ b/src/main/cliapp/src/containers/constructsPage/mockData/mockData.js @@ -805,7 +805,7 @@ export const mockSettingsData = { multiSortMeta: [], selectedColumnNames: [ 'Unique ID', - 'MOD Entity ID', + 'Primary External ID', 'MOD Internal ID', 'Name', 'Taxon', diff --git a/src/main/cliapp/src/containers/genesPage/GenesTable.js b/src/main/cliapp/src/containers/genesPage/GenesTable.js index d04150477..a28258380 100644 --- a/src/main/cliapp/src/containers/genesPage/GenesTable.js +++ b/src/main/cliapp/src/containers/genesPage/GenesTable.js @@ -205,7 +205,7 @@ export const GenesTable = () => { }, { field: 'primaryExternalId', - header: 'MOD Entity ID', + header: 'Primary External ID', sortable: true, body: (rowData) => , filterConfig: FILTER_CONFIGS.primaryexternalidFilterConfig, diff --git a/src/main/cliapp/src/containers/variantsPage/VariantsTable.js b/src/main/cliapp/src/containers/variantsPage/VariantsTable.js index cf76aa0bd..d5a206850 100644 --- a/src/main/cliapp/src/containers/variantsPage/VariantsTable.js +++ b/src/main/cliapp/src/containers/variantsPage/VariantsTable.js @@ -174,7 +174,7 @@ export const VariantsTable = () => { }, { field: 'primaryExternalId', - header: 'MOD Entity ID', + header: 'Primary External ID', sortable: true, body: (rowData) => , filterConfig: FILTER_CONFIGS.primaryexternalidFilterConfig,