Compare commits

...

389 Commits

Author SHA1 Message Date
Claudio Atzori 4a7e960409 [maven-release-plugin] prepare for next development iteration 2024-04-19 17:26:56 +02:00
Claudio Atzori a835c8db1e [maven-release-plugin] prepare release dhp-schemas-6.1.1 2024-04-19 17:26:52 +02:00
Claudio Atzori 2a4b84af79 updated changelog 2024-04-19 17:26:05 +02:00
Claudio Atzori 2324536a61 Merge pull request 'doidoost_dismiss' (#31) from doidoost_dismiss into master
Reviewed-on: #31
2024-04-19 17:24:42 +02:00
Sandro La Bruzzo b336c40970 Merge remote-tracking branch 'origin/master' into doidoost_dismiss 2024-04-11 17:39:22 +02:00
Sandro La Bruzzo 48adfff200 added some MAG costant 2024-04-11 12:06:08 +02:00
Claudio Atzori 5118d7f08a updated changelog 2024-03-27 10:30:20 +01:00
Claudio Atzori 2e2556f3c9 [maven-release-plugin] prepare for next development iteration 2024-03-22 16:11:07 +01:00
Claudio Atzori 4092dcbef2 [maven-release-plugin] prepare release dhp-schemas-6.1.0 2024-03-22 16:11:03 +01:00
Claudio Atzori 7480ec0ab3 removed equals and hashcode methods from the Oaf model, utility classes moved in dhp-common 2024-03-22 16:10:20 +01:00
Claudio Atzori 46eec69aed [maven-release-plugin] prepare for next development iteration 2024-03-22 10:24:19 +01:00
Claudio Atzori 17f69b4cb4 [maven-release-plugin] prepare release dhp-schemas-6.0.0 2024-03-22 10:24:15 +01:00
Claudio Atzori 4488c3eb60 added more model hard limits 2024-03-22 10:22:23 +01:00
Claudio Atzori 1f2b70aa95 Merge pull request 'solr json payload model' (#30) from solr_json_model into master
Reviewed-on: #30
2024-03-22 10:20:36 +01:00
Claudio Atzori 04654b16f9 WIP: included deletedbyinference flag 2024-03-12 09:55:21 +01:00
Claudio Atzori b0eec2e5bb added serialVersionUID 2024-03-06 20:49:27 +01:00
Claudio Atzori 890c039a91 WIP: updated static builders 2024-03-04 16:28:37 +01:00
Claudio Atzori da06e17041 WIP: updated alternative titles definition 2024-03-04 10:58:35 +01:00
Claudio Atzori db99c7f113 WIP: defining model classes used to store the json payload in the Solr documents 2024-03-01 15:25:28 +01:00
Claudio Atzori f6745a9d30 WIP: defining model classes used to store the json payload in the Solr documents 2024-03-01 12:26:58 +01:00
Claudio Atzori 6b3165bec2 [maven-release-plugin] prepare for next development iteration 2024-01-29 16:34:20 +01:00
Claudio Atzori 9758ef9a78 [maven-release-plugin] prepare release dhp-schemas-5.17.3 2024-01-29 16:34:16 +01:00
Claudio Atzori 79eaae42ff Merge branch 'master' of https://code-repo.d4science.org/D-Net/dhp-schemas 2024-01-29 16:32:46 +01:00
Claudio Atzori 1b285cca59 bumped version, updated changelog 2024-01-29 16:32:36 +01:00
Claudio Atzori 9ef028aca1 Merge pull request 'Transformative agreement' (#29) from transformative_agreement into master
Reviewed-on: #29
2024-01-29 16:29:00 +01:00
Claudio Atzori ad42b0ac3c added result level textual field to store the transformative agreement information 2024-01-29 16:28:14 +01:00
Claudio Atzori b5f29dc17c Merge pull request 'code of conduct and contributing' (#28) from contributing into master
Reviewed-on: #28
2024-01-24 15:40:07 +01:00
Claudio Atzori bb630de8ab added code of conduct and contributing files 2024-01-24 10:45:44 +01:00
Claudio Atzori 90afc76f5f [maven-release-plugin] prepare for next development iteration 2024-01-10 14:54:58 +01:00
Claudio Atzori 49aef3cf22 [maven-release-plugin] prepare release dhp-schemas-4.17.3 2024-01-10 14:54:54 +01:00
Claudio Atzori e3f4cb9cc0 integrated changes from contextInEntities PR#27, updated CHANGES.md 2024-01-10 14:45:01 +01:00
Miriam Baglioni 70cc447dbb apdate the changelog 2024-01-10 12:12:17 +01:00
Miriam Baglioni 3aa0ea4123 moving context at the level of the entity 2024-01-10 12:07:33 +01:00
Claudio Atzori 2dcdb69c16 Update 'CHANGES.md' 2023-12-19 10:26:41 +01:00
Claudio Atzori 1491dd6708 Update 'CHANGES.md' 2023-11-20 11:35:05 +01:00
Claudio Atzori a2105fe6e2 [maven-release-plugin] prepare for next development iteration 2023-10-25 11:33:08 +02:00
Claudio Atzori 40b86f1e4c [maven-release-plugin] prepare release dhp-schemas-4.17.2 2023-10-25 11:33:04 +02:00
Alessia Bardi 77a12c0a2d Merge pull request 'COAR based resource & irish tender fields' (#25) from resource_types into master
Reviewed-on: #25
2023-10-25 11:08:49 +02:00
Claudio Atzori d9a988c3f1 merged latest fix from the master branch 2023-10-25 10:02:10 +02:00
Claudio Atzori 6067254a6c extended changelog 2023-10-25 10:00:14 +02:00
Claudio Atzori 58fd156d5d [maven-release-plugin] prepare for next development iteration 2023-10-20 22:25:29 +02:00
Claudio Atzori 3ccee68e0e [maven-release-plugin] prepare release dhp-schemas-3.17.2 2023-10-20 22:25:25 +02:00
Claudio Atzori c54607f8ab Merge pull request 'fix_merge_instance' (#26) from fix_merge_instance into master
Reviewed-on: #26
2023-10-20 22:24:31 +02:00
Claudio Atzori efe30b1637 pom version 2023-10-20 22:23:54 +02:00
Claudio Atzori b54f4eabe7 return the base instance when merging an empty enrichment 2023-10-20 14:33:03 +02:00
Claudio Atzori 9ec184ff15 Introduced fields for the Irish tender 2023-10-16 12:59:29 +02:00
Claudio Atzori d56343164b added fields required by the Irish tender 2023-10-13 09:08:00 +02:00
Claudio Atzori fd56e17442 Introducing InstanceTypeMapping 2023-10-11 10:33:02 +02:00
Claudio Atzori 6ce896ca0a [maven-release-plugin] prepare for next development iteration 2023-06-12 13:42:17 +02:00
Claudio Atzori c341fe012b [maven-release-plugin] prepare release dhp-schemas-3.17.1 2023-06-12 13:42:13 +02:00
Claudio Atzori f57efd75b5 udpated changelog 2023-06-12 13:41:24 +02:00
Claudio Atzori 28b81c55bb added extra organization specific PID types 2023-06-12 13:39:00 +02:00
Claudio Atzori f32852e3dd Merge pull request 'instance level fulltext' (#24) from instance_fulltext into master
Reviewed-on: #24
2023-06-12 13:36:45 +02:00
Claudio Atzori 66ffad1ca0 bumped version 2023-05-26 15:09:20 +02:00
Claudio Atzori 7a285680a0 added fulltext field on the instance level 2023-05-25 16:28:13 +02:00
Claudio Atzori fdf0115f81 [maven-release-plugin] prepare for next development iteration 2023-02-21 16:17:15 +01:00
Claudio Atzori 145aeb2295 [maven-release-plugin] prepare release dhp-schemas-3.16.0 2023-02-21 16:17:11 +01:00
Claudio Atzori c216f79e8e bumped version, updated changelog 2023-02-21 16:16:23 +01:00
Miriam Baglioni 0327320b53 [UsageCount] Added measure at the level of the OafEntity 2023-02-10 16:50:19 +01:00
Claudio Atzori 3123e3f1f2 [maven-release-plugin] prepare for next development iteration 2022-09-27 14:24:41 +02:00
Claudio Atzori 490d0a7acc [maven-release-plugin] prepare release dhp-schemas-3.15.0 2022-09-27 14:24:35 +02:00
Claudio Atzori 47faf312e0 Merge pull request 'relation-from-odf' (#22) from relation-from-odf into master
Reviewed-on: #22
2022-09-27 14:23:26 +02:00
Claudio Atzori 0680e76506 bumped version, updated CHANGES 2022-09-27 14:22:59 +02:00
Claudio Atzori 3e6c8f9d76 Merge branch 'master' into relation-from-odf 2022-09-27 14:14:18 +02:00
Alessia Bardi 952be6b30d fixed typo in relclass 2022-09-26 11:25:25 +02:00
Alessia Bardi 5d93f5e69a ROHub as delegated authority for w3id 2022-09-23 12:03:58 +02:00
Alessia Bardi b1cd0c476d ROHub authoritative for w3id PIDs #7847 2022-09-09 17:14:36 +02:00
Claudio Atzori 00d4b800af [maven-release-plugin] prepare for next development iteration 2022-09-09 14:52:36 +02:00
Claudio Atzori 3f0e456145 [maven-release-plugin] prepare release dhp-schemas-3.14.0 2022-09-09 14:52:30 +02:00
Claudio Atzori 5b772c2fcc adjusted version number, updated changelog 2022-09-09 14:51:35 +02:00
Claudio Atzori f807e189af Merge pull request 'specific type for result subjects' (#20) from subject_type into master
Reviewed-on: #20
2022-09-09 14:43:53 +02:00
Claudio Atzori 53803a3c59 bumped major number 2022-09-09 13:59:51 +02:00
Claudio Atzori f712db79be Merge branch 'master' into subject_type 2022-09-09 13:38:13 +02:00
Michele Artini 2b553e7aa5 [maven-release-plugin] prepare for next development iteration 2022-09-08 10:20:33 +02:00
Michele Artini 542d0cb98a [maven-release-plugin] prepare release dhp-schemas-2.14.0 2022-09-08 10:20:30 +02:00
Claudio Atzori 07348d74cd Merge pull request 'springdoc-openapi-ui' (#21) from springdoc-openapi-ui into master
Reviewed-on: #21
2022-09-08 09:19:31 +02:00
Michele Artini 9a23c69b13 merged from master 2022-09-05 08:37:53 +02:00
Michele Artini bfd3a50fea new version 2.13.0 2022-09-05 08:09:53 +02:00
Sandro La Bruzzo 2410c4a5c2 update swagger annotation jar version to be compatible with new implementation of openAPI ui 2022-08-31 11:12:01 +02:00
Claudio Atzori 4a509bc0c5 subject type constants 2022-08-05 15:36:27 +02:00
Claudio Atzori 7c06e588d1 Merge branch 'master' into subject_type 2022-08-04 14:58:15 +02:00
Claudio Atzori 5e6dce133c introduced specific type for result.subject 2022-08-04 14:55:43 +02:00
Claudio Atzori dde6e95ac1 Merge pull request '[Schema no Dump] Remove the model of the dump from the project' (#19) from schema-no-dump into master
Reviewed-on: #19
2022-08-04 14:53:22 +02:00
Miriam Baglioni 497aef2696 changed the version in the pom to 2.13.2-SNAPSHOT 2022-08-04 14:38:30 +02:00
Miriam Baglioni 57bb15aa0b [Schema no Dump] remove the code associated to the dump from the schema model 2022-08-01 10:52:05 +02:00
Claudio Atzori 3e9c91a741 updated changelog 2022-07-13 16:09:46 +02:00
Claudio Atzori 3bdd215a27 [maven-release-plugin] prepare for next development iteration 2022-07-13 11:20:23 +02:00
Claudio Atzori b718ed4dbf [maven-release-plugin] prepare release dhp-schemas-2.12.1 2022-07-13 11:20:18 +02:00
Claudio Atzori 5dc3270908 Merge pull request 'added field oafEntity.eoscifguidelines' (#17) from eoscifguidelines into master
Reviewed-on: #17
2022-07-13 11:18:29 +02:00
Claudio Atzori ce46df4f2a moved EoscIfGuidelines field to Result and Datasource/Service 2022-07-13 11:11:22 +02:00
Claudio Atzori 931ffb9d42 updated javadoc 2022-07-13 10:09:04 +02:00
Claudio Atzori 6facd0ec18 added field oafEntity.eoscifguidelines 2022-07-12 17:02:10 +02:00
Claudio Atzori ccf9f6ef34 [maven-release-plugin] prepare for next development iteration 2022-05-03 11:48:02 +02:00
Claudio Atzori 283cf04606 [maven-release-plugin] prepare release dhp-schemas-2.12.0 2022-05-03 11:47:58 +02:00
Claudio Atzori 2f960f6a18 Merge pull request '[Datasource / Service] datasource_model_eosc' (#16) from datasource_model_eosc into master
Reviewed-on: #16
2022-05-03 11:45:40 +02:00
Claudio Atzori b5e20b558d datasources do not need to be merged by the graph processing pipeline; bumped pom version; updated CHANGELOG 2022-05-03 11:45:12 +02:00
Claudio Atzori 1a4173d0e6 EOSC Services - removed field knowledgegraph 2022-05-03 10:43:24 +02:00
Claudio Atzori cbca60011e cleanup 2022-04-27 09:28:18 +02:00
Claudio Atzori 78cf7ea084 EOSC Services - ongoing update 2022-04-27 09:23:57 +02:00
Claudio Atzori 97663bd79f EOSC Services - ongoing update 2022-04-26 16:19:01 +02:00
Michele Artini eeef59765e some comments 2022-04-26 11:12:37 +02:00
Claudio Atzori b287c80cc1 deprecated odlanguages, added languages 2022-04-26 10:17:50 +02:00
Claudio Atzori 0d7a3ea4b9 Merge branch 'master' into datasource_model_eosc 2022-04-22 09:34:16 +02:00
Sandro La Bruzzo 56c9af6ee5 [maven-release-plugin] prepare for next development iteration 2022-03-29 12:11:29 +02:00
Sandro La Bruzzo 8632374611 [maven-release-plugin] prepare release dhp-schemas-2.11.33 2022-03-29 12:11:25 +02:00
Sandro La Bruzzo c8e6bf9199 updated mid version 2022-03-29 12:10:59 +02:00
Sandro La Bruzzo 0980b87619 updated changes.md ready to deploy 2022-03-29 11:52:36 +02:00
Sandro La Bruzzo 4804fb2dd2 Merge pull request 'scholexplorer_incremental_index' (#14) from scholexplorer_incremental_index into master
Reviewed-on: #14
2022-03-29 11:43:02 +02:00
Sandro La Bruzzo 0be00f4361 moved all dependency with version under dependency-management section 2022-03-29 11:39:48 +02:00
Sandro La Bruzzo c6f9f8f391 Merge branch 'scholexplorer_incremental_index' of code-repo.d4science.org:D-Net/dhp-schemas into scholexplorer_incremental_index 2022-03-29 11:29:29 +02:00
Sandro La Bruzzo f8d7a15c32 converted all explicit dependencies version to maven property 2022-03-29 11:29:05 +02:00
Claudio Atzori 0667dcc23e Merge branch 'master' into scholexplorer_incremental_index 2022-03-29 11:22:43 +02:00
Sandro La Bruzzo 0798a35924 removed wrong string 2022-03-29 11:18:30 +02:00
Sandro La Bruzzo 986f60b5fe code formatted 2022-03-29 11:12:08 +02:00
Claudio Atzori 5aca5915b6 [maven-release-plugin] prepare for next development iteration 2022-03-29 09:39:21 +02:00
Claudio Atzori d275d91c59 [maven-release-plugin] prepare release dhp-schemas-2.10.32 2022-03-29 09:39:17 +02:00
Claudio Atzori 8a5652f969 Merge pull request 'Consent fields for Datasources' (#15) from datasource_pdf_consent into master
Reviewed-on: #15
2022-03-29 09:37:23 +02:00
Claudio Atzori 44ec9a21e3 Merge branch 'master' into datasource_pdf_consent 2022-03-29 09:37:07 +02:00
Claudio Atzori b6d9516daf [maven-release-plugin] prepare for next development iteration 2022-03-25 15:08:23 +01:00
Claudio Atzori c781f5542c [maven-release-plugin] prepare release dhp-schemas-2.10.31 2022-03-25 15:08:19 +01:00
Claudio Atzori 2c809318b9 bumped version 2022-03-25 15:07:40 +01:00
Claudio Atzori ffa6bbf392 added MPE checks in the mergeOAFDataInfo method 2022-03-25 15:05:17 +01:00
Claudio Atzori b073935a64 [maven-release-plugin] prepare for next development iteration 2022-03-23 14:33:50 +01:00
Claudio Atzori 5df6c09062 [maven-release-plugin] prepare release dhp-schemas-2.10.30 2022-03-23 14:33:47 +01:00
Claudio Atzori 5a21b8bee3 added comparator for refereed field instances, updated constants 2022-03-23 14:33:21 +01:00
Claudio Atzori f683019c3d [maven-release-plugin] prepare for next development iteration 2022-03-23 14:02:47 +01:00
Claudio Atzori 3270b05ac9 [maven-release-plugin] prepare release dhp-schemas-2.10.30 2022-03-23 14:02:43 +01:00
Claudio Atzori f05d76fa7c updated changelog 2022-03-23 14:02:16 +01:00
Claudio Atzori d08c2744f5 added comparator for refereed field instances 2022-03-23 13:59:40 +01:00
Claudio Atzori 6cf976d5a9 Merge branch 'master' into datasource_pdf_consent 2022-03-03 10:34:17 +01:00
Sandro La Bruzzo d899bacebb Merge remote-tracking branch 'origin/scholexplorer_incremental_index' into scholexplorer_incremental_index 2022-02-28 12:11:37 +01:00
Sandro La Bruzzo a92be97501 moved scholix API data model from dnet-applications to dhp-schemas 2022-02-28 12:11:24 +01:00
Sandro La Bruzzo d25db5680b Merge branch 'master' into scholexplorer_incremental_index 2022-02-25 15:25:48 +01:00
Claudio Atzori 87818acd14 Update 'CHANGES.md' 2022-02-25 09:32:00 +01:00
Claudio Atzori 826a20aa26 added fields consenttermsofuse, fulltextdownload, consenttermsofusedate to the Datasource entity 2022-02-24 15:17:50 +01:00
Claudio Atzori 1dd572de0c Update 'CHANGES.md'
minor
2022-02-24 12:09:43 +01:00
Miriam Baglioni 4fecbed21b Aggiornare 'CHANGES.md' 2022-02-24 11:49:44 +01:00
Sandro La Bruzzo 88a347d978 implemented unitTest to verify if compare works 2022-02-23 10:42:23 +01:00
Sandro La Bruzzo dc514a7281 implemented comparable on each element of scholix 2022-02-22 17:26:05 +01:00
Sandro La Bruzzo fb05d15ff2 implemented comparable interface on few fields 2022-02-21 10:57:47 +01:00
Alessia Bardi ee4a01f711 [maven-release-plugin] prepare for next development iteration 2022-02-11 17:57:06 +01:00
Alessia Bardi a1c56dbeed [maven-release-plugin] prepare release dhp-schemas-2.10.29 2022-02-11 17:57:02 +01:00
Alessia Bardi 78929fe658 merge logics changed to consider invisble in dataInfo 2022-02-10 18:57:16 +01:00
Alessia Bardi 9beef2e678 [maven-release-plugin] prepare for next development iteration 2022-02-04 16:35:36 +01:00
Alessia Bardi b07b356307 [maven-release-plugin] prepare release dhp-schemas-2.10.28 2022-02-04 16:35:32 +01:00
Alessia Bardi 050a1b9e34 reverted pom 2022-02-04 16:33:44 +01:00
Miriam Baglioni 8a1fb330ab [maven-release-plugin] prepare for next development iteration 2022-02-04 16:02:41 +01:00
Miriam Baglioni fb92579fe3 [maven-release-plugin] prepare release dhp-schemas-2.10.28 2022-02-04 16:02:29 +01:00
Alessia Bardi 30697da8dd Merge pull request 'APClevelresult' (#13) from APClevelresult into master
Reviewed-on: #13
2022-02-04 14:11:52 +01:00
Alessia Bardi 05d1a21ebe Merge branch 'master' into APClevelresult 2022-02-04 14:10:45 +01:00
Miriam Baglioni 91af2dade8 [APC at the result level] added other test 2022-02-04 13:18:46 +01:00
Miriam Baglioni 2895988f2b [APC at the result level] added the APC at the level of the result and test for the merge and resource for the tes 2022-02-04 12:52:12 +01:00
Alessia Bardi 76a4cedec6 Merge branch 'master' of https://code-repo.d4science.org/D-Net/dhp-schemas 2022-02-02 17:28:41 +01:00
Alessia Bardi a8c9f8e666 added URL to OpenAPC test record 2022-02-02 17:28:32 +01:00
Sandro La Bruzzo 0060831200 [maven-release-plugin] prepare for next development iteration 2022-02-02 10:13:57 +01:00
Sandro La Bruzzo 768de3c288 [maven-release-plugin] prepare release dhp-schemas-2.10.27 2022-02-02 10:13:53 +01:00
Sandro La Bruzzo a81aa83c4f reverted version 2022-02-02 10:13:15 +01:00
Sandro La Bruzzo 5abcb0a1cb [maven-release-plugin] rollback the release of dhp-schemas-2.10.27 2022-02-02 10:12:55 +01:00
Sandro La Bruzzo f8a63457b1 [maven-release-plugin] prepare release dhp-schemas-2.10.27 2022-02-02 10:10:39 +01:00
Sandro La Bruzzo bfafc0fbaf reverted version 2022-02-02 10:10:07 +01:00
Sandro La Bruzzo 8833c32d22 [maven-release-plugin] rollback the release of dhp-schemas-2.10.27 2022-02-02 10:08:35 +01:00
Sandro La Bruzzo bfe4da29ea [maven-release-plugin] prepare release dhp-schemas-2.10.27 2022-02-02 10:07:43 +01:00
Sandro La Bruzzo 2c39d27469 reverted version 2022-02-02 10:07:08 +01:00
Alessia Bardi 4c2e635aa2 [maven-release-plugin] prepare for next development iteration 2022-02-01 17:01:25 +01:00
Alessia Bardi cb2adfee9f resolved conflict 2022-02-01 16:57:06 +01:00
Miriam Baglioni 5b0e2f7076 [maven-release-plugin] prepare for next development iteration 2022-02-01 16:48:50 +01:00
Miriam Baglioni 2b9d7580c3 [maven-release-plugin] prepare release dhp-schemas-2.10.27 2022-02-01 16:48:46 +01:00
Alessia Bardi 26f543a03f [maven-release-plugin] prepare release dhp-schemas-2.10.27 2022-02-01 16:40:48 +01:00
Miriam Baglioni 09ef0e9760 [Enrichment Entities] changed name and id of OpenAPC datasource because of mess in DS ids 2022-02-01 16:38:51 +01:00
Claudio Atzori 48ccbfb1cc [maven-release-plugin] prepare for next development iteration 2022-01-27 13:03:49 +01:00
Claudio Atzori fb306a0574 [maven-release-plugin] prepare release dhp-schemas-2.10.26 2022-01-27 13:03:45 +01:00
Miriam Baglioni 1e795f49bc Merge pull request 'Enrichment providers' (#12) from enrichment_providers into master
Reviewed-on: #12
2022-01-27 12:48:52 +01:00
Claudio Atzori adabfed068 introduced concept of enrichment providers in the identifier creation strategy 2022-01-26 14:59:12 +01:00
Claudio Atzori 31ab5f2a60 Merge pull request 'delegated_authorities' (#11) from delegated_authorities into master
Reviewed-on: #11
2022-01-21 14:42:55 +01:00
Claudio Atzori 19c84675f8 Merge branch 'master' into delegated_authorities 2022-01-21 14:21:53 +01:00
Claudio Atzori 55800920a9 added helper method to get the OpenAIRE ids of the delegated authorities 2022-01-21 14:21:30 +01:00
Claudio Atzori e1f1721da8 [maven-release-plugin] prepare for next development iteration 2022-01-14 12:09:26 +01:00
Claudio Atzori fca037f035 [maven-release-plugin] prepare release dhp-schemas-2.10.25 2022-01-14 12:09:22 +01:00
Claudio Atzori 9efbfb0f9c bumped tag version in scm 2022-01-14 12:08:42 +01:00
Claudio Atzori 2482031403 Revert "[maven-release-plugin] prepare for next development iteration"
This reverts commit 5549f5bbf5.
2022-01-14 12:06:00 +01:00
Claudio Atzori 5549f5bbf5 [maven-release-plugin] prepare for next development iteration 2022-01-14 11:57:50 +01:00
Sandro La Bruzzo d90704f1bb updated method, using java.lang.Pair instead of scala tuple2 2022-01-14 10:06:49 +01:00
Sandro La Bruzzo 3838658535 updated CHANGES.md 2022-01-14 09:52:47 +01:00
Claudio Atzori fa4cd3963b Merge pull request 'enrichment' (#9) from enrichment into master
Reviewed-on: #9
2022-01-14 09:48:53 +01:00
Sandro La Bruzzo 30665c840c update method normalized Pid to reuse existent function on CleaningFunction.
-renamed the method name
2022-01-14 09:46:32 +01:00
Sandro La Bruzzo 3984893480 Merge branch 'master' into enrichment 2022-01-14 08:46:23 +01:00
Sandro La Bruzzo 123ea40795 Merge branch 'enrichment' of code-repo.d4science.org:D-Net/dhp-schemas into enrichment 2022-01-13 14:50:36 +01:00
Sandro La Bruzzo 0996676f5b Implement merge extending enrichment
implemented test
2022-01-13 14:50:18 +01:00
Claudio Atzori eb8c5f38ce [maven-release-plugin] prepare for next development iteration 2022-01-12 17:41:33 +01:00
Claudio Atzori 8c20660f29 [maven-release-plugin] prepare release dhp-schemas-2.10.24 2022-01-12 17:41:29 +01:00
Claudio Atzori 11ea9e46b1 Merge pull request 'Enrichment support' (#8) from enrichment into master
Reviewed-on: #8
2022-01-12 17:40:43 +01:00
Claudio Atzori bb91311ab8 updated CHANGES.md, bumped version in pom 2022-01-12 17:40:22 +01:00
Sandro La Bruzzo 7996cfd33d Added Enrichment provenance constant
added first utility for checking weather is an enrichment entity
2022-01-12 16:54:12 +01:00
Claudio Atzori 185dcac4e1 Update 'CHANGES.md'
updated readiness
2022-01-12 10:34:45 +01:00
Claudio Atzori 4083d78045 [maven-release-plugin] prepare for next development iteration 2021-12-22 12:20:55 +01:00
Claudio Atzori 916be1c781 [maven-release-plugin] prepare release dhp-schemas-2.9.24 2021-12-22 12:20:52 +01:00
Claudio Atzori 87c925ac24 updated CHANGES.md 2021-12-22 12:20:21 +01:00
Miriam Baglioni 0a54f5bea7 [Dump-schema] update schemas for some classes for the new json annotation 2021-12-14 18:37:00 +01:00
Miriam Baglioni 34ec7dbf02 [Dump-schema] update Result schema 2021-12-14 18:16:24 +01:00
Miriam Baglioni 984375cb46 [Dump-schema] resolved conflicts 2021-12-14 16:31:31 +01:00
Miriam Baglioni 040bef60d9 Merge pull request 'schema-dump' (#7) from dump_schema into master
Reviewed-on: #7
2021-12-14 16:01:54 +01:00
Miriam Baglioni 41841e3347 - 2021-12-06 14:51:29 +01:00
Miriam Baglioni ca03bf1380 Merge branch 'master' of https://code-repo.d4science.org/D-Net/dhp-schemas 2021-12-06 14:49:17 +01:00
Claudio Atzori 8a809a60e2 Added helper method to lookup for inverse relations regardless of the upper/lower case in the relation encoding 2021-12-06 10:45:23 +01:00
Claudio Atzori 0194a86433 Revert to 923c0ff803 2021-12-06 10:03:07 +01:00
Claudio Atzori 3be96a92f9 [maven-release-plugin] prepare for next development iteration 2021-12-06 09:53:58 +01:00
Claudio Atzori 7bdc99e89d [maven-release-plugin] prepare release dhp-schemas-2.9.24 2021-12-06 09:53:55 +01:00
Claudio Atzori a69e57eecc Added helper method to lookup for inverse relations regardless of the upper/lower case in the relation encoding 2021-12-06 09:53:15 +01:00
Claudio Atzori 923c0ff803 Merge branch 'master' of https://code-repo.d4science.org/D-Net/dhp-schemas 2021-12-01 09:29:01 +01:00
Claudio Atzori 80f4baa412 fixed relation label separator 2021-12-01 09:28:56 +01:00
Miriam Baglioni 593034920a [Schema-Dump] added class to automatically generate schemas and save them in /eu/dnetlib/dhp/schema/oaf/dump/jsonschemas/ under target/classes (target/test-classes) directory 2021-11-19 15:30:35 +01:00
Miriam Baglioni 11e062f54c [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field - part 6 2021-11-19 14:42:12 +01:00
Miriam Baglioni 823b4cc210 [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field - part 5 2021-11-18 11:55:43 +01:00
Miriam Baglioni 61400f22c2 [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field - part 4 2021-11-18 11:49:16 +01:00
Miriam Baglioni a222c28fec [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field - refactoring 2021-11-18 11:24:32 +01:00
Miriam Baglioni 82720345f0 [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field - pat 3 2021-11-18 11:23:48 +01:00
Miriam Baglioni fd0f1d5068 [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field - refactoring 2021-11-18 11:01:44 +01:00
Miriam Baglioni dabbcf7315 [Graph Dump]revertng master as it was before the insertion of the annotation to automatically add comments in the schema 2021-11-18 10:49:14 +01:00
Miriam Baglioni 9e8abe59f8 [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field - part 2 2021-11-18 10:36:00 +01:00
Miriam Baglioni 5276cc1195 Revert "[Graph Dump] changed the type for policies from Object to String"
This reverts commit 95592369f2.
2021-11-18 09:35:11 +01:00
Miriam Baglioni baef47b360 Revert "[Graph Dump] added test class to generate the json schema of the dump"
This reverts commit fb0139c09a.
2021-11-18 09:31:40 +01:00
Miriam Baglioni 9c2aadac92 [Schema-Dump] changed the model to allow to change the description annotation w.r.t. the specific semantics of the field 2021-11-18 09:16:59 +01:00
Miriam Baglioni fb0139c09a [Graph Dump] added test class to generate the json schema of the dump 2021-11-17 10:24:04 +01:00
Miriam Baglioni d01dce4337 {Graph Dump] added dependency to pom to move the class for the generation of the schema 2021-11-17 09:35:14 +01:00
Miriam Baglioni 95592369f2 [Graph Dump] changed the type for policies from Object to String 2021-11-17 09:28:54 +01:00
Claudio Atzori 9663d50027 [maven-release-plugin] prepare for next development iteration 2021-11-16 10:56:12 +01:00
Claudio Atzori ad6cf3fdaa [maven-release-plugin] prepare release dhp-schemas-2.9.23 2021-11-16 10:56:08 +01:00
Miriam Baglioni 0d55c92e68 Merge pull request 'Moving the BipFinder! Measures' (#6) from instance_measures into master
Reviewed-on: #6
2021-11-16 10:52:54 +01:00
Miriam Baglioni c6e733b47b [Graph Dump] change in the description of the measures field for #5 (comment) and #5 (comment) 2021-11-16 10:30:06 +01:00
Miriam Baglioni ea5ad71286 [Graph Dump] change in the description of the measures field for #5 (comment) and #5 (comment) 2021-11-16 10:21:52 +01:00
Miriam Baglioni 3fe8e14d5a [Graph Dump] Regenerated schema for the dumped result 2021-11-15 16:53:03 +01:00
Miriam Baglioni 80a2991016 [Graph Dump] Moving the measure at the level of the instance 2021-11-15 16:26:32 +01:00
Claudio Atzori 8b1bcc065d - added Instance.measures field, allowing to maintain the association between them and the individual result instance
- bumped pom version
- updated changelog
2021-11-12 15:16:44 +01:00
Miriam Baglioni 10fca3a034 Merge branch 'master' of https://code-repo.d4science.org/D-Net/dhp-schemas 2021-11-12 11:50:03 +01:00
Miriam Baglioni 3a0bff2ac4 [Graph Dump] added the json schema files 2021-11-12 11:49:31 +01:00
Claudio Atzori 8fbd32d2bd [maven-release-plugin] prepare for next development iteration 2021-11-12 10:07:29 +01:00
Claudio Atzori 731a141773 [maven-release-plugin] prepare release dhp-schemas-2.8.22 2021-11-12 10:07:26 +01:00
Claudio Atzori a0885e64e4 updated CHANGES.md 2021-11-12 10:06:42 +01:00
Miriam Baglioni 1eb683ccac changed to the type of bestaccessright in the result 2021-11-10 17:04:26 +01:00
Miriam Baglioni ca4be66c1a Reverted the type of bestaccessright to the version without openaccessroute 2021-11-10 16:58:37 +01:00
Miriam Baglioni d1582e7930 Added implements Serializable to eu.dnetlib.dhp.schema.oaf.Measure class 2021-11-09 15:49:36 +01:00
Claudio Atzori 827fbab06d [maven-release-plugin] prepare for next development iteration 2021-10-18 17:28:01 +02:00
Claudio Atzori a802f75eda [maven-release-plugin] prepare release dhp-schemas-2.8.21 2021-10-18 17:27:58 +02:00
Claudio Atzori 5d8b4d0dc8 updated changelog file 2021-10-18 17:27:28 +02:00
Claudio Atzori 7b239c94c4 code formatting 2021-10-18 17:27:13 +02:00
Claudio Atzori 8d37a3ccf3 [maven-release-plugin] rollback the release of dhp-schemas-2.8.21 2021-10-18 17:25:01 +02:00
Claudio Atzori de0d5f14b4 [maven-release-plugin] prepare for next development iteration 2021-10-18 17:20:41 +02:00
Claudio Atzori 36a5d4499c [maven-release-plugin] prepare release dhp-schemas-2.8.21 2021-10-18 17:20:38 +02:00
Sandro La Bruzzo b0199b2e10 Added missing datacite Relations into dhp-schemas 2021-10-18 17:14:23 +02:00
Claudio Atzori bc7828cdee added new relation labels in the relationInverseMap 2021-10-18 12:07:29 +02:00
Michele Artini f9f64ba93f add parent/child rels 2021-10-13 11:29:32 +02:00
Claudio Atzori c6efa75fbb [maven-release-plugin] prepare for next development iteration 2021-10-12 11:53:54 +02:00
Claudio Atzori c6aed732e3 [maven-release-plugin] prepare release dhp-schemas-2.8.20 2021-10-12 11:53:49 +02:00
Claudio Atzori d12607e2f0 uopdated README 2021-10-12 11:53:18 +02:00
Claudio Atzori 466503ccaa added IsParentOf / IsChildOf relClass constants 2021-10-12 11:50:33 +02:00
Claudio Atzori 5e957315ff [maven-release-plugin] prepare for next development iteration 2021-10-04 16:11:19 +02:00
Claudio Atzori 925f2d3e92 [maven-release-plugin] prepare release dhp-schemas-2.7.19 2021-10-04 16:11:16 +02:00
Claudio Atzori c0331c2f30 update issue tracker url 2021-10-04 16:10:48 +02:00
Claudio Atzori 9a567fd4b8 [maven-release-plugin] rollback the release of dhp-schemas-2.7.19 2021-10-04 16:06:08 +02:00
Claudio Atzori f9cb9d1714 [maven-release-plugin] prepare for next development iteration 2021-10-04 14:59:15 +02:00
Claudio Atzori 5a7d2f50dd updated changelog 2021-10-04 14:58:39 +02:00
Claudio Atzori 08fbc07a67 Revert "[maven-release-plugin] prepare release dhp-schemas-2.7.19"
This reverts commit 13823d9564.
2021-10-04 14:48:07 +02:00
Miriam Baglioni fbc43bbc9d [maven-release-plugin] prepare for next development iteration 2021-10-01 11:56:10 +02:00
Miriam Baglioni 13823d9564 [maven-release-plugin] prepare release dhp-schemas-2.7.19 2021-10-01 11:56:06 +02:00
Claudio Atzori 5a36809f8d Merge pull request 'Dump Schema: Addition' (#4) from dump_extention into master
Reviewed-on: #4
2021-10-01 11:05:41 +02:00
Claudio Atzori db21240a3f Merge branch 'master' into dump_extention 2021-10-01 11:05:27 +02:00
Miriam Baglioni 5c2ed26073 added constants for OpenCitations 2021-09-23 16:20:47 +02:00
Claudio Atzori d567acab6a [maven-release-plugin] prepare for next development iteration 2021-09-15 16:03:04 +02:00
Claudio Atzori fa67d03826 [maven-release-plugin] prepare release dhp-schemas-2.7.18 2021-09-15 16:03:00 +02:00
Claudio Atzori 5ab85f35c2 added constants declaring vocabulary names for relation fields 2021-09-15 16:02:29 +02:00
Claudio Atzori 3bffa796f2 added constants declaring vocabulary names for relation fields 2021-09-14 18:59:13 +02:00
Claudio Atzori 0a60bf39ce [maven-release-plugin] prepare for next development iteration 2021-08-23 14:10:38 +02:00
Claudio Atzori 2a7c79fa01 [maven-release-plugin] prepare release dhp-schemas-2.7.17 2021-08-23 14:10:33 +02:00
Alessia Bardi 1fd5475600 [maven-release-plugin] rollback the release of dhp-schemas-2.7.17 2021-08-23 12:39:11 +02:00
Alessia Bardi 07e6b3ca6f [maven-release-plugin] prepare release dhp-schemas-2.7.17 2021-08-23 12:17:28 +02:00
Alessia Bardi 503bfbe4a5 Merge pull request 'Datasource model extension' (#2) from datasource_model_eosc into master
Reviewed-on: #2
2021-08-23 11:07:24 +02:00
Alessia Bardi 65023a7520 Merge branch 'master' into datasource_model_eosc 2021-08-23 10:45:09 +02:00
Claudio Atzori 1a34a9f7b3 added public constructor to allow subclassing 2021-08-11 15:42:00 +02:00
Claudio Atzori 3ab98d8b37 suggestions from SonarLint 2021-08-10 09:36:37 +02:00
Miriam Baglioni 49d42ea9d8 added new static newInstance method in the Validated class 2021-08-06 14:44:33 +02:00
Miriam Baglioni 32bcdcb1c0 added extention to the schema for the relation validated by funder 2021-08-06 14:31:35 +02:00
Claudio Atzori b808238422 updated changelog 2021-08-05 14:07:41 +02:00
Claudio Atzori f075753c3f code formatting 2021-08-05 14:01:18 +02:00
Claudio Atzori 77c5a0c3a5 Merge branch 'master' into datasource_model_eosc 2021-08-05 12:35:35 +02:00
Miriam Baglioni 28ef0d2fa3 extended the schema of the dump to mirror the changes in the model. Added openaccessroute at the level of the instance inside the AccessRight element. Added the information of the pid and the alternate indentifiers at the level of the instance, and added the bipFinder measures at the level of the dumper result. Also correct a typo in the Measure class in the oaf model 2021-08-05 12:04:10 +02:00
Claudio Atzori 04dca1a2e8 [maven-release-plugin] prepare for next development iteration 2021-08-03 17:49:13 +02:00
Claudio Atzori 20289756f0 [maven-release-plugin] prepare release dhp-schemas-2.7.16 2021-08-03 17:49:09 +02:00
Claudio Atzori 2614c2c645 updated casing for the relClass terms: IsAmongTopNSimilarDocuments, HasAmongTopNSimilarDocuments, IsRelatedTo 2021-08-03 17:45:41 +02:00
Claudio Atzori b478ae0a07 added model constants for relClass terms isAmongTopNSimilarDocuments/hasAmongTopNSimilarDocuments 2021-08-03 17:23:49 +02:00
Claudio Atzori 91dbda711a [maven-release-plugin] prepare for next development iteration 2021-08-02 13:43:10 +02:00
Claudio Atzori 3c41b40afd [maven-release-plugin] prepare release dhp-schemas-2.7.15 2021-08-02 13:43:06 +02:00
Claudio Atzori d13195811a updated changelog 2021-08-02 13:42:33 +02:00
Claudio Atzori b99477e137 fixed regex for DOI cleaning 2021-08-02 13:39:00 +02:00
Claudio Atzori 00693d6f9b Merge branch 'master' into datasource_model_eosc 2021-07-29 17:27:30 +02:00
Claudio Atzori 269e166661 Merge pull request 'delegated authorities (Zenodo)' (#1) from delegated_authorities into master
Reviewed-on: #1
2021-07-29 17:27:19 +02:00
Claudio Atzori aa0c79e0d1 Merge branch 'master' into delegated_authorities 2021-07-29 17:27:04 +02:00
Miriam Baglioni 5b99f678f4 indented test resource 2021-07-29 15:22:12 +02:00
Claudio Atzori 9d11c973e9 Merge branch 'master' of https://code-repo.d4science.org/D-Net/dhp-schemas 2021-07-28 10:54:27 +02:00
Claudio Atzori e54f8449c7 added constants from the ACCESS_RIGHTS vocab 2021-07-28 10:54:21 +02:00
Michele Artini 97c5fe44d8 Merge branch 'master' into datasource_model_eosc 2021-07-27 13:01:12 +02:00
Miriam Baglioni 36930204c7 revert before renaming originalId to acronym 2021-07-27 12:59:10 +02:00
Michele Artini 08bab501dc updated the definition of the new fields 2021-07-27 11:20:45 +02:00
Michele Artini 937a6550c0 updated schema of dsm_datasources_eosc 2021-07-26 14:09:29 +02:00
Michele Artini 152b16ddfa patcg db for eosc 2021-07-23 12:06:59 +02:00
Claudio Atzori 103b781f3b added support for delegated authorities in the PID filtering criteria, thus in the identifier creation procedure 2021-07-22 16:51:45 +02:00
Michele Artini 5dc27152e2 new fields for eosc 2021-07-22 14:42:08 +02:00
Michele Artini 1bbc98694e add field datasourcetypeui 2021-07-22 12:40:23 +02:00
Miriam Baglioni 4336646df9 changed the name of originalId in acronym 2021-07-13 16:20:05 +02:00
Miriam Baglioni cba43126e1 Added APC to the schema of the dump 2021-07-13 15:01:00 +02:00
Miriam Baglioni 5f0b0d3a87 Merge branch 'master' of https://code-repo.d4science.org/D-Net/dhp-schemas 2021-07-13 13:39:22 +02:00
Claudio Atzori bb7c6e838c updated realiness level in the changelog 2021-07-13 10:28:39 +02:00
Claudio Atzori f76a11d27d this is a release 2021-07-13 10:23:03 +02:00
Claudio Atzori 0f7d4b10d0 [maven-release-plugin] rollback the release of dhp-schemas-2.6.14 2021-07-13 10:22:27 +02:00
Claudio Atzori 468c7f24db [maven-release-plugin] prepare for next development iteration 2021-07-13 10:21:24 +02:00
Claudio Atzori 2f6c91f767 [maven-release-plugin] prepare release dhp-schemas-2.6.14 2021-07-13 10:21:20 +02:00
Claudio Atzori 93a10a50b5 removed tag 2021-07-13 10:17:27 +02:00
Claudio Atzori b034b16594 [maven-release-plugin] rollback the release of dhp-schemas-2.6.14 2021-07-13 10:16:18 +02:00
Claudio Atzori acab6500ab [maven-release-plugin] prepare for next development iteration 2021-07-13 10:13:00 +02:00
Claudio Atzori 461dafb96e [maven-release-plugin] prepare release dhp-schemas-2.6.14 2021-07-13 10:12:56 +02:00
Claudio Atzori 8fd1b508ad introducing version 2.6.14 to include the Scholexplorer model classes 2021-07-13 10:11:00 +02:00
Sandro La Bruzzo bc66406171 [Scholexplorer]:
Removed TypedIdentifier class on summary and resue ScholixIdentifier
2021-07-13 10:10:35 +02:00
Sandro La Bruzzo 905d425064 [Scholexplorer]:
Updated scholix model: added subtype in scholix Summary and URL in Identifier field
2021-07-13 10:10:15 +02:00
Sandro La Bruzzo 9b0fc0ec2e [Scholexplorer]:
Imported Scholix Schema and Scholix Summary data model on dhp-schemas
2021-07-13 10:09:48 +02:00
Claudio Atzori 1dc24aa4ad [maven-release-plugin] prepare for next development iteration 2021-07-12 17:40:46 +02:00
Claudio Atzori 46749989ee [maven-release-plugin] prepare release dhp-schemas-2.7.14 2021-07-12 17:40:42 +02:00
Claudio Atzori 0d1b4dacaf Update 'CHANGES.md' 2021-07-12 17:39:17 +02:00
Sandro La Bruzzo 8c0f88adb5 Merge branch 'master' of code-repo.d4science.org:D-Net/dhp-schemas 2021-07-06 09:54:44 +02:00
Sandro La Bruzzo 78c8781fca [Scholexplorer]:
Removed TypedIdentifier class on summary and resue ScholixIdentifier
2021-07-06 09:54:26 +02:00
Claudio Atzori ff8f91577e minor update on the CHANGELOG 2021-07-05 15:32:58 +02:00
Claudio Atzori d77d4123b3 updated CHANGELOG 2021-07-05 15:27:48 +02:00
Sandro La Bruzzo c0d47b2248 Merge branch 'master' of code-repo.d4science.org:D-Net/dhp-schemas 2021-07-05 14:36:55 +02:00
Sandro La Bruzzo 74aa404a80 [Scholexplorer]:
Updated scholix model: added subtype in scholix Summary and URL in Identifier field
2021-07-05 14:36:45 +02:00
Claudio Atzori 05284542d8 Merge branch 'master' of https://code-repo.d4science.org/D-Net/dhp-schemas 2021-07-05 14:35:32 +02:00
Claudio Atzori b0203ff5cc added more cleaning/identifier utilities 2021-07-05 14:35:26 +02:00
Claudio Atzori a7472744ec added resultResult relation types, inspired by Datacite 2021-07-05 11:12:44 +02:00
Claudio Atzori fc913472a1 code formatting 2021-07-05 11:11:45 +02:00
Claudio Atzori 1f7fe39c3f Update 'README.md' 2021-07-01 16:57:57 +02:00
Sandro La Bruzzo 7605f08d81 [Scholexplorer]:
Imported Scholix Schema and Scholix Summary data model on dhp-schemas
2021-07-01 14:29:47 +02:00
Alessia Bardi 83641012da No, it does not work without the md extension 2021-06-28 17:49:59 +02:00
Alessia Bardi 598a4b8ed9 does it work without md extension? 2021-06-28 17:49:27 +02:00
Claudio Atzori 762a9ebb73 added changelog file 2021-06-28 17:41:24 +02:00
Claudio Atzori 3601609119 Update 'README.md' 2021-06-28 16:50:09 +02:00
Claudio Atzori 0b08332dc4 Update 'CHANGES.md' 2021-06-28 16:49:58 +02:00
Miriam Baglioni 92750c418c Merge branch 'master' of https://code-repo.d4science.org/D-Net/dhp-schemas 2021-06-21 09:58:05 +02:00
Claudio Atzori 1401484f15 [maven-release-plugin] prepare for next development iteration 2021-06-18 10:03:17 +02:00
Claudio Atzori 4a60d3024a [maven-release-plugin] prepare release dhp-schemas-2.6.13 2021-06-18 10:03:11 +02:00
Claudio Atzori a08220a616 bumped pom version 2021-06-18 10:02:21 +02:00
Claudio Atzori f5a3b451c9 Result.mergeFrom handles dateOfAcceptance 2021-06-18 09:58:30 +02:00
Claudio Atzori f0e00d3abd WIP descriptions for pid types 2021-06-18 09:57:57 +02:00
Claudio Atzori 3b15fefa7b [maven-release-plugin] prepare for next development iteration 2021-06-11 16:54:04 +02:00
Claudio Atzori 48c7949946 [maven-release-plugin] prepare release dhp-schemas-2.5.12 2021-06-11 16:53:59 +02:00
Claudio Atzori 4328c3ca19 delegating the date parsing to https://github.com/sisyphsu/dateparser 2021-06-09 12:29:24 +02:00
Claudio Atzori 7abc9d1d96 [maven-release-plugin] prepare for next development iteration 2021-05-28 10:45:16 +02:00
Claudio Atzori 961f558ac6 [maven-release-plugin] prepare release dhp-schemas-2.5.11 2021-05-28 10:45:10 +02:00
Claudio Atzori c9495f4b5d added more date formats 2021-05-28 10:43:08 +02:00
Claudio Atzori 80f68327de [maven-release-plugin] prepare for next development iteration 2021-05-27 17:29:32 +02:00
Claudio Atzori b39e0a2b74 [maven-release-plugin] prepare release dhp-schemas-2.5.10 2021-05-27 17:29:27 +02:00
Claudio Atzori 8e764c10fc added more date formats 2021-05-27 17:28:34 +02:00
Claudio Atzori 6cce7245a3 [maven-release-plugin] prepare for next development iteration 2021-05-27 15:03:41 +02:00
Claudio Atzori b1c95210ef [maven-release-plugin] prepare release dhp-schemas-2.5.9 2021-05-27 15:03:35 +02:00
Claudio Atzori 9dbe397b1a bumped pom version 2021-05-27 15:02:26 +02:00
Claudio Atzori e447ac68fa enable the possibility to extend the date formats used to parse Relation.validationDate 2021-05-27 14:58:39 +02:00
Claudio Atzori bf7acf268c [maven-release-plugin] prepare for next development iteration 2021-05-26 17:41:56 +02:00
Claudio Atzori 1b500a9d7c [maven-release-plugin] prepare release dhp-schemas-2.4.8 2021-05-26 17:41:51 +02:00
Claudio Atzori acd28f94cc added constant for ORCID datasource name 2021-05-26 17:41:09 +02:00
Claudio Atzori 1d9e909d2f [maven-release-plugin] prepare for next development iteration 2021-05-24 08:57:37 +02:00
Claudio Atzori 679539525b [maven-release-plugin] prepare release dhp-schemas-2.4.7 2021-05-24 08:57:31 +02:00
Miriam Baglioni e723513fac added merge forh2020topiccode and h2020topicdescription. Removed merge for funded amount. 2021-05-21 13:20:43 +02:00
Claudio Atzori db618fe0c3 uniform constant names across the branches 2021-05-20 15:45:52 +02:00
Miriam Baglioni 627b57575e changed originalId to acronym 2021-05-20 11:09:44 +02:00
Miriam Baglioni f613f4cc1a added article processing charges to the model of the dump 2021-05-20 11:05:52 +02:00
Miriam Baglioni 0dc0d69bcf changed the documentation of the class 2021-05-20 11:04:23 +02:00
Claudio Atzori 1271bec1f8 applied intellij code cleanup 2021-05-14 11:06:24 +02:00
Claudio Atzori 0e5cf7a7d8 OafMapperUtils moved back to dhp-common 2021-05-11 11:08:08 +02:00
Claudio Atzori 5f7672cd29 CleaningFunctions should only define the minimal necessary methods used in this module, the rest is moved in dnet-hadoop 2021-05-10 16:30:36 +02:00
Claudio Atzori 2ba6a9ccbe [maven-release-plugin] prepare for next development iteration 2021-05-10 14:02:59 +02:00
Claudio Atzori d5812e0be6 [maven-release-plugin] prepare release dhp-schemas-2.3.6 2021-05-10 14:02:52 +02:00
Claudio Atzori 5dc52ed56b MDStoreManager model classes imported from dnet-hadoop project 2021-05-10 14:02:18 +02:00
Claudio Atzori eb9aecfcf9 [maven-release-plugin] prepare for next development iteration 2021-05-10 13:49:02 +02:00
Claudio Atzori 6a5cce319e [maven-release-plugin] prepare release dhp-schemas-2.3.6 2021-05-10 13:48:55 +02:00
Claudio Atzori 09b890fc73 MDStoreManager model classes imported from dnet-hadoop project 2021-05-10 13:48:14 +02:00
Claudio Atzori 3a92c46e0d [maven-release-plugin] prepare for next development iteration 2021-04-27 18:25:00 +02:00
Claudio Atzori 478bcd957a [maven-release-plugin] prepare release dhp-schemas-2.2.5 2021-04-27 18:24:52 +02:00
Claudio Atzori f2f3823d4c removed classifier before release 2021-04-27 18:24:09 +02:00
Claudio Atzori 611095144b imported core utilities from dhp-common 2021-04-27 15:42:38 +02:00
Claudio Atzori b803343669 added classifier to pom 2021-04-26 10:48:18 +02:00
Claudio Atzori b5b7da198a merging from stable_ids branch 2021-04-23 14:03:59 +02:00
Claudio Atzori f3b72d3b7c [maven-release-plugin] prepare for next development iteration 2021-04-23 13:24:54 +02:00
Claudio Atzori 12fd479faa [maven-release-plugin] prepare release dhp-schemas-2.2.4 2021-04-23 13:24:47 +02:00
171 changed files with 9312 additions and 4340 deletions

47
CHANGES.md Normal file
View File

@ -0,0 +1,47 @@
## Changelog
| **Version** | **Changes** | **Readiness** |
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
| 6.1.1 | [Graph model] </br> <ul><li>Introduced constants used in the DOIBoost dismission.</li></ul> | beta |
| 6.1.0 | [Graph model] </br> <ul><li>Introduced model classes to provide a JSON representation of records embedding information from the related entities.</li></ul> | beta |
| 5.17.3 | [Graph model] </br> <ul><li>added result level textual field to store the transformative agreement information.</li></ul> | beta |
| 4.17.3 | [Graph model] </br> <ul><li>moved context at the level of the entity. </li></ul> | beta |
| 4.17.2 | [Graph model] </br> <ul><li>added InstaceTypeMapping field on the instance level.</li><li>new result level fields to support the activities in the Irish tender `isGreen`, `openAccessColor`, `isInDiamondJournal`, `publiclyFunded`</li><ul> | production |
| 3.17.1 | [Graph model] </br> <ul><li>added fulltext field on the instance level.</li><li>added extra organization specific PID types</li><ul> | production |
| 3.16.0 | [Graph model] </br> <ul><li>added entity level measures.</li><ul> | production |
| 3.15.0 | [Graph model] </br> <ul><li>added w3id as PID type, with ROHub as authority.</li> <ul> | production |
| 3.14.0 | [Graph model] </br> <ul><li>introduced specific type for result.subject</li> <ul> | production |
| 2.13.0 | [Scholexplorer] </br> <ul><li>update swagger annotation jar version to be compatible with new implementation of openAPI ui</li> <ul> | production |
| 2.12.1 | [Graph model] </br> <ul><li>added field oafEntity.eoscifguidelines</li> <ul> | production |
| 2.12.0 | [Graph model] </br> <ul><li>Introducing EOSC Services as datasources</li> <ul> | production |
| 2.11.33 | [Scholexplorer] </br> <ul><li>Moved Scholix API Data model into dhp-schemas</li><li>implementation of the compareTo method on Scholix objects and all model properties</li> <li>Unit Test to verify that compareTo works on different case</li> <ul> | production |
| 2.10.31 | [Minor] </br>NPE checks | production |
| 2.10.30 | [Minor] </br>added comparator for refereed field instances | production |
| 2.10.29 | [Merge Result] </br>merge logics changed to consider invisble in dataInfo | production |
| 2.10.28 | [Graph Model] </br> Added APC information at the level of the result | production |
| 2.10.27 | [Graph Model] </br> change name and id of OpenAPC datasource | production |
| 2.10.26 | [Graph Model] </br> OpenAIRE ids of the delegated authorities and enrichment providers in the identifier creation strategy | production |
| 2.10.25 | [Graph model]</br>implemented enrichment on Result specializing in the method mergefrom. | production |
| 2.10.24 | [Graph model]</br>added utility method and constants for checking weather is an OafEntity represents an enrichment. | production |
| 2.9.24 | [Dump model]</br>change the names of the classes to be able to automatically create the json schema with specific descriptions | production |
| 2.9.23 | [Graph model]<br>Added Instance.measures field, allowing to maintain the association between them and the individual result instance</br>[Dump model]</br>added json schemas | production |
| 2.8.22 | [Graph model]<br>minor: added serializable to the Measures model class</br>[Dump model]</br>added dedicated BestAccessRight class, used at the result level instead of AccessRight | production |
| 2.8.21 | [Graph model]<br>added the following relation terms Describes/IsDescribedBy, IsMetadataFor/IsMetadataOf, HasAssociationWith/HasAssociationWith, IsRequiredBy/Requires. All these are used in combination with the relation subRelType "relationship" | production |
| 2.8.20 | [Graph model]<br>added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | production |
| 2.7.18-19 | [Dump model]<br>include validation info in relations<br>[Graph model]<br>added constants declaring vocabulary names for relation fields | production |
| 2.7.17 | [Dump model]<br>aligned the graph dump schema to mirror the changes in the model<br>1. Added openaccessroute at the level of the instance inside the AccessRight element;<br>2. Added pid and the alternate identifiers at the level of the instance;<br>3. Added the bipFinder measures | production |
| 2.7.16 | [Graph model]<br>Updated the casing of the following terms (`relation.relClass`):<br>1. `isRelatedTo -> IsRelatedTo`<br>Added the following `relClass` terms:<br>1. `IsAmongTopNSimilarDocuments`<br>2. `HasAmongTopNSimilarDocuments` | production |
| 2.7.15 | 1. added support for delegated authorities<br>2. fixed regex for DOI cleaning | production |
| 2.7.14 | [Graph model]<br>Relation types are now inspired by the Datacite definitions https://schema.datacite.org/meta/kernel-4.4/doc/DataCite-MetadataKernel_v4.4.pdf <br>The changes involve the values stored in `relation.subRelType` and `relation.relClass`:<br>Updated the casing of the following terms (`relation.relClass`):<br>1. `isSupplementTo -> IsSupplementTo` / `isSupplementedBy -> IsSupplementedBy`<br>2. `isPartOf -> IsPartOf` / `hasPart -> HasPart`<br>3. `cites -> Cites` / `isCitedBy -> IsCitedBy`<br>4. `reviews -> Reviews` / `isReviewedBy -> IsReviewedBy`<br>Added the following terms [`subRelType: relClass / relClass (inverse)`]:<br>1. `relationship: References / IsReferencedBy`<br>2. `relationship: IsIdenticalTo`<br>3. `relationship: IsContinuedBy / Continues`<br>4. `relationship: IsDocumentedBy / Documents`<br>5. `relationship: Documents / IsDocumentedBy`<br>6. `relationship: IsCompiledBy / Compiles`<br>7. `version: IsPreviousVersionOf / IsNewVersionOf`<br>8. `version: IsSourceOf / IsDerivedFrom`<br>9. `version: IsVariantFormOf / IsOriginalFormOf`<br>10. `version: IsObsoletedBy / Obsoletes`<br>11. `version: IsVersionOf / HasVersion` | production |
| 2.6.14 | [Scholexplorer]<br>1. Added model classes for Scholexplorer, package `eu.dnetlib.dhp.schema.sx` | production |
| 2.6.13 | 1. `Result.mergeFrom` handles field `dateOfAcceptance` | production |
| 2.5.12 | 1. delegating the date parsing to https://github.com/sisyphsu/dateparser | production |
| 2.5.[11-9] | 1. support for more date formats<br>2. enable the possibility to extend the date formats used to parse `Relation.validationDate` | production |
| 2.4.8 | 1. added constant for ORCID datasource name | production |
| 2.4.7 | refactoring | production |
| 2.3.6 | [Aggregation]<br>1. introduced MetadataStoreManager (MdSM) model classes | production |
| 2.2.5 | [Graph model]<br>1. introduced fields `Instance.pid` and `Instance.alternateIdentifier`<br>2. `LicenseComparator` renamed as `AccessRightComparator`<br>3. introduced `AccessRight` model class defining the `OpenAccessRoute` field to keep track of the OpenAccess color at the `Instance` level<br>4. `ExternalReference` cleanup (removed description, added alternateLabel(s))<br>5. added several ModelConstants<br>[Aggregation]<br>7. introduced MDStore record model classes<br>8. Introduced ORCID specific model classes | production |
| 2.2.4 | 1. ORCID specific model classes backported in the version used in PROD<br>2. added constant for dnet:externalReference_typologies<br>3. added constant for ORCID datasource name<br>4. `Result.mergeFrom` handles field `dateOfAcceptance` | production |

43
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,43 @@
# Contributor Code of Conduct
Openness, transparency and our community-driven participatory approach guide us in our day-to-day interactions and decision-making. Our open source projects are no exception. Trust, respect, collaboration and transparency are core values we believe should live and breathe within our projects. Our community welcomes participants from around the world with different experiences, unique perspectives, and great ideas to share.
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Attempting collaboration before conflict
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- Violence, threats of violence, or inciting others to commit self-harm
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, intentionally spreading misinformation, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Abuse of the reporting process to intentionally harass or exclude others
- Advocating for, or encouraging, any of the above behavior
- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), [version 1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html).

10
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,10 @@
# Contributing to D-Net Hadoop
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
This project and everyone participating in it is governed by our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [dnet-team@isti.cnr.it](mailto:dnet-team@isti.cnr.it).
The following is a set of guidelines for contributing to this project and its packages. These are mostly guidelines, not rules, which applies to this project as a while, including all its sub-modules.
Use your best judgment, and feel free to propose changes to this document in a pull request.
All contributions are welcome, all contributions will be considered to be contributed under the [project license](#LICENSE.md).

View File

View File

@ -1,11 +1,23 @@
Description of the project
--------------------------
Introduction
====================
This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report unacceptable behavior to [dnet-team@isti.cnr.it](mailto:dnet-team@isti.cnr.it).
This project is licensed under the [AGPL v3 or later version](#LICENSE.md).
Purpose
====================
This project defines **object schemas** of the OpenAIRE main entities and the relationships that intercur among them.
Namely it defines the model for
- **research product (result)** which subclasses in publication, dataset, other research product, software
- **data source** object describing the data provider (institutional repository, aggregators, cris systems)
- **organization** research bodies managing a data source or participating to a research project
- **project** research project
- the graph internal representation, defined under the package `eu.dnetlib.dhp.schema.oaf`
- the scholexplorer content representation, defined under the package `eu.dnetlib.dhp.schema.sx`
- the contents acquired from the metadata aggregation subsystem, defined under the package `eu.dnetlib.dhp.schema.mdstore`
- the ORCID common schemas, defined under the package `eu.dnetlib.dhp.schema.orcid`
- the Solr common schemas used to represent the information returned to the Explore portal and the APIs, defined under
the package `eu.dnetlib.dhp.schema.solr`
Te serialization of such objects (data store files) are used to pass data between workflow nodes in the processing pipeline.
The serialization of such objects (data store files) are used to pass data between workflow nodes in the processing pipeline
and / or intended to be shared across components.

160
pom.xml
View File

@ -5,7 +5,7 @@
<groupId>eu.dnetlib.dhp</groupId>
<artifactId>dhp-schemas</artifactId>
<packaging>jar</packaging>
<version>2.2.4-SNAPSHOT</version>
<version>6.1.2-SNAPSHOT</version>
<licenses>
<license>
@ -20,7 +20,7 @@
<issueManagement>
<system>Redmine</system>
<url>https://issue.openaire.research-infrastructures.eu/projects/openaire</url>
<url>https://support.openaire.eu/projects/openaire</url>
</issueManagement>
<ciManagement>
@ -32,7 +32,7 @@
<connection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</connection>
<developerConnection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</developerConnection>
<url>https://code-repo.d4science.org/D-Net/dhp-schemas/</url>
<tag>HEAD</tag>
<tag>dhp-schemas-2.10.30</tag>
</scm>
<description>This module contains common schema classes meant to be used across the dnet-hadoop submodules</description>
@ -137,9 +137,32 @@
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${dhp.jackson.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
@ -225,6 +248,19 @@
<scalaVersion>${scala.version}</scalaVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<includePluginDependencies>true</includePluginDependencies>
<mainClass>eu.dnetlib.dhp.schema.dump.ExecCreateSchemas</mainClass>
<arguments>
<argument>eu.dnetlib.dhp.schema.dump.oaf.GraphResult;eu.dnetlib.dhp.schema.dump.oaf.graph.Organization;eu.dnetlib.dhp.schema.dump.oaf.graph.Project</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
@ -245,10 +281,16 @@
<dependencyManagement>
<dependencies>
<dependency>
<groupId>me.xuender</groupId>
<artifactId>unidecode</artifactId>
<version>${dhp.unidecode.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.25</version>
<version>${dhp.slf4j.version}</version>
<scope>provided</scope>
</dependency>
@ -258,6 +300,12 @@
<version>${dhp.commons.lang.version}</version>
</dependency>
<dependency>
<groupId>com.github.sisyphsu</groupId>
<artifactId>dateparser</artifactId>
<version>${dhp.dateparser.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
@ -267,15 +315,16 @@
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.9</version>
<version>${dhp.commons.codec.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
<version>${dhp.commons.io.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
@ -283,30 +332,89 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>${dhp.javax.persistence.api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${dhp.swagger.annotations.version}</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>${dhp.validation.api.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.victools</groupId>
<artifactId>jsonschema-generator</artifactId>
<version>${jsonschemagenerator.version}</version>
</dependency>
<dependency>
<groupId>com.github.imifou</groupId>
<artifactId>jsonschema-module-addon</artifactId>
<version>${dhp.jsonschema.module.addon.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>me.xuender</groupId>
<artifactId>unidecode</artifactId>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@ -319,6 +427,11 @@
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>com.github.sisyphsu</groupId>
<artifactId>dateparser</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
@ -334,9 +447,31 @@
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
</dependency>
<dependency>
<groupId>com.github.victools</groupId>
<artifactId>jsonschema-generator</artifactId>
</dependency>
<dependency>
<groupId>com.github.imifou</groupId>
<artifactId>jsonschema-module-addon</artifactId>
</dependency>
</dependencies>
<properties>
<dhp.dateparser.version>1.0.7</dhp.dateparser.version>
<dhp.jsonschema.module.addon.version>1.2.1</dhp.jsonschema.module.addon.version>
<dhp.validation.api.version>2.0.1.Final</dhp.validation.api.version>
<dhp.swagger.annotations.version>2.2.2</dhp.swagger.annotations.version>
<dhp.javax.persistence.api.version>2.2</dhp.javax.persistence.api.version>
<dhp.commons.codec.version>1.9</dhp.commons.codec.version>
<dhp.commons.io.version>2.4</dhp.commons.io.version>
<dhp.slf4j.version>1.7.25</dhp.slf4j.version>
<dhp.unidecode.version>0.0.7</dhp.unidecode.version>
<dhp.swagger-annotations-version>2.1.12</dhp.swagger-annotations-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.plugin.version>3.6.0</maven.compiler.plugin.version>
@ -350,6 +485,7 @@
<scala.version>2.11.12</scala.version>
<junit-jupiter.version>5.6.1</junit-jupiter.version>
<mockito-core.version>3.3.3</mockito-core.version>
<jsonschemagenerator.version>4.13.0</jsonschemagenerator.version>
</properties>

View File

@ -4,7 +4,6 @@ package eu.dnetlib.dhp.schema.action;
import java.io.IOException;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.JsonNode;
@ -12,10 +11,11 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import eu.dnetlib.dhp.schema.oaf.Oaf;
public class AtomicActionDeserializer extends JsonDeserializer {
public class AtomicActionDeserializer<T extends Oaf> extends JsonDeserializer<AtomicAction<T>> {
@Override
public Object deserialize(JsonParser jp, DeserializationContext ctxt)
@SuppressWarnings("unchecked")
public AtomicAction<T> deserialize(JsonParser jp, DeserializationContext ctxt)
throws IOException {
JsonNode node = jp.getCodec().readTree(jp);
String classTag = node.get("clazz").asText();
@ -23,8 +23,9 @@ public class AtomicActionDeserializer extends JsonDeserializer {
ObjectMapper mapper = new ObjectMapper();
try {
final Class<?> clazz = Class.forName(classTag);
return new AtomicAction(clazz, (Oaf) mapper.readValue(payload.toString(), clazz));
final Class<T> clazz = (Class<T>) Class.forName(classTag);
final T oaf = mapper.readValue(payload.toString(), clazz);
return new AtomicAction(clazz, oaf);
} catch (ClassNotFoundException e) {
throw new IOException(e);
}

View File

@ -5,10 +5,10 @@ import java.util.Comparator;
import eu.dnetlib.dhp.schema.oaf.Qualifier;
public class LicenseComparator implements Comparator<Qualifier> {
public class AccessRightComparator<T extends Qualifier> implements Comparator<T> {
@Override
public int compare(Qualifier left, Qualifier right) {
public int compare(T left, T right) {
if (left == null && right == null)
return 0;

View File

@ -1,15 +1,53 @@
package eu.dnetlib.dhp.schema.common;
import eu.dnetlib.dhp.schema.oaf.AccessRight;
import eu.dnetlib.dhp.schema.oaf.DataInfo;
import eu.dnetlib.dhp.schema.oaf.KeyValue;
import eu.dnetlib.dhp.schema.oaf.Qualifier;
public class ModelConstants {
private ModelConstants() {}
public static final String ORCID = "orcid";
public static final String ORCID_PENDING = "orcid_pending";
public static final String ORCID_CLASSNAME = "Open Researcher and Contributor ID";
public static final String ORCID_DS = ORCID.toUpperCase();
public static final String CROSSREF_ID = "10|openaire____::081b82f96300b6a6e3d282bad31cb6e2";
public static final String MAG_ID ="10|openaire____::5f532a3fc4f1ea403f37070f59a7a53a";
public static final String DATACITE_ID = "10|openaire____::9e3be59865b2c1c335d32dae2fe7b254";
public static final String ZENODO_OD_ID = "10|opendoar____::358aee4cc897452c00244351e4d91f69";
public static final String ZENODO_R3_ID = "10|re3data_____::7b0ad08687b2c960d5aeef06f811d5e6";
public static final String EUROPE_PUBMED_CENTRAL_ID = "10|opendoar____::8b6dd7db9af49e67306feb59a8bdc52c";
public static final String PUBMED_CENTRAL_ID = "10|opendoar____::eda80a3d5b344bc40f3bc04f65b7a357";
public static final String ARXIV_ID = "10|opendoar____::6f4922f45568161a8cdf4ad2299f6d23";
public static final String ROHUB_ID = "10|fairsharing_::1b69ebedb522700034547abc5652ffac";
public static final String OPENORGS_NAME = "OpenOrgs Database";
public static final String MAG_NAME = "Microsoft Academic Graph";
public static final String OPENOCITATIONS_NAME = "OpenCitations";
public static final String OPENOCITATIONS_ID = "10|openaire____::c06df618c5de1c786535ccf3f8b7b059";
public static final String OPEN_APC_NAME = "OpenAPC Global Initiative";
public static final String OPEN_APC_ID = "10|apc_________::e2b1600b229fc30663c8a1f662debddf";
// VOCABULARY VALUE
public static final String ACCESS_RIGHT_OPEN = "OPEN";
public static final String ACCESS_RIGHT_EMBARGO = "EMBARGO";
public static final String ACCESS_RIGHT_CLOSED = "CLOSED";
public static final String DNET_SUBJECT_KEYWORD = "keyword";
public static final String DNET_SUBJECT_FOS_CLASSID = "FOS";
public static final String DNET_SUBJECT_FOS_CLASSNAME = "Fields of Science and Technology classification";
public static final String DNET_SUBJECT_TYPOLOGIES = "dnet:subject_classification_typologies";
public static final String DNET_RESULT_TYPOLOGIES = "dnet:result_typologies";
@ -17,63 +55,137 @@ public class ModelConstants {
public static final String DNET_ACCESS_MODES = "dnet:access_modes";
public static final String DNET_LANGUAGES = "dnet:languages";
public static final String DNET_PID_TYPES = "dnet:pid_types";
public static final String DNET_DATA_CITE_DATE = "dnet:dataCite_date";
public static final String DNET_DATACITE_DATE = "dnet:dataCite_date";
public static final String DNET_DATACITE_TITLE = "dnet:dataCite_title";
public static final String DNET_DATA_CITE_RESOURCE = "dnet:dataCite_resource";
public static final String DNET_PROVENANCE_ACTIONS = "dnet:provenanceActions";
public static final String DNET_COUNTRY_TYPE = "dnet:countries";
public static final String DNET_REVIEW_LEVELS = "dnet:review_levels";
public static final String DNET_PROGRAMMING_LANGUAGES = "dnet:programming_languages";
public static final String DNET_EXTERNAL_REFERENCE_TYPE = "dnet:externalReference_typologies";
public static final String DNET_RELATION_RELTYPE = "dnet:relation_relType";
public static final String DNET_RELATION_SUBRELTYPE = "dnet:relation_subRelType";
public static final String DNET_RELATION_RELCLASS = "dnet:relation_relClass";
public static final String OPENAIRE_COAR_RESOURCE_TYPES_3_1 = "openaire::coar_resource_types_3_1";
public static final String OPENAIRE_USER_RESOURCE_TYPES = "openaire::user_resource_types";
public static final String OPENAIRE_META_RESOURCE_TYPE = "openaire::meta_resource_types";
public static final String PEER_REVIEWED_CLASSNAME = "nonPeerReviewed";
public static final String NON_PEER_REVIEWED_CLASSNAME = "nonPeerReviewed";
public static final String PEER_REVIEWED_CLASSID = "0001";
public static final String NON_PEER_REVIEWED_CLASSID = "0002";
public static final String SYSIMPORT_CROSSWALK_REPOSITORY = "sysimport:crosswalk:repository";
public static final String SYSIMPORT_CROSSWALK_ENTITYREGISTRY = "sysimport:crosswalk:entityregistry";
public static final String SYSIMPORT_ACTIONSET = "sysimport:actionset";
public static final String SYSIMPORT_ORCID_NO_DOI = "sysimport:actionset:orcidworks-no-doi";
public static final String USER_CLAIM = "user:claim";
public static final String HARVESTED = "Harvested";
public static final String PROVENANCE_DEDUP = "sysimport:dedup";
public static final String PROVENANCE_ENRICH = "sysimport:enrich";
public static final Qualifier PROVENANCE_ACTION_SET_QUALIFIER = qualifier(
SYSIMPORT_ACTIONSET, SYSIMPORT_ACTIONSET, DNET_PROVENANCE_ACTIONS, DNET_PROVENANCE_ACTIONS);
public static final String DATASET_RESULTTYPE_CLASSID = "dataset";
public static final String PUBLICATION_RESULTTYPE_CLASSID = "publication";
public static final String SOFTWARE_RESULTTYPE_CLASSID = "software";
public static final String ORP_RESULTTYPE_CLASSID = "other";
public static final String RESULT_RESULT = "resultResult";
public static final String RESULT_RESULT = "resultResult"; // relType
/**
* @deprecated Use {@link ModelConstants#RELATIONSHIP} instead.
*/
@Deprecated
public static final String PUBLICATION_DATASET = "publicationDataset";
public static final String IS_RELATED_TO = "isRelatedTo";
public static final String SUPPLEMENT = "supplement";
public static final String IS_SUPPLEMENT_TO = "isSupplementTo";
public static final String IS_SUPPLEMENTED_BY = "isSupplementedBy";
public static final String PART = "part";
public static final String IS_PART_OF = "isPartOf";
public static final String HAS_PARTS = "hasParts";
public static final String RELATIONSHIP = "relationship";
public static final String CITATION = "citation";
public static final String CITES = "cites";
public static final String IS_CITED_BY = "isCitedBy";
public static final String REVIEW = "review";
public static final String REVIEWS = "reviews";
public static final String IS_REVIEWED_BY = "isReviewedBy";
public static final String PUBLICATION_DATASET = "publicationDataset"; // subreltype
public static final String RESULT_PROJECT = "resultProject";
public static final String OUTCOME = "outcome";
public static final String SUPPLEMENT = "supplement"; // subreltype
public static final String IS_SUPPLEMENT_TO = "IsSupplementTo";
public static final String IS_SUPPLEMENTED_BY = "IsSupplementedBy";
public static final String PART = "part"; // subreltype
public static final String IS_PART_OF = "IsPartOf";
public static final String HAS_PART = "HasPart";
public static final String RELATIONSHIP = "relationship"; // subreltype
public static final String IS_RELATED_TO = "IsRelatedTo";
public static final String IS_IDENTICAL_TO = "IsIdenticalTo";
public static final String REFERENCES = "References";
public static final String IS_REFERENCED_BY = "IsReferencedBy";
public static final String CONTINUES = "Continues";
public static final String IS_CONTINUED_BY = "IsContinuedBy";
public static final String DOCUMENTS = "Documents";
public static final String IS_DOCUMENTED_BY = "IsDocumentedBy";
public static final String IS_SOURCE_OF = "IsSourceOf";
public static final String IS_DERIVED_FROM = "IsDerivedFrom";
public static final String COMPILES = "Compiles";
public static final String IS_COMPILED_BY = "IsCompiledBy";
public static final String DESCRIBES = "Describes";
public static final String IS_DESCRIBED_BY = "IsDescribedBy";
public static final String IS_METADATA_FOR = "IsMetadataFor";
public static final String IS_METADATA_OF = "IsMetadataOf";
public static final String HAS_ASSOCIATION_WITH = "HasAssociationWith";
public static final String IS_REQUIRED_BY = "IsRequiredBy";
public static final String REQUIRES = "Requires";
public static final String CITATION = "citation"; // subreltype
public static final String CITES = "Cites";
public static final String IS_CITED_BY = "IsCitedBy";
public static final String REVIEW = "review"; // subreltype
public static final String REVIEWS = "Reviews";
public static final String IS_REVIEWED_BY = "IsReviewedBy";
public static final String VERSION = "version"; // subreltype
public static final String IS_VERSION_OF = "IsVersionOf";
public static final String HAS_VERSION = "HasVersion";
public static final String IS_PREVIOUS_VERSION_OF = "IsPreviousVersionOf";
public static final String IS_NEW_VERSION_OF = "IsNewVersionOf";
public static final String IS_VARIANT_FORM_OF = "IsVariantFormOf";
public static final String IS_ORIGINAL_FORM_OF = "IsOriginalFormOf";
public static final String IS_OBSOLETED_BY = "IsObsoletedBy";
public static final String OBSOLETES = "Obsoletes";
public static final String RESULT_PROJECT = "resultProject"; // relType
public static final String OUTCOME = "outcome"; // subreltype
public static final String IS_PRODUCED_BY = "isProducedBy";
public static final String PRODUCES = "produces";
public static final String DATASOURCE_ORGANIZATION = "datasourceOrganization";
public static final String PROVISION = "provision";
public static final String DATASOURCE_ORGANIZATION = "datasourceOrganization"; // relType
public static final String PROVISION = "provision"; // subreltype
public static final String IS_PROVIDED_BY = "isProvidedBy";
public static final String PROVIDES = "provides";
public static final String PROJECT_ORGANIZATION = "projectOrganization";
public static final String PARTICIPATION = "participation";
public static final String PROJECT_ORGANIZATION = "projectOrganization"; // relType
public static final String PARTICIPATION = "participation"; // subreltype
public static final String HAS_PARTICIPANT = "hasParticipant";
public static final String IS_PARTICIPANT = "isParticipant";
public static final String RESULT_ORGANIZATION = "resultOrganization";
public static final String AFFILIATION = "affiliation";
public static final String RESULT_ORGANIZATION = "resultOrganization"; // relType
public static final String AFFILIATION = "affiliation"; // subreltype
public static final String IS_AUTHOR_INSTITUTION_OF = "isAuthorInstitutionOf";
public static final String HAS_AUTHOR_INSTITUTION = "hasAuthorInstitution";
public static final String ORG_ORG_RELTYPE = "organizationOrganization"; // relType
public static final String IS_PARENT_OF = "IsParentOf";
public static final String IS_CHILD_OF = "IsChildOf";
public static final String DEDUP = "dedup"; // subreltype
public static final String MERGES = "merges";
public static final String IS_MERGED_IN = "isMergedIn";
public static final String SIMILARITY = "similarity"; // subreltype
public static final String IS_SIMILAR_TO = "isSimilarTo";
public static final String IS_AMONG_TOP_N_SIMILAR_DOCS = "IsAmongTopNSimilarDocuments";
public static final String HAS_AMONG_TOP_N_SIMILAR_DOCS = "HasAmongTopNSimilarDocuments";
public static final String IS_DIFFERENT_FROM = "isDifferentFrom";
public static final String UNKNOWN = "UNKNOWN";
public static final String NOT_AVAILABLE = "not available";
@ -102,11 +214,30 @@ public class ModelConstants {
SYSIMPORT_CROSSWALK_ENTITYREGISTRY, SYSIMPORT_CROSSWALK_ENTITYREGISTRY,
DNET_PROVENANCE_ACTIONS, DNET_PROVENANCE_ACTIONS);
public static final String UNKNOWN_REPOSITORY_ORIGINALID = "openaire____::1256f046-bf1f-4afc-8b47-d0b147148b18";
public static final KeyValue UNKNOWN_REPOSITORY = keyValue(
"10|openaire____::55045bd2a65019fd8e6741a755395c8c", "Unknown Repository");
public static final Qualifier UNKNOWN_COUNTRY = qualifier(UNKNOWN, "Unknown", DNET_COUNTRY_TYPE, DNET_COUNTRY_TYPE);
public static final Qualifier MAIN_TITLE_QUALIFIER = qualifier(
"main title", "main title", DNET_DATACITE_TITLE, DNET_DATACITE_TITLE);
public static final Qualifier ALTERNATIVE_TITLE_QUALIFIER = qualifier(
"alternative title", "alternative title", DNET_DATACITE_TITLE, DNET_DATACITE_TITLE);
public static final Qualifier SUBTITLE_QUALIFIER = qualifier(
"subtitle", "subtitle", DNET_DATACITE_TITLE, DNET_DATACITE_TITLE);
public static final AccessRight OPEN_ACCESS_RIGHT() {
final AccessRight result = new AccessRight();
result.setClassid(ACCESS_RIGHT_OPEN);
result.setClassid(ACCESS_RIGHT_OPEN);
result.setSchemeid(ModelConstants.DNET_ACCESS_MODES);
result.setSchemename(ModelConstants.DNET_ACCESS_MODES);
return result;
}
private static Qualifier qualifier(
final String classid,
final String classname,
@ -120,8 +251,8 @@ public class ModelConstants {
return q;
}
private static KeyValue keyValue(String key, String value) {
KeyValue kv = new KeyValue();
private static KeyValue keyValue(final String key, final String value) {
final KeyValue kv = new KeyValue();
kv.setKey(key);
kv.setValue(value);
kv.setDataInfo(new DataInfo());

View File

@ -2,20 +2,22 @@
package eu.dnetlib.dhp.schema.common;
import static com.google.common.base.Preconditions.checkArgument;
import static eu.dnetlib.dhp.schema.common.ModelConstants.*;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAccessor;
import java.util.Date;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Function;
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.lang3.StringUtils;
import com.github.sisyphsu.dateparser.DateParserUtils;
import com.google.common.collect.Maps;
import eu.dnetlib.dhp.schema.oaf.*;
@ -24,7 +26,7 @@ import eu.dnetlib.dhp.schema.oaf.*;
public class ModelSupport {
/** Defines the mapping between the actual entity type and the main entity type */
private static Map<EntityType, MainEntityType> entityMapping = Maps.newHashMap();
private static final Map<EntityType, MainEntityType> entityMapping = Maps.newHashMap();
static {
entityMapping.put(EntityType.publication, MainEntityType.result);
@ -97,222 +99,110 @@ public class ModelSupport {
public static final Map<String, RelationInverse> relationInverseMap = Maps.newHashMap();
static {
relationInverseMap
.put(
"personResult_authorship_isAuthorOf", new RelationInverse()
.setRelation("isAuthorOf")
.setInverse("hasAuthor")
.setRelType("personResult")
.setSubReltype("authorship"));
relationInverseMap
.put(
"personResult_authorship_hasAuthor", new RelationInverse()
.setInverse("isAuthorOf")
.setRelation("hasAuthor")
.setRelType("personResult")
.setSubReltype("authorship"));
relationInverseMap
.put(
"projectOrganization_participation_isParticipant", new RelationInverse()
.setRelation("isParticipant")
.setInverse("hasParticipant")
.setRelType("projectOrganization")
.setSubReltype("participation"));
relationInverseMap
.put(
"projectOrganization_participation_hasParticipant", new RelationInverse()
.setInverse("isParticipant")
.setRelation("hasParticipant")
.setRelType("projectOrganization")
.setSubReltype("participation"));
relationInverseMap
.put(
"resultOrganization_affiliation_hasAuthorInstitution", new RelationInverse()
.setRelation("hasAuthorInstitution")
.setInverse("isAuthorInstitutionOf")
.setRelType("resultOrganization")
.setSubReltype("affiliation"));
relationInverseMap
.put(
"resultOrganization_affiliation_isAuthorInstitutionOf", new RelationInverse()
.setInverse("hasAuthorInstitution")
.setRelation("isAuthorInstitutionOf")
.setRelType("resultOrganization")
.setSubReltype("affiliation"));
relationInverseMap
.put(
"organizationOrganization_dedup_merges", new RelationInverse()
.setRelation("merges")
.setInverse("isMergedIn")
.setRelType("organizationOrganization")
.setSubReltype("dedup"));
relationInverseMap
.put(
"organizationOrganization_dedup_isMergedIn", new RelationInverse()
.setInverse("merges")
.setRelation("isMergedIn")
.setRelType("organizationOrganization")
.setSubReltype("dedup"));
relationInverseMap
.put(
"organizationOrganization_dedupSimilarity_isSimilarTo", new RelationInverse()
.setInverse("isSimilarTo")
.setRelation("isSimilarTo")
.setRelType("organizationOrganization")
.setSubReltype("dedupSimilarity"));
set(relationInverseMap, PROJECT_ORGANIZATION, PARTICIPATION, IS_PARTICIPANT, HAS_PARTICIPANT);
set(relationInverseMap, RESULT_ORGANIZATION, AFFILIATION, IS_AUTHOR_INSTITUTION_OF, HAS_AUTHOR_INSTITUTION);
set(relationInverseMap, ORG_ORG_RELTYPE, DEDUP, IS_MERGED_IN, MERGES);
set(relationInverseMap, ORG_ORG_RELTYPE, DEDUP, IS_SIMILAR_TO, IS_SIMILAR_TO);
set(relationInverseMap, RESULT_PROJECT, OUTCOME, IS_PRODUCED_BY, PRODUCES);
set(relationInverseMap, DATASOURCE_ORGANIZATION, PROVISION, IS_PROVIDED_BY, PROVIDES);
set(relationInverseMap, RESULT_RESULT, SIMILARITY, IS_AMONG_TOP_N_SIMILAR_DOCS, HAS_AMONG_TOP_N_SIMILAR_DOCS);
set(relationInverseMap, RESULT_RESULT, SUPPLEMENT, IS_SUPPLEMENT_TO, IS_SUPPLEMENTED_BY);
set(relationInverseMap, RESULT_RESULT, PART, IS_PART_OF, HAS_PART);
set(relationInverseMap, RESULT_RESULT, DEDUP, IS_MERGED_IN, MERGES);
set(relationInverseMap, RESULT_RESULT, DEDUP, IS_SIMILAR_TO, IS_SIMILAR_TO);
set(relationInverseMap, RESULT_RESULT, CITATION, IS_CITED_BY, CITES);
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_IDENTICAL_TO, IS_IDENTICAL_TO);
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_REFERENCED_BY, REFERENCES);
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_CONTINUED_BY, CONTINUES);
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_DOCUMENTED_BY, DOCUMENTS);
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_DERIVED_FROM, IS_SOURCE_OF);
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_RELATED_TO, IS_RELATED_TO);
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_COMPILED_BY, COMPILES);
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_DESCRIBED_BY, DESCRIBES);
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_METADATA_FOR, IS_METADATA_OF);
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, HAS_ASSOCIATION_WITH, HAS_ASSOCIATION_WITH);
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_REQUIRED_BY, REQUIRES);
set(relationInverseMap, RESULT_RESULT, VERSION, IS_PREVIOUS_VERSION_OF, IS_NEW_VERSION_OF);
set(relationInverseMap, RESULT_RESULT, VERSION, IS_VARIANT_FORM_OF, IS_ORIGINAL_FORM_OF);
set(relationInverseMap, RESULT_RESULT, VERSION, IS_OBSOLETED_BY, OBSOLETES);
set(relationInverseMap, RESULT_RESULT, VERSION, IS_VERSION_OF, HAS_VERSION);
set(relationInverseMap, RESULT_RESULT, REVIEW, IS_REVIEWED_BY, REVIEWS);
}
private static void set(Map<String, RelationInverse> relationInverseMap, String relType, String subRelType, String relClass, String inverseRelClass) {
relationInverseMap
.put(
"resultProject_outcome_isProducedBy", new RelationInverse()
.setRelation("isProducedBy")
.setInverse("produces")
.setRelType("resultProject")
.setSubReltype("outcome"));
relationInverseMap
.put(
"resultProject_outcome_produces", new RelationInverse()
.setInverse("isProducedBy")
.setRelation("produces")
.setRelType("resultProject")
.setSubReltype("outcome"));
relationInverseMap
.put(
"projectPerson_contactPerson_isContact", new RelationInverse()
.setRelation("isContact")
.setInverse("hasContact")
.setRelType("projectPerson")
.setSubReltype("contactPerson"));
relationInverseMap
.put(
"projectPerson_contactPerson_hasContact", new RelationInverse()
.setInverse("isContact")
.setRelation("hasContact")
.setRelType("personPerson")
.setSubReltype("coAuthorship"));
relationInverseMap
.put(
"personPerson_coAuthorship_isCoauthorOf", new RelationInverse()
.setInverse("isCoAuthorOf")
.setRelation("isCoAuthorOf")
.setRelType("personPerson")
.setSubReltype("coAuthorship"));
relationInverseMap
.put(
"personPerson_dedup_merges", new RelationInverse()
.setInverse("isMergedIn")
.setRelation("merges")
.setRelType("personPerson")
.setSubReltype("dedup"));
relationInverseMap
.put(
"personPerson_dedup_isMergedIn", new RelationInverse()
.setInverse("merges")
.setRelation("isMergedIn")
.setRelType("personPerson")
.setSubReltype("dedup"));
relationInverseMap
.put(
"personPerson_dedupSimilarity_isSimilarTo", new RelationInverse()
.setInverse("isSimilarTo")
.setRelation("isSimilarTo")
.setRelType("personPerson")
.setSubReltype("dedupSimilarity"));
relationInverseMap
.put(
"datasourceOrganization_provision_isProvidedBy", new RelationInverse()
.setInverse("provides")
.setRelation("isProvidedBy")
.setRelType("datasourceOrganization")
.setSubReltype("provision"));
relationInverseMap
.put(
"datasourceOrganization_provision_provides", new RelationInverse()
.setInverse("isProvidedBy")
.setRelation("provides")
.setRelType("datasourceOrganization")
.setSubReltype("provision"));
relationInverseMap
.put(
"resultResult_similarity_hasAmongTopNSimilarDocuments", new RelationInverse()
.setInverse("isAmongTopNSimilarDocuments")
.setRelation("hasAmongTopNSimilarDocuments")
.setRelType("resultResult")
.setSubReltype("similarity"));
relationInverseMap
.put(
"resultResult_similarity_isAmongTopNSimilarDocuments", new RelationInverse()
.setInverse("hasAmongTopNSimilarDocuments")
.setRelation("isAmongTopNSimilarDocuments")
.setRelType("resultResult")
.setSubReltype("similarity"));
relationInverseMap
.put(
"resultResult_relationship_isRelatedTo", new RelationInverse()
.setInverse("isRelatedTo")
.setRelation("isRelatedTo")
.setRelType("resultResult")
.setSubReltype("relationship"));
relationInverseMap
.put(
"resultResult_similarity_isAmongTopNSimilarDocuments", new RelationInverse()
.setInverse("hasAmongTopNSimilarDocuments")
.setRelation("isAmongTopNSimilarDocuments")
.setRelType("resultResult")
.setSubReltype("similarity"));
relationInverseMap
.put(
"resultResult_supplement_isSupplementTo", new RelationInverse()
.setInverse("isSupplementedBy")
.setRelation("isSupplementTo")
.setRelType("resultResult")
.setSubReltype("supplement"));
relationInverseMap
.put(
"resultResult_supplement_isSupplementedBy", new RelationInverse()
.setInverse("isSupplementTo")
.setRelation("isSupplementedBy")
.setRelType("resultResult")
.setSubReltype("supplement"));
relationInverseMap
.put(
"resultResult_part_isPartOf", new RelationInverse()
.setInverse("hasPart")
.setRelation("isPartOf")
.setRelType("resultResult")
.setSubReltype("part"));
relationInverseMap
.put(
"resultResult_part_hasPart", new RelationInverse()
.setInverse("isPartOf")
.setRelation("hasPart")
.setRelType("resultResult")
.setSubReltype("part"));
relationInverseMap
.put(
"resultResult_dedup_merges", new RelationInverse()
.setInverse("isMergedIn")
.setRelation("merges")
.setRelType("resultResult")
.setSubReltype("dedup"));
relationInverseMap
.put(
"resultResult_dedup_isMergedIn", new RelationInverse()
.setInverse("merges")
.setRelation("isMergedIn")
.setRelType("resultResult")
.setSubReltype("dedup"));
relationInverseMap
.put(
"resultResult_dedupSimilarity_isSimilarTo", new RelationInverse()
.setInverse("isSimilarTo")
.setRelation("isSimilarTo")
.setRelType("resultResult")
.setSubReltype("dedupSimilarity"));
.put(
rel(relType, subRelType, relClass), new RelationInverse()
.setInverseRelClass(inverseRelClass)
.setRelClass(relClass)
.setRelType(relType)
.setSubReltype(subRelType));
if (!relClass.equals(inverseRelClass)) {
relationInverseMap
.put(
rel(relType, subRelType, inverseRelClass), new RelationInverse()
.setInverseRelClass(relClass)
.setRelClass(inverseRelClass)
.setRelType(relType)
.setSubReltype(subRelType));
}
}
/**
* Helper method: lookup relation inverse, given the direct relation encoding (case insensitive)
* @param encoding
* @return the relation inverse descriptor, throws @IllegalArgumentException when not found.
*/
public static RelationInverse findInverse(String encoding) {
return ModelSupport.relationInverseMap
.entrySet()
.stream()
.filter(r -> encoding.equalsIgnoreCase(r.getKey()))
.findFirst()
.map(r -> r.getValue())
.orElseThrow(() -> new IllegalArgumentException("invalid relationship: " + encoding));
}
/**
* Helper method: fina a relation filtering by a relation name
* @param relationName
* @return
*/
public static RelationInverse findRelation(final String relationName) {
return relationInverseMap.values()
.stream()
.filter(r -> relationName.equalsIgnoreCase(r.getRelClass()))
.findFirst()
.orElse(null);
}
/**
* Helper method: combines the relation attributes
* @param relType
* @param subRelType
* @param relClass
* @return
*/
public static String rel(String relType, String subRelType, String relClass) {
return String.format("%s_%s_%s", relType, subRelType, relClass);
}
private static final String schemeTemplate = "dnet:%s_%s_relations";
public static final String DATE_FORMAT = "yyyy-MM-dd";
private ModelSupport() {
}
@ -381,6 +271,8 @@ public class ModelSupport {
Field.class,
GeoLocation.class,
Instance.class,
AccessRight.class,
OpenAccessRoute.class,
Journal.class,
KeyValue.class,
Oaf.class,
@ -480,6 +372,20 @@ public class ModelSupport {
return ((OafEntity) t).getId();
}
public static String md5(final String s) {
try {
final MessageDigest md = MessageDigest.getInstance("MD5");
md.update(s.getBytes(StandardCharsets.UTF_8));
return new String(Hex.encodeHex(md.digest()));
} catch (final NoSuchAlgorithmException e) {
throw new IllegalStateException(e);
}
}
public static String generateIdentifier(final String originalId, final String nsPrefix) {
return String.format("%s::%s", nsPrefix, md5(originalId));
}
public static String oldest(String dateA, String dateB) throws ParseException {
if (StringUtils.isBlank(dateA)) {
@ -490,12 +396,17 @@ public class ModelSupport {
}
if (StringUtils.isNotBlank(dateA) && StringUtils.isNotBlank(dateB)) {
final Date a = Date.from(Instant.from(DateTimeFormatter.ISO_INSTANT.parse(dateA)));
final Date b = Date.from(Instant.from(DateTimeFormatter.ISO_INSTANT.parse(dateB)));
final Date a = DateParserUtils.parseDate(dateA);
final Date b = DateParserUtils.parseDate(dateB);
return a.before(b) ? dateA : dateB;
if (Objects.nonNull(a) && Objects.nonNull(b)) {
return a.before(b) ? dateA : dateB;
} else {
return null;
}
} else {
return null;
}
}
}

View File

@ -0,0 +1,44 @@
package eu.dnetlib.dhp.schema.common;
import java.util.Comparator;
import eu.dnetlib.dhp.schema.oaf.Qualifier;
public class RefereedComparator implements Comparator<Qualifier> {
@Override
public int compare(Qualifier left, Qualifier right) {
if (left == null && right == null)
return 0;
if (left == null)
return 1;
if (right == null)
return -1;
String lClass = left.getClassid();
String rClass = right.getClassid();
if (lClass.equals(rClass))
return 0;
if (lClass.equals(ModelConstants.PEER_REVIEWED_CLASSID))
return -1;
if (rClass.equals(ModelConstants.PEER_REVIEWED_CLASSID))
return 1;
if (lClass.equals(ModelConstants.NON_PEER_REVIEWED_CLASSID))
return -1;
if (rClass.equals(ModelConstants.NON_PEER_REVIEWED_CLASSID))
return 1;
if (lClass.equals(ModelConstants.UNKNOWN))
return -1;
if (rClass.equals(ModelConstants.UNKNOWN))
return 1;
// Else (but unlikely), lexicographical ordering will do.
return lClass.compareTo(rClass);
}
}

View File

@ -2,8 +2,8 @@
package eu.dnetlib.dhp.schema.common;
public class RelationInverse {
private String relation;
private String inverse;
private String relClass;
private String inverseRelClass;
private String relType;
private String subReltype;
@ -25,21 +25,21 @@ public class RelationInverse {
return this;
}
public String getRelation() {
return relation;
public String getRelClass() {
return relClass;
}
public RelationInverse setRelation(String relation) {
this.relation = relation;
public RelationInverse setRelClass(String relClass) {
this.relClass = relClass;
return this;
}
public String getInverse() {
return inverse;
public String getInverseRelClass() {
return inverseRelClass;
}
public RelationInverse setInverse(String inverse) {
this.inverse = inverse;
public RelationInverse setInverseRelClass(String inverseRelClass) {
this.inverseRelClass = inverseRelClass;
return this;
}

View File

@ -1,29 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
/**
* Used to refer to the Article Processing Charge information. Not dumped in this release. It contains two parameters: -
* currency of type String to store the currency of the APC - amount of type String to stores the charged amount
*/
public class APC implements Serializable {
private String currency;
private String amount;
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
}

View File

@ -1,31 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
/**
* AccessRight. Used to represent the result access rights. It extends the eu.dnet.lib.dhp.schema.dump.oaf.Qualifier
* element with a parameter scheme of type String to store the scheme. Values for this element are found against the
* COAR access right scheme. The classid of the element accessright in eu.dnetlib.dhp.schema.oaf.Result is used to get
* the COAR corresponding code whose value will be used to set the code parameter. The COAR label corresponding to the
* COAR code will be used to set the label parameter. The scheme value will always be the one referring to the COAR
* access right scheme
*/
public class AccessRight extends Qualifier {
private String scheme;
public String getScheme() {
return scheme;
}
public void setScheme(String scheme) {
this.scheme = scheme;
}
public static AccessRight newInstance(String code, String label, String scheme) {
AccessRight ar = new AccessRight();
ar.setCode(code);
ar.setLabel(label);
ar.setScheme(scheme);
return ar;
}
}

View File

@ -1,73 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
import java.util.List;
/**
* Used to represent the generic author of the result. It has six parameters: - name of type String to store the given
* name of the author. The value for this parameter corresponds to eu.dnetlib.dhp.schema.oaf.Author name - surname of
* type String to store the family name of the author. The value for this parameter corresponds to
* eu.dnetlib.dhp.schema.oaf.Author surname - fullname of type String to store the fullname of the author. The value for
* this parameter corresponds to eu.dnetlib.dhp.schema.oaf.Author fullname - rank of type Integer to store the rank on
* the author in the result's authors list. The value for this parameter corresponds to eu.dnetlib.dhp.schema.oaf.Author
* rank - pid of type eu.dnetlib.dhp.schema.dump.oaf.Pid to store the persistent identifier for the author. For the
* moment only ORCID identifiers will be dumped. - The id element is instantiated by using the following values in the
* eu.dnetlib.dhp.schema.oaf.Result pid: * Qualifier.classid for scheme * value for value - The provenance element is
* instantiated only if the dataInfo is set for the pid in the result to be dumped. The provenance element is
* instantiated by using the following values in the eu.dnetlib.dhp.schema.oaf.Result pid: *
* dataInfo.provenanceaction.classname for provenance * dataInfo.trust for trust
*/
public class Author implements Serializable {
private String fullname;
private String name;
private String surname;
private Integer rank;
private Pid pid;
public String getFullname() {
return fullname;
}
public void setFullname(String fullname) {
this.fullname = fullname;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSurname() {
return surname;
}
public void setSurname(String surname) {
this.surname = surname;
}
public Integer getRank() {
return rank;
}
public void setRank(Integer rank) {
this.rank = rank;
}
public Pid getPid() {
return pid;
}
public void setPid(Pid pid) {
this.pid = pid;
}
}

View File

@ -1,136 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
import java.util.Objects;
/**
* To store information about the conference or journal where the result has been presented or published. It contains
* eleven parameters: - name of type String to store the name of the journal or conference. It corresponds to the
* parameter name of eu.dnetlib.dhp.schema.oaf.Journal - issnPrinted ot type String to store the journal printed issn.
* It corresponds to the parameter issnPrinted of eu.dnetlib.dhp.schema.oaf.Journal - issnOnline of type String to store
* the journal online issn. It corresponds to the parameter issnOnline of eu.dnetlib.dhp.schema.oaf.Journal -
* issnLinking of type String to store the journal linking issn. It corresponds to the parameter issnLinking of
* eu.dnetlib.dhp.schema.oaf.Journal - ep of type String to store the end page. It corresponds to the parameter ep of
* eu.dnetlib.dhp.schema.oaf.Journal - iss of type String to store the journal issue. It corresponds to the parameter
* iss of eu.dnetlib.dhp.schema.oaf.Journal - sp of type String to store the start page. It corresponds to the parameter
* sp of eu.dnetlib.dhp.schema.oaf.Journal - vol of type String to store the Volume. It corresponds to the parameter vol
* of eu.dnetlib.dhp.schema.oaf.Journal - edition of type String to store the edition of the journal or conference
* proceeding. It corresponds to the parameter edition of eu.dnetlib.dhp.schema.oaf.Journal - conferenceplace of type
* String to store the place of the conference. It corresponds to the parameter conferenceplace of
* eu.dnetlib.dhp.schema.oaf.Journal - conferencedate of type String to store the date of the conference. It corresponds
* to the parameter conferencedate of eu.dnetlib.dhp.schema.oaf.Journal
*/
public class Container implements Serializable {
private String name;
private String issnPrinted;
private String issnOnline;
private String issnLinking;
private String ep;
private String iss;
private String sp;
private String vol;
private String edition;
private String conferenceplace;
private String conferencedate;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getIssnPrinted() {
return issnPrinted;
}
public void setIssnPrinted(String issnPrinted) {
this.issnPrinted = issnPrinted;
}
public String getIssnOnline() {
return issnOnline;
}
public void setIssnOnline(String issnOnline) {
this.issnOnline = issnOnline;
}
public String getIssnLinking() {
return issnLinking;
}
public void setIssnLinking(String issnLinking) {
this.issnLinking = issnLinking;
}
public String getEp() {
return ep;
}
public void setEp(String ep) {
this.ep = ep;
}
public String getIss() {
return iss;
}
public void setIss(String iss) {
this.iss = iss;
}
public String getSp() {
return sp;
}
public void setSp(String sp) {
this.sp = sp;
}
public String getVol() {
return vol;
}
public void setVol(String vol) {
this.vol = vol;
}
public String getEdition() {
return edition;
}
public void setEdition(String edition) {
this.edition = edition;
}
public String getConferenceplace() {
return conferenceplace;
}
public void setConferenceplace(String conferenceplace) {
this.conferenceplace = conferenceplace;
}
public String getConferencedate() {
return conferencedate;
}
public void setConferencedate(String conferencedate) {
this.conferencedate = conferencedate;
}
}

View File

@ -1,38 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
/**
* To represent the information described by a scheme and a value in that scheme (i.e. pid). It has two parameters: -
* scheme of type String to store the scheme - value of type String to store the value in that scheme
*/
public class ControlledField implements Serializable {
private String scheme;
private String value;
public String getScheme() {
return scheme;
}
public void setScheme(String scheme) {
this.scheme = scheme;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static ControlledField newInstance(String scheme, String value) {
ControlledField cf = new ControlledField();
cf.setScheme(scheme);
cf.setValue(value);
return cf;
}
}

View File

@ -1,37 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
/**
* Represents the country associated to this result. It extends eu.dnetlib.dhp.schema.dump.oaf.Qualifier with a
* provenance parameter of type eu.dnetlib.dhp.schema.dumo.oaf.Provenance. The country in not mapped if its value in the
* result reprensented in the internal format is Unknown. The value for this element correspond to: - code corresponds
* to the classid of eu.dnetlib.dhp.schema.oaf.Country - label corresponds to the classname of
* eu.dnetlib.dhp.schema.oaf.Country - provenance set only if the dataInfo associated to the Country of the result to be
* dumped is not null. In this case : - provenance corresponds to dataInfo.provenanceaction.classid (to be modified with
* datainfo.provenanceaction.classname) - trust corresponds to dataInfo.trust
*/
public class Country extends Qualifier {
private Provenance provenance;
public Provenance getProvenance() {
return provenance;
}
public void setProvenance(Provenance provenance) {
this.provenance = provenance;
}
public static Country newInstance(String code, String label, Provenance provenance) {
Country c = new Country();
c.setProvenance(provenance);
c.setCode(code);
c.setLabel(label);
return c;
}
public static Country newInstance(String code, String label, String provenance, String trust) {
return newInstance(code, label, Provenance.newInstance(provenance, trust));
}
}

View File

@ -1,36 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
public class Funder implements Serializable {
private String shortName;
private String name;
private String jurisdiction;
public String getJurisdiction() {
return jurisdiction;
}
public void setJurisdiction(String jurisdiction) {
this.jurisdiction = jurisdiction;
}
public String getShortName() {
return shortName;
}
public void setShortName(String shortName) {
this.shortName = shortName;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@ -1,53 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
import org.apache.commons.lang3.StringUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
/**
* Represents the geolocation information. It has three parameters: - point of type String to store the point
* information. It corresponds to eu.dnetlib.dhp.schema.oaf.GeoLocation point - box ot type String to store the box
* information. It corresponds to eu.dnetlib.dhp.schema.oaf.GeoLocation box - place of type String to store the place
* information. It corresponds to eu.dnetlib.dhp.schema.oaf.GeoLocation place
*/
public class GeoLocation implements Serializable {
private String point;
private String box;
private String place;
public String getPoint() {
return point;
}
public void setPoint(String point) {
this.point = point;
}
public String getBox() {
return box;
}
public void setBox(String box) {
this.box = box;
}
public String getPlace() {
return place;
}
public void setPlace(String place) {
this.place = place;
}
@JsonIgnore
public boolean isBlank() {
return StringUtils.isBlank(point) && StringUtils.isBlank(box) && StringUtils.isBlank(place);
}
}

View File

@ -1,81 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
import java.util.List;
/**
* Represents the manifestations (i.e. different versions) of the result. For example: the pre-print and the published
* versions are two manifestations of the same research result. It has the following parameters: - license of type
* String to store the license applied to the instance. It corresponds to the value of the licence in the instance to be
* dumped - accessright of type eu.dnetlib.dhp.schema.dump.oaf.AccessRight to store the accessright of the instance. -
* type of type String to store the type of the instance as defined in the corresponding dnet vocabulary
* (dnet:pubication_resource). It corresponds to the instancetype.classname of the instance to be mapped - url of type
* List<String> list of locations where the instance is accessible. It corresponds to url of the instance to be dumped -
* publicationdate of type String to store the publication date of the instance ;// dateofacceptance; - refereed of type
* String to store information abour tthe review status of the instance. Possible values are 'Unknown',
* 'nonPeerReviewed', 'peerReviewed'. It corresponds to refereed.classname of the instance to be dumped
*/
public class Instance implements Serializable {
private String license;
private AccessRight accessright;
private String type;
private List<String> url;
private String publicationdate;// dateofacceptance;
private String refereed; // peer-review status
public String getLicense() {
return license;
}
public void setLicense(String license) {
this.license = license;
}
public AccessRight getAccessright() {
return accessright;
}
public void setAccessright(AccessRight accessright) {
this.accessright = accessright;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public List<String> getUrl() {
return url;
}
public void setUrl(List<String> url) {
this.url = url;
}
public String getPublicationdate() {
return publicationdate;
}
public void setPublicationdate(String publicationdate) {
this.publicationdate = publicationdate;
}
public String getRefereed() {
return refereed;
}
public void setRefereed(String refereed) {
this.refereed = refereed;
}
}

View File

@ -1,48 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
import org.apache.commons.lang3.StringUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
/**
* To represent the information described by a key and a value. It has two parameters: - key to store the key (generally
* the OpenAIRE id for some entity) - value to store the value (generally the OpenAIRE name for the key)
*/
public class KeyValue implements Serializable {
private String key;
private String value;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static KeyValue newInstance(String key, String value) {
KeyValue inst = new KeyValue();
inst.key = key;
inst.value = value;
return inst;
}
@JsonIgnore
public boolean isBlank() {
return StringUtils.isBlank(key) && StringUtils.isBlank(value);
}
}

View File

@ -1,45 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
/**
* To represent the generic persistent identifier. It has two parameters: - id of type
* eu.dnetlib.dhp.schema.dump.oaf.ControlledField to store the scheme and value of the Persistent Identifier. -
* provenance of type eu.dnetlib.dhp.schema.dump.oaf.Provenance to store the provenance and trust of the information
*/
public class Pid implements Serializable {
private ControlledField id;
private Provenance provenance;
public ControlledField getId() {
return id;
}
public void setId(ControlledField pid) {
this.id = pid;
}
public Provenance getProvenance() {
return provenance;
}
public void setProvenance(Provenance provenance) {
this.provenance = provenance;
}
public static Pid newInstance(ControlledField pid, Provenance provenance) {
Pid p = new Pid();
p.id = pid;
p.provenance = provenance;
return p;
}
public static Pid newInstance(ControlledField pid) {
Pid p = new Pid();
p.id = pid;
return p;
}
}

View File

@ -1,51 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
/**
* This class to store the common information about the project that will be dumped for community and for the whole
* graph - private String id to store the id of the project (OpenAIRE id) - private String code to store the grant
* agreement of the project - private String acronym to store the acronym of the project - private String title to store
* the tile of the project
*/
public class Project implements Serializable {
protected String id;// OpenAIRE id
protected String code;
protected String acronym;
protected String title;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getAcronym() {
return acronym;
}
public void setAcronym(String acronym) {
this.acronym = acronym;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}

View File

@ -1,41 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
/**
* Indicates the process that produced (or provided) the information, and the trust associated to the information. It
* has two parameters: - provenance of type String to store the provenance of the information, - trust of type String to
* store the trust associated to the information
*/
public class Provenance implements Serializable {
private String provenance;
private String trust;
public String getProvenance() {
return provenance;
}
public void setProvenance(String provenance) {
this.provenance = provenance;
}
public String getTrust() {
return trust;
}
public void setTrust(String trust) {
this.trust = trust;
}
public static Provenance newInstance(String provenance, String trust) {
Provenance p = new Provenance();
p.provenance = provenance;
p.trust = trust;
return p;
}
public String toString() {
return provenance + trust;
}
}

View File

@ -1,42 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
import org.apache.commons.lang3.StringUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
/**
* To represent the information described by a code and a value It has two parameters: - code to store the code
* (generally the classid of the eu.dnetlib.dhp.schema.oaf.Qualifier element) - label to store the label (generally the
* classname of the eu.dnetlib.dhp.schema.oaf.Qualifier element
*/
public class Qualifier implements Serializable {
private String code; // the classid in the Qualifier
private String label; // the classname in the Qualifier
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public static Qualifier newInstance(String code, String value) {
Qualifier qualifier = new Qualifier();
qualifier.setCode(code);
qualifier.setLabel(value);
return qualifier;
}
}

View File

@ -1,379 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
import java.util.List;
import eu.dnetlib.dhp.schema.dump.oaf.community.Project;
/**
* To represent the dumped result. It will be extended in the dump for Research Communities - Research
* Initiative/Infrastructures. It has the following parameters: - author of type
* List<eu.dnetlib.dhpschema.dump.oaf.Author> to describe the authors of a result. For each author in the result
* represented in the internal model one author in the esternal model is produced. - type of type String to represent
* the category of the result. Possible values are publication, dataset, software, other. It corresponds to
* resulttype.classname of the dumped result - language of type eu.dnetlib.dhp.schema.dump.oaf.Qualifier to store
* information about the language of the result. It is dumped as - code corresponds to language.classid - value
* corresponds to language.classname - country of type List<eu.dnetlib.dhp.schema.dump.oaf.Country> to store the country
* list to which the result is associated. For each country in the result respresented in the internal model one country
* in the external model is produces - subjects of type List<eu.dnetlib.dhp.dump.oaf.Subject> to store the subjects for
* the result. For each subject in the result represented in the internal model one subject in the external model is
* produced - maintitle of type String to store the main title of the result. It corresponds to the value of the first
* title in the resul to be dumped having classid equals to "main title" - subtitle of type String to store the subtitle
* of the result. It corresponds to the value of the first title in the resul to be dumped having classid equals to
* "subtitle" - description of type List<String> to store the description of the result. It corresponds to the list of
* description.value in the result represented in the internal model - publicationdate of type String to store the
* pubblication date. It corresponds to dateofacceptance.value in the result represented in the internal model -
* publisher of type String to store information about the publisher. It corresponds to publisher.value of the result
* represented in the intrenal model - embargoenddate of type String to store the embargo end date. It corresponds to
* embargoenddate.value of the result represented in the internal model - source of type List<String> See definition of
* Dublin Core field dc:source. It corresponds to the list of source.value in the result represented in the internal
* model - format of type List<String> It corresponds to the list of format.value in the result represented in the
* internal model - contributor of type List<String> to represent contributors for this result. It corresponds to the
* list of contributor.value in the result represented in the internal model - coverage of type String. It corresponds
* to the list of coverage.value in the result represented in the internal model - bestaccessright of type
* eu.dnetlib.dhp.schema.dump.oaf.AccessRight to store informatin about the openest access right associated to the
* manifestations of this research results. It corresponds to the same parameter in the result represented in the
* internal model - container of type eu.dnetlib.dhp.schema/dump.oaf.Container (only for result of type publication). It
* corresponds to the parameter journal of the result represented in the internal model - documentationUrl of type
* List<String> (only for results of type software) to store the URLs to the software documentation. It corresponds to
* the list of documentationUrl.value of the result represented in the internal model - codeRepositoryUrl of type String
* (only for results of type software) to store the URL to the repository with the source code. It corresponds to
* codeRepositoryUrl.value of the result represented in the internal model - programmingLanguage of type String (only
* for results of type software) to store the programming language. It corresponds to programmingLanguaga.classid of the
* result represented in the internal model - contactperson of type List<String> (only for results of type other) to
* store the contact person for this result. It corresponds to the list of contactperson.value of the result represented
* in the internal model - contactgroup of type List<String> (only for results of type other) to store the information
* for the contact group. It corresponds to the list of contactgroup.value of the result represented in the internal
* model - tool of type List<String> (only fro results of type other) to store information about tool useful for the
* interpretation and/or re-used of the research product. It corresponds to the list of tool.value in the result
* represented in the internal modelt - size of type String (only for results of type dataset) to store the size of the
* dataset. It corresponds to size.value in the result represented in the internal model - version of type String (only
* for results of type dataset) to store the version. It corresponds to version.value of the result represented in the
* internal model - geolocation fo type List<eu.dnetlib.dhp.schema.dump.oaf.GeoLocation> (only for results of type
* dataset) to store geolocation information. For each geolocation element in the result represented in the internal
* model a GeoLocation in the external model il produced - id of type String to store the OpenAIRE id of the result. It
* corresponds to the id of the result represented in the internal model - originalId of type List<String> to store the
* original ids of the result. It corresponds to the originalId of the result represented in the internal model - pid of
* type List<eu.dnetlib.dhp.schema.dump.oaf.ControlledField> to store the persistent identifiers for the result. For
* each pid in the results represented in the internal model one pid in the external model is produced. The value
* correspondence is: - scheme corresponds to pid.qualifier.classid of the result represented in the internal model -
* value corresponds to the pid.value of the result represented in the internal model - dateofcollection of type String
* to store information about the time OpenAIRE collected the record. It corresponds to dateofcollection of the result
* represented in the internal model - lasteupdatetimestamp of type String to store the timestamp of the last update of
* the record. It corresponds to lastupdatetimestamp of the resord represented in the internal model
*/
public class Result implements Serializable {
private List<Author> author;
// resulttype allows subclassing results into publications | datasets | software
private String type; // resulttype
// common fields
private Qualifier language;
private List<Country> country;
private List<Subject> subjects;
private String maintitle;
private String subtitle;
private List<String> description;
private String publicationdate; // dateofacceptance;
private String publisher;
private String embargoenddate;
private List<String> source;
private List<String> format;
private List<String> contributor;
private List<String> coverage;
private AccessRight bestaccessright;
private Container container;// Journal
private List<String> documentationUrl; // software
private String codeRepositoryUrl; // software
private String programmingLanguage; // software
private List<String> contactperson; // orp
private List<String> contactgroup; // orp
private List<String> tool; // orp
private String size; // dataset
private String version; // dataset
private List<GeoLocation> geolocation; // dataset
private String id;
private List<String> originalId;
private List<ControlledField> pid;
private String dateofcollection;
private Long lastupdatetimestamp;
public Long getLastupdatetimestamp() {
return lastupdatetimestamp;
}
public void setLastupdatetimestamp(Long lastupdatetimestamp) {
this.lastupdatetimestamp = lastupdatetimestamp;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public List<String> getOriginalId() {
return originalId;
}
public void setOriginalId(List<String> originalId) {
this.originalId = originalId;
}
public List<ControlledField> getPid() {
return pid;
}
public void setPid(List<ControlledField> pid) {
this.pid = pid;
}
public String getDateofcollection() {
return dateofcollection;
}
public void setDateofcollection(String dateofcollection) {
this.dateofcollection = dateofcollection;
}
public List<Author> getAuthor() {
return author;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Container getContainer() {
return container;
}
public void setContainer(Container container) {
this.container = container;
}
public void setAuthor(List<Author> author) {
this.author = author;
}
public Qualifier getLanguage() {
return language;
}
public void setLanguage(Qualifier language) {
this.language = language;
}
public List<Country> getCountry() {
return country;
}
public void setCountry(List<Country> country) {
this.country = country;
}
public List<Subject> getSubjects() {
return subjects;
}
public void setSubjects(List<Subject> subjects) {
this.subjects = subjects;
}
public String getMaintitle() {
return maintitle;
}
public void setMaintitle(String maintitle) {
this.maintitle = maintitle;
}
public String getSubtitle() {
return subtitle;
}
public void setSubtitle(String subtitle) {
this.subtitle = subtitle;
}
public List<String> getDescription() {
return description;
}
public void setDescription(List<String> description) {
this.description = description;
}
public String getPublicationdate() {
return publicationdate;
}
public void setPublicationdate(String publicationdate) {
this.publicationdate = publicationdate;
}
public String getPublisher() {
return publisher;
}
public void setPublisher(String publisher) {
this.publisher = publisher;
}
public String getEmbargoenddate() {
return embargoenddate;
}
public void setEmbargoenddate(String embargoenddate) {
this.embargoenddate = embargoenddate;
}
public List<String> getSource() {
return source;
}
public void setSource(List<String> source) {
this.source = source;
}
public List<String> getFormat() {
return format;
}
public void setFormat(List<String> format) {
this.format = format;
}
public List<String> getContributor() {
return contributor;
}
public void setContributor(List<String> contributor) {
this.contributor = contributor;
}
public List<String> getCoverage() {
return coverage;
}
public void setCoverage(List<String> coverage) {
this.coverage = coverage;
}
public AccessRight getBestaccessright() {
return bestaccessright;
}
public void setBestaccessright(AccessRight bestaccessright) {
this.bestaccessright = bestaccessright;
}
public List<String> getDocumentationUrl() {
return documentationUrl;
}
public void setDocumentationUrl(List<String> documentationUrl) {
this.documentationUrl = documentationUrl;
}
public String getCodeRepositoryUrl() {
return codeRepositoryUrl;
}
public void setCodeRepositoryUrl(String codeRepositoryUrl) {
this.codeRepositoryUrl = codeRepositoryUrl;
}
public String getProgrammingLanguage() {
return programmingLanguage;
}
public void setProgrammingLanguage(String programmingLanguage) {
this.programmingLanguage = programmingLanguage;
}
public List<String> getContactperson() {
return contactperson;
}
public void setContactperson(List<String> contactperson) {
this.contactperson = contactperson;
}
public List<String> getContactgroup() {
return contactgroup;
}
public void setContactgroup(List<String> contactgroup) {
this.contactgroup = contactgroup;
}
public List<String> getTool() {
return tool;
}
public void setTool(List<String> tool) {
this.tool = tool;
}
public String getSize() {
return size;
}
public void setSize(String size) {
this.size = size;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public List<GeoLocation> getGeolocation() {
return geolocation;
}
public void setGeolocation(List<GeoLocation> geolocation) {
this.geolocation = geolocation;
}
}

View File

@ -1,34 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
/**
* To represent keywords associated to the result. It has two parameters: - subject of type
* eu.dnetlib.dhp.schema.dump.oaf.ControlledField to describe the subject. It mapped as: - schema it corresponds to
* qualifier.classid of the dumped subject - value it corresponds to the subject value - provenance of type
* eu.dnetlib.dhp.schema.dump.oaf.Provenance to represent the provenance of the subject. It is dumped only if dataInfo
* is not null. In this case: - provenance corresponds to dataInfo.provenanceaction.classname - trust corresponds to
* dataInfo.trust
*/
public class Subject implements Serializable {
private ControlledField subject;
private Provenance provenance;
public ControlledField getSubject() {
return subject;
}
public void setSubject(ControlledField subject) {
this.subject = subject;
}
public Provenance getProvenance() {
return provenance;
}
public void setProvenance(Provenance provenance) {
this.provenance = provenance;
}
}

View File

@ -1,36 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.community;
import eu.dnetlib.dhp.schema.dump.oaf.Instance;
import eu.dnetlib.dhp.schema.dump.oaf.KeyValue;
/**
* It extends eu.dnetlib.dhp.dump.oaf.Instance with values related to the community dump. In the Result dump this
* information is not present because it is dumped as a set of relations between the result and the datasource. -
* hostedby of type eu.dnetlib.dhp.schema.dump.oaf.KeyValue to store the information about the source from which the
* instance can be viewed or downloaded. It is mapped against the hostedby parameter of the instance to be dumped and -
* key corresponds to hostedby.key - value corresponds to hostedby.value - collectedfrom of type
* eu.dnetlib.dhp.schema.dump.oaf.KeyValue to store the information about the source from which the instance has been
* collected. It is mapped against the collectedfrom parameter of the instance to be dumped and - key corresponds to
* collectedfrom.key - value corresponds to collectedfrom.value
*/
public class CommunityInstance extends Instance {
private KeyValue hostedby;
private KeyValue collectedfrom;
public KeyValue getHostedby() {
return hostedby;
}
public void setHostedby(KeyValue hostedby) {
this.hostedby = hostedby;
}
public KeyValue getCollectedfrom() {
return collectedfrom;
}
public void setCollectedfrom(KeyValue collectedfrom) {
this.collectedfrom = collectedfrom;
}
}

View File

@ -1,63 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.community;
import java.util.List;
import eu.dnetlib.dhp.schema.dump.oaf.KeyValue;
import eu.dnetlib.dhp.schema.dump.oaf.Result;
/**
* extends eu.dnetlib.dhp.schema.dump.oaf.Result with the following parameters: - projects of type
* List<eu.dnetlib.dhp.schema.dump.oaf.community.Project> to store the list of projects related to the result. The
* information is added after the result is mapped to the external model - context of type
* List<eu.dnetlib.dhp.schema.dump.oaf.community.Context> to store information about the RC RI related to the result.
* For each context in the result represented in the internal model one context in the external model is produced -
* collectedfrom of type List<eu.dnetliv.dhp.schema.dump.oaf.KeyValue> to store information about the sources from which
* the record has been collected. For each collectedfrom in the result represented in the internal model one
* collectedfrom in the external model is produced - instance of type
* List<eu.dnetlib.dhp.schema.dump.oaf.community.CommunityInstance> to store all the instances associated to the result.
* It corresponds to the same parameter in the result represented in the internal model
*/
public class CommunityResult extends Result {
private List<Project> projects;
private List<Context> context;
protected List<KeyValue> collectedfrom;
private List<CommunityInstance> instance;
public List<CommunityInstance> getInstance() {
return instance;
}
public void setInstance(List<CommunityInstance> instance) {
this.instance = instance;
}
public List<KeyValue> getCollectedfrom() {
return collectedfrom;
}
public void setCollectedfrom(List<KeyValue> collectedfrom) {
this.collectedfrom = collectedfrom;
}
public List<Project> getProjects() {
return projects;
}
public void setProjects(List<Project> projects) {
this.projects = projects;
}
public List<Context> getContext() {
return context;
}
public void setContext(List<Context> context) {
this.context = context;
}
}

View File

@ -1,40 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.community;
import java.util.List;
import java.util.Objects;
import eu.dnetlib.dhp.schema.dump.oaf.Provenance;
import eu.dnetlib.dhp.schema.dump.oaf.Qualifier;
/**
* Reference to a relevant research infrastructure, initiative or community (RI/RC) among those collaborating with
* OpenAIRE. It extend eu.dnetlib.dhp.shema.dump.oaf.Qualifier with a parameter provenance of type
* List<eu.dnetlib.dhp.schema.dump.oaf.Provenance> to store the provenances of the association between the result and
* the RC/RI. The values for this element correspond to: - code: it corresponds to the id of the context in the result
* to be mapped. If the context id refers to a RC/RI and contains '::' only the part of the id before the first "::"
* will be used as value for code - label it corresponds to the label associated to the id. The information id taken
* from the profile of the RC/RI - provenance it is set only if the dataInfo associated to the contenxt element of the
* result to be dumped is not null. For each dataInfo one instance of type eu.dnetlib.dhp.schema.dump.oaf.Provenance is
* instantiated if the element datainfo.provenanceaction is not null. In this case - provenance corresponds to
* dataInfo.provenanceaction.classname - trust corresponds to dataInfo.trust
*/
public class Context extends Qualifier {
private List<Provenance> provenance;
public List<Provenance> getProvenance() {
return provenance;
}
public void setProvenance(List<Provenance> provenance) {
this.provenance = provenance;
}
@Override
public int hashCode() {
String provenance = new String();
this.provenance.forEach(p -> provenance.concat(p.toString()));
return Objects.hash(getCode(), getLabel(), provenance);
}
}

View File

@ -1,23 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.community;
import java.io.Serializable;
/**
* To store information about the funder funding the project related to the result. It has the following parameters: -
* shortName of type String to store the funder short name (e.c. AKA). - name of type String to store the funder name
* (e.c. Akademy of Finland) - fundingStream of type String to store the funding stream - jurisdiction of type String to
* store the jurisdiction of the funder
*/
public class Funder extends eu.dnetlib.dhp.schema.dump.oaf.Funder {
private String fundingStream;
public String getFundingStream() {
return fundingStream;
}
public void setFundingStream(String fundingStream) {
this.fundingStream = fundingStream;
}
}

View File

@ -1,47 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.community;
import java.io.Serializable;
import eu.dnetlib.dhp.schema.dump.oaf.Provenance;
/**
* To store information about the project related to the result. This information is not directly mapped from the result
* represented in the internal model because it is not there. The mapped result will be enriched with project
* information derived by relation between results and projects. Project extends eu.dnetlib.dhp.schema.dump.oaf.Project
* with the following parameters: - funder of type eu.dnetlib.dhp.schema.dump.oaf.community.Funder to store information
* about the funder funding the project - provenance of type eu.dnetlib.dhp.schema.dump.oaf.Provenance to store
* information about the. provenance of the association between the result and the project
*/
public class Project extends eu.dnetlib.dhp.schema.dump.oaf.Project {
private Funder funder;
private Provenance provenance;
public Provenance getProvenance() {
return provenance;
}
public void setProvenance(Provenance provenance) {
this.provenance = provenance;
}
public Funder getFunder() {
return funder;
}
public void setFunder(Funder funders) {
this.funder = funders;
}
public static Project newInstance(String id, String code, String acronym, String title, Funder funder) {
Project project = new Project();
project.setAcronym(acronym);
project.setCode(code);
project.setFunder(funder);
project.setId(id);
project.setTitle(title);
return project;
}
}

View File

@ -1,21 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.io.Serializable;
public class Constants implements Serializable {
// collectedFrom va con isProvidedBy -> becco da ModelSupport
public static final String HOSTED_BY = "isHostedBy";
public static final String HOSTS = "hosts";
// community result uso isrelatedto
public static final String RESULT_ENTITY = "result";
public static final String DATASOURCE_ENTITY = "datasource";
public static final String CONTEXT_ENTITY = "context";
public static final String CONTEXT_ID = "60";
public static final String CONTEXT_NS_PREFIX = "context____";
}

View File

@ -1,316 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.io.Serializable;
import java.util.List;
import eu.dnetlib.dhp.schema.dump.oaf.Container;
import eu.dnetlib.dhp.schema.dump.oaf.ControlledField;
import eu.dnetlib.dhp.schema.dump.oaf.KeyValue;
/**
* To store information about the datasource OpenAIRE collects information from. It contains the following parameters: -
* id of type String to store the OpenAIRE id for the datasource. It corresponds to the parameter id of the datasource
* represented in the internal model - originalId of type List<String> to store the list of original ids associated to
* the datasource. It corresponds to the parameter originalId of the datasource represented in the internal model. The
* null values are filtered out - pid of type List<eu.dnetlib.shp.schema.dump.oaf.ControlledField> to store the
* persistent identifiers for the datasource. For each pid in the datasource represented in the internal model one pid
* in the external model is produced as : - schema corresponds to pid.qualifier.classid of the datasource represented in
* the internal model - value corresponds to pid.value of the datasource represented in the internal model -
* datasourceType of type eu.dnetlib.dhp.schema.dump.oaf.ControlledField to store the datasource type (e.g.
* pubsrepository::institutional, Institutional Repository) as in the dnet vocabulary dnet:datasource_typologies. It
* corresponds to datasourcetype of the datasource represented in the internal model and : - code corresponds to
* datasourcetype.classid - value corresponds to datasourcetype.classname - openairecompatibility of type String to
* store information about the OpenAIRE compatibility of the ingested results (which guidelines they are compliant to).
* It corresponds to openairecompatibility.classname of the datasource represented in the internal model - officialname
* of type Sgtring to store the official name of the datasource. It correspond to officialname.value of the datasource
* represented in the internal model - englishname of type String to store the English name of the datasource. It
* corresponds to englishname.value of the datasource represented in the internal model - websiteurl of type String to
* store the URL of the website of the datasource. It corresponds to websiteurl.value of the datasource represented in
* the internal model - logourl of type String to store the URL of the logo for the datasource. It corresponds to
* logourl.value of the datasource represented in the internal model - dateofvalidation of type String to store the data
* of validation against the guidelines for the datasource records. It corresponds to dateofvalidation.value of the
* datasource represented in the internal model - description of type String to store the description for the
* datasource. It corresponds to description.value of the datasource represented in the internal model
*/
public class Datasource implements Serializable {
private String id; // string
private List<String> originalId; // list string
private List<ControlledField> pid; // list<String>
private ControlledField datasourcetype; // value
private String openairecompatibility; // value
private String officialname; // string
private String englishname; // string
private String websiteurl; // string
private String logourl; // string
private String dateofvalidation; // string
private String description; // description
private List<String> subjects; // List<String>
// opendoar specific fields (od*)
private List<String> languages; // odlanguages List<String>
private List<String> contenttypes; // odcontent types List<String>
// re3data fields
private String releasestartdate; // string
private String releaseenddate; // string
private String missionstatementurl; // string
// {open, restricted or closed}
private String accessrights; // databaseaccesstype string
// {open, restricted or closed}
private String uploadrights; // datauploadtype string
// {feeRequired, registration, other}
private String databaseaccessrestriction; // string
// {feeRequired, registration, other}
private String datauploadrestriction; // string
private Boolean versioning; // boolean
private String citationguidelineurl; // string
// {yes, no, uknown}
private String pidsystems; // string
private String certificates; // string
private List<Object> policies; //
private Container journal; // issn etc del Journal
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public List<String> getOriginalId() {
return originalId;
}
public void setOriginalId(List<String> originalId) {
this.originalId = originalId;
}
public List<ControlledField> getPid() {
return pid;
}
public void setPid(List<ControlledField> pid) {
this.pid = pid;
}
public ControlledField getDatasourcetype() {
return datasourcetype;
}
public void setDatasourcetype(ControlledField datasourcetype) {
this.datasourcetype = datasourcetype;
}
public String getOpenairecompatibility() {
return openairecompatibility;
}
public void setOpenairecompatibility(String openairecompatibility) {
this.openairecompatibility = openairecompatibility;
}
public String getOfficialname() {
return officialname;
}
public void setOfficialname(String officialname) {
this.officialname = officialname;
}
public String getEnglishname() {
return englishname;
}
public void setEnglishname(String englishname) {
this.englishname = englishname;
}
public String getWebsiteurl() {
return websiteurl;
}
public void setWebsiteurl(String websiteurl) {
this.websiteurl = websiteurl;
}
public String getLogourl() {
return logourl;
}
public void setLogourl(String logourl) {
this.logourl = logourl;
}
public String getDateofvalidation() {
return dateofvalidation;
}
public void setDateofvalidation(String dateofvalidation) {
this.dateofvalidation = dateofvalidation;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public List<String> getSubjects() {
return subjects;
}
public void setSubjects(List<String> subjects) {
this.subjects = subjects;
}
public List<String> getLanguages() {
return languages;
}
public void setLanguages(List<String> languages) {
this.languages = languages;
}
public List<String> getContenttypes() {
return contenttypes;
}
public void setContenttypes(List<String> contenttypes) {
this.contenttypes = contenttypes;
}
public String getReleasestartdate() {
return releasestartdate;
}
public void setReleasestartdate(String releasestartdate) {
this.releasestartdate = releasestartdate;
}
public String getReleaseenddate() {
return releaseenddate;
}
public void setReleaseenddate(String releaseenddate) {
this.releaseenddate = releaseenddate;
}
public String getMissionstatementurl() {
return missionstatementurl;
}
public void setMissionstatementurl(String missionstatementurl) {
this.missionstatementurl = missionstatementurl;
}
public String getAccessrights() {
return accessrights;
}
public void setAccessrights(String accessrights) {
this.accessrights = accessrights;
}
public String getUploadrights() {
return uploadrights;
}
public void setUploadrights(String uploadrights) {
this.uploadrights = uploadrights;
}
public String getDatabaseaccessrestriction() {
return databaseaccessrestriction;
}
public void setDatabaseaccessrestriction(String databaseaccessrestriction) {
this.databaseaccessrestriction = databaseaccessrestriction;
}
public String getDatauploadrestriction() {
return datauploadrestriction;
}
public void setDatauploadrestriction(String datauploadrestriction) {
this.datauploadrestriction = datauploadrestriction;
}
public Boolean getVersioning() {
return versioning;
}
public void setVersioning(Boolean versioning) {
this.versioning = versioning;
}
public String getCitationguidelineurl() {
return citationguidelineurl;
}
public void setCitationguidelineurl(String citationguidelineurl) {
this.citationguidelineurl = citationguidelineurl;
}
public String getPidsystems() {
return pidsystems;
}
public void setPidsystems(String pidsystems) {
this.pidsystems = pidsystems;
}
public String getCertificates() {
return certificates;
}
public void setCertificates(String certificates) {
this.certificates = certificates;
}
public List<Object> getPolicies() {
return policies;
}
public void setPolicies(List<Object> policiesr3) {
this.policies = policiesr3;
}
public Container getJournal() {
return journal;
}
public void setJournal(Container journal) {
this.journal = journal;
}
}

View File

@ -1,22 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.io.Serializable;
/**
* To store information about the funder funding the project related to the result. It extends
* eu.dnetlib.dhp.schema.dump.oaf.Funder with the following parameter: - - private
* eu.dnetdlib.dhp.schema.dump.oaf.graph.Fundings funding_stream to store the fundingstream
*/
public class Funder extends eu.dnetlib.dhp.schema.dump.oaf.Funder {
private Fundings funding_stream;
public Fundings getFunding_stream() {
return funding_stream;
}
public void setFunding_stream(Fundings funding_stream) {
this.funding_stream = funding_stream;
}
}

View File

@ -1,35 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.io.Serializable;
/**
* To store inforamtion about the funding stream. It has two parameters: - private String id to store the id of the
* fundings stream. The id is created by appending the shortname of the funder to the name of each level in the xml
* representing the fundng stream. For example: if the funder is the European Commission, the funding level 0 name is
* FP7, the funding level 1 name is SP3 and the funding level 2 name is PEOPLE then the id will be: EC::FP7::SP3::PEOPLE
* - private String description to describe the funding stream. It is created by concatenating the description of each
* funding level so for the example above the description would be: SEVENTH FRAMEWORK PROGRAMME - SP3-People -
* Marie-Curie Actions
*/
public class Fundings implements Serializable {
private String id;
private String description;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}

View File

@ -1,55 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.io.Serializable;
import java.util.Optional;
/**
* To describe the funded amount. It has the following parameters: - private String currency to store the currency of
* the fund - private float totalcost to store the total cost of the project - private float fundedamount to store the
* funded amount by the funder
*/
public class Granted implements Serializable {
private String currency;
private float totalcost;
private float fundedamount;
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public float getTotalcost() {
return totalcost;
}
public void setTotalcost(float totalcost) {
this.totalcost = totalcost;
}
public float getFundedamount() {
return fundedamount;
}
public void setFundedamount(float fundedamount) {
this.fundedamount = fundedamount;
}
public static Granted newInstance(String currency, float totalcost, float fundedamount) {
Granted granted = new Granted();
granted.currency = currency;
granted.totalcost = totalcost;
granted.fundedamount = fundedamount;
return granted;
}
public static Granted newInstance(String currency, float fundedamount) {
Granted granted = new Granted();
granted.currency = currency;
granted.fundedamount = fundedamount;
return granted;
}
}

View File

@ -1,24 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.util.List;
import eu.dnetlib.dhp.schema.dump.oaf.Instance;
import eu.dnetlib.dhp.schema.dump.oaf.Result;
/**
* It extends the eu.dnetlib.dhp.schema.dump.oaf.Result with - instance of type
* List<eu.dnetlib.dhp.schema.dump.oaf.Instance> to store all the instances associated to the result. It corresponds to
* the same parameter in the result represented in the internal model
*/
public class GraphResult extends Result {
private List<Instance> instance;
public List<Instance> getInstance() {
return instance;
}
public void setInstance(List<Instance> instance) {
this.instance = instance;
}
}

View File

@ -1,82 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.io.Serializable;
/**
* To store information about the classification for the project. The classification depends on the programme. For example
* H2020-EU.3.4.5.3 can be classified as
* H2020-EU.3. => Societal Challenges (level1)
* H2020-EU.3.4. => Transport (level2)
* H2020-EU.3.4.5. => CLEANSKY2 (level3)
* H2020-EU.3.4.5.3. => IADP Fast Rotorcraft (level4)
*
* We decided to explicitly represent up to three levels in the classification.
*
* H2020Classification has the following parameters:
* - private Programme programme to store the information about the programme related to this classification
* - private String level1 to store the information about the level 1 of the classification (Priority or Pillar of the EC)
* - private String level2 to store the information about the level2 af the classification (Objectives (?))
* - private String level3 to store the information about the level3 of the classification
* - private String classification to store the entire classification related to the programme
*/
public class H2020Classification implements Serializable {
private Programme programme;
private String level1;
private String level2;
private String level3;
private String classification;
public Programme getProgramme() {
return programme;
}
public void setProgramme(Programme programme) {
this.programme = programme;
}
public String getLevel1() {
return level1;
}
public void setLevel1(String level1) {
this.level1 = level1;
}
public String getLevel2() {
return level2;
}
public void setLevel2(String level2) {
this.level2 = level2;
}
public String getLevel3() {
return level3;
}
public void setLevel3(String level3) {
this.level3 = level3;
}
public String getClassification() {
return classification;
}
public void setClassification(String classification) {
this.classification = classification;
}
public static H2020Classification newInstance(String programme_code, String programme_description, String level1,
String level2, String level3, String classification) {
H2020Classification h2020classification = new H2020Classification();
h2020classification.programme = Programme.newInstance(programme_code, programme_description);
h2020classification.level1 = level1;
h2020classification.level2 = level2;
h2020classification.level3 = level3;
h2020classification.classification = classification;
return h2020classification;
}
}

View File

@ -1,38 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.io.Serializable;
/**
* To represent the generic node in a relation. It has the following parameters: - private String id the openaire id of
* the entity in the relation - private String type the type of the entity in the relation. Consider the generic
* relation between a Result R and a Project P, the node representing R will have as id the id of R and as type result,
* while the node representing the project will have as id the id of the project and as type project
*/
public class Node implements Serializable {
private String id;
private String type;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public static Node newInstance(String id, String type) {
Node node = new Node();
node.id = id;
node.type = type;
return node;
}
}

View File

@ -1,86 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.io.Serializable;
import java.util.List;
import eu.dnetlib.dhp.schema.dump.oaf.ControlledField;
import eu.dnetlib.dhp.schema.dump.oaf.Country;
import eu.dnetlib.dhp.schema.dump.oaf.KeyValue;
import eu.dnetlib.dhp.schema.dump.oaf.Qualifier;
import eu.dnetlib.dhp.schema.dump.oaf.community.Project;
/**
* To represent the generic organizaiton. It has the following parameters: - private String legalshortname to store the
* legalshortname of the organizaiton - private String legalname to store the legal name of the organization - private
* String websiteurl to store the websiteurl of the organization - private List<String> alternativenames to store the
* alternative names of the organization - private Qualifier country to store the country of the organization - private
* String id to store the id of the organization - private List<ControlledField> pid to store the list of pids for the
* organization
*/
public class Organization implements Serializable {
private String legalshortname;
private String legalname;
private String websiteurl;
private List<String> alternativenames;
private Qualifier country;
private String id;
private List<ControlledField> pid;
public String getLegalshortname() {
return legalshortname;
}
public void setLegalshortname(String legalshortname) {
this.legalshortname = legalshortname;
}
public String getLegalname() {
return legalname;
}
public void setLegalname(String legalname) {
this.legalname = legalname;
}
public String getWebsiteurl() {
return websiteurl;
}
public void setWebsiteurl(String websiteurl) {
this.websiteurl = websiteurl;
}
public List<String> getAlternativenames() {
return alternativenames;
}
public void setAlternativenames(List<String> alternativenames) {
this.alternativenames = alternativenames;
}
public Qualifier getCountry() {
return country;
}
public void setCountry(Qualifier country) {
this.country = country;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public List<ControlledField> getPid() {
return pid;
}
public void setPid(List<ControlledField> pid) {
this.pid = pid;
}
}

View File

@ -1,36 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.io.Serializable;
/**
* To store information about the ec programme for the project. It has the following parameters: - private String code
* to store the code of the programme - private String description to store the description of the programme
*/
public class Programme implements Serializable {
private String code;
private String description;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public static Programme newInstance(String code, String description) {
Programme p = new Programme();
p.code = code;
p.description = description;
return p;
}
}

View File

@ -1,192 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.io.Serializable;
import java.util.List;
/**
* This is the class representing the Project in the model used for the dumps of the whole graph. At the moment the dump
* of the Projects differs from the other dumps because we do not create relations between Funders (Organization) and
* Projects but we put the information about the Funder within the Project representation. We also removed the
* collected from element from the Project. No relation between the Project and the Datasource entity from which it is
* collected will be created. We will never create relations between Project and Datasource. In case some relation will
* be extracted from the Project they will refer the Funder and will be of type ( organization -> funds -> project,
* project -> isFundedBy -> organization) We also removed the duration parameter because the most of times it is set to
* 0. It has the following parameters:
* - private String id to store the id of the project (OpenAIRE id)
* - private String websiteurl to store the websiteurl of the project
* - private String code to store the grant agreement of the project
* - private String acronym to store the acronym of the project
* - private String title to store the tile of the project
* - private String startdate to store the start date
* - private String enddate to store the end date
* - private String callidentifier to store the call indentifier
* - private String keywords to store the keywords
* - private boolean openaccessmandateforpublications to store if the project must accomplish to the open access mandate
* for publications. This value will be set to true if one of the field in the project represented in the internal model
* is set to true
* - private boolean openaccessmandatefordataset to store if the project must accomplish to the open access mandate for
* dataset. It is set to the value in the corresponding filed of the project represented in the internal model
* - private List<String> subject to store the list of subjects of the project
* - private List<Funder> funding to store the list of funder of the project
* - private String summary to store the summary of the project
* - private Granted granted to store the granted amount
* - private List<Programme> h2020programme to store the list of programmes the project is related to
*/
public class Project implements Serializable {
private String id;
private String websiteurl;
private String code;
private String acronym;
private String title;
private String startdate;
private String enddate;
private String callidentifier;
private String keywords;
private boolean openaccessmandateforpublications;
private boolean openaccessmandatefordataset;
private List<String> subject;
private List<Funder> funding;
private String summary;
private Granted granted;
private List<Programme> h2020programme;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getWebsiteurl() {
return websiteurl;
}
public void setWebsiteurl(String websiteurl) {
this.websiteurl = websiteurl;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getAcronym() {
return acronym;
}
public void setAcronym(String acronym) {
this.acronym = acronym;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getStartdate() {
return startdate;
}
public void setStartdate(String startdate) {
this.startdate = startdate;
}
public String getEnddate() {
return enddate;
}
public void setEnddate(String enddate) {
this.enddate = enddate;
}
public String getCallidentifier() {
return callidentifier;
}
public void setCallidentifier(String callidentifier) {
this.callidentifier = callidentifier;
}
public String getKeywords() {
return keywords;
}
public void setKeywords(String keywords) {
this.keywords = keywords;
}
public boolean isOpenaccessmandateforpublications() {
return openaccessmandateforpublications;
}
public void setOpenaccessmandateforpublications(boolean openaccessmandateforpublications) {
this.openaccessmandateforpublications = openaccessmandateforpublications;
}
public boolean isOpenaccessmandatefordataset() {
return openaccessmandatefordataset;
}
public void setOpenaccessmandatefordataset(boolean openaccessmandatefordataset) {
this.openaccessmandatefordataset = openaccessmandatefordataset;
}
public List<String> getSubject() {
return subject;
}
public void setSubject(List<String> subject) {
this.subject = subject;
}
public List<Funder> getFunding() {
return funding;
}
public void setFunding(List<Funder> funding) {
this.funding = funding;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public Granted getGranted() {
return granted;
}
public void setGranted(Granted granted) {
this.granted = granted;
}
public List<Programme> getH2020programme() {
return h2020programme;
}
public void setH2020programme(List<Programme> h2020programme) {
this.h2020programme = h2020programme;
}
}

View File

@ -1,39 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.io.Serializable;
/**
* To represent the semantics of the generic relation between two entities. It has the following parameters: - private
* String name to store the semantics of the relation (i.e. isAuthorInstitutionOf). It corresponds to the relclass
* parameter in the relation represented in the internal model represented in the internal model - private String type
* to store the type of the relation (i.e. affiliation). It corresponds to the subreltype parameter of the relation
* represented in theinternal model
*/
public class RelType implements Serializable {
private String name; // relclass
private String type; // subreltype
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public static RelType newInstance(String name, String type) {
RelType rel = new RelType();
rel.name = name;
rel.type = type;
return rel;
}
}

View File

@ -1,67 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.io.Serializable;
import java.util.Objects;
import eu.dnetlib.dhp.schema.dump.oaf.Provenance;
/**
* To represent the gereric relation between two entities. It has the following parameters: - private Node source to
* represent the entity source of the relation - private Node target to represent the entity target of the relation -
* private RelType reltype to represent the semantics of the relation - private Provenance provenance to represent the
* provenance of the relation
*/
public class Relation implements Serializable {
private Node source;
private Node target;
private RelType reltype;
private Provenance provenance;
public Node getSource() {
return source;
}
public void setSource(Node source) {
this.source = source;
}
public Node getTarget() {
return target;
}
public void setTarget(Node target) {
this.target = target;
}
public RelType getReltype() {
return reltype;
}
public void setReltype(RelType reltype) {
this.reltype = reltype;
}
public Provenance getProvenance() {
return provenance;
}
public void setProvenance(Provenance provenance) {
this.provenance = provenance;
}
@Override
public int hashCode() {
return Objects.hash(source.getId(), target.getId(), reltype.getType() + ":" + reltype.getName());
}
public static Relation newInstance(Node source, Node target, RelType reltype, Provenance provenance) {
Relation relation = new Relation();
relation.source = source;
relation.target = target;
relation.reltype = reltype;
relation.provenance = provenance;
return relation;
}
}

View File

@ -1,20 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.util.List;
/**
* To represent RC entities. It extends eu.dnetlib.dhp.dump.oaf.grap.ResearchInitiative by adding the parameter subject
* to store the list of subjects related to the community
*/
public class ResearchCommunity extends ResearchInitiative {
private List<String> subject;
public List<String> getSubject() {
return subject;
}
public void setSubject(List<String> subject) {
this.subject = subject;
}
}

View File

@ -1,75 +0,0 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.io.Serializable;
/**
* To represent entity of type RC/RI. It has the following parameters, which are mostly derived by the profile
* - private
* String id to store the openaire id for the entity. Is has as code 00 and will be created as
* 00|context_____::md5(originalId) private
* String originalId to store the id of the context as provided in the profile
* (i.e. mes)
* - private String name to store the name of the context (got from the label attribute in the context
* definition)
* - private String type to store the type of the context (i.e.: research initiative or research community)
* - private String description to store the description of the context as given in the profile
* -private String
* zenodo_community to store the zenodo community associated to the context (main zenodo community)
*/
public class ResearchInitiative implements Serializable {
private String id; // openaireId
private String originalId; // context id
private String name; // context name
private String type; // context type: research initiative or research community
private String description;
private String zenodo_community;
public String getZenodo_community() {
return zenodo_community;
}
public void setZenodo_community(String zenodo_community) {
this.zenodo_community = zenodo_community;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String label) {
this.name = label;
}
public String getOriginalId() {
return originalId;
}
public void setOriginalId(String originalId) {
this.originalId = originalId;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}

View File

@ -0,0 +1,177 @@
package eu.dnetlib.dhp.schema.mdstore;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
import java.util.UUID;
import javax.persistence.*;
@Entity
@Table(name = "mdstores")
public class MDStore implements Serializable {
/** */
private static final long serialVersionUID = 3160530489149700055L;
@Id
@Column(name = "id")
private String id;
@Column(name = "format")
private String format;
@Column(name = "layout")
private String layout;
@Column(name = "interpretation")
private String interpretation;
@Column(name = "datasource_name")
private String datasourceName;
@Column(name = "datasource_id")
private String datasourceId;
@Column(name = "api_id")
private String apiId;
@Column(name = "hdfs_path")
private String hdfsPath;
@Column(name = "creation_date")
@Temporal(TemporalType.TIMESTAMP)
private Date creationDate;
public String getId() {
return id;
}
public void setId(final String id) {
this.id = id;
}
public String getFormat() {
return format;
}
public void setFormat(final String format) {
this.format = format;
}
public String getLayout() {
return layout;
}
public void setLayout(final String layout) {
this.layout = layout;
}
public String getInterpretation() {
return interpretation;
}
public void setInterpretation(final String interpretation) {
this.interpretation = interpretation;
}
public String getDatasourceName() {
return datasourceName;
}
public void setDatasourceName(final String datasourceName) {
this.datasourceName = datasourceName;
}
public String getDatasourceId() {
return datasourceId;
}
public void setDatasourceId(final String datasourceId) {
this.datasourceId = datasourceId;
}
public String getApiId() {
return apiId;
}
public void setApiId(final String apiId) {
this.apiId = apiId;
}
public String getHdfsPath() {
return hdfsPath;
}
public void setHdfsPath(final String hdfsPath) {
this.hdfsPath = hdfsPath;
}
public Date getCreationDate() {
return creationDate;
}
public void setCreationDate(final Date creationDate) {
this.creationDate = creationDate;
}
public static MDStore newInstance(
final String format,
final String layout,
final String interpretation,
final String hdfsBasePath) {
return newInstance(format, layout, interpretation, null, null, null, hdfsBasePath);
}
public static MDStore newInstance(
final String format,
final String layout,
final String interpretation,
final String dsName,
final String dsId,
final String apiId,
final String hdfsBasePath) {
final String mdId = "md-" + UUID.randomUUID();
final MDStore md = new MDStore();
md.setId(mdId);
md.setFormat(format);
md.setLayout(layout);
md.setInterpretation(interpretation);
md.setCreationDate(new Date());
md.setDatasourceName(dsName);
md.setDatasourceId(dsId);
md.setApiId(apiId);
md.setHdfsPath(String.format("%s/%s", hdfsBasePath, mdId));
return md;
}
@Override
public String toString() {
return String
.format(
"MDStore [id=%s, format=%s, layout=%s, interpretation=%s, datasourceName=%s, datasourceId=%s, apiId=%s, hdfsPath=%s, creationDate=%s]",
id, format, layout, interpretation, datasourceName, datasourceId, apiId, hdfsPath, creationDate);
}
@Override
public int hashCode() {
return Objects.hash(id);
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof MDStore)) {
return false;
}
final MDStore other = (MDStore) obj;
return Objects.equals(id, other.id);
}
}

View File

@ -0,0 +1,74 @@
package eu.dnetlib.dhp.schema.mdstore;
import java.io.Serializable;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "mdstore_current_versions")
public class MDStoreCurrentVersion implements Serializable {
/** */
private static final long serialVersionUID = -4757725888593745773L;
@Id
@Column(name = "mdstore")
private String mdstore;
@Column(name = "current_version")
private String currentVersion;
public String getMdstore() {
return mdstore;
}
public void setMdstore(final String mdstore) {
this.mdstore = mdstore;
}
public String getCurrentVersion() {
return currentVersion;
}
public void setCurrentVersion(final String currentVersion) {
this.currentVersion = currentVersion;
}
public static MDStoreCurrentVersion newInstance(final String mdId, final String versionId) {
final MDStoreCurrentVersion cv = new MDStoreCurrentVersion();
cv.setMdstore(mdId);
cv.setCurrentVersion(versionId);
return cv;
}
public static MDStoreCurrentVersion newInstance(final MDStoreVersion v) {
return newInstance(v.getMdstore(), v.getId());
}
@Override
public String toString() {
return String.format("MDStoreCurrentVersion [mdstore=%s, currentVersion=%s]", mdstore, currentVersion);
}
@Override
public int hashCode() {
return Objects.hash(currentVersion, mdstore);
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof MDStoreCurrentVersion)) {
return false;
}
final MDStoreCurrentVersion other = (MDStoreCurrentVersion) obj;
return Objects.equals(currentVersion, other.currentVersion) && Objects.equals(mdstore, other.mdstore);
}
}

View File

@ -0,0 +1,135 @@
package eu.dnetlib.dhp.schema.mdstore;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
import javax.persistence.*;
@Entity
@Table(name = "mdstore_versions")
public class MDStoreVersion implements Serializable {
/** */
private static final long serialVersionUID = -4763494442274298339L;
@Id
@Column(name = "id")
private String id;
@Column(name = "mdstore")
private String mdstore;
@Column(name = "writing")
private boolean writing;
@Column(name = "readcount")
private int readCount = 0;
@Column(name = "lastupdate")
@Temporal(TemporalType.TIMESTAMP)
private Date lastUpdate;
@Column(name = "size")
private long size = 0;
@Column(name = "hdfs_path")
private String hdfsPath;
public static MDStoreVersion newInstance(final String mdId, final boolean writing, final String hdfsBasePath) {
final MDStoreVersion v = new MDStoreVersion();
final String versionId = mdId + "-" + new Date().getTime();
v.setId(versionId);
v.setMdstore(mdId);
v.setLastUpdate(null);
v.setWriting(writing);
v.setReadCount(0);
v.setSize(0);
v.setHdfsPath(String.format("%s/%s/%s", hdfsBasePath, mdId, versionId));
return v;
}
public String getId() {
return id;
}
public void setId(final String id) {
this.id = id;
}
public String getMdstore() {
return mdstore;
}
public void setMdstore(final String mdstore) {
this.mdstore = mdstore;
}
public boolean isWriting() {
return writing;
}
public void setWriting(final boolean writing) {
this.writing = writing;
}
public int getReadCount() {
return readCount;
}
public void setReadCount(final int readCount) {
this.readCount = readCount;
}
public Date getLastUpdate() {
return lastUpdate;
}
public void setLastUpdate(final Date lastUpdate) {
this.lastUpdate = lastUpdate;
}
public long getSize() {
return size;
}
public void setSize(final long size) {
this.size = size;
}
public String getHdfsPath() {
return hdfsPath;
}
public void setHdfsPath(final String hdfsPath) {
this.hdfsPath = hdfsPath;
}
@Override
public String toString() {
return String
.format(
"MDStoreVersion [id=%s, mdstore=%s, writing=%s, readCount=%s, lastUpdate=%s, size=%s, hdfsPath=%s]", id,
mdstore, writing, readCount, lastUpdate, size, hdfsPath);
}
@Override
public int hashCode() {
return Objects.hash(id);
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof MDStoreVersion)) {
return false;
}
final MDStoreVersion other = (MDStoreVersion) obj;
return Objects.equals(id, other.id);
}
}

View File

@ -0,0 +1,189 @@
package eu.dnetlib.dhp.schema.mdstore;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
import javax.persistence.*;
@Entity
@Table(name = "mdstores_with_info")
public class MDStoreWithInfo implements Serializable {
/** */
private static final long serialVersionUID = -8445784770687571492L;
@Id
@Column(name = "id")
private String id;
@Column(name = "format")
private String format;
@Column(name = "layout")
private String layout;
@Column(name = "interpretation")
private String interpretation;
@Column(name = "datasource_name")
private String datasourceName;
@Column(name = "datasource_id")
private String datasourceId;
@Column(name = "api_id")
private String apiId;
@Column(name = "current_version")
private String currentVersion;
@Column(name = "creation_date")
@Temporal(TemporalType.TIMESTAMP)
private Date creationDate;
@Column(name = "lastupdate")
@Temporal(TemporalType.TIMESTAMP)
private Date lastUpdate;
@Column(name = "size")
private long size = 0;
@Column(name = "n_versions")
private long numberOfVersions = 0;
@Column(name = "hdfs_path")
private String hdfsPath;
public String getId() {
return id;
}
public void setId(final String id) {
this.id = id;
}
public String getFormat() {
return format;
}
public void setFormat(final String format) {
this.format = format;
}
public String getLayout() {
return layout;
}
public void setLayout(final String layout) {
this.layout = layout;
}
public String getInterpretation() {
return interpretation;
}
public void setInterpretation(final String interpretation) {
this.interpretation = interpretation;
}
public String getDatasourceName() {
return datasourceName;
}
public void setDatasourceName(final String datasourceName) {
this.datasourceName = datasourceName;
}
public String getDatasourceId() {
return datasourceId;
}
public void setDatasourceId(final String datasourceId) {
this.datasourceId = datasourceId;
}
public String getApiId() {
return apiId;
}
public void setApiId(final String apiId) {
this.apiId = apiId;
}
public String getCurrentVersion() {
return currentVersion;
}
public void setCurrentVersion(final String currentVersion) {
this.currentVersion = currentVersion;
}
public Date getCreationDate() {
return creationDate;
}
public void setCreationDate(final Date creationDate) {
this.creationDate = creationDate;
}
public Date getLastUpdate() {
return lastUpdate;
}
public void setLastUpdate(final Date lastUpdate) {
this.lastUpdate = lastUpdate;
}
public long getSize() {
return size;
}
public void setSize(final long size) {
this.size = size;
}
public long getNumberOfVersions() {
return numberOfVersions;
}
public void setNumberOfVersions(final long numberOfVersions) {
this.numberOfVersions = numberOfVersions;
}
public String getHdfsPath() {
return hdfsPath;
}
public void setHdfsPath(final String hdfsPath) {
this.hdfsPath = hdfsPath;
}
@Override
public String toString() {
return String
.format(
"MDStoreWithInfo [id=%s, format=%s, layout=%s, interpretation=%s, datasourceName=%s, datasourceId=%s, apiId=%s, currentVersion=%s, creationDate=%s, lastUpdate=%s, size=%s, numberOfVersions=%s, hdfsPath=%s]",
id, format, layout, interpretation, datasourceName, datasourceId, apiId, currentVersion, creationDate,
lastUpdate, size, numberOfVersions, hdfsPath);
}
@Override
public int hashCode() {
return Objects.hash(id);
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof MDStoreWithInfo)) {
return false;
}
final MDStoreWithInfo other = (MDStoreWithInfo) obj;
return Objects.equals(id, other.id);
}
}

View File

@ -0,0 +1,123 @@
package eu.dnetlib.dhp.schema.mdstore;
import java.io.Serializable;
import eu.dnetlib.dhp.schema.common.ModelSupport;
/**
* This class models a record in a Metadata store collection on HDFS
*/
public class MetadataRecord implements Serializable {
/** The D-Net Identifier associated to the record */
private String id;
/** The original Identifier of the record */
private String originalId;
/** The encoding of the record, should be JSON or XML */
private String encoding;
/**
* The information about the provenance of the record see @{@link Provenance} for the model of this information
*/
private Provenance provenance;
/** The content of the metadata */
private String body;
/** the date when the record has been stored */
private Long dateOfCollection;
/** the date when the record has been stored */
private Long dateOfTransformation;
public MetadataRecord() {
}
public MetadataRecord(
String originalId,
String encoding,
Provenance provenance,
String body,
Long dateOfCollection) {
this.originalId = originalId;
this.encoding = encoding;
this.provenance = provenance;
this.body = body;
this.dateOfCollection = dateOfCollection;
this.id = ModelSupport.generateIdentifier(originalId, this.provenance.getNsPrefix());
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getOriginalId() {
return originalId;
}
public void setOriginalId(String originalId) {
this.originalId = originalId;
}
public String getEncoding() {
return encoding;
}
public void setEncoding(String encoding) {
this.encoding = encoding;
}
public Provenance getProvenance() {
return provenance;
}
public void setProvenance(Provenance provenance) {
this.provenance = provenance;
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public Long getDateOfCollection() {
return dateOfCollection;
}
public void setDateOfCollection(Long dateOfCollection) {
this.dateOfCollection = dateOfCollection;
}
public Long getDateOfTransformation() {
return dateOfTransformation;
}
public void setDateOfTransformation(Long dateOfTransformation) {
this.dateOfTransformation = dateOfTransformation;
}
@Override
public boolean equals(Object o) {
if (!(o instanceof MetadataRecord)) {
return false;
}
return ((MetadataRecord) o).getId().equalsIgnoreCase(id);
}
@Override
public int hashCode() {
return id.hashCode();
}
}

View File

@ -0,0 +1,52 @@
package eu.dnetlib.dhp.schema.mdstore;
import java.io.Serializable;
/**
* @author Sandro La Bruzzo
* <p>
* Provenace class models the provenance of the record in the metadataStore It contains the identifier and the
* name of the datasource that gives the record
*/
public class Provenance implements Serializable {
private String datasourceId;
private String datasourceName;
private String nsPrefix;
public Provenance() {
}
public Provenance(String datasourceId, String datasourceName, String nsPrefix) {
this.datasourceId = datasourceId;
this.datasourceName = datasourceName;
this.nsPrefix = nsPrefix;
}
public String getDatasourceId() {
return datasourceId;
}
public void setDatasourceId(String datasourceId) {
this.datasourceId = datasourceId;
}
public String getDatasourceName() {
return datasourceName;
}
public void setDatasourceName(String datasourceName) {
this.datasourceName = datasourceName;
}
public String getNsPrefix() {
return nsPrefix;
}
public void setNsPrefix(String nsPrefix) {
this.nsPrefix = nsPrefix;
}
}

View File

@ -0,0 +1,23 @@
package eu.dnetlib.dhp.schema.oaf;
import java.util.Objects;
import java.util.Optional;
/**
* This class models the access rights of research products.
*/
public class AccessRight extends Qualifier {
private static final long serialVersionUID = -8945177777173510134L;
private OpenAccessRoute openAccessRoute;
public OpenAccessRoute getOpenAccessRoute() {
return openAccessRoute;
}
public void setOpenAccessRoute(OpenAccessRoute openAccessRoute) {
this.openAccessRoute = openAccessRoute;
}
}

View File

@ -6,12 +6,14 @@ import java.util.*;
public class Author implements Serializable {
private static final long serialVersionUID = 1625492739044457437L;
private String fullname;
private String name;
private String surname;
// START WITH 1
private Integer rank;
private List<StructuredProperty> pid;
@ -66,24 +68,4 @@ public class Author implements Serializable {
this.affiliation = affiliation;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Author author = (Author) o;
return Objects.equals(fullname, author.fullname)
&& Objects.equals(name, author.name)
&& Objects.equals(surname, author.surname)
&& Objects.equals(rank, author.rank)
&& Objects.equals(pid, author.pid)
&& Objects.equals(affiliation, author.affiliation);
}
@Override
public int hashCode() {
return Objects.hash(fullname, name, surname, rank, pid, affiliation);
}
}

View File

@ -3,8 +3,11 @@ package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.List;
import java.util.Objects;
public class Context implements Serializable {
private static final long serialVersionUID = -778899398223144398L;
private String id;
private List<DataInfo> dataInfo;
@ -25,22 +28,4 @@ public class Context implements Serializable {
this.dataInfo = dataInfo;
}
@Override
public int hashCode() {
return id == null ? 0 : id.hashCode();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Context other = (Context) obj;
return id.equals(other.getId());
}
}

View File

@ -1,10 +1,9 @@
package eu.dnetlib.dhp.schema.oaf;
import java.util.Objects;
public class Country extends Qualifier {
private static final long serialVersionUID = 1587334433446567175L;
private DataInfo dataInfo;
public DataInfo getDataInfo() {
@ -15,20 +14,4 @@ public class Country extends Qualifier {
this.dataInfo = dataInfo;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
if (!super.equals(o))
return false;
Country country = (Country) o;
return Objects.equals(dataInfo, country.dataInfo);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), dataInfo);
}
}

View File

@ -6,6 +6,8 @@ import java.util.Objects;
public class DataInfo implements Serializable {
private static final long serialVersionUID = -277099962930866451L;
private Boolean invisible = false;
private Boolean inferred;
private Boolean deletedbyinference = false;
@ -61,25 +63,4 @@ public class DataInfo implements Serializable {
this.provenanceaction = provenanceaction;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
DataInfo dataInfo = (DataInfo) o;
return Objects.equals(invisible, dataInfo.invisible)
&& Objects.equals(inferred, dataInfo.inferred)
&& Objects.equals(deletedbyinference, dataInfo.deletedbyinference)
&& Objects.equals(trust, dataInfo.trust)
&& Objects.equals(inferenceprovenance, dataInfo.inferenceprovenance)
&& Objects.equals(provenanceaction, dataInfo.provenanceaction);
}
@Override
public int hashCode() {
return Objects
.hash(
invisible, inferred, deletedbyinference, trust, inferenceprovenance, provenanceaction);
}
}

View File

@ -8,6 +8,7 @@ import eu.dnetlib.dhp.schema.common.ModelConstants;
public class Dataset extends Result implements Serializable {
private static final long serialVersionUID = 916526716184645549L;
private Field<String> storagedate;
// candidate for removal
@ -83,34 +84,4 @@ public class Dataset extends Result implements Serializable {
this.geolocation = geolocation;
}
@Override
public void mergeFrom(OafEntity e) {
super.mergeFrom(e);
if (!Dataset.class.isAssignableFrom(e.getClass())) {
return;
}
final Dataset d = (Dataset) e;
storagedate = d.getStoragedate() != null && compareTrust(this, e) < 0 ? d.getStoragedate() : storagedate;
device = d.getDevice() != null && compareTrust(this, e) < 0 ? d.getDevice() : device;
size = d.getSize() != null && compareTrust(this, e) < 0 ? d.getSize() : size;
version = d.getVersion() != null && compareTrust(this, e) < 0 ? d.getVersion() : version;
lastmetadataupdate = d.getLastmetadataupdate() != null && compareTrust(this, e) < 0
? d.getLastmetadataupdate()
: lastmetadataupdate;
metadataversionnumber = d.getMetadataversionnumber() != null && compareTrust(this, e) < 0
? d.getMetadataversionnumber()
: metadataversionnumber;
geolocation = mergeLists(geolocation, d.getGeolocation());
mergeOAFDataInfo(d);
}
}

View File

@ -6,8 +6,18 @@ import java.util.List;
public class Datasource extends OafEntity implements Serializable {
private static final long serialVersionUID = 1019089598408414496L;
@Deprecated
private Qualifier datasourcetype;
@Deprecated
private Qualifier datasourcetypeui;
private Qualifier eosctype; // Data Source | Service
private Qualifier eoscdatasourcetype;
private Qualifier openairecompatibility;
private Field<String> officialname;
@ -33,14 +43,21 @@ public class Datasource extends OafEntity implements Serializable {
private List<StructuredProperty> subjects;
// opendoar specific fields (od*)
@Deprecated
private Field<String> odnumberofitems;
@Deprecated
private Field<String> odnumberofitemsdate;
@Deprecated
private Field<String> odpolicies;
@Deprecated
private List<Field<String>> odlanguages;
private List<String> languages;
@Deprecated
private List<Field<String>> odcontenttypes;
private List<Field<String>> accessinfopackage;
@ -52,8 +69,10 @@ public class Datasource extends OafEntity implements Serializable {
private Field<String> missionstatementurl;
@Deprecated
private Field<Boolean> dataprovider;
@Deprecated
private Field<Boolean> serviceprovider;
// {open, restricted or closed}
@ -68,34 +87,95 @@ public class Datasource extends OafEntity implements Serializable {
// {feeRequired, registration, other}
private Field<String> datauploadrestriction;
@Deprecated
private Field<Boolean> versioning;
private Field<String> citationguidelineurl;
private Boolean versioncontrol;
// {yes, no, uknown}
private Field<String> qualitymanagementkind;
private Field<String> citationguidelineurl;
private Field<String> pidsystems;
private Field<String> certificates;
@Deprecated
private List<KeyValue> policies;
private Journal journal;
// New field for EOSC
private List<String> researchentitytypes;
// New field for EOSC
private List<String> providedproducttypes;
// New field for EOSC
private Qualifier jurisdiction;
// New field for EOSC
private Boolean thematic;
// New field for EOSC
private List<Qualifier> contentpolicies;
private String submissionpolicyurl;
private String preservationpolicyurl;
private List<String> researchproductaccesspolicies;
private List<String> researchproductmetadataaccesspolicies;
private Boolean consenttermsofuse;
private Boolean fulltextdownload;
private String consenttermsofusedate;
private String lastconsenttermsofusedate;
/**
* EOSC Interoperability Framework Guidelines
*/
private List<EoscIfGuidelines> eoscifguidelines;
public Qualifier getDatasourcetype() {
return datasourcetype;
}
public void setDatasourcetype(Qualifier datasourcetype) {
public void setDatasourcetype(final Qualifier datasourcetype) {
this.datasourcetype = datasourcetype;
}
public Qualifier getDatasourcetypeui() {
return datasourcetypeui;
}
public void setDatasourcetypeui(final Qualifier datasourcetypeui) {
this.datasourcetypeui = datasourcetypeui;
}
public Qualifier getEosctype() {
return eosctype;
}
public void setEosctype(Qualifier eosctype) {
this.eosctype = eosctype;
}
public Qualifier getEoscdatasourcetype() {
return eoscdatasourcetype;
}
public void setEoscdatasourcetype(Qualifier eoscdatasourcetype) {
this.eoscdatasourcetype = eoscdatasourcetype;
}
public Qualifier getOpenairecompatibility() {
return openairecompatibility;
}
public void setOpenairecompatibility(Qualifier openairecompatibility) {
public void setOpenairecompatibility(final Qualifier openairecompatibility) {
this.openairecompatibility = openairecompatibility;
}
@ -103,7 +183,7 @@ public class Datasource extends OafEntity implements Serializable {
return officialname;
}
public void setOfficialname(Field<String> officialname) {
public void setOfficialname(final Field<String> officialname) {
this.officialname = officialname;
}
@ -111,7 +191,7 @@ public class Datasource extends OafEntity implements Serializable {
return englishname;
}
public void setEnglishname(Field<String> englishname) {
public void setEnglishname(final Field<String> englishname) {
this.englishname = englishname;
}
@ -119,7 +199,7 @@ public class Datasource extends OafEntity implements Serializable {
return websiteurl;
}
public void setWebsiteurl(Field<String> websiteurl) {
public void setWebsiteurl(final Field<String> websiteurl) {
this.websiteurl = websiteurl;
}
@ -127,7 +207,7 @@ public class Datasource extends OafEntity implements Serializable {
return logourl;
}
public void setLogourl(Field<String> logourl) {
public void setLogourl(final Field<String> logourl) {
this.logourl = logourl;
}
@ -135,7 +215,7 @@ public class Datasource extends OafEntity implements Serializable {
return contactemail;
}
public void setContactemail(Field<String> contactemail) {
public void setContactemail(final Field<String> contactemail) {
this.contactemail = contactemail;
}
@ -143,7 +223,7 @@ public class Datasource extends OafEntity implements Serializable {
return namespaceprefix;
}
public void setNamespaceprefix(Field<String> namespaceprefix) {
public void setNamespaceprefix(final Field<String> namespaceprefix) {
this.namespaceprefix = namespaceprefix;
}
@ -151,7 +231,7 @@ public class Datasource extends OafEntity implements Serializable {
return latitude;
}
public void setLatitude(Field<String> latitude) {
public void setLatitude(final Field<String> latitude) {
this.latitude = latitude;
}
@ -159,7 +239,7 @@ public class Datasource extends OafEntity implements Serializable {
return longitude;
}
public void setLongitude(Field<String> longitude) {
public void setLongitude(final Field<String> longitude) {
this.longitude = longitude;
}
@ -167,7 +247,7 @@ public class Datasource extends OafEntity implements Serializable {
return dateofvalidation;
}
public void setDateofvalidation(Field<String> dateofvalidation) {
public void setDateofvalidation(final Field<String> dateofvalidation) {
this.dateofvalidation = dateofvalidation;
}
@ -175,7 +255,7 @@ public class Datasource extends OafEntity implements Serializable {
return description;
}
public void setDescription(Field<String> description) {
public void setDescription(final Field<String> description) {
this.description = description;
}
@ -183,7 +263,7 @@ public class Datasource extends OafEntity implements Serializable {
return subjects;
}
public void setSubjects(List<StructuredProperty> subjects) {
public void setSubjects(final List<StructuredProperty> subjects) {
this.subjects = subjects;
}
@ -191,7 +271,7 @@ public class Datasource extends OafEntity implements Serializable {
return odnumberofitems;
}
public void setOdnumberofitems(Field<String> odnumberofitems) {
public void setOdnumberofitems(final Field<String> odnumberofitems) {
this.odnumberofitems = odnumberofitems;
}
@ -199,7 +279,7 @@ public class Datasource extends OafEntity implements Serializable {
return odnumberofitemsdate;
}
public void setOdnumberofitemsdate(Field<String> odnumberofitemsdate) {
public void setOdnumberofitemsdate(final Field<String> odnumberofitemsdate) {
this.odnumberofitemsdate = odnumberofitemsdate;
}
@ -207,7 +287,7 @@ public class Datasource extends OafEntity implements Serializable {
return odpolicies;
}
public void setOdpolicies(Field<String> odpolicies) {
public void setOdpolicies(final Field<String> odpolicies) {
this.odpolicies = odpolicies;
}
@ -215,15 +295,23 @@ public class Datasource extends OafEntity implements Serializable {
return odlanguages;
}
public void setOdlanguages(List<Field<String>> odlanguages) {
public void setOdlanguages(final List<Field<String>> odlanguages) {
this.odlanguages = odlanguages;
}
public List<String> getLanguages() {
return languages;
}
public void setLanguages(final List<String> languages) {
this.languages = languages;
}
public List<Field<String>> getOdcontenttypes() {
return odcontenttypes;
}
public void setOdcontenttypes(List<Field<String>> odcontenttypes) {
public void setOdcontenttypes(final List<Field<String>> odcontenttypes) {
this.odcontenttypes = odcontenttypes;
}
@ -231,7 +319,7 @@ public class Datasource extends OafEntity implements Serializable {
return accessinfopackage;
}
public void setAccessinfopackage(List<Field<String>> accessinfopackage) {
public void setAccessinfopackage(final List<Field<String>> accessinfopackage) {
this.accessinfopackage = accessinfopackage;
}
@ -239,7 +327,7 @@ public class Datasource extends OafEntity implements Serializable {
return releasestartdate;
}
public void setReleasestartdate(Field<String> releasestartdate) {
public void setReleasestartdate(final Field<String> releasestartdate) {
this.releasestartdate = releasestartdate;
}
@ -247,7 +335,7 @@ public class Datasource extends OafEntity implements Serializable {
return releaseenddate;
}
public void setReleaseenddate(Field<String> releaseenddate) {
public void setReleaseenddate(final Field<String> releaseenddate) {
this.releaseenddate = releaseenddate;
}
@ -255,7 +343,7 @@ public class Datasource extends OafEntity implements Serializable {
return missionstatementurl;
}
public void setMissionstatementurl(Field<String> missionstatementurl) {
public void setMissionstatementurl(final Field<String> missionstatementurl) {
this.missionstatementurl = missionstatementurl;
}
@ -263,7 +351,7 @@ public class Datasource extends OafEntity implements Serializable {
return dataprovider;
}
public void setDataprovider(Field<Boolean> dataprovider) {
public void setDataprovider(final Field<Boolean> dataprovider) {
this.dataprovider = dataprovider;
}
@ -271,7 +359,7 @@ public class Datasource extends OafEntity implements Serializable {
return serviceprovider;
}
public void setServiceprovider(Field<Boolean> serviceprovider) {
public void setServiceprovider(final Field<Boolean> serviceprovider) {
this.serviceprovider = serviceprovider;
}
@ -279,7 +367,7 @@ public class Datasource extends OafEntity implements Serializable {
return databaseaccesstype;
}
public void setDatabaseaccesstype(Field<String> databaseaccesstype) {
public void setDatabaseaccesstype(final Field<String> databaseaccesstype) {
this.databaseaccesstype = databaseaccesstype;
}
@ -287,7 +375,7 @@ public class Datasource extends OafEntity implements Serializable {
return datauploadtype;
}
public void setDatauploadtype(Field<String> datauploadtype) {
public void setDatauploadtype(final Field<String> datauploadtype) {
this.datauploadtype = datauploadtype;
}
@ -295,7 +383,7 @@ public class Datasource extends OafEntity implements Serializable {
return databaseaccessrestriction;
}
public void setDatabaseaccessrestriction(Field<String> databaseaccessrestriction) {
public void setDatabaseaccessrestriction(final Field<String> databaseaccessrestriction) {
this.databaseaccessrestriction = databaseaccessrestriction;
}
@ -303,7 +391,7 @@ public class Datasource extends OafEntity implements Serializable {
return datauploadrestriction;
}
public void setDatauploadrestriction(Field<String> datauploadrestriction) {
public void setDatauploadrestriction(final Field<String> datauploadrestriction) {
this.datauploadrestriction = datauploadrestriction;
}
@ -311,31 +399,31 @@ public class Datasource extends OafEntity implements Serializable {
return versioning;
}
public void setVersioning(Field<Boolean> versioning) {
public void setVersioning(final Field<Boolean> versioning) {
this.versioning = versioning;
}
public Boolean getVersioncontrol() {
return versioncontrol;
}
public void setVersioncontrol(Boolean versioncontrol) {
this.versioncontrol = versioncontrol;
}
public Field<String> getCitationguidelineurl() {
return citationguidelineurl;
}
public void setCitationguidelineurl(Field<String> citationguidelineurl) {
public void setCitationguidelineurl(final Field<String> citationguidelineurl) {
this.citationguidelineurl = citationguidelineurl;
}
public Field<String> getQualitymanagementkind() {
return qualitymanagementkind;
}
public void setQualitymanagementkind(Field<String> qualitymanagementkind) {
this.qualitymanagementkind = qualitymanagementkind;
}
public Field<String> getPidsystems() {
return pidsystems;
}
public void setPidsystems(Field<String> pidsystems) {
public void setPidsystems(final Field<String> pidsystems) {
this.pidsystems = pidsystems;
}
@ -343,7 +431,7 @@ public class Datasource extends OafEntity implements Serializable {
return certificates;
}
public void setCertificates(Field<String> certificates) {
public void setCertificates(final Field<String> certificates) {
this.certificates = certificates;
}
@ -351,7 +439,7 @@ public class Datasource extends OafEntity implements Serializable {
return policies;
}
public void setPolicies(List<KeyValue> policies) {
public void setPolicies(final List<KeyValue> policies) {
this.policies = policies;
}
@ -359,114 +447,120 @@ public class Datasource extends OafEntity implements Serializable {
return journal;
}
public void setJournal(Journal journal) {
public void setJournal(final Journal journal) {
this.journal = journal;
}
@Override
public void mergeFrom(OafEntity e) {
super.mergeFrom(e);
if (!Datasource.class.isAssignableFrom(e.getClass())) {
return;
}
Datasource d = (Datasource) e;
datasourcetype = d.getDatasourcetype() != null && compareTrust(this, e) < 0
? d.getDatasourcetype()
: datasourcetype;
openairecompatibility = d.getOpenairecompatibility() != null && compareTrust(this, e) < 0
? d.getOpenairecompatibility()
: openairecompatibility;
officialname = d.getOfficialname() != null && compareTrust(this, e) < 0
? d.getOfficialname()
: officialname;
englishname = d.getEnglishname() != null && compareTrust(this, e) < 0 ? d.getEnglishname() : officialname;
websiteurl = d.getWebsiteurl() != null && compareTrust(this, e) < 0 ? d.getWebsiteurl() : websiteurl;
logourl = d.getLogourl() != null && compareTrust(this, e) < 0 ? d.getLogourl() : getLogourl();
contactemail = d.getContactemail() != null && compareTrust(this, e) < 0
? d.getContactemail()
: contactemail;
namespaceprefix = d.getNamespaceprefix() != null && compareTrust(this, e) < 0
? d.getNamespaceprefix()
: namespaceprefix;
latitude = d.getLatitude() != null && compareTrust(this, e) < 0 ? d.getLatitude() : latitude;
longitude = d.getLongitude() != null && compareTrust(this, e) < 0 ? d.getLongitude() : longitude;
dateofvalidation = d.getDateofvalidation() != null && compareTrust(this, e) < 0
? d.getDateofvalidation()
: dateofvalidation;
description = d.getDescription() != null && compareTrust(this, e) < 0 ? d.getDescription() : description;
subjects = mergeLists(subjects, d.getSubjects());
// opendoar specific fields (od*)
odnumberofitems = d.getOdnumberofitems() != null && compareTrust(this, e) < 0
? d.getOdnumberofitems()
: odnumberofitems;
odnumberofitemsdate = d.getOdnumberofitemsdate() != null && compareTrust(this, e) < 0
? d.getOdnumberofitemsdate()
: odnumberofitemsdate;
odpolicies = d.getOdpolicies() != null && compareTrust(this, e) < 0 ? d.getOdpolicies() : odpolicies;
odlanguages = mergeLists(odlanguages, d.getOdlanguages());
odcontenttypes = mergeLists(odcontenttypes, d.getOdcontenttypes());
accessinfopackage = mergeLists(accessinfopackage, d.getAccessinfopackage());
// re3data fields
releasestartdate = d.getReleasestartdate() != null && compareTrust(this, e) < 0
? d.getReleasestartdate()
: releasestartdate;
releaseenddate = d.getReleaseenddate() != null && compareTrust(this, e) < 0
? d.getReleaseenddate()
: releaseenddate;
missionstatementurl = d.getMissionstatementurl() != null && compareTrust(this, e) < 0
? d.getMissionstatementurl()
: missionstatementurl;
dataprovider = d.getDataprovider() != null && compareTrust(this, e) < 0
? d.getDataprovider()
: dataprovider;
serviceprovider = d.getServiceprovider() != null && compareTrust(this, e) < 0
? d.getServiceprovider()
: serviceprovider;
// {open, restricted or closed}
databaseaccesstype = d.getDatabaseaccesstype() != null && compareTrust(this, e) < 0
? d.getDatabaseaccesstype()
: databaseaccesstype;
// {open, restricted or closed}
datauploadtype = d.getDatauploadtype() != null && compareTrust(this, e) < 0
? d.getDatauploadtype()
: datauploadtype;
// {feeRequired, registration, other}
databaseaccessrestriction = d.getDatabaseaccessrestriction() != null && compareTrust(this, e) < 0
? d.getDatabaseaccessrestriction()
: databaseaccessrestriction;
// {feeRequired, registration, other}
datauploadrestriction = d.getDatauploadrestriction() != null && compareTrust(this, e) < 0
? d.getDatauploadrestriction()
: datauploadrestriction;
versioning = d.getVersioning() != null && compareTrust(this, e) < 0 ? d.getVersioning() : versioning;
citationguidelineurl = d.getCitationguidelineurl() != null && compareTrust(this, e) < 0
? d.getCitationguidelineurl()
: citationguidelineurl;
// {yes, no, unknown}
qualitymanagementkind = d.getQualitymanagementkind() != null && compareTrust(this, e) < 0
? d.getQualitymanagementkind()
: qualitymanagementkind;
pidsystems = d.getPidsystems() != null && compareTrust(this, e) < 0 ? d.getPidsystems() : pidsystems;
certificates = d.getCertificates() != null && compareTrust(this, e) < 0
? d.getCertificates()
: certificates;
policies = mergeLists(policies, d.getPolicies());
journal = d.getJournal() != null && compareTrust(this, e) < 0 ? d.getJournal() : journal;
mergeOAFDataInfo(e);
public List<String> getResearchentitytypes() {
return researchentitytypes;
}
public void setResearchentitytypes(final List<String> researchentitytypes) {
this.researchentitytypes = researchentitytypes;
}
public List<String> getProvidedproducttypes() {
return providedproducttypes;
}
public void setProvidedproducttypes(final List<String> providedproducttypes) {
this.providedproducttypes = providedproducttypes;
}
public Qualifier getJurisdiction() {
return jurisdiction;
}
public void setJurisdiction(final Qualifier jurisdiction) {
this.jurisdiction = jurisdiction;
}
public Boolean getThematic() {
return thematic;
}
public void setThematic(final Boolean thematic) {
this.thematic = thematic;
}
public List<Qualifier> getContentpolicies() {
return contentpolicies;
}
public void setContentpolicies(final List<Qualifier> contentpolicies) {
this.contentpolicies = contentpolicies;
}
public String getSubmissionpolicyurl() {
return submissionpolicyurl;
}
public void setSubmissionpolicyurl(String submissionpolicyurl) {
this.submissionpolicyurl = submissionpolicyurl;
}
public String getPreservationpolicyurl() {
return preservationpolicyurl;
}
public void setPreservationpolicyurl(String preservationpolicyurl) {
this.preservationpolicyurl = preservationpolicyurl;
}
public List<String> getResearchproductaccesspolicies() {
return researchproductaccesspolicies;
}
public void setResearchproductaccesspolicies(List<String> researchproductaccesspolicies) {
this.researchproductaccesspolicies = researchproductaccesspolicies;
}
public List<String> getResearchproductmetadataaccesspolicies() {
return researchproductmetadataaccesspolicies;
}
public void setResearchproductmetadataaccesspolicies(List<String> researchproductmetadataaccesspolicies) {
this.researchproductmetadataaccesspolicies = researchproductmetadataaccesspolicies;
}
public Boolean getConsenttermsofuse() {
return consenttermsofuse;
}
public void setConsenttermsofuse(final Boolean consenttermsofuse) {
this.consenttermsofuse = consenttermsofuse;
}
public String getLastconsenttermsofusedate() {
return lastconsenttermsofusedate;
}
public void setLastconsenttermsofusedate(String lastconsenttermsofusedate) {
this.lastconsenttermsofusedate = lastconsenttermsofusedate;
}
public Boolean getFulltextdownload() {
return fulltextdownload;
}
public void setFulltextdownload(final Boolean fulltextdownload) {
this.fulltextdownload = fulltextdownload;
}
public String getConsenttermsofusedate() {
return consenttermsofusedate;
}
public void setConsenttermsofusedate(final String consenttermsofusedate) {
this.consenttermsofusedate = consenttermsofusedate;
}
public List<EoscIfGuidelines> getEoscifguidelines() {
return eoscifguidelines;
}
public void setEoscifguidelines(List<EoscIfGuidelines> eoscifguidelines) {
this.eoscifguidelines = eoscifguidelines;
}
}

View File

@ -0,0 +1,70 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.commons.lang3.StringUtils;
/**
* Describes a reference to the EOSC Interoperability Framework (IF) Guidelines
*/
public class EoscIfGuidelines implements Serializable {
private static final long serialVersionUID = -2166497471601245048L;
/**
* EOSC-IF local code. Later on it could be populated with a PID (e.g. DOI), but for the time being we stick to
* a more loose definition.
*/
private String code;
/**
* EOSC-IF label
*/
private String label;
/**
* EOSC-IF url
*/
private String url;
/**
* EOSC-IF semantic relation (e.g. compliesWith). Values shall be controlled by a dedicated vocabulary.
*/
private String semanticRelation;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getSemanticRelation() {
return semanticRelation;
}
public void setSemanticRelation(String semanticRelation) {
this.semanticRelation = semanticRelation;
}
}

View File

@ -2,21 +2,24 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.List;
import java.util.Objects;
public class ExternalReference implements Serializable {
private static final long serialVersionUID = -3711445600549155961L;
// source
private String sitename;
// title
private String label;
// alternative labels
private List<String> alternateLabel;
// text()
private String url;
// ?? not mapped yet ??
private String description;
// type
private Qualifier qualifier;
@ -45,6 +48,14 @@ public class ExternalReference implements Serializable {
this.label = label;
}
public List<String> getAlternateLabel() {
return alternateLabel;
}
public void setAlternateLabel(List<String> alternateLabel) {
this.alternateLabel = alternateLabel;
}
public String getUrl() {
return url;
}
@ -53,14 +64,6 @@ public class ExternalReference implements Serializable {
this.url = url;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Qualifier getQualifier() {
return qualifier;
}
@ -93,27 +96,4 @@ public class ExternalReference implements Serializable {
this.dataInfo = dataInfo;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
ExternalReference that = (ExternalReference) o;
return Objects.equals(sitename, that.sitename)
&& Objects.equals(label, that.label)
&& Objects.equals(url, that.url)
&& Objects.equals(description, that.description)
&& Objects.equals(qualifier, that.qualifier)
&& Objects.equals(refidentifier, that.refidentifier)
&& Objects.equals(query, that.query)
&& Objects.equals(dataInfo, that.dataInfo);
}
@Override
public int hashCode() {
return Objects
.hash(
sitename, label, url, description, qualifier, refidentifier, query, dataInfo);
}
}

View File

@ -5,6 +5,8 @@ import java.io.Serializable;
import java.util.Objects;
public class ExtraInfo implements Serializable {
private static final long serialVersionUID = 8689244676887698486L;
private String name;
private String typology;
@ -56,22 +58,4 @@ public class ExtraInfo implements Serializable {
this.value = value;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
ExtraInfo extraInfo = (ExtraInfo) o;
return Objects.equals(name, extraInfo.name)
&& Objects.equals(typology, extraInfo.typology)
&& Objects.equals(provenance, extraInfo.provenance)
&& Objects.equals(trust, extraInfo.trust)
&& Objects.equals(value, extraInfo.value);
}
@Override
public int hashCode() {
return Objects.hash(name, typology, provenance, trust, value);
}
}

View File

@ -6,6 +6,7 @@ import java.util.Objects;
public class Field<T> implements Serializable {
private static final long serialVersionUID = -4255501306375330131L;
private T value;
private DataInfo dataInfo;

View File

@ -2,6 +2,7 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
import org.apache.commons.lang3.StringUtils;
@ -9,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
public class GeoLocation implements Serializable {
private static final long serialVersionUID = 8096534610208458404L;
private String point;
private String box;
@ -39,38 +41,4 @@ public class GeoLocation implements Serializable {
this.place = place;
}
@JsonIgnore
public boolean isBlank() {
return StringUtils.isBlank(point) && StringUtils.isBlank(box) && StringUtils.isBlank(place);
}
public String toComparableString() {
return isBlank()
? ""
: String
.format(
"%s::%s%s",
point != null ? point.toLowerCase() : "",
box != null ? box.toLowerCase() : "",
place != null ? place.toLowerCase() : "");
}
@Override
public int hashCode() {
return toComparableString().hashCode();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
GeoLocation other = (GeoLocation) obj;
return toComparableString().equals(other.toComparableString());
}
}

View File

@ -21,8 +21,9 @@ import java.util.Objects;
* - private String level3 to store the information about the level3 of the classification
* - private String classification to store the entire classification related to the programme
*/
public class H2020Classification implements Serializable {
private static final long serialVersionUID = 1062734689288369769L;
private H2020Programme h2020Programme;
private String level1;
private String level2;
@ -70,19 +71,4 @@ public class H2020Classification implements Serializable {
this.classification = classification;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
H2020Classification h2020classification = (H2020Classification) o;
return Objects.equals(level1, h2020classification.level1) &&
Objects.equals(level2, h2020classification.level2) &&
Objects.equals(level3, h2020classification.level3) &&
Objects.equals(classification, h2020classification.classification) &&
h2020Programme.equals(h2020classification.h2020Programme);
}
}

View File

@ -9,8 +9,9 @@ import java.util.Objects;
* - private String code to store the code of the programme
* - private String description to store the description of the programme
*/
public class H2020Programme implements Serializable {
private static final long serialVersionUID = -7851791644568592481L;
private String code;
private String description;
@ -30,15 +31,4 @@ public class H2020Programme implements Serializable {
this.description = description;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
H2020Programme h2020Programme = (H2020Programme) o;
return Objects.equals(code, h2020Programme.code);
}
}

View File

@ -3,15 +3,21 @@ package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.List;
import java.util.Optional;
import com.google.common.base.Joiner;
public class Instance implements Serializable {
private static final long serialVersionUID = 3918544870298859300L;
private Field<String> license;
private Qualifier accessright;
private AccessRight accessright;
private Qualifier instancetype;
private List<InstanceTypeMapping> instanceTypeMapping;
private KeyValue hostedby;
private List<String> url;
@ -21,6 +27,10 @@ public class Instance implements Serializable {
private KeyValue collectedfrom;
private List<StructuredProperty> pid;
private List<StructuredProperty> alternateIdentifier;
private Field<String> dateofacceptance;
// ( article | book ) processing charges. Defined here to cope with possible wrongly typed
@ -33,6 +43,13 @@ public class Instance implements Serializable {
private Qualifier refereed; // peer-review status
private List<Measure> measures;
/**
* Direct fulltext URL.
*/
private String fulltext;
public Field<String> getLicense() {
return license;
}
@ -41,11 +58,11 @@ public class Instance implements Serializable {
this.license = license;
}
public Qualifier getAccessright() {
public AccessRight getAccessright() {
return accessright;
}
public void setAccessright(Qualifier accessright) {
public void setAccessright(AccessRight accessright) {
this.accessright = accessright;
}
@ -57,6 +74,14 @@ public class Instance implements Serializable {
this.instancetype = instancetype;
}
public List<InstanceTypeMapping> getInstanceTypeMapping() {
return instanceTypeMapping;
}
public void setInstanceTypeMapping(List<InstanceTypeMapping> instanceTypeMapping) {
this.instanceTypeMapping = instanceTypeMapping;
}
public KeyValue getHostedby() {
return hostedby;
}
@ -89,6 +114,14 @@ public class Instance implements Serializable {
this.collectedfrom = collectedfrom;
}
public List<StructuredProperty> getPid() {
return pid;
}
public void setPid(List<StructuredProperty> pid) {
this.pid = pid;
}
public Field<String> getDateofacceptance() {
return dateofacceptance;
}
@ -97,6 +130,14 @@ public class Instance implements Serializable {
this.dateofacceptance = dateofacceptance;
}
public List<StructuredProperty> getAlternateIdentifier() {
return alternateIdentifier;
}
public void setAlternateIdentifier(List<StructuredProperty> alternateIdentifier) {
this.alternateIdentifier = alternateIdentifier;
}
public Field<String> getProcessingchargeamount() {
return processingchargeamount;
}
@ -121,32 +162,20 @@ public class Instance implements Serializable {
this.refereed = refereed;
}
public String toComparableString() {
return String
.format(
"%s::%s::%s::%s",
hostedby != null && hostedby.getKey() != null ? hostedby.getKey().toLowerCase() : "",
accessright != null && accessright.getClassid() != null ? accessright.getClassid() : "",
instancetype != null && instancetype.getClassid() != null ? instancetype.getClassid() : "",
url != null ? url : "");
public List<Measure> getMeasures() {
return measures;
}
@Override
public int hashCode() {
return toComparableString().hashCode();
public void setMeasures(List<Measure> measures) {
this.measures = measures;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Instance other = (Instance) obj;
return toComparableString().equals(other.toComparableString());
public String getFulltext() {
return fulltext;
}
public void setFulltext(String fulltext) {
this.fulltext = fulltext;
}
}

View File

@ -0,0 +1,62 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
/**
* Defines a mapping between the original resource types and the type code and label available in a given vocabulary.
*/
public class InstanceTypeMapping implements Serializable {
private static final long serialVersionUID = -8209930054790495309L;
/**
* Original resource type, typically mapped from dc:type, datacite:resourceType.
*/
private String originalType;
/**
* Contains the code of the resource type resulted from the mapping.
*/
private String typeCode;
/**
* Contains the label of the resource type resulted from the mapping.
*/
private String typeLabel;
/**
* Contains name of the vocabulary used to produce this resource type mapping.
*/
private String vocabularyName;
public String getOriginalType() {
return originalType;
}
public void setOriginalType(String originalType) {
this.originalType = originalType;
}
public String getTypeCode() {
return typeCode;
}
public void setTypeCode(String typeCode) {
this.typeCode = typeCode;
}
public String getTypeLabel() {
return typeLabel;
}
public void setTypeLabel(String typeLabel) {
this.typeLabel = typeLabel;
}
public String getVocabularyName() {
return vocabularyName;
}
public void setVocabularyName(String vocabularyName) {
this.vocabularyName = vocabularyName;
}
}

View File

@ -6,6 +6,8 @@ import java.util.Objects;
public class Journal implements Serializable {
private static final long serialVersionUID = -8476321782780781681L;
private String name;
private String issnPrinted;
@ -126,42 +128,4 @@ public class Journal implements Serializable {
this.dataInfo = dataInfo;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Journal journal = (Journal) o;
return Objects.equals(name, journal.name)
&& Objects.equals(issnPrinted, journal.issnPrinted)
&& Objects.equals(issnOnline, journal.issnOnline)
&& Objects.equals(issnLinking, journal.issnLinking)
&& Objects.equals(ep, journal.ep)
&& Objects.equals(iss, journal.iss)
&& Objects.equals(sp, journal.sp)
&& Objects.equals(vol, journal.vol)
&& Objects.equals(edition, journal.edition)
&& Objects.equals(conferenceplace, journal.conferenceplace)
&& Objects.equals(conferencedate, journal.conferencedate)
&& Objects.equals(dataInfo, journal.dataInfo);
}
@Override
public int hashCode() {
return Objects
.hash(
name,
issnPrinted,
issnOnline,
issnLinking,
ep,
iss,
sp,
vol,
edition,
conferenceplace,
conferencedate,
dataInfo);
}
}

View File

@ -2,13 +2,17 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
import java.util.Optional;
import org.apache.commons.lang3.StringUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.base.Joiner;
public class KeyValue implements Serializable {
private static final long serialVersionUID = 1905267445569591240L;
private String key;
private String value;
@ -39,36 +43,4 @@ public class KeyValue implements Serializable {
this.dataInfo = dataInfo;
}
public String toComparableString() {
return isBlank()
? ""
: String
.format(
"%s::%s",
key != null ? key.toLowerCase() : "", value != null ? value.toLowerCase() : "");
}
@JsonIgnore
public boolean isBlank() {
return StringUtils.isBlank(key) && StringUtils.isBlank(value);
}
@Override
public int hashCode() {
return toComparableString().hashCode();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
KeyValue other = (KeyValue) obj;
return toComparableString().equals(other.toComparableString());
}
}

View File

@ -1,6 +1,7 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.List;
import com.google.common.base.Objects;
@ -8,15 +9,16 @@ import com.google.common.base.Objects;
/**
* Represent a measure, must be further described by a system available resource providing name and descriptions.
*/
public class Measure {
public class Measure implements Serializable {
private static final long serialVersionUID = 8383308453679722661L;
/**
* Unique measure identifier.
*/
private String id;
/**
* List of units associated with this measure. KeyValue provides a pair to store the laber (key) and the value, plus
* List of units associated with this measure. KeyValue provides a pair to store the label (key) and the value, plus
* common provenance information.
*/
private List<KeyValue> unit;
@ -37,23 +39,4 @@ public class Measure {
this.unit = unit;
}
public void mergeFrom(Measure m) {
// TODO
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Measure measure = (Measure) o;
return Objects.equal(id, measure.id) &&
Objects.equal(unit, measure.unit);
}
@Override
public int hashCode() {
return Objects.hashCode(id, unit);
}
}

View File

@ -6,6 +6,8 @@ import java.util.Objects;
public class OAIProvenance implements Serializable {
private static final long serialVersionUID = -767252660700352729L;
private OriginDescription originDescription;
public OriginDescription getOriginDescription() {
@ -16,18 +18,4 @@ public class OAIProvenance implements Serializable {
this.originDescription = originDescription;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
OAIProvenance that = (OAIProvenance) o;
return Objects.equals(originDescription, that.originDescription);
}
@Override
public int hashCode() {
return Objects.hash(originDescription);
}
}

View File

@ -11,6 +11,7 @@ import java.util.stream.Stream;
public abstract class Oaf implements Serializable {
private static final long serialVersionUID = 94599232915572420L;
/**
* The list of datasource id/name pairs providing this relationship.
*/
@ -44,59 +45,4 @@ public abstract class Oaf implements Serializable {
this.lastupdatetimestamp = lastupdatetimestamp;
}
public void mergeFrom(Oaf o) {
if (Objects.isNull(o)) {
return;
}
setCollectedfrom(
Stream
.concat(
Optional
.ofNullable(getCollectedfrom())
.map(Collection::stream)
.orElse(Stream.empty()),
Optional
.ofNullable(o.getCollectedfrom())
.map(Collection::stream)
.orElse(Stream.empty()))
.distinct() // relies on KeyValue.equals
.collect(Collectors.toList()));
setLastupdatetimestamp(
Math
.max(
Optional.ofNullable(getLastupdatetimestamp()).orElse(0L),
Optional.ofNullable(o.getLastupdatetimestamp()).orElse(0L)));
}
public void mergeOAFDataInfo(Oaf o) {
if (o.getDataInfo() != null && compareTrust(this, o) < 0)
dataInfo = o.getDataInfo();
}
protected String extractTrust(Oaf e) {
if (e == null || e.getDataInfo() == null || e.getDataInfo().getTrust() == null)
return "0.0";
return e.getDataInfo().getTrust();
}
protected int compareTrust(Oaf a, Oaf b) {
return extractTrust(a).compareTo(extractTrust(b));
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Oaf oaf = (Oaf) o;
return Objects.equals(getDataInfo(), oaf.getDataInfo())
&& Objects.equals(lastupdatetimestamp, oaf.lastupdatetimestamp);
}
@Override
public int hashCode() {
return Objects.hash(dataInfo, lastupdatetimestamp);
}
}

View File

@ -7,6 +7,8 @@ import java.util.stream.Collectors;
public abstract class OafEntity extends Oaf implements Serializable {
private static final long serialVersionUID = -7793594664115821897L;
private String id;
private List<String> originalId;
@ -21,6 +23,52 @@ public abstract class OafEntity extends Oaf implements Serializable {
private OAIProvenance oaiprovenance;
/**
* The Measures.
*/
private List<Measure> measures;
/**
* The Context.
*/
private List<Context> context;
/**
* Gets context.
*
* @return the context
*/
public List<Context> getContext() {
return context;
}
/**
* Sets context.
*
* @param context the context
*/
public void setContext(List<Context> context) {
this.context = context;
}
/**
* Gets measures.
*
* @return the measures
*/
public List<Measure> getMeasures() {
return measures;
}
/**
* Sets measures.
*
* @param measures the measures
*/
public void setMeasures(List<Measure> measures) {
this.measures = measures;
}
public String getId() {
return id;
}
@ -77,50 +125,19 @@ public abstract class OafEntity extends Oaf implements Serializable {
this.oaiprovenance = oaiprovenance;
}
public void mergeFrom(OafEntity e) {
super.mergeFrom(e);
originalId = mergeLists(originalId, e.getOriginalId());
pid = mergeLists(pid, e.getPid());
if (e.getDateofcollection() != null && compareTrust(this, e) < 0)
dateofcollection = e.getDateofcollection();
if (e.getDateoftransformation() != null && compareTrust(this, e) < 0)
dateoftransformation = e.getDateoftransformation();
extraInfo = mergeLists(extraInfo, e.getExtraInfo());
if (e.getOaiprovenance() != null && compareTrust(this, e) < 0)
oaiprovenance = e.getOaiprovenance();
}
protected <T> List<T> mergeLists(final List<T>... lists) {
return Arrays
.stream(lists)
.filter(Objects::nonNull)
.flatMap(List::stream)
.filter(Objects::nonNull)
.distinct()
.collect(Collectors.toList());
@Override
public int hashCode() {
return Objects.hash(getId());
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
if (!super.equals(o))
if (!(o instanceof OafEntity))
return false;
OafEntity oafEntity = (OafEntity) o;
return Objects.equals(id, oafEntity.id);
return Objects.equals(getId(), oafEntity.getId());
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), id);
}
}

View File

@ -0,0 +1,12 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
/**
* The OpenAccess color meant to be used on the result level
*/
public enum OpenAccessColor implements Serializable {
gold, hybrid, bronze
}

View File

@ -0,0 +1,13 @@
package eu.dnetlib.dhp.schema.oaf;
/**
* This Enum models the OpenAccess status, currently including only the values from Unpaywall
*
* https://support.unpaywall.org/support/solutions/articles/44001777288-what-do-the-types-of-oa-status-green-gold-hybrid-and-bronze-mean-
*/
public enum OpenAccessRoute {
gold, green, hybrid, bronze
}

View File

@ -6,6 +6,8 @@ import java.util.List;
public class Organization extends OafEntity implements Serializable {
private static final long serialVersionUID = -9048723860770504113L;
private Field<String> legalshortname;
private Field<String> legalname;
@ -167,48 +169,4 @@ public class Organization extends OafEntity implements Serializable {
this.country = country;
}
@Override
public void mergeFrom(OafEntity e) {
super.mergeFrom(e);
if (!Organization.class.isAssignableFrom(e.getClass())) {
return;
}
final Organization o = (Organization) e;
legalshortname = o.getLegalshortname() != null && compareTrust(this, e) < 0
? o.getLegalshortname()
: legalshortname;
legalname = o.getLegalname() != null && compareTrust(this, e) < 0 ? o.getLegalname() : legalname;
alternativeNames = mergeLists(o.getAlternativeNames(), alternativeNames);
websiteurl = o.getWebsiteurl() != null && compareTrust(this, e) < 0 ? o.getWebsiteurl() : websiteurl;
logourl = o.getLogourl() != null && compareTrust(this, e) < 0 ? o.getLogourl() : logourl;
eclegalbody = o.getEclegalbody() != null && compareTrust(this, e) < 0 ? o.getEclegalbody() : eclegalbody;
eclegalperson = o.getEclegalperson() != null && compareTrust(this, e) < 0
? o.getEclegalperson()
: eclegalperson;
ecnonprofit = o.getEcnonprofit() != null && compareTrust(this, e) < 0 ? o.getEcnonprofit() : ecnonprofit;
ecresearchorganization = o.getEcresearchorganization() != null && compareTrust(this, e) < 0
? o.getEcresearchorganization()
: ecresearchorganization;
echighereducation = o.getEchighereducation() != null && compareTrust(this, e) < 0
? o.getEchighereducation()
: echighereducation;
ecinternationalorganizationeurinterests = o.getEcinternationalorganizationeurinterests() != null
&& compareTrust(this, e) < 0
? o.getEcinternationalorganizationeurinterests()
: ecinternationalorganizationeurinterests;
ecinternationalorganization = o.getEcinternationalorganization() != null && compareTrust(this, e) < 0
? o.getEcinternationalorganization()
: ecinternationalorganization;
ecenterprise = o.getEcenterprise() != null && compareTrust(this, e) < 0
? o.getEcenterprise()
: ecenterprise;
ecsmevalidated = o.getEcsmevalidated() != null && compareTrust(this, e) < 0
? o.getEcsmevalidated()
: ecsmevalidated;
ecnutscode = o.getEcnutscode() != null && compareTrust(this, e) < 0 ? o.getEcnutscode() : ecnutscode;
country = o.getCountry() != null && compareTrust(this, e) < 0 ? o.getCountry() : country;
mergeOAFDataInfo(o);
}
}

View File

@ -6,6 +6,8 @@ import java.util.Objects;
public class OriginDescription implements Serializable {
private static final long serialVersionUID = -7256156902727658863L;
private String harvestDate;
private Boolean altered = true;
@ -66,23 +68,4 @@ public class OriginDescription implements Serializable {
this.metadataNamespace = metadataNamespace;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
OriginDescription that = (OriginDescription) o;
return Objects.equals(harvestDate, that.harvestDate)
&& Objects.equals(altered, that.altered)
&& Objects.equals(baseURL, that.baseURL)
&& Objects.equals(identifier, that.identifier)
&& Objects.equals(datestamp, that.datestamp)
&& Objects.equals(metadataNamespace, that.metadataNamespace);
}
@Override
public int hashCode() {
return Objects.hash(harvestDate, altered, baseURL, identifier, datestamp, metadataNamespace);
}
}

View File

@ -8,6 +8,8 @@ import eu.dnetlib.dhp.schema.common.ModelConstants;
public class OtherResearchProduct extends Result implements Serializable {
private static final long serialVersionUID = -7611546868867175491L;
private List<Field<String>> contactperson;
private List<Field<String>> contactgroup;
@ -42,19 +44,4 @@ public class OtherResearchProduct extends Result implements Serializable {
this.tool = tool;
}
@Override
public void mergeFrom(OafEntity e) {
super.mergeFrom(e);
if (!OtherResearchProduct.class.isAssignableFrom(e.getClass())) {
return;
}
OtherResearchProduct o = (OtherResearchProduct) e;
contactperson = mergeLists(contactperson, o.getContactperson());
contactgroup = mergeLists(contactgroup, o.getContactgroup());
tool = mergeLists(tool, o.getTool());
mergeOAFDataInfo(e);
}
}

View File

@ -4,8 +4,12 @@ package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
public class Project extends OafEntity implements Serializable {
private static final long serialVersionUID = 5783959097903529424L;
private Field<String> websiteurl;
private Field<String> code;
@ -296,63 +300,4 @@ public class Project extends OafEntity implements Serializable {
this.fundedamount = fundedamount;
}
@Override
public void mergeFrom(OafEntity e) {
super.mergeFrom(e);
if (!Project.class.isAssignableFrom(e.getClass())) {
return;
}
Project p = (Project) e;
websiteurl = p.getWebsiteurl() != null && compareTrust(this, e) < 0 ? p.getWebsiteurl() : websiteurl;
code = p.getCode() != null && compareTrust(this, e) < 0 ? p.getCode() : code;
acronym = p.getAcronym() != null && compareTrust(this, e) < 0 ? p.getAcronym() : acronym;
title = p.getTitle() != null && compareTrust(this, e) < 0 ? p.getTitle() : title;
startdate = p.getStartdate() != null && compareTrust(this, e) < 0 ? p.getStartdate() : startdate;
enddate = p.getEnddate() != null && compareTrust(this, e) < 0 ? p.getEnddate() : enddate;
callidentifier = p.getCallidentifier() != null && compareTrust(this, e) < 0
? p.getCallidentifier()
: callidentifier;
keywords = p.getKeywords() != null && compareTrust(this, e) < 0 ? p.getKeywords() : keywords;
duration = p.getDuration() != null && compareTrust(this, e) < 0 ? p.getDuration() : duration;
ecsc39 = p.getEcsc39() != null && compareTrust(this, e) < 0 ? p.getEcsc39() : ecsc39;
oamandatepublications = p.getOamandatepublications() != null && compareTrust(this, e) < 0
? p.getOamandatepublications()
: oamandatepublications;
ecarticle29_3 = p.getEcarticle29_3() != null && compareTrust(this, e) < 0
? p.getEcarticle29_3()
: ecarticle29_3;
subjects = mergeLists(subjects, p.getSubjects());
fundingtree = mergeLists(fundingtree, p.getFundingtree());
contracttype = p.getContracttype() != null && compareTrust(this, e) < 0
? p.getContracttype()
: contracttype;
optional1 = p.getOptional1() != null && compareTrust(this, e) < 0 ? p.getOptional1() : optional1;
optional2 = p.getOptional2() != null && compareTrust(this, e) < 0 ? p.getOptional2() : optional2;
jsonextrainfo = p.getJsonextrainfo() != null && compareTrust(this, e) < 0
? p.getJsonextrainfo()
: jsonextrainfo;
contactfullname = p.getContactfullname() != null && compareTrust(this, e) < 0
? p.getContactfullname()
: contactfullname;
contactfax = p.getContactfax() != null && compareTrust(this, e) < 0 ? p.getContactfax() : contactfax;
contactphone = p.getContactphone() != null && compareTrust(this, e) < 0
? p.getContactphone()
: contactphone;
contactemail = p.getContactemail() != null && compareTrust(this, e) < 0
? p.getContactemail()
: contactemail;
summary = p.getSummary() != null && compareTrust(this, e) < 0 ? p.getSummary() : summary;
currency = p.getCurrency() != null && compareTrust(this, e) < 0 ? p.getCurrency() : currency;
totalcost = p.getTotalcost() != null && compareTrust(this, e) < 0 ? p.getTotalcost() : totalcost;
fundedamount = p.getFundedamount() != null && compareTrust(this, e) < 0
? p.getFundedamount()
: fundedamount;
h2020classification = mergeLists(h2020classification, p.getH2020classification());
mergeOAFDataInfo(e);
}
}

View File

@ -7,6 +7,8 @@ import eu.dnetlib.dhp.schema.common.ModelConstants;
public class Publication extends Result implements Serializable {
private static final long serialVersionUID = 4155353046627214846L;
// publication specific
private Journal journal;
@ -22,18 +24,4 @@ public class Publication extends Result implements Serializable {
this.journal = journal;
}
@Override
public void mergeFrom(OafEntity e) {
super.mergeFrom(e);
if (!Publication.class.isAssignableFrom(e.getClass())) {
return;
}
Publication p = (Publication) e;
if (p.getJournal() != null && compareTrust(this, e) < 0)
journal = p.getJournal();
mergeOAFDataInfo(e);
}
}

View File

@ -2,13 +2,15 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
import java.util.Optional;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.EqualsBuilder;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.base.Joiner;
public class Qualifier implements Serializable {
private static final long serialVersionUID = 6632548656644563076L;
private String classid;
private String classname;
private String schemeid;
@ -46,42 +48,4 @@ public class Qualifier implements Serializable {
this.schemename = schemename;
}
public String toComparableString() {
return isBlank()
? ""
: String
.format(
"%s::%s::%s::%s",
classid != null ? classid : "",
classname != null ? classname : "",
schemeid != null ? schemeid : "",
schemename != null ? schemename : "");
}
@JsonIgnore
public boolean isBlank() {
return StringUtils.isBlank(classid)
&& StringUtils.isBlank(classname)
&& StringUtils.isBlank(schemeid)
&& StringUtils.isBlank(schemename);
}
@Override
public int hashCode() {
return toComparableString().hashCode();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Qualifier other = (Qualifier) obj;
return toComparableString().equals(other.toComparableString());
}
}

View File

@ -4,9 +4,9 @@ package eu.dnetlib.dhp.schema.oaf;
import static com.google.common.base.Preconditions.checkArgument;
import java.text.ParseException;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import eu.dnetlib.dhp.schema.common.ModelSupport;
@ -18,6 +18,8 @@ import eu.dnetlib.dhp.schema.common.ModelSupport;
*/
public class Relation extends Oaf {
private static final long serialVersionUID = -7061565324218172207L;
/**
* Main relationship classifier, values include 'resultResult', 'resultProject', 'resultOrganization', etc.
*/
@ -124,23 +126,9 @@ public class Relation extends Oaf {
this.validationDate = validationDate;
}
public void mergeFrom(final Relation r) {
checkArgument(Objects.equals(getSource(), r.getSource()), "source ids must be equal");
checkArgument(Objects.equals(getTarget(), r.getTarget()), "target ids must be equal");
checkArgument(Objects.equals(getRelType(), r.getRelType()), "relType(s) must be equal");
checkArgument(
Objects.equals(getSubRelType(), r.getSubRelType()), "subRelType(s) must be equal");
checkArgument(Objects.equals(getRelClass(), r.getRelClass()), "relClass(es) must be equal");
setValidated(getValidated() || r.getValidated());
try {
setValidationDate(ModelSupport.oldest(getValidationDate(), r.getValidationDate()));
} catch (ParseException e) {
throw new IllegalArgumentException(String.format("invalid validation date format in relation [s:%s, t:%s]: %s", getSource(), getTarget(), getValidationDate()));
}
super.mergeFrom(r);
@Override
public int hashCode() {
return Objects.hash(getRelType(), getSubRelType(), getRelClass(), getSource(), getTarget());
}
@Override
@ -150,16 +138,11 @@ public class Relation extends Oaf {
if (o == null || getClass() != o.getClass())
return false;
Relation relation = (Relation) o;
return relType.equals(relation.relType)
&& subRelType.equals(relation.subRelType)
&& relClass.equals(relation.relClass)
&& source.equals(relation.source)
&& target.equals(relation.target);
}
@Override
public int hashCode() {
return Objects.hash(relType, subRelType, relClass, source, target, collectedfrom);
return Objects.equals(getRelType(), relation.getRelType()) &&
Objects.equals(getSubRelType(), relation.getSubRelType()) &&
Objects.equals(getRelClass(), relation.getRelClass()) &&
Objects.equals(getSource(), relation.getSource()) &&
Objects.equals(getTarget(), relation.getTarget());
}
}

View File

@ -2,350 +2,581 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import eu.dnetlib.dhp.schema.common.LicenseComparator;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* The type Result.
*/
public class Result extends OafEntity implements Serializable {
private List<Measure> measures;
private static final long serialVersionUID = 5597290552671699408L;
/**
* ( article | book ) processing charges.
*/
private Field<String> processingchargeamount;
/**
* currency - alphabetic code describe in ISO-4217.
*/
private Field<String> processingchargecurrency;
/**
* The Author.
*/
private List<Author> author;
// resulttype allows subclassing results into publications | datasets | software
/**
* The Resulttype.
*/
// resulttype allows subclassing results into publications | datasets | software
private Qualifier resulttype;
// common fields
/**
* Temporary field suporting the analysis of the new COAR-based resource types
*/
private Qualifier metaResourceType;
/**
* The Language.
*/
// common fields
private Qualifier language;
/**
* The Country.
*/
private List<Country> country;
private List<StructuredProperty> subject;
/**
* The Subject.
*/
private List<Subject> subject;
/**
* The Title.
*/
private List<StructuredProperty> title;
/**
* The Relevantdate.
*/
private List<StructuredProperty> relevantdate;
/**
* The Description.
*/
private List<Field<String>> description;
/**
* The Dateofacceptance.
*/
private Field<String> dateofacceptance;
/**
* The Publisher.
*/
private Field<String> publisher;
/**
* The Embargoenddate.
*/
private Field<String> embargoenddate;
/**
* The Source.
*/
private List<Field<String>> source;
private List<Field<String>> fulltext; // remove candidate
/**
* The list of direct fulltext URLs.
*/
private List<Field<String>> fulltext;
/**
* The Format.
*/
private List<Field<String>> format;
/**
* The Contributor.
*/
private List<Field<String>> contributor;
/**
* The Resourcetype.
*/
private Qualifier resourcetype;
/**
* The Coverage.
*/
private List<Field<String>> coverage;
/**
* The Bestaccessright.
*/
private Qualifier bestaccessright;
private List<Context> context;
/**
* The External reference.
*/
private List<ExternalReference> externalReference;
/**
* The Instance.
*/
private List<Instance> instance;
public List<Measure> getMeasures() {
return measures;
/**
* EOSC Interoperability Framework Guidelines
*/
private List<EoscIfGuidelines> eoscifguidelines;
@JsonProperty("isGreen")
private Boolean isGreen;
private OpenAccessColor openAccessColor;
@JsonProperty("isInDiamondJournal")
private Boolean isInDiamondJournal;
private Boolean publiclyFunded;
private String transformativeAgreement;
public String getTransformativeAgreement() {
return transformativeAgreement;
}
public void setMeasures(List<Measure> measures) {
this.measures = measures;
public void setTransformativeAgreement(String transformativeAgreement) {
this.transformativeAgreement = transformativeAgreement;
}
public Field<String> getProcessingchargeamount() {
return processingchargeamount;
}
public void setProcessingchargeamount(Field<String> processingchargeamount) {
this.processingchargeamount = processingchargeamount;
}
public Field<String> getProcessingchargecurrency() {
return processingchargecurrency;
}
public void setProcessingchargecurrency(Field<String> processingchargecurrency) {
this.processingchargecurrency = processingchargecurrency;
}
/**
* Gets author.
*
* @return the author
*/
public List<Author> getAuthor() {
return author;
}
/**
* Sets author.
*
* @param author the author
*/
public void setAuthor(List<Author> author) {
this.author = author;
}
/**
* Gets resulttype.
*
* @return the resulttype
*/
public Qualifier getResulttype() {
return resulttype;
}
/**
* Sets resulttype.
*
* @param resulttype the resulttype
*/
public void setResulttype(Qualifier resulttype) {
this.resulttype = resulttype;
}
public Qualifier getMetaResourceType() {
return metaResourceType;
}
public void setMetaResourceType(Qualifier metaResourceType) {
this.metaResourceType = metaResourceType;
}
/**
* Gets language.
*
* @return the language
*/
public Qualifier getLanguage() {
return language;
}
/**
* Sets language.
*
* @param language the language
*/
public void setLanguage(Qualifier language) {
this.language = language;
}
/**
* Gets country.
*
* @return the country
*/
public List<Country> getCountry() {
return country;
}
/**
* Sets country.
*
* @param country the country
*/
public void setCountry(List<Country> country) {
this.country = country;
}
public List<StructuredProperty> getSubject() {
/**
* Gets subject.
*
* @return the subject
*/
public List<Subject> getSubject() {
return subject;
}
public void setSubject(List<StructuredProperty> subject) {
/**
* Sets subject.
*
* @param subject the subject
*/
public void setSubject(List<Subject> subject) {
this.subject = subject;
}
/**
* Gets title.
*
* @return the title
*/
public List<StructuredProperty> getTitle() {
return title;
}
/**
* Sets title.
*
* @param title the title
*/
public void setTitle(List<StructuredProperty> title) {
this.title = title;
}
/**
* Gets relevantdate.
*
* @return the relevantdate
*/
public List<StructuredProperty> getRelevantdate() {
return relevantdate;
}
/**
* Sets relevantdate.
*
* @param relevantdate the relevantdate
*/
public void setRelevantdate(List<StructuredProperty> relevantdate) {
this.relevantdate = relevantdate;
}
/**
* Gets description.
*
* @return the description
*/
public List<Field<String>> getDescription() {
return description;
}
/**
* Sets description.
*
* @param description the description
*/
public void setDescription(List<Field<String>> description) {
this.description = description;
}
/**
* Gets dateofacceptance.
*
* @return the dateofacceptance
*/
public Field<String> getDateofacceptance() {
return dateofacceptance;
}
/**
* Sets dateofacceptance.
*
* @param dateofacceptance the dateofacceptance
*/
public void setDateofacceptance(Field<String> dateofacceptance) {
this.dateofacceptance = dateofacceptance;
}
/**
* Gets publisher.
*
* @return the publisher
*/
public Field<String> getPublisher() {
return publisher;
}
/**
* Sets publisher.
*
* @param publisher the publisher
*/
public void setPublisher(Field<String> publisher) {
this.publisher = publisher;
}
/**
* Gets embargoenddate.
*
* @return the embargoenddate
*/
public Field<String> getEmbargoenddate() {
return embargoenddate;
}
/**
* Sets embargoenddate.
*
* @param embargoenddate the embargoenddate
*/
public void setEmbargoenddate(Field<String> embargoenddate) {
this.embargoenddate = embargoenddate;
}
/**
* Gets source.
*
* @return the source
*/
public List<Field<String>> getSource() {
return source;
}
/**
* Sets source.
*
* @param source the source
*/
public void setSource(List<Field<String>> source) {
this.source = source;
}
/**
* Gets fulltext.
*
* @return the fulltext
*/
public List<Field<String>> getFulltext() {
return fulltext;
}
/**
* Sets fulltext.
*
* @param fulltext the fulltext
*/
public void setFulltext(List<Field<String>> fulltext) {
this.fulltext = fulltext;
}
/**
* Gets format.
*
* @return the format
*/
public List<Field<String>> getFormat() {
return format;
}
/**
* Sets format.
*
* @param format the format
*/
public void setFormat(List<Field<String>> format) {
this.format = format;
}
/**
* Gets contributor.
*
* @return the contributor
*/
public List<Field<String>> getContributor() {
return contributor;
}
/**
* Sets contributor.
*
* @param contributor the contributor
*/
public void setContributor(List<Field<String>> contributor) {
this.contributor = contributor;
}
/**
* Gets resourcetype.
*
* @return the resourcetype
*/
public Qualifier getResourcetype() {
return resourcetype;
}
/**
* Sets resourcetype.
*
* @param resourcetype the resourcetype
*/
public void setResourcetype(Qualifier resourcetype) {
this.resourcetype = resourcetype;
}
/**
* Gets coverage.
*
* @return the coverage
*/
public List<Field<String>> getCoverage() {
return coverage;
}
/**
* Sets coverage.
*
* @param coverage the coverage
*/
public void setCoverage(List<Field<String>> coverage) {
this.coverage = coverage;
}
/**
* Gets bestaccessright.
*
* @return the bestaccessright
*/
public Qualifier getBestaccessright() {
return bestaccessright;
}
/**
* Sets bestaccessright.
*
* @param bestaccessright the bestaccessright
*/
public void setBestaccessright(Qualifier bestaccessright) {
this.bestaccessright = bestaccessright;
}
public List<Context> getContext() {
return context;
}
public void setContext(List<Context> context) {
this.context = context;
}
/**
* Gets external reference.
*
* @return the external reference
*/
public List<ExternalReference> getExternalReference() {
return externalReference;
}
/**
* Sets external reference.
*
* @param externalReference the external reference
*/
public void setExternalReference(List<ExternalReference> externalReference) {
this.externalReference = externalReference;
}
/**
* Gets instance.
*
* @return the instance
*/
public List<Instance> getInstance() {
return instance;
}
/**
* Sets instance.
*
* @param instance the instance
*/
public void setInstance(List<Instance> instance) {
this.instance = instance;
}
@Override
public void mergeFrom(OafEntity e) {
super.mergeFrom(e);
if (!Result.class.isAssignableFrom(e.getClass())) {
return;
}
Result r = (Result) e;
measures = mergeLists(measures, r.getMeasures());
instance = mergeLists(instance, r.getInstance());
if (r.getBestaccessright() != null
&& new LicenseComparator().compare(r.getBestaccessright(), bestaccessright) < 0)
bestaccessright = r.getBestaccessright();
if (r.getResulttype() != null && compareTrust(this, r) < 0)
resulttype = r.getResulttype();
if (r.getLanguage() != null && compareTrust(this, r) < 0)
language = r.getLanguage();
country = mergeLists(country, r.getCountry());
subject = mergeLists(subject, r.getSubject());
// merge title lists: main title with higher trust and distinct between the others
StructuredProperty baseMainTitle = null;
if (title != null) {
baseMainTitle = getMainTitle(title);
if (baseMainTitle != null) {
final StructuredProperty p = baseMainTitle;
title = title.stream().filter(t -> t != p).collect(Collectors.toList());
}
}
StructuredProperty newMainTitle = null;
if (r.getTitle() != null) {
newMainTitle = getMainTitle(r.getTitle());
if (newMainTitle != null) {
final StructuredProperty p = newMainTitle;
r.setTitle(r.getTitle().stream().filter(t -> t != p).collect(Collectors.toList()));
}
}
if (newMainTitle != null && compareTrust(this, r) < 0) {
baseMainTitle = newMainTitle;
}
title = mergeLists(title, r.getTitle());
if (title != null && baseMainTitle != null) {
title.add(baseMainTitle);
}
relevantdate = mergeLists(relevantdate, r.getRelevantdate());
description = longestLists(description, r.getDescription());
if (r.getPublisher() != null && compareTrust(this, r) < 0)
publisher = r.getPublisher();
if (r.getEmbargoenddate() != null && compareTrust(this, r) < 0)
embargoenddate = r.getEmbargoenddate();
source = mergeLists(source, r.getSource());
fulltext = mergeLists(fulltext, r.getFulltext());
format = mergeLists(format, r.getFormat());
contributor = mergeLists(contributor, r.getContributor());
if (r.getResourcetype() != null)
resourcetype = r.getResourcetype();
coverage = mergeLists(coverage, r.getCoverage());
context = mergeLists(context, r.getContext());
externalReference = mergeLists(externalReference, r.getExternalReference());
public List<EoscIfGuidelines> getEoscifguidelines() {
return eoscifguidelines;
}
private List<Field<String>> longestLists(List<Field<String>> a, List<Field<String>> b) {
if (a == null || b == null)
return a == null ? b : a;
if (a.size() == b.size()) {
int msa = a
.stream()
.filter(i -> i != null && i.getValue() != null)
.map(i -> i.getValue().length())
.max(Comparator.naturalOrder())
.orElse(0);
int msb = b
.stream()
.filter(i -> i != null && i.getValue() != null)
.map(i -> i.getValue().length())
.max(Comparator.naturalOrder())
.orElse(0);
return msa > msb ? a : b;
}
return a.size() > b.size() ? a : b;
public void setEoscifguidelines(List<EoscIfGuidelines> eoscifguidelines) {
this.eoscifguidelines = eoscifguidelines;
}
private StructuredProperty getMainTitle(List<StructuredProperty> titles) {
// need to check if the list of titles contains more than 1 main title? (in that case, we should chose which
// main title select in the list)
for (StructuredProperty title : titles) {
if (title.getQualifier() != null && title.getQualifier().getClassid() != null)
if (title.getQualifier().getClassid().equals("main title"))
return title;
}
return null;
public Boolean getIsGreen() {
return isGreen;
}
public void setIsGreen(Boolean green) {
isGreen = green;
}
public OpenAccessColor getOpenAccessColor() {
return openAccessColor;
}
public void setOpenAccessColor(OpenAccessColor openAccessColor) {
this.openAccessColor = openAccessColor;
}
public Boolean getIsInDiamondJournal() {
return isInDiamondJournal;
}
public void setIsInDiamondJournal(Boolean inDiamondJournal) {
isInDiamondJournal = inDiamondJournal;
}
public Boolean getPubliclyFunded() {
return publiclyFunded;
}
public void setPubliclyFunded(Boolean publiclyFunded) {
this.publiclyFunded = publiclyFunded;
}
}

View File

@ -8,6 +8,8 @@ import eu.dnetlib.dhp.schema.common.ModelConstants;
public class Software extends Result implements Serializable {
private static final long serialVersionUID = -3096641763359312576L;
private List<Field<String>> documentationUrl;
// candidate for removal
@ -54,27 +56,4 @@ public class Software extends Result implements Serializable {
this.programmingLanguage = programmingLanguage;
}
@Override
public void mergeFrom(OafEntity e) {
super.mergeFrom(e);
if (!Software.class.isAssignableFrom(e.getClass())) {
return;
}
final Software s = (Software) e;
documentationUrl = mergeLists(documentationUrl, s.getDocumentationUrl());
license = mergeLists(license, s.getLicense());
codeRepositoryUrl = s.getCodeRepositoryUrl() != null && compareTrust(this, s) < 0
? s.getCodeRepositoryUrl()
: codeRepositoryUrl;
programmingLanguage = s.getProgrammingLanguage() != null && compareTrust(this, s) < 0
? s.getProgrammingLanguage()
: programmingLanguage;
mergeOAFDataInfo(e);
}
}

View File

@ -2,9 +2,17 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.commons.lang3.StringUtils;
public class StructuredProperty implements Serializable {
private static final long serialVersionUID = -8490243153237377762L;
private String value;
private Qualifier qualifier;
@ -35,26 +43,4 @@ public class StructuredProperty implements Serializable {
this.dataInfo = dataInfo;
}
public String toComparableString() {
return value != null ? value.toLowerCase() : "";
}
@Override
public int hashCode() {
return toComparableString().hashCode();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
StructuredProperty other = (StructuredProperty) obj;
return toComparableString().equals(other.toComparableString());
}
}

View File

@ -0,0 +1,9 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
public class Subject extends StructuredProperty implements Serializable {
private static final long serialVersionUID = 5072481219939207428L;
}

View File

@ -0,0 +1,79 @@
package eu.dnetlib.dhp.schema.orcid;
import java.io.Serializable;
public class AuthorHistory implements Serializable {
private String creationMethod;
private String completionDate;
private String submissionDate;
private String lastModifiedDate;
private boolean claimed;
private String deactivationDate;
private boolean verifiedEmail;
private boolean verifiedPrimaryEmail;
public String getCreationMethod() {
return creationMethod;
}
public void setCreationMethod(String creationMethod) {
this.creationMethod = creationMethod;
}
public String getCompletionDate() {
return completionDate;
}
public void setCompletionDate(String completionDate) {
this.completionDate = completionDate;
}
public String getSubmissionDate() {
return submissionDate;
}
public void setSubmissionDate(String submissionDate) {
this.submissionDate = submissionDate;
}
public String getLastModifiedDate() {
return lastModifiedDate;
}
public void setLastModifiedDate(String lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
public boolean isClaimed() {
return claimed;
}
public void setClaimed(boolean claimed) {
this.claimed = claimed;
}
public String getDeactivationDate() {
return deactivationDate;
}
public void setDeactivationDate(String deactivationDate) {
this.deactivationDate = deactivationDate;
}
public boolean isVerifiedEmail() {
return verifiedEmail;
}
public void setVerifiedEmail(boolean verifiedEmail) {
this.verifiedEmail = verifiedEmail;
}
public boolean isVerifiedPrimaryEmail() {
return verifiedPrimaryEmail;
}
public void setVerifiedPrimaryEmail(boolean verifiedPrimaryEmail) {
this.verifiedPrimaryEmail = verifiedPrimaryEmail;
}
}

View File

@ -0,0 +1,25 @@
package eu.dnetlib.dhp.schema.orcid;
import java.io.Serializable;
public class AuthorSummary extends OrcidData implements Serializable {
private AuthorData authorData;
private AuthorHistory authorHistory;
public AuthorData getAuthorData() {
return authorData;
}
public void setAuthorData(AuthorData authorData) {
this.authorData = authorData;
}
public AuthorHistory getAuthorHistory() {
return authorHistory;
}
public void setAuthorHistory(AuthorHistory authorHistory) {
this.authorHistory = authorHistory;
}
}

View File

@ -0,0 +1,55 @@
package eu.dnetlib.dhp.schema.orcid;
import java.io.Serializable;
/**
* This class models the data related to a contributor, that are retrieved from an orcid publication
*/
public class Contributor extends AuthorData implements Serializable {
private String sequence;
private String role;
private transient boolean simpleMatch;
private transient Double score;
private transient boolean bestMatch;
public String getSequence() {
return sequence;
}
public void setSequence(String sequence) {
this.sequence = sequence;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public boolean isSimpleMatch() {
return simpleMatch;
}
public void setSimpleMatch(boolean simpleMatch) {
this.simpleMatch = simpleMatch;
}
public Double getScore() {
return score;
}
public void setScore(Double score) {
this.score = score;
}
public boolean isBestMatch() {
return bestMatch;
}
public void setBestMatch(boolean bestMatch) {
this.bestMatch = bestMatch;
}
}

View File

@ -0,0 +1,38 @@
package eu.dnetlib.dhp.schema.orcid;
import java.io.Serializable;
/**
* This class models the data related to external id, that are retrieved from an orcid publication
*/
public class ExternalId implements Serializable {
private String type;
private String value;
private String relationShip;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getRelationShip() {
return relationShip;
}
public void setRelationShip(String relationShip) {
this.relationShip = relationShip;
}
}

View File

@ -0,0 +1,34 @@
package eu.dnetlib.dhp.schema.orcid;
import java.io.Serializable;
public class OrcidData implements Serializable {
protected String base64CompressData;
protected String statusCode;
protected String downloadDate;
public String getBase64CompressData() {
return base64CompressData;
}
public void setBase64CompressData(String base64CompressData) {
this.base64CompressData = base64CompressData;
}
public String getStatusCode() {
return statusCode;
}
public void setStatusCode(String statusCode) {
this.statusCode = statusCode;
}
public String getDownloadDate() {
return downloadDate;
}
public void setDownloadDate(String downloadDate) {
this.downloadDate = downloadDate;
}
}

View File

@ -0,0 +1,38 @@
package eu.dnetlib.dhp.schema.orcid;
import java.io.Serializable;
/**
* This class models the data related to a publication date, that are retrieved from an orcid publication
*/
public class PublicationDate implements Serializable {
private String year;
private String month;
private String day;
public String getYear() {
return year;
}
public void setYear(String year) {
this.year = year;
}
public String getMonth() {
return month;
}
public void setMonth(String month) {
this.month = month;
}
public String getDay() {
return day;
}
public void setDay(String day) {
this.day = day;
}
}

View File

@ -0,0 +1,79 @@
package eu.dnetlib.dhp.schema.orcid;
import java.io.Serializable;
public class Summary implements Serializable {
private String creationMethod;
private String completionDate;
private String submissionDate;
private String lastModifiedDate;
private boolean claimed;
private String deactivationDate;
private boolean verifiedEmail;
private boolean verifiedPrimaryEmail;
public String getCreationMethod() {
return creationMethod;
}
public void setCreationMethod(String creationMethod) {
this.creationMethod = creationMethod;
}
public String getCompletionDate() {
return completionDate;
}
public void setCompletionDate(String completionDate) {
this.completionDate = completionDate;
}
public String getSubmissionDate() {
return submissionDate;
}
public void setSubmissionDate(String submissionDate) {
this.submissionDate = submissionDate;
}
public String getLastModifiedDate() {
return lastModifiedDate;
}
public void setLastModifiedDate(String lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
public boolean isClaimed() {
return claimed;
}
public void setClaimed(boolean claimed) {
this.claimed = claimed;
}
public String getDeactivationDate() {
return deactivationDate;
}
public void setDeactivationDate(String deactivationDate) {
this.deactivationDate = deactivationDate;
}
public boolean isVerifiedEmail() {
return verifiedEmail;
}
public void setVerifiedEmail(boolean verifiedEmail) {
this.verifiedEmail = verifiedEmail;
}
public boolean isVerifiedPrimaryEmail() {
return verifiedPrimaryEmail;
}
public void setVerifiedPrimaryEmail(boolean verifiedPrimaryEmail) {
this.verifiedPrimaryEmail = verifiedPrimaryEmail;
}
}

View File

@ -0,0 +1,16 @@
package eu.dnetlib.dhp.schema.orcid;
import java.io.Serializable;
public class Work extends OrcidData implements Serializable {
WorkDetail workDetail;
public WorkDetail getWorkDetail() {
return workDetail;
}
public void setWorkDetail(WorkDetail workDetail) {
this.workDetail = workDetail;
}
}

View File

@ -0,0 +1,104 @@
package eu.dnetlib.dhp.schema.orcid;
import java.io.Serializable;
import java.util.List;
/**
* This class models the data that are retrieved from orcid publication
*/
public class WorkDetail implements Serializable {
private String oid;
private String id;
private String sourceName;
private String type;
private List<String> titles;
private List<String> urls;
List<ExternalId> extIds;
List<PublicationDate> publicationDates;
List<Contributor> contributors;
public String getOid() {
return oid;
}
public void setOid(String oid) {
this.oid = oid;
}
public String getErrorCode() {
return errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
private String errorCode;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public List<String> getTitles() {
return titles;
}
public void setTitles(List<String> titles) {
this.titles = titles;
}
public String getSourceName() {
return sourceName;
}
public void setSourceName(String sourceName) {
this.sourceName = sourceName;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public List<String> getUrls() {
return urls;
}
public void setUrls(List<String> urls) {
this.urls = urls;
}
public List<ExternalId> getExtIds() {
return extIds;
}
public void setExtIds(List<ExternalId> extIds) {
this.extIds = extIds;
}
public List<PublicationDate> getPublicationDates() {
return publicationDates;
}
public void setPublicationDates(List<PublicationDate> publicationDates) {
this.publicationDates = publicationDates;
}
public List<Contributor> getContributors() {
return contributors;
}
public void setContributors(List<Contributor> contributors) {
this.contributors = contributors;
}
}

View File

@ -1,89 +0,0 @@
package eu.dnetlib.dhp.schema.scholexplorer;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import eu.dnetlib.dhp.schema.oaf.Dataset;
import eu.dnetlib.dhp.schema.oaf.OafEntity;
public class DLIDataset extends Dataset {
private String originalObjIdentifier;
private List<ProvenaceInfo> dlicollectedfrom;
private String completionStatus;
public String getCompletionStatus() {
return completionStatus;
}
public void setCompletionStatus(String completionStatus) {
this.completionStatus = completionStatus;
}
public List<ProvenaceInfo> getDlicollectedfrom() {
return dlicollectedfrom;
}
public void setDlicollectedfrom(List<ProvenaceInfo> dlicollectedfrom) {
this.dlicollectedfrom = dlicollectedfrom;
}
public String getOriginalObjIdentifier() {
return originalObjIdentifier;
}
public void setOriginalObjIdentifier(String originalObjIdentifier) {
this.originalObjIdentifier = originalObjIdentifier;
}
@Override
public void mergeFrom(OafEntity e) {
super.mergeFrom(e);
DLIDataset p = (DLIDataset) e;
if (StringUtils.isBlank(completionStatus) && StringUtils.isNotBlank(p.completionStatus))
completionStatus = p.completionStatus;
if ("complete".equalsIgnoreCase(p.completionStatus))
completionStatus = "complete";
dlicollectedfrom = mergeProvenance(dlicollectedfrom, p.getDlicollectedfrom());
}
private List<ProvenaceInfo> mergeProvenance(
final List<ProvenaceInfo> a, final List<ProvenaceInfo> b) {
Map<String, ProvenaceInfo> result = new HashMap<>();
if (a != null)
a
.forEach(
p -> {
if (p != null && StringUtils.isNotBlank(p.getId()) && result.containsKey(p.getId())) {
if ("incomplete".equalsIgnoreCase(result.get(p.getId()).getCompletionStatus())
&& StringUtils.isNotBlank(p.getCompletionStatus())) {
result.put(p.getId(), p);
}
} else if (p != null && p.getId() != null && !result.containsKey(p.getId()))
result.put(p.getId(), p);
});
if (b != null)
b
.forEach(
p -> {
if (p != null && StringUtils.isNotBlank(p.getId()) && result.containsKey(p.getId())) {
if ("incomplete".equalsIgnoreCase(result.get(p.getId()).getCompletionStatus())
&& StringUtils.isNotBlank(p.getCompletionStatus())) {
result.put(p.getId(), p);
}
} else if (p != null && p.getId() != null && !result.containsKey(p.getId()))
result.put(p.getId(), p);
});
return new ArrayList<>(result.values());
}
}

View File

@ -1,87 +0,0 @@
package eu.dnetlib.dhp.schema.scholexplorer;
import java.io.Serializable;
import java.util.*;
import org.apache.commons.lang3.StringUtils;
import eu.dnetlib.dhp.schema.oaf.OafEntity;
import eu.dnetlib.dhp.schema.oaf.Publication;
public class DLIPublication extends Publication implements Serializable {
private String originalObjIdentifier;
private List<ProvenaceInfo> dlicollectedfrom;
private String completionStatus;
public String getCompletionStatus() {
return completionStatus;
}
public void setCompletionStatus(String completionStatus) {
this.completionStatus = completionStatus;
}
public List<ProvenaceInfo> getDlicollectedfrom() {
return dlicollectedfrom;
}
public void setDlicollectedfrom(List<ProvenaceInfo> dlicollectedfrom) {
this.dlicollectedfrom = dlicollectedfrom;
}
public String getOriginalObjIdentifier() {
return originalObjIdentifier;
}
public void setOriginalObjIdentifier(String originalObjIdentifier) {
this.originalObjIdentifier = originalObjIdentifier;
}
@Override
public void mergeFrom(OafEntity e) {
super.mergeFrom(e);
DLIPublication p = (DLIPublication) e;
if (StringUtils.isBlank(completionStatus) && StringUtils.isNotBlank(p.completionStatus))
completionStatus = p.completionStatus;
if ("complete".equalsIgnoreCase(p.completionStatus))
completionStatus = "complete";
dlicollectedfrom = mergeProvenance(dlicollectedfrom, p.getDlicollectedfrom());
}
private List<ProvenaceInfo> mergeProvenance(
final List<ProvenaceInfo> a, final List<ProvenaceInfo> b) {
Map<String, ProvenaceInfo> result = new HashMap<>();
if (a != null)
a
.forEach(
p -> {
if (p != null && StringUtils.isNotBlank(p.getId()) && result.containsKey(p.getId())) {
if ("incomplete".equalsIgnoreCase(result.get(p.getId()).getCompletionStatus())
&& StringUtils.isNotBlank(p.getCompletionStatus())) {
result.put(p.getId(), p);
}
} else if (p != null && p.getId() != null && !result.containsKey(p.getId()))
result.put(p.getId(), p);
});
if (b != null)
b
.forEach(
p -> {
if (p != null && StringUtils.isNotBlank(p.getId()) && result.containsKey(p.getId())) {
if ("incomplete".equalsIgnoreCase(result.get(p.getId()).getCompletionStatus())
&& StringUtils.isNotBlank(p.getCompletionStatus())) {
result.put(p.getId(), p);
}
} else if (p != null && p.getId() != null && !result.containsKey(p.getId()))
result.put(p.getId(), p);
});
return new ArrayList<>(result.values());
}
}

Some files were not shown because too many files have changed in this diff Show More