Compare commits
302 Commits
dhp-schema
...
master
Author | SHA1 | Date |
---|---|---|
Claudio Atzori | bd93479688 | |
Claudio Atzori | 842542a41c | |
Claudio Atzori | 43ecf83c04 | |
Claudio Atzori | a24da6de30 | |
Claudio Atzori | c82a007217 | |
Claudio Atzori | 330794f12c | |
Claudio Atzori | 1ae0a39aa0 | |
Claudio Atzori | f872a24c96 | |
Claudio Atzori | a40552fb94 | |
Claudio Atzori | d0b310c1f4 | |
Claudio Atzori | caebb5e661 | |
Claudio Atzori | c43362bc6d | |
Claudio Atzori | eee23553bd | |
Claudio Atzori | 161dc0141f | |
Claudio Atzori | c6e77902d5 | |
Claudio Atzori | c45a6dbba7 | |
Claudio Atzori | 0340fafb56 | |
Claudio Atzori | 9ad61e70fa | |
Claudio Atzori | 14365d7ea2 | |
Claudio Atzori | 0b3ae130e2 | |
Claudio Atzori | dc20c3b54c | |
Claudio Atzori | f8f5381221 | |
Claudio Atzori | 02abe33b46 | |
Claudio Atzori | 8c2665a706 | |
Claudio Atzori | 06db0239cf | |
Claudio Atzori | fd6ec5e58f | |
Claudio Atzori | 9d296a48c6 | |
Claudio Atzori | fbfc413d85 | |
Claudio Atzori | 40c20d9e33 | |
Claudio Atzori | f6063714cc | |
Claudio Atzori | 0720af9c2c | |
Claudio Atzori | 3654959f03 | |
Claudio Atzori | 81fda4a9b8 | |
Claudio Atzori | 1c66476cb9 | |
Claudio Atzori | ec1f471eb1 | |
Claudio Atzori | a6bc90b90e | |
Claudio Atzori | f4a16cee52 | |
Claudio Atzori | 2dae7d8675 | |
Claudio Atzori | 1e8e4c9bec | |
Claudio Atzori | 59b942b2a8 | |
Miriam Baglioni | 50d4db8b04 | |
Miriam Baglioni | bcbcba399d | |
Claudio Atzori | fe961af8c1 | |
Claudio Atzori | 14fe99d2c5 | |
Claudio Atzori | 18f82d0a3b | |
Claudio Atzori | d8d0409e4c | |
Claudio Atzori | c46c235c83 | |
Claudio Atzori | ca02fc29b3 | |
Claudio Atzori | 8658cf9a01 | |
Claudio Atzori | ae5337f266 | |
Claudio Atzori | 39fa75ae3f | |
Claudio Atzori | b03a9f497d | |
Claudio Atzori | a620d3ff21 | |
Claudio Atzori | 7bd21aa475 | |
Claudio Atzori | 7aed048eec | |
Claudio Atzori | 642f535498 | |
Claudio Atzori | eb7dcf6f11 | |
Giambattista Bloisi | 2dc10b8afe | |
Claudio Atzori | 9eaad49a2e | |
Claudio Atzori | 055afdc5fc | |
Claudio Atzori | cf3135ac5a | |
Claudio Atzori | 2502d512d1 | |
Claudio Atzori | 3531ac7f66 | |
Claudio Atzori | f422a58b95 | |
Claudio Atzori | 97df2e3c48 | |
Claudio Atzori | 4a7e960409 | |
Claudio Atzori | a835c8db1e | |
Claudio Atzori | 2a4b84af79 | |
Claudio Atzori | 2324536a61 | |
Sandro La Bruzzo | b336c40970 | |
Sandro La Bruzzo | 48adfff200 | |
Claudio Atzori | 5118d7f08a | |
Claudio Atzori | 2e2556f3c9 | |
Claudio Atzori | 4092dcbef2 | |
Claudio Atzori | 7480ec0ab3 | |
Claudio Atzori | 46eec69aed | |
Claudio Atzori | 17f69b4cb4 | |
Claudio Atzori | 4488c3eb60 | |
Claudio Atzori | 1f2b70aa95 | |
Claudio Atzori | 04654b16f9 | |
Claudio Atzori | b0eec2e5bb | |
Claudio Atzori | 890c039a91 | |
Claudio Atzori | da06e17041 | |
Claudio Atzori | db99c7f113 | |
Claudio Atzori | f6745a9d30 | |
Claudio Atzori | 6b3165bec2 | |
Claudio Atzori | 9758ef9a78 | |
Claudio Atzori | 79eaae42ff | |
Claudio Atzori | 1b285cca59 | |
Claudio Atzori | 9ef028aca1 | |
Claudio Atzori | ad42b0ac3c | |
Claudio Atzori | b5f29dc17c | |
Claudio Atzori | bb630de8ab | |
Claudio Atzori | 90afc76f5f | |
Claudio Atzori | 49aef3cf22 | |
Claudio Atzori | e3f4cb9cc0 | |
Miriam Baglioni | 70cc447dbb | |
Miriam Baglioni | 3aa0ea4123 | |
Claudio Atzori | 2dcdb69c16 | |
Claudio Atzori | 1491dd6708 | |
Claudio Atzori | a2105fe6e2 | |
Claudio Atzori | 40b86f1e4c | |
Alessia Bardi | 77a12c0a2d | |
Claudio Atzori | d9a988c3f1 | |
Claudio Atzori | 6067254a6c | |
Claudio Atzori | 58fd156d5d | |
Claudio Atzori | 3ccee68e0e | |
Claudio Atzori | c54607f8ab | |
Claudio Atzori | efe30b1637 | |
Claudio Atzori | b54f4eabe7 | |
Claudio Atzori | 9ec184ff15 | |
Claudio Atzori | d56343164b | |
Claudio Atzori | fd56e17442 | |
Claudio Atzori | 6ce896ca0a | |
Claudio Atzori | c341fe012b | |
Claudio Atzori | f57efd75b5 | |
Claudio Atzori | 28b81c55bb | |
Claudio Atzori | f32852e3dd | |
Claudio Atzori | 66ffad1ca0 | |
Claudio Atzori | 7a285680a0 | |
Claudio Atzori | fdf0115f81 | |
Claudio Atzori | 145aeb2295 | |
Claudio Atzori | c216f79e8e | |
Miriam Baglioni | 0327320b53 | |
Claudio Atzori | 3123e3f1f2 | |
Claudio Atzori | 490d0a7acc | |
Claudio Atzori | 47faf312e0 | |
Claudio Atzori | 0680e76506 | |
Claudio Atzori | 3e6c8f9d76 | |
Alessia Bardi | 952be6b30d | |
Alessia Bardi | 5d93f5e69a | |
Alessia Bardi | b1cd0c476d | |
Claudio Atzori | 00d4b800af | |
Claudio Atzori | 3f0e456145 | |
Claudio Atzori | 5b772c2fcc | |
Claudio Atzori | f807e189af | |
Claudio Atzori | 53803a3c59 | |
Claudio Atzori | f712db79be | |
Michele Artini | 2b553e7aa5 | |
Michele Artini | 542d0cb98a | |
Claudio Atzori | 07348d74cd | |
Michele Artini | 9a23c69b13 | |
Michele Artini | bfd3a50fea | |
Sandro La Bruzzo | 2410c4a5c2 | |
Claudio Atzori | 4a509bc0c5 | |
Claudio Atzori | 7c06e588d1 | |
Claudio Atzori | 5e6dce133c | |
Claudio Atzori | dde6e95ac1 | |
Miriam Baglioni | 497aef2696 | |
Miriam Baglioni | 57bb15aa0b | |
Claudio Atzori | 3e9c91a741 | |
Claudio Atzori | 3bdd215a27 | |
Claudio Atzori | b718ed4dbf | |
Claudio Atzori | 5dc3270908 | |
Claudio Atzori | ce46df4f2a | |
Claudio Atzori | 931ffb9d42 | |
Claudio Atzori | 6facd0ec18 | |
Claudio Atzori | ccf9f6ef34 | |
Claudio Atzori | 283cf04606 | |
Claudio Atzori | 2f960f6a18 | |
Claudio Atzori | b5e20b558d | |
Claudio Atzori | 1a4173d0e6 | |
Claudio Atzori | cbca60011e | |
Claudio Atzori | 78cf7ea084 | |
Claudio Atzori | 97663bd79f | |
Michele Artini | eeef59765e | |
Claudio Atzori | b287c80cc1 | |
Claudio Atzori | 0d7a3ea4b9 | |
Sandro La Bruzzo | 56c9af6ee5 | |
Sandro La Bruzzo | 8632374611 | |
Sandro La Bruzzo | c8e6bf9199 | |
Sandro La Bruzzo | 0980b87619 | |
Sandro La Bruzzo | 4804fb2dd2 | |
Sandro La Bruzzo | 0be00f4361 | |
Sandro La Bruzzo | c6f9f8f391 | |
Sandro La Bruzzo | f8d7a15c32 | |
Claudio Atzori | 0667dcc23e | |
Sandro La Bruzzo | 0798a35924 | |
Sandro La Bruzzo | 986f60b5fe | |
Claudio Atzori | 5aca5915b6 | |
Claudio Atzori | d275d91c59 | |
Claudio Atzori | 8a5652f969 | |
Claudio Atzori | 44ec9a21e3 | |
Claudio Atzori | b6d9516daf | |
Claudio Atzori | c781f5542c | |
Claudio Atzori | 2c809318b9 | |
Claudio Atzori | ffa6bbf392 | |
Claudio Atzori | b073935a64 | |
Claudio Atzori | 5df6c09062 | |
Claudio Atzori | 5a21b8bee3 | |
Claudio Atzori | f683019c3d | |
Claudio Atzori | 3270b05ac9 | |
Claudio Atzori | f05d76fa7c | |
Claudio Atzori | d08c2744f5 | |
Claudio Atzori | 6cf976d5a9 | |
Sandro La Bruzzo | d899bacebb | |
Sandro La Bruzzo | a92be97501 | |
Sandro La Bruzzo | d25db5680b | |
Claudio Atzori | 87818acd14 | |
Claudio Atzori | 826a20aa26 | |
Claudio Atzori | 1dd572de0c | |
Miriam Baglioni | 4fecbed21b | |
Sandro La Bruzzo | 88a347d978 | |
Sandro La Bruzzo | dc514a7281 | |
Sandro La Bruzzo | fb05d15ff2 | |
Alessia Bardi | ee4a01f711 | |
Alessia Bardi | a1c56dbeed | |
Alessia Bardi | 78929fe658 | |
Alessia Bardi | 9beef2e678 | |
Alessia Bardi | b07b356307 | |
Alessia Bardi | 050a1b9e34 | |
Miriam Baglioni | 8a1fb330ab | |
Miriam Baglioni | fb92579fe3 | |
Alessia Bardi | 30697da8dd | |
Alessia Bardi | 05d1a21ebe | |
Miriam Baglioni | 91af2dade8 | |
Miriam Baglioni | 2895988f2b | |
Alessia Bardi | 76a4cedec6 | |
Alessia Bardi | a8c9f8e666 | |
Sandro La Bruzzo | 0060831200 | |
Sandro La Bruzzo | 768de3c288 | |
Sandro La Bruzzo | a81aa83c4f | |
Sandro La Bruzzo | 5abcb0a1cb | |
Sandro La Bruzzo | f8a63457b1 | |
Sandro La Bruzzo | bfafc0fbaf | |
Sandro La Bruzzo | 8833c32d22 | |
Sandro La Bruzzo | bfe4da29ea | |
Sandro La Bruzzo | 2c39d27469 | |
Alessia Bardi | 4c2e635aa2 | |
Alessia Bardi | cb2adfee9f | |
Miriam Baglioni | 5b0e2f7076 | |
Miriam Baglioni | 2b9d7580c3 | |
Alessia Bardi | 26f543a03f | |
Miriam Baglioni | 09ef0e9760 | |
Claudio Atzori | 48ccbfb1cc | |
Claudio Atzori | fb306a0574 | |
Miriam Baglioni | 1e795f49bc | |
Claudio Atzori | adabfed068 | |
Claudio Atzori | 31ab5f2a60 | |
Claudio Atzori | 19c84675f8 | |
Claudio Atzori | 55800920a9 | |
Claudio Atzori | e1f1721da8 | |
Claudio Atzori | fca037f035 | |
Claudio Atzori | 9efbfb0f9c | |
Claudio Atzori | 2482031403 | |
Claudio Atzori | 5549f5bbf5 | |
Sandro La Bruzzo | d90704f1bb | |
Sandro La Bruzzo | 3838658535 | |
Claudio Atzori | fa4cd3963b | |
Sandro La Bruzzo | 30665c840c | |
Sandro La Bruzzo | 3984893480 | |
Sandro La Bruzzo | 123ea40795 | |
Sandro La Bruzzo | 0996676f5b | |
Claudio Atzori | eb8c5f38ce | |
Claudio Atzori | 8c20660f29 | |
Claudio Atzori | 11ea9e46b1 | |
Claudio Atzori | bb91311ab8 | |
Sandro La Bruzzo | 7996cfd33d | |
Claudio Atzori | 185dcac4e1 | |
Claudio Atzori | 4083d78045 | |
Claudio Atzori | 916be1c781 | |
Claudio Atzori | 87c925ac24 | |
Miriam Baglioni | 0a54f5bea7 | |
Miriam Baglioni | 34ec7dbf02 | |
Miriam Baglioni | 984375cb46 | |
Miriam Baglioni | 040bef60d9 | |
Miriam Baglioni | 41841e3347 | |
Miriam Baglioni | ca03bf1380 | |
Claudio Atzori | 8a809a60e2 | |
Claudio Atzori | 0194a86433 | |
Claudio Atzori | 3be96a92f9 | |
Claudio Atzori | 7bdc99e89d | |
Claudio Atzori | a69e57eecc | |
Claudio Atzori | 923c0ff803 | |
Claudio Atzori | 80f4baa412 | |
Miriam Baglioni | 593034920a | |
Miriam Baglioni | 11e062f54c | |
Miriam Baglioni | 823b4cc210 | |
Miriam Baglioni | 61400f22c2 | |
Miriam Baglioni | a222c28fec | |
Miriam Baglioni | 82720345f0 | |
Miriam Baglioni | fd0f1d5068 | |
Miriam Baglioni | dabbcf7315 | |
Miriam Baglioni | 9e8abe59f8 | |
Miriam Baglioni | 5276cc1195 | |
Miriam Baglioni | baef47b360 | |
Miriam Baglioni | 9c2aadac92 | |
Miriam Baglioni | fb0139c09a | |
Miriam Baglioni | d01dce4337 | |
Miriam Baglioni | 95592369f2 | |
Claudio Atzori | 9663d50027 | |
Claudio Atzori | ad6cf3fdaa | |
Miriam Baglioni | 0d55c92e68 | |
Miriam Baglioni | c6e733b47b | |
Miriam Baglioni | ea5ad71286 | |
Miriam Baglioni | 3fe8e14d5a | |
Miriam Baglioni | 80a2991016 | |
Claudio Atzori | 8b1bcc065d | |
Miriam Baglioni | 10fca3a034 | |
Miriam Baglioni | 3a0bff2ac4 | |
Claudio Atzori | 8fbd32d2bd | |
Michele Artini | f9f64ba93f |
36
CHANGES.md
36
CHANGES.md
|
@ -3,10 +3,38 @@
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
| **Version** | **Changes** | **Readiness** |
|
| **Version** | **Changes** | **Readiness** |
|
||||||
|---|---|---|
|
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
|
||||||
| 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 | beta |
|
| 9.0.0 | [Graph model] </br> <ul><li>added OafEntity.mergedIds</li><li>added Result.bestInstanceType</li></ul></br>[Solr model]</br> <ul><li>added Result.bestInstanceType</li><li>added RelatedRecord.description</li><li>added RelatedRecord.author[]</li></ul></br> | beta |
|
||||||
| 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" | beta |
|
| 8.0.1 | [Solr model] </br> <ul><li>using string to represent PersonTopic.(fromYear/toYear)</li></ul> | beta |
|
||||||
| 2.8.20 | [Graph model]<br>added constants declaring the values used for hierarchical relationships among the organizations IsParentOf / IsChildOf | beta |
|
| 8.0.0 | [Graph model] </br> <ul><li>Renamed `Result.author.affiliation` to `rawAffiliationString`. Updated Solr JSON payload model classes</li></ul> | beta |
|
||||||
|
| 7.0.0 | [Graph model] </br> <ul><li>Introduced Person entity and its relations: authorship, coauthorship, affiliation</li><li>Updated Solr JSON payload model classes</li></ul> | production |
|
||||||
|
| 6.1.3 | [Graph model] </br> <ul><li>Updated Solr JSON payload model classes</li></ul> | production |
|
||||||
|
| 6.1.1 | [Graph model] </br> <ul><li>Introduced constants used in the DOIBoost dismission.</li></ul> | production |
|
||||||
|
| 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> | production |
|
||||||
|
| 5.17.3 | [Graph model] </br> <ul><li>added result level textual field to store the transformative agreement information.</li></ul> | production |
|
||||||
|
| 4.17.3 | [Graph model] </br> <ul><li>moved context at the level of the entity. </li></ul> | production |
|
||||||
|
| 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.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.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.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 |
|
||||||
|
|
|
@ -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).
|
|
@ -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).
|
21
README.md
21
README.md
|
@ -1,12 +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.
|
This project defines **object schemas** of the OpenAIRE main entities and the relationships that intercur among them.
|
||||||
Namely it defines the model for
|
Namely it defines the model for
|
||||||
|
|
||||||
- the graph internal representation, defined under the package `eu.dnetlib.dhp.schema.oaf`
|
- the graph internal representation, defined under the package `eu.dnetlib.dhp.schema.oaf`
|
||||||
- the public graph dump representations, defined under the package `eu.dnetlib.dhp.schema.dump.oaf`
|
|
||||||
- the scholexplorer content representation, defined under the package `eu.dnetlib.dhp.schema.sx`
|
- the scholexplorer content representation, defined under the package `eu.dnetlib.dhp.schema.sx`
|
||||||
- the contents acquired from the netadata aggregation subsystem, defined under the package `eu.dnetlib.dhp.schema.mdstore`
|
- 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 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.
|
||||||
|
|
131
pom.xml
131
pom.xml
|
@ -5,7 +5,7 @@
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>dhp-schemas</artifactId>
|
<artifactId>dhp-schemas</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>2.8.22</version>
|
<version>9.0.1-SNAPSHOT</version>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
<connection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</connection>
|
<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>
|
<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>
|
<url>https://code-repo.d4science.org/D-Net/dhp-schemas/</url>
|
||||||
<tag>dhp-schemas-2.8.22</tag>
|
<tag>HEAD</tag>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<description>This module contains common schema classes meant to be used across the dnet-hadoop submodules</description>
|
<description>This module contains common schema classes meant to be used across the dnet-hadoop submodules</description>
|
||||||
|
@ -137,7 +137,26 @@
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
<version>3.0.0</version>
|
<version>3.0.0</version>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
|
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -229,6 +248,19 @@
|
||||||
<scalaVersion>${scala.version}</scalaVersion>
|
<scalaVersion>${scala.version}</scalaVersion>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
@ -249,10 +281,16 @@
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>me.xuender</groupId>
|
||||||
|
<artifactId>unidecode</artifactId>
|
||||||
|
<version>${dhp.unidecode.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>jcl-over-slf4j</artifactId>
|
<artifactId>jcl-over-slf4j</artifactId>
|
||||||
<version>1.7.25</version>
|
<version>${dhp.slf4j.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
@ -265,7 +303,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.sisyphsu</groupId>
|
<groupId>com.github.sisyphsu</groupId>
|
||||||
<artifactId>dateparser</artifactId>
|
<artifactId>dateparser</artifactId>
|
||||||
<version>1.0.7</version>
|
<version>${dhp.dateparser.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -277,15 +315,16 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-codec</groupId>
|
<groupId>commons-codec</groupId>
|
||||||
<artifactId>commons-codec</artifactId>
|
<artifactId>commons-codec</artifactId>
|
||||||
<version>1.9</version>
|
<version>${dhp.commons.codec.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
<artifactId>commons-io</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
<version>2.4</version>
|
<version>${dhp.commons.io.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>jackson-databind</artifactId>
|
<artifactId>jackson-databind</artifactId>
|
||||||
|
@ -296,14 +335,21 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.persistence</groupId>
|
<groupId>javax.persistence</groupId>
|
||||||
<artifactId>javax.persistence-api</artifactId>
|
<artifactId>javax.persistence-api</artifactId>
|
||||||
<version>2.2</version>
|
<version>${dhp.javax.persistence.api.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
<dependency>
|
||||||
</dependencyManagement>
|
<groupId>io.swagger.core.v3</groupId>
|
||||||
|
<artifactId>swagger-annotations</artifactId>
|
||||||
|
<version>${dhp.swagger.annotations.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependencies>
|
<dependency>
|
||||||
|
<groupId>javax.validation</groupId>
|
||||||
|
<artifactId>validation-api</artifactId>
|
||||||
|
<version>${dhp.validation.api.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
@ -326,6 +372,51 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</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>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mockito</groupId>
|
||||||
|
<artifactId>mockito-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mockito</groupId>
|
||||||
|
<artifactId>mockito-junit-jupiter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
<artifactId>commons-io</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
|
@ -360,10 +451,27 @@
|
||||||
<groupId>javax.persistence</groupId>
|
<groupId>javax.persistence</groupId>
|
||||||
<artifactId>javax.persistence-api</artifactId>
|
<artifactId>javax.persistence-api</artifactId>
|
||||||
</dependency>
|
</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>
|
</dependencies>
|
||||||
|
|
||||||
<properties>
|
<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.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<maven.compiler.plugin.version>3.6.0</maven.compiler.plugin.version>
|
<maven.compiler.plugin.version>3.6.0</maven.compiler.plugin.version>
|
||||||
|
@ -377,6 +485,7 @@
|
||||||
<scala.version>2.11.12</scala.version>
|
<scala.version>2.11.12</scala.version>
|
||||||
<junit-jupiter.version>5.6.1</junit-jupiter.version>
|
<junit-jupiter.version>5.6.1</junit-jupiter.version>
|
||||||
<mockito-core.version>3.3.3</mockito-core.version>
|
<mockito-core.version>3.3.3</mockito-core.version>
|
||||||
|
<jsonschemagenerator.version>4.13.0</jsonschemagenerator.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ public class AtomicActionDeserializer<T extends Oaf> extends JsonDeserializer<At
|
||||||
try {
|
try {
|
||||||
final Class<T> clazz = (Class<T>) Class.forName(classTag);
|
final Class<T> clazz = (Class<T>) Class.forName(classTag);
|
||||||
final T oaf = mapper.readValue(payload.toString(), clazz);
|
final T oaf = mapper.readValue(payload.toString(), clazz);
|
||||||
return new AtomicAction(clazz, oaf);
|
return new AtomicAction<>(clazz, oaf);
|
||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException e) {
|
||||||
throw new IOException(e);
|
throw new IOException(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.common;
|
package eu.dnetlib.dhp.schema.common;
|
||||||
|
|
||||||
import eu.dnetlib.dhp.schema.oaf.OafEntity;
|
|
||||||
|
|
||||||
/** Actual entity types in the Graph */
|
/** Actual entity types in the Graph */
|
||||||
public enum EntityType {
|
public enum EntityType {
|
||||||
publication, dataset, otherresearchproduct, software, datasource, organization, project;
|
publication, dataset, otherresearchproduct, software, datasource, organization, project, person;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolves the EntityType, given the relative class name
|
* Resolves the EntityType, given the relative class name
|
||||||
|
@ -14,7 +12,7 @@ public enum EntityType {
|
||||||
* @param <T> actual OafEntity subclass
|
* @param <T> actual OafEntity subclass
|
||||||
* @return the EntityType associated to the given class
|
* @return the EntityType associated to the given class
|
||||||
*/
|
*/
|
||||||
public static <T extends OafEntity> EntityType fromClass(Class<T> clazz) {
|
public static <T> EntityType fromClass(Class<T> clazz) {
|
||||||
|
|
||||||
return EntityType.valueOf(clazz.getSimpleName().toLowerCase());
|
return EntityType.valueOf(clazz.getSimpleName().toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,5 +3,5 @@ package eu.dnetlib.dhp.schema.common;
|
||||||
|
|
||||||
/** Main entity types in the Graph */
|
/** Main entity types in the Graph */
|
||||||
public enum MainEntityType {
|
public enum MainEntityType {
|
||||||
result, datasource, organization, project
|
result, datasource, organization, project, person
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,9 @@ public class ModelConstants {
|
||||||
public static final String ORCID_DS = ORCID.toUpperCase();
|
public static final String ORCID_DS = ORCID.toUpperCase();
|
||||||
|
|
||||||
public static final String CROSSREF_ID = "10|openaire____::081b82f96300b6a6e3d282bad31cb6e2";
|
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 DATACITE_ID = "10|openaire____::9e3be59865b2c1c335d32dae2fe7b254";
|
||||||
|
|
||||||
public static final String ZENODO_OD_ID = "10|opendoar____::358aee4cc897452c00244351e4d91f69";
|
public static final String ZENODO_OD_ID = "10|opendoar____::358aee4cc897452c00244351e4d91f69";
|
||||||
|
@ -24,17 +27,27 @@ public class ModelConstants {
|
||||||
public static final String EUROPE_PUBMED_CENTRAL_ID = "10|opendoar____::8b6dd7db9af49e67306feb59a8bdc52c";
|
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 PUBMED_CENTRAL_ID = "10|opendoar____::eda80a3d5b344bc40f3bc04f65b7a357";
|
||||||
public static final String ARXIV_ID = "10|opendoar____::6f4922f45568161a8cdf4ad2299f6d23";
|
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 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_NAME = "OpenCitations";
|
||||||
public static final String OPENOCITATIONS_ID = "10|openaire____::c06df618c5de1c786535ccf3f8b7b059";
|
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
|
// VOCABULARY VALUE
|
||||||
public static final String ACCESS_RIGHT_OPEN = "OPEN";
|
public static final String ACCESS_RIGHT_OPEN = "OPEN";
|
||||||
public static final String ACCESS_RIGHT_EMBARGO = "EMBARGO";
|
public static final String ACCESS_RIGHT_EMBARGO = "EMBARGO";
|
||||||
public static final String ACCESS_RIGHT_CLOSED = "CLOSED";
|
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_SUBJECT_TYPOLOGIES = "dnet:subject_classification_typologies";
|
||||||
public static final String DNET_RESULT_TYPOLOGIES = "dnet:result_typologies";
|
public static final String DNET_RESULT_TYPOLOGIES = "dnet:result_typologies";
|
||||||
|
@ -53,6 +66,13 @@ public class ModelConstants {
|
||||||
public static final String DNET_RELATION_RELTYPE = "dnet:relation_relType";
|
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_SUBRELTYPE = "dnet:relation_subRelType";
|
||||||
public static final String DNET_RELATION_RELCLASS = "dnet:relation_relClass";
|
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_REPOSITORY = "sysimport:crosswalk:repository";
|
||||||
public static final String SYSIMPORT_CROSSWALK_ENTITYREGISTRY = "sysimport:crosswalk:entityregistry";
|
public static final String SYSIMPORT_CROSSWALK_ENTITYREGISTRY = "sysimport:crosswalk:entityregistry";
|
||||||
|
@ -63,6 +83,8 @@ public class ModelConstants {
|
||||||
public static final String HARVESTED = "Harvested";
|
public static final String HARVESTED = "Harvested";
|
||||||
|
|
||||||
public static final String PROVENANCE_DEDUP = "sysimport:dedup";
|
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(
|
public static final Qualifier PROVENANCE_ACTION_SET_QUALIFIER = qualifier(
|
||||||
SYSIMPORT_ACTIONSET, SYSIMPORT_ACTIONSET, DNET_PROVENANCE_ACTIONS, DNET_PROVENANCE_ACTIONS);
|
SYSIMPORT_ACTIONSET, SYSIMPORT_ACTIONSET, DNET_PROVENANCE_ACTIONS, DNET_PROVENANCE_ACTIONS);
|
||||||
|
@ -103,7 +125,7 @@ public class ModelConstants {
|
||||||
public static final String COMPILES = "Compiles";
|
public static final String COMPILES = "Compiles";
|
||||||
public static final String IS_COMPILED_BY = "IsCompiledBy";
|
public static final String IS_COMPILED_BY = "IsCompiledBy";
|
||||||
public static final String DESCRIBES = "Describes";
|
public static final String DESCRIBES = "Describes";
|
||||||
public static final String IS_DESCRIBE_DBY = "IsDescribedBy";
|
public static final String IS_DESCRIBED_BY = "IsDescribedBy";
|
||||||
public static final String IS_METADATA_FOR = "IsMetadataFor";
|
public static final String IS_METADATA_FOR = "IsMetadataFor";
|
||||||
public static final String IS_METADATA_OF = "IsMetadataOf";
|
public static final String IS_METADATA_OF = "IsMetadataOf";
|
||||||
public static final String HAS_ASSOCIATION_WITH = "HasAssociationWith";
|
public static final String HAS_ASSOCIATION_WITH = "HasAssociationWith";
|
||||||
|
@ -168,6 +190,23 @@ public class ModelConstants {
|
||||||
public static final String UNKNOWN = "UNKNOWN";
|
public static final String UNKNOWN = "UNKNOWN";
|
||||||
public static final String NOT_AVAILABLE = "not available";
|
public static final String NOT_AVAILABLE = "not available";
|
||||||
|
|
||||||
|
public static final String RESULT_PERSON_RELTYPE = "resultPerson"; // relType
|
||||||
|
public static final String RESULT_PERSON_SUBRELTYPE = "authorship"; // subreltype
|
||||||
|
public static final String RESULT_PERSON_HASAUTHORED = "hasAuthored"; // relclass
|
||||||
|
|
||||||
|
public static final String PERSON_PERSON_RELTYPE = "personPerson"; // relType
|
||||||
|
public static final String PERSON_PERSON_SUBRELTYPE = "coAuthorship"; // subreltype
|
||||||
|
public static final String PERSON_PERSON_HASCOAUTHORED = "hasCoAuthor"; // relclass
|
||||||
|
|
||||||
|
public static final String PROJECT_PERSON_RELTYPE = "projectPerson"; // relType
|
||||||
|
public static final String PROJECT_PERSON_SUBRELTYPE = "participation"; // subreltype
|
||||||
|
public static final String PROJECT_PERSON_PARTICIPATES = "participatesToProject"; // relclass
|
||||||
|
|
||||||
|
// author affiliations are intended to be characterised by a start and an end date
|
||||||
|
public static final String ORG_PERSON_RELTYPE = "organizationPerson"; // relType
|
||||||
|
public static final String ORG_PERSON_SUBRELTYPE = "affiliation"; // subreltype
|
||||||
|
public static final String ORG_PERSON_PARTICIPATES = "isAffiliatedWith"; // relclass
|
||||||
|
|
||||||
public static final Qualifier PUBLICATION_DEFAULT_RESULTTYPE = qualifier(
|
public static final Qualifier PUBLICATION_DEFAULT_RESULTTYPE = qualifier(
|
||||||
PUBLICATION_RESULTTYPE_CLASSID, PUBLICATION_RESULTTYPE_CLASSID,
|
PUBLICATION_RESULTTYPE_CLASSID, PUBLICATION_RESULTTYPE_CLASSID,
|
||||||
DNET_RESULT_TYPOLOGIES, DNET_RESULT_TYPOLOGIES);
|
DNET_RESULT_TYPOLOGIES, DNET_RESULT_TYPOLOGIES);
|
||||||
|
@ -201,6 +240,11 @@ public class ModelConstants {
|
||||||
public static final Qualifier MAIN_TITLE_QUALIFIER = qualifier(
|
public static final Qualifier MAIN_TITLE_QUALIFIER = qualifier(
|
||||||
"main title", "main title", DNET_DATACITE_TITLE, DNET_DATACITE_TITLE);
|
"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() {
|
public static final AccessRight OPEN_ACCESS_RIGHT() {
|
||||||
|
|
||||||
final AccessRight result = new AccessRight();
|
final AccessRight result = new AccessRight();
|
||||||
|
|
|
@ -36,6 +36,7 @@ public class ModelSupport {
|
||||||
entityMapping.put(EntityType.datasource, MainEntityType.datasource);
|
entityMapping.put(EntityType.datasource, MainEntityType.datasource);
|
||||||
entityMapping.put(EntityType.organization, MainEntityType.organization);
|
entityMapping.put(EntityType.organization, MainEntityType.organization);
|
||||||
entityMapping.put(EntityType.project, MainEntityType.project);
|
entityMapping.put(EntityType.project, MainEntityType.project);
|
||||||
|
entityMapping.put(EntityType.person, MainEntityType.person);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,6 +52,7 @@ public class ModelSupport {
|
||||||
entityTypes.put(EntityType.otherresearchproduct, OtherResearchProduct.class);
|
entityTypes.put(EntityType.otherresearchproduct, OtherResearchProduct.class);
|
||||||
entityTypes.put(EntityType.software, Software.class);
|
entityTypes.put(EntityType.software, Software.class);
|
||||||
entityTypes.put(EntityType.publication, Publication.class);
|
entityTypes.put(EntityType.publication, Publication.class);
|
||||||
|
entityTypes.put(EntityType.person, Person.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Map<String, Class> oafTypes = Maps.newHashMap();
|
public static final Map<String, Class> oafTypes = Maps.newHashMap();
|
||||||
|
@ -64,6 +66,7 @@ public class ModelSupport {
|
||||||
oafTypes.put("software", Software.class);
|
oafTypes.put("software", Software.class);
|
||||||
oafTypes.put("publication", Publication.class);
|
oafTypes.put("publication", Publication.class);
|
||||||
oafTypes.put("relation", Relation.class);
|
oafTypes.put("relation", Relation.class);
|
||||||
|
oafTypes.put("person", Person.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Map<Class, String> idPrefixMap = Maps.newHashMap();
|
public static final Map<Class, String> idPrefixMap = Maps.newHashMap();
|
||||||
|
@ -76,6 +79,7 @@ public class ModelSupport {
|
||||||
idPrefixMap.put(OtherResearchProduct.class, "50");
|
idPrefixMap.put(OtherResearchProduct.class, "50");
|
||||||
idPrefixMap.put(Software.class, "50");
|
idPrefixMap.put(Software.class, "50");
|
||||||
idPrefixMap.put(Publication.class, "50");
|
idPrefixMap.put(Publication.class, "50");
|
||||||
|
idPrefixMap.put(Person.class, "30");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Map<String, String> entityIdPrefix = Maps.newHashMap();
|
public static final Map<String, String> entityIdPrefix = Maps.newHashMap();
|
||||||
|
@ -85,6 +89,7 @@ public class ModelSupport {
|
||||||
entityIdPrefix.put("organization", "20");
|
entityIdPrefix.put("organization", "20");
|
||||||
entityIdPrefix.put("project", "40");
|
entityIdPrefix.put("project", "40");
|
||||||
entityIdPrefix.put("result", "50");
|
entityIdPrefix.put("result", "50");
|
||||||
|
entityIdPrefix.put("person", "30");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Map<String, String> idPrefixEntity = Maps.newHashMap();
|
public static final Map<String, String> idPrefixEntity = Maps.newHashMap();
|
||||||
|
@ -92,6 +97,7 @@ public class ModelSupport {
|
||||||
static {
|
static {
|
||||||
idPrefixEntity.put("10", "datasource");
|
idPrefixEntity.put("10", "datasource");
|
||||||
idPrefixEntity.put("20", "organization");
|
idPrefixEntity.put("20", "organization");
|
||||||
|
idPrefixEntity.put("30", "person");
|
||||||
idPrefixEntity.put("40", "project");
|
idPrefixEntity.put("40", "project");
|
||||||
idPrefixEntity.put("50", "result");
|
idPrefixEntity.put("50", "result");
|
||||||
}
|
}
|
||||||
|
@ -125,7 +131,7 @@ public class ModelSupport {
|
||||||
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_RELATED_TO, IS_RELATED_TO);
|
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_COMPILED_BY, COMPILES);
|
||||||
|
|
||||||
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_DESCRIBE_DBY, DESCRIBES);
|
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, IS_METADATA_FOR, IS_METADATA_OF);
|
||||||
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, HAS_ASSOCIATION_WITH, HAS_ASSOCIATION_WITH);
|
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, HAS_ASSOCIATION_WITH, HAS_ASSOCIATION_WITH);
|
||||||
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_REQUIRED_BY, REQUIRES);
|
set(relationInverseMap, RESULT_RESULT, RELATIONSHIP, IS_REQUIRED_BY, REQUIRES);
|
||||||
|
@ -158,6 +164,21 @@ public class ModelSupport {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
* Helper method: fina a relation filtering by a relation name
|
||||||
* @param relationName
|
* @param relationName
|
||||||
|
@ -181,7 +202,7 @@ public class ModelSupport {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static String rel(String relType, String subRelType, String relClass) {
|
public static String rel(String relType, String subRelType, String relClass) {
|
||||||
return String.format("%s-%s-%s", relType, subRelType, relClass);
|
return String.format("%s_%s_%s", relType, subRelType, relClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String schemeTemplate = "dnet:%s_%s_relations";
|
private static final String schemeTemplate = "dnet:%s_%s_relations";
|
||||||
|
@ -191,7 +212,7 @@ public class ModelSupport {
|
||||||
private ModelSupport() {
|
private ModelSupport() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <E extends OafEntity> String getIdPrefix(Class<E> clazz) {
|
public static <E> String getIdPrefix(Class<E> clazz) {
|
||||||
return idPrefixMap.get(clazz);
|
return idPrefixMap.get(clazz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,29 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Used to refer to the Article Processing Charge information. 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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,30 +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.BestAccessRight
|
|
||||||
* element with value for the openaccess route
|
|
||||||
*/
|
|
||||||
public class AccessRight extends BestAccessRight {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private OpenAccessRoute openAccessRoute ;
|
|
||||||
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
public OpenAccessRoute getOpenAccessRoute() {
|
|
||||||
return openAccessRoute;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOpenAccessRoute(OpenAccessRoute openAccessRoute) {
|
|
||||||
this.openAccessRoute = openAccessRoute;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,72 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,31 +0,0 @@
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* BestAccessRight. Used to represent the result best 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 BestAccessRight extends Qualifier {
|
|
||||||
|
|
||||||
private String scheme;
|
|
||||||
|
|
||||||
public String getScheme() {
|
|
||||||
return scheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setScheme(String scheme) {
|
|
||||||
this.scheme = scheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static BestAccessRight newInstance(String code, String label, String scheme) {
|
|
||||||
BestAccessRight ar = new BestAccessRight();
|
|
||||||
ar.setCode(code);
|
|
||||||
ar.setLabel(label);
|
|
||||||
ar.setScheme(scheme);
|
|
||||||
return ar;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,135 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,114 +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 the review status of the instance. Possible values are 'Unknown',
|
|
||||||
* 'nonPeerReviewed', 'peerReviewed'. It corresponds to refereed.classname of the instance to be dumped
|
|
||||||
* - articleprocessingcharge of type APC to store the article processing charges possibly associated to the instance
|
|
||||||
* -pid of type List<ControlledField> that is the list of pids associated to the result coming from authoritative sources for that pid
|
|
||||||
* -alternateIdentifier of type List<ControlledField> that is the list of pids associated to the result coming from NON authoritative
|
|
||||||
* sources for that pid
|
|
||||||
*/
|
|
||||||
public class Instance implements Serializable {
|
|
||||||
|
|
||||||
private List<ControlledField> pid;
|
|
||||||
|
|
||||||
private List<ControlledField> alternateIdentifier;
|
|
||||||
|
|
||||||
private String license;
|
|
||||||
|
|
||||||
private AccessRight accessright;
|
|
||||||
|
|
||||||
private String type;
|
|
||||||
|
|
||||||
private List<String> url;
|
|
||||||
|
|
||||||
private APC articleprocessingcharge;
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
public APC getArticleprocessingcharge() {
|
|
||||||
return articleprocessingcharge;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setArticleprocessingcharge(APC articleprocessingcharge) {
|
|
||||||
this.articleprocessingcharge = articleprocessingcharge;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ControlledField> getPid() {
|
|
||||||
return pid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPid(List<ControlledField> pid) {
|
|
||||||
this.pid = pid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ControlledField> getAlternateIdentifier() {
|
|
||||||
return alternateIdentifier;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAlternateIdentifier(List<ControlledField> alternateIdentifier) {
|
|
||||||
this.alternateIdentifier = alternateIdentifier;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,388 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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
|
|
||||||
* -measure list<KeyValue> to represent the measure of beepFinder. It corresponds to measures in the model
|
|
||||||
*/
|
|
||||||
public class Result implements Serializable {
|
|
||||||
|
|
||||||
private List<KeyValue> measures;
|
|
||||||
|
|
||||||
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 BestAccessRight 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 BestAccessRight getBestaccessright() {
|
|
||||||
return bestaccessright;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBestaccessright(BestAccessRight 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<KeyValue> getMeasures() {
|
|
||||||
return measures;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMeasures(List<KeyValue> measures) {
|
|
||||||
this.measures = measures;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,46 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf.community;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
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() {
|
|
||||||
final String p = Optional.ofNullable(getProvenance())
|
|
||||||
.map(prov -> prov.stream()
|
|
||||||
.map(Provenance::toString)
|
|
||||||
.collect(Collectors.joining()))
|
|
||||||
.orElse("");
|
|
||||||
|
|
||||||
return Objects.hash(getCode(), getLabel(), p);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf.community;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,55 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf.community;
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
private Validated validated;
|
|
||||||
|
|
||||||
public void setValidated(Validated validated){
|
|
||||||
this.validated = validated;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Validated getValidated(){
|
|
||||||
return validated;
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,39 +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 Validated implements Serializable {
|
|
||||||
|
|
||||||
private String validationDate;
|
|
||||||
private Boolean validatedByFunder;
|
|
||||||
|
|
||||||
public void setValidationDate(String validationDate){
|
|
||||||
this.validationDate = validationDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValidationDate(){
|
|
||||||
return validationDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValidatedByFunder(Boolean validated){
|
|
||||||
this.validatedByFunder = validated;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getValidatedByFunder(){
|
|
||||||
return validatedByFunder;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Validated newInstance(Boolean validated, String validationDate){
|
|
||||||
Validated v = new Validated();
|
|
||||||
v.validatedByFunder = validated;
|
|
||||||
v.validationDate = validationDate;
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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____";
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,315 +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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf.graph;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,54 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.dump.oaf.graph;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,83 +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.Qualifier;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,85 +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;
|
|
||||||
private boolean validated;
|
|
||||||
private String validationDate;
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValidated(boolean validate){
|
|
||||||
this.validated = validate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean getValidated(){
|
|
||||||
return validated;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValidationDate(String validationDate){
|
|
||||||
this.validationDate = validationDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValidationDate(){
|
|
||||||
return validationDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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 acronym; // 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 getAcronym() {
|
|
||||||
return acronym;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAcronym(String acronym) {
|
|
||||||
this.acronym = acronym;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDescription(String description) {
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,13 +1,13 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class models the access rights of research products.
|
* This class models the access rights of research products.
|
||||||
*/
|
*/
|
||||||
public class AccessRight extends Qualifier {
|
public class AccessRight extends Qualifier {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -8945177777173510134L;
|
||||||
|
|
||||||
private OpenAccessRoute openAccessRoute;
|
private OpenAccessRoute openAccessRoute;
|
||||||
|
|
||||||
public OpenAccessRoute getOpenAccessRoute() {
|
public OpenAccessRoute getOpenAccessRoute() {
|
||||||
|
@ -18,32 +18,4 @@ public class AccessRight extends Qualifier {
|
||||||
this.openAccessRoute = openAccessRoute;
|
this.openAccessRoute = openAccessRoute;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toComparableString() {
|
|
||||||
String s = super.toComparableString();
|
|
||||||
return Optional
|
|
||||||
.ofNullable(getOpenAccessRoute())
|
|
||||||
.map(x -> s + "::" + x)
|
|
||||||
.orElse(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
@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());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ import java.util.*;
|
||||||
|
|
||||||
public class Author implements Serializable {
|
public class Author implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1625492739044457437L;
|
||||||
|
|
||||||
private String fullname;
|
private String fullname;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
@ -17,7 +19,7 @@ public class Author implements Serializable {
|
||||||
|
|
||||||
private List<StructuredProperty> pid;
|
private List<StructuredProperty> pid;
|
||||||
|
|
||||||
private List<Field<String>> affiliation;
|
private List<String> rawAffiliationString;
|
||||||
|
|
||||||
public String getFullname() {
|
public String getFullname() {
|
||||||
return fullname;
|
return fullname;
|
||||||
|
@ -59,32 +61,11 @@ public class Author implements Serializable {
|
||||||
this.pid = pid;
|
this.pid = pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Field<String>> getAffiliation() {
|
public List<String> getRawAffiliationString() {
|
||||||
return affiliation;
|
return rawAffiliationString;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAffiliation(List<Field<String>> affiliation) {
|
public void setRawAffiliationString(List<String> rawAffiliationString) {
|
||||||
this.affiliation = affiliation;
|
this.rawAffiliationString = rawAffiliationString;
|
||||||
}
|
}
|
||||||
|
|
||||||
@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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,8 @@ import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class Context implements Serializable {
|
public class Context implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -778899398223144398L;
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
private List<DataInfo> dataInfo;
|
private List<DataInfo> dataInfo;
|
||||||
|
@ -25,22 +27,4 @@ public class Context implements Serializable {
|
||||||
this.dataInfo = dataInfo;
|
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());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class Country extends Qualifier {
|
public class Country extends Qualifier {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1587334433446567175L;
|
||||||
private DataInfo dataInfo;
|
private DataInfo dataInfo;
|
||||||
|
|
||||||
public DataInfo getDataInfo() {
|
public DataInfo getDataInfo() {
|
||||||
|
@ -15,20 +14,4 @@ public class Country extends Qualifier {
|
||||||
this.dataInfo = dataInfo;
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,11 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class DataInfo implements Serializable {
|
public class DataInfo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -277099962930866451L;
|
||||||
|
|
||||||
private Boolean invisible = false;
|
private Boolean invisible = false;
|
||||||
private Boolean inferred;
|
private Boolean inferred;
|
||||||
private Boolean deletedbyinference = false;
|
private Boolean deletedbyinference = false;
|
||||||
|
@ -61,25 +62,4 @@ public class DataInfo implements Serializable {
|
||||||
this.provenanceaction = provenanceaction;
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import eu.dnetlib.dhp.schema.common.ModelConstants;
|
||||||
|
|
||||||
public class Dataset extends Result implements Serializable {
|
public class Dataset extends Result implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 916526716184645549L;
|
||||||
private Field<String> storagedate;
|
private Field<String> storagedate;
|
||||||
|
|
||||||
// candidate for removal
|
// candidate for removal
|
||||||
|
@ -83,34 +84,4 @@ public class Dataset extends Result implements Serializable {
|
||||||
this.geolocation = geolocation;
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,15 +6,18 @@ import java.util.List;
|
||||||
|
|
||||||
public class Datasource extends OafEntity implements Serializable {
|
public class Datasource extends OafEntity implements Serializable {
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = 1019089598408414496L;
|
private static final long serialVersionUID = 1019089598408414496L;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private Qualifier datasourcetype;
|
private Qualifier datasourcetype;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private Qualifier datasourcetypeui;
|
private Qualifier datasourcetypeui;
|
||||||
|
|
||||||
|
private Qualifier eosctype; // Data Source | Service
|
||||||
|
|
||||||
|
private Qualifier eoscdatasourcetype;
|
||||||
|
|
||||||
private Qualifier openairecompatibility;
|
private Qualifier openairecompatibility;
|
||||||
|
|
||||||
private Field<String> officialname;
|
private Field<String> officialname;
|
||||||
|
@ -40,14 +43,21 @@ public class Datasource extends OafEntity implements Serializable {
|
||||||
private List<StructuredProperty> subjects;
|
private List<StructuredProperty> subjects;
|
||||||
|
|
||||||
// opendoar specific fields (od*)
|
// opendoar specific fields (od*)
|
||||||
|
@Deprecated
|
||||||
private Field<String> odnumberofitems;
|
private Field<String> odnumberofitems;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private Field<String> odnumberofitemsdate;
|
private Field<String> odnumberofitemsdate;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private Field<String> odpolicies;
|
private Field<String> odpolicies;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private List<Field<String>> odlanguages;
|
private List<Field<String>> odlanguages;
|
||||||
|
|
||||||
|
private List<String> languages;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private List<Field<String>> odcontenttypes;
|
private List<Field<String>> odcontenttypes;
|
||||||
|
|
||||||
private List<Field<String>> accessinfopackage;
|
private List<Field<String>> accessinfopackage;
|
||||||
|
@ -59,8 +69,10 @@ public class Datasource extends OafEntity implements Serializable {
|
||||||
|
|
||||||
private Field<String> missionstatementurl;
|
private Field<String> missionstatementurl;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private Field<Boolean> dataprovider;
|
private Field<Boolean> dataprovider;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private Field<Boolean> serviceprovider;
|
private Field<Boolean> serviceprovider;
|
||||||
|
|
||||||
// {open, restricted or closed}
|
// {open, restricted or closed}
|
||||||
|
@ -75,23 +87,24 @@ public class Datasource extends OafEntity implements Serializable {
|
||||||
// {feeRequired, registration, other}
|
// {feeRequired, registration, other}
|
||||||
private Field<String> datauploadrestriction;
|
private Field<String> datauploadrestriction;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private Field<Boolean> versioning;
|
private Field<Boolean> versioning;
|
||||||
|
|
||||||
private Field<String> citationguidelineurl;
|
private Boolean versioncontrol;
|
||||||
|
|
||||||
// {yes, no, uknown}
|
private Field<String> citationguidelineurl;
|
||||||
private Field<String> qualitymanagementkind;
|
|
||||||
|
|
||||||
private Field<String> pidsystems;
|
private Field<String> pidsystems;
|
||||||
|
|
||||||
private Field<String> certificates;
|
private Field<String> certificates;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private List<KeyValue> policies;
|
private List<KeyValue> policies;
|
||||||
|
|
||||||
private Journal journal;
|
private Journal journal;
|
||||||
|
|
||||||
// New field for EOSC
|
// New field for EOSC
|
||||||
private List<String> providedentitytypes;
|
private List<String> researchentitytypes;
|
||||||
|
|
||||||
// New field for EOSC
|
// New field for EOSC
|
||||||
private List<String> providedproducttypes;
|
private List<String> providedproducttypes;
|
||||||
|
@ -102,12 +115,30 @@ public class Datasource extends OafEntity implements Serializable {
|
||||||
// New field for EOSC
|
// New field for EOSC
|
||||||
private Boolean thematic;
|
private Boolean thematic;
|
||||||
|
|
||||||
// New field for EOSC
|
|
||||||
private Boolean knowledgegraph;
|
|
||||||
|
|
||||||
// New field for EOSC
|
// New field for EOSC
|
||||||
private List<Qualifier> contentpolicies;
|
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() {
|
public Qualifier getDatasourcetype() {
|
||||||
return datasourcetype;
|
return datasourcetype;
|
||||||
}
|
}
|
||||||
|
@ -124,6 +155,22 @@ public class Datasource extends OafEntity implements Serializable {
|
||||||
this.datasourcetypeui = 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() {
|
public Qualifier getOpenairecompatibility() {
|
||||||
return openairecompatibility;
|
return openairecompatibility;
|
||||||
}
|
}
|
||||||
|
@ -252,6 +299,14 @@ public class Datasource extends OafEntity implements Serializable {
|
||||||
this.odlanguages = 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() {
|
public List<Field<String>> getOdcontenttypes() {
|
||||||
return odcontenttypes;
|
return odcontenttypes;
|
||||||
}
|
}
|
||||||
|
@ -348,6 +403,14 @@ public class Datasource extends OafEntity implements Serializable {
|
||||||
this.versioning = versioning;
|
this.versioning = versioning;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean getVersioncontrol() {
|
||||||
|
return versioncontrol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVersioncontrol(Boolean versioncontrol) {
|
||||||
|
this.versioncontrol = versioncontrol;
|
||||||
|
}
|
||||||
|
|
||||||
public Field<String> getCitationguidelineurl() {
|
public Field<String> getCitationguidelineurl() {
|
||||||
return citationguidelineurl;
|
return citationguidelineurl;
|
||||||
}
|
}
|
||||||
|
@ -356,14 +419,6 @@ public class Datasource extends OafEntity implements Serializable {
|
||||||
this.citationguidelineurl = citationguidelineurl;
|
this.citationguidelineurl = citationguidelineurl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Field<String> getQualitymanagementkind() {
|
|
||||||
return qualitymanagementkind;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setQualitymanagementkind(final Field<String> qualitymanagementkind) {
|
|
||||||
this.qualitymanagementkind = qualitymanagementkind;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Field<String> getPidsystems() {
|
public Field<String> getPidsystems() {
|
||||||
return pidsystems;
|
return pidsystems;
|
||||||
}
|
}
|
||||||
|
@ -396,12 +451,12 @@ public class Datasource extends OafEntity implements Serializable {
|
||||||
this.journal = journal;
|
this.journal = journal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getProvidedentitytypes() {
|
public List<String> getResearchentitytypes() {
|
||||||
return providedentitytypes;
|
return researchentitytypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setProvidedentitytypes(final List<String> providedentitytypes) {
|
public void setResearchentitytypes(final List<String> researchentitytypes) {
|
||||||
this.providedentitytypes = providedentitytypes;
|
this.researchentitytypes = researchentitytypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getProvidedproducttypes() {
|
public List<String> getProvidedproducttypes() {
|
||||||
|
@ -428,14 +483,6 @@ public class Datasource extends OafEntity implements Serializable {
|
||||||
this.thematic = thematic;
|
this.thematic = thematic;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getKnowledgegraph() {
|
|
||||||
return knowledgegraph;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setKnowledgegraph(final Boolean knowledgegraph) {
|
|
||||||
this.knowledgegraph = knowledgegraph;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Qualifier> getContentpolicies() {
|
public List<Qualifier> getContentpolicies() {
|
||||||
return contentpolicies;
|
return contentpolicies;
|
||||||
}
|
}
|
||||||
|
@ -444,130 +491,76 @@ public class Datasource extends OafEntity implements Serializable {
|
||||||
this.contentpolicies = contentpolicies;
|
this.contentpolicies = contentpolicies;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public String getSubmissionpolicyurl() {
|
||||||
public void mergeFrom(final OafEntity e) {
|
return submissionpolicyurl;
|
||||||
super.mergeFrom(e);
|
}
|
||||||
|
|
||||||
if (!Datasource.class.isAssignableFrom(e.getClass())) { return; }
|
public void setSubmissionpolicyurl(String submissionpolicyurl) {
|
||||||
|
this.submissionpolicyurl = submissionpolicyurl;
|
||||||
|
}
|
||||||
|
|
||||||
final Datasource d = (Datasource) e;
|
public String getPreservationpolicyurl() {
|
||||||
|
return preservationpolicyurl;
|
||||||
|
}
|
||||||
|
|
||||||
datasourcetype = d.getDatasourcetype() != null && compareTrust(this, e) < 0
|
public void setPreservationpolicyurl(String preservationpolicyurl) {
|
||||||
? d.getDatasourcetype()
|
this.preservationpolicyurl = preservationpolicyurl;
|
||||||
: datasourcetype;
|
}
|
||||||
datasourcetypeui = d.getDatasourcetypeui() != null && compareTrust(this, e) < 0
|
|
||||||
? d.getDatasourcetypeui()
|
|
||||||
: datasourcetypeui;
|
|
||||||
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*)
|
public List<String> getResearchproductaccesspolicies() {
|
||||||
odnumberofitems = d.getOdnumberofitems() != null && compareTrust(this, e) < 0
|
return researchproductaccesspolicies;
|
||||||
? 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
|
public void setResearchproductaccesspolicies(List<String> researchproductaccesspolicies) {
|
||||||
releasestartdate = d.getReleasestartdate() != null && compareTrust(this, e) < 0
|
this.researchproductaccesspolicies = researchproductaccesspolicies;
|
||||||
? 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}
|
public List<String> getResearchproductmetadataaccesspolicies() {
|
||||||
databaseaccesstype = d.getDatabaseaccesstype() != null && compareTrust(this, e) < 0
|
return researchproductmetadataaccesspolicies;
|
||||||
? d.getDatabaseaccesstype()
|
}
|
||||||
: databaseaccesstype;
|
|
||||||
|
|
||||||
// {open, restricted or closed}
|
public void setResearchproductmetadataaccesspolicies(List<String> researchproductmetadataaccesspolicies) {
|
||||||
datauploadtype = d.getDatauploadtype() != null && compareTrust(this, e) < 0
|
this.researchproductmetadataaccesspolicies = researchproductmetadataaccesspolicies;
|
||||||
? d.getDatauploadtype()
|
}
|
||||||
: datauploadtype;
|
|
||||||
|
|
||||||
// {feeRequired, registration, other}
|
public Boolean getConsenttermsofuse() {
|
||||||
databaseaccessrestriction = d.getDatabaseaccessrestriction() != null && compareTrust(this, e) < 0
|
return consenttermsofuse;
|
||||||
? d.getDatabaseaccessrestriction()
|
}
|
||||||
: databaseaccessrestriction;
|
|
||||||
|
|
||||||
// {feeRequired, registration, other}
|
public void setConsenttermsofuse(final Boolean consenttermsofuse) {
|
||||||
datauploadrestriction = d.getDatauploadrestriction() != null && compareTrust(this, e) < 0
|
this.consenttermsofuse = consenttermsofuse;
|
||||||
? d.getDatauploadrestriction()
|
}
|
||||||
: datauploadrestriction;
|
|
||||||
|
|
||||||
versioning = d.getVersioning() != null && compareTrust(this, e) < 0 ? d.getVersioning() : versioning;
|
public String getLastconsenttermsofusedate() {
|
||||||
citationguidelineurl = d.getCitationguidelineurl() != null && compareTrust(this, e) < 0
|
return lastconsenttermsofusedate;
|
||||||
? d.getCitationguidelineurl()
|
}
|
||||||
: citationguidelineurl;
|
|
||||||
|
|
||||||
// {yes, no, unknown}
|
public void setLastconsenttermsofusedate(String lastconsenttermsofusedate) {
|
||||||
qualitymanagementkind = d.getQualitymanagementkind() != null && compareTrust(this, e) < 0
|
this.lastconsenttermsofusedate = lastconsenttermsofusedate;
|
||||||
? d.getQualitymanagementkind()
|
}
|
||||||
: qualitymanagementkind;
|
|
||||||
pidsystems = d.getPidsystems() != null && compareTrust(this, e) < 0 ? d.getPidsystems() : pidsystems;
|
|
||||||
|
|
||||||
certificates = d.getCertificates() != null && compareTrust(this, e) < 0
|
public Boolean getFulltextdownload() {
|
||||||
? d.getCertificates()
|
return fulltextdownload;
|
||||||
: certificates;
|
}
|
||||||
|
|
||||||
policies = mergeLists(policies, d.getPolicies());
|
public void setFulltextdownload(final Boolean fulltextdownload) {
|
||||||
|
this.fulltextdownload = fulltextdownload;
|
||||||
|
}
|
||||||
|
|
||||||
journal = d.getJournal() != null && compareTrust(this, e) < 0 ? d.getJournal() : journal;
|
public String getConsenttermsofusedate() {
|
||||||
|
return consenttermsofusedate;
|
||||||
|
}
|
||||||
|
|
||||||
providedentitytypes = mergeLists(providedentitytypes, d.getProvidedentitytypes());;
|
public void setConsenttermsofusedate(final String consenttermsofusedate) {
|
||||||
|
this.consenttermsofusedate = consenttermsofusedate;
|
||||||
|
}
|
||||||
|
|
||||||
providedproducttypes = mergeLists(providedproducttypes, d.getProvidedproducttypes());;
|
public List<EoscIfGuidelines> getEoscifguidelines() {
|
||||||
|
return eoscifguidelines;
|
||||||
|
}
|
||||||
|
|
||||||
jurisdiction = d.getJurisdiction() != null && compareTrust(this, e) < 0
|
public void setEoscifguidelines(List<EoscIfGuidelines> eoscifguidelines) {
|
||||||
? d.getJurisdiction()
|
this.eoscifguidelines = eoscifguidelines;
|
||||||
: jurisdiction;
|
|
||||||
|
|
||||||
thematic = d.getThematic() != null && compareTrust(this, e) < 0
|
|
||||||
? d.getThematic()
|
|
||||||
: thematic;
|
|
||||||
|
|
||||||
knowledgegraph = d.getKnowledgegraph() != null && compareTrust(this, e) < 0
|
|
||||||
? d.getKnowledgegraph()
|
|
||||||
: knowledgegraph;
|
|
||||||
|
|
||||||
contentpolicies = mergeLists(contentpolicies, d.getContentpolicies());;
|
|
||||||
|
|
||||||
mergeOAFDataInfo(e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -3,9 +3,10 @@ package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class ExternalReference implements Serializable {
|
public class ExternalReference implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -3711445600549155961L;
|
||||||
// source
|
// source
|
||||||
private String sitename;
|
private String sitename;
|
||||||
|
|
||||||
|
@ -94,27 +95,4 @@ public class ExternalReference implements Serializable {
|
||||||
this.dataInfo = dataInfo;
|
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(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, qualifier, refidentifier, query, dataInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class ExtraInfo implements Serializable {
|
public class ExtraInfo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 8689244676887698486L;
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
private String typology;
|
private String typology;
|
||||||
|
@ -56,22 +57,4 @@ public class ExtraInfo implements Serializable {
|
||||||
this.value = value;
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import java.util.Objects;
|
||||||
|
|
||||||
public class Field<T> implements Serializable {
|
public class Field<T> implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -4255501306375330131L;
|
||||||
private T value;
|
private T value;
|
||||||
|
|
||||||
private DataInfo dataInfo;
|
private DataInfo dataInfo;
|
||||||
|
|
|
@ -3,12 +3,9 @@ package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
|
|
||||||
public class GeoLocation implements Serializable {
|
public class GeoLocation implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 8096534610208458404L;
|
||||||
private String point;
|
private String point;
|
||||||
|
|
||||||
private String box;
|
private String box;
|
||||||
|
@ -39,38 +36,4 @@ public class GeoLocation implements Serializable {
|
||||||
this.place = place;
|
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());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To store information about the classification for the project. The classification depends on the programme. For example
|
* To store information about the classification for the project. The classification depends on the programme. For example
|
||||||
|
@ -21,8 +20,9 @@ import java.util.Objects;
|
||||||
* - private String level3 to store the information about the level3 of the classification
|
* - 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
|
* - private String classification to store the entire classification related to the programme
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class H2020Classification implements Serializable {
|
public class H2020Classification implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1062734689288369769L;
|
||||||
private H2020Programme h2020Programme;
|
private H2020Programme h2020Programme;
|
||||||
private String level1;
|
private String level1;
|
||||||
private String level2;
|
private String level2;
|
||||||
|
@ -70,19 +70,4 @@ public class H2020Classification implements Serializable {
|
||||||
this.classification = classification;
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To store information about the ec programme for the project. It has the following parameters:
|
* 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 code to store the code of the programme
|
||||||
* - private String description to store the description of the programme
|
* - private String description to store the description of the programme
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class H2020Programme implements Serializable {
|
public class H2020Programme implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -7851791644568592481L;
|
||||||
private String code;
|
private String code;
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
@ -30,15 +30,4 @@ public class H2020Programme implements Serializable {
|
||||||
this.description = description;
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,12 +6,15 @@ import java.util.List;
|
||||||
|
|
||||||
public class Instance implements Serializable {
|
public class Instance implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 3918544870298859300L;
|
||||||
private Field<String> license;
|
private Field<String> license;
|
||||||
|
|
||||||
private AccessRight accessright;
|
private AccessRight accessright;
|
||||||
|
|
||||||
private Qualifier instancetype;
|
private Qualifier instancetype;
|
||||||
|
|
||||||
|
private List<InstanceTypeMapping> instanceTypeMapping;
|
||||||
|
|
||||||
private KeyValue hostedby;
|
private KeyValue hostedby;
|
||||||
|
|
||||||
private List<String> url;
|
private List<String> url;
|
||||||
|
@ -37,6 +40,13 @@ public class Instance implements Serializable {
|
||||||
|
|
||||||
private Qualifier refereed; // peer-review status
|
private Qualifier refereed; // peer-review status
|
||||||
|
|
||||||
|
private List<Measure> measures;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Direct fulltext URL.
|
||||||
|
*/
|
||||||
|
private String fulltext;
|
||||||
|
|
||||||
public Field<String> getLicense() {
|
public Field<String> getLicense() {
|
||||||
return license;
|
return license;
|
||||||
}
|
}
|
||||||
|
@ -61,6 +71,14 @@ public class Instance implements Serializable {
|
||||||
this.instancetype = instancetype;
|
this.instancetype = instancetype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<InstanceTypeMapping> getInstanceTypeMapping() {
|
||||||
|
return instanceTypeMapping;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInstanceTypeMapping(List<InstanceTypeMapping> instanceTypeMapping) {
|
||||||
|
this.instanceTypeMapping = instanceTypeMapping;
|
||||||
|
}
|
||||||
|
|
||||||
public KeyValue getHostedby() {
|
public KeyValue getHostedby() {
|
||||||
return hostedby;
|
return hostedby;
|
||||||
}
|
}
|
||||||
|
@ -141,33 +159,20 @@ public class Instance implements Serializable {
|
||||||
this.refereed = refereed;
|
this.refereed = refereed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toComparableString() {
|
public List<Measure> getMeasures() {
|
||||||
return String
|
return measures;
|
||||||
.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 : "");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void setMeasures(List<Measure> measures) {
|
||||||
public int hashCode() {
|
this.measures = measures;
|
||||||
return toComparableString().hashCode();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public String getFulltext() {
|
||||||
public boolean equals(Object obj) {
|
return fulltext;
|
||||||
if (this == obj)
|
}
|
||||||
return true;
|
|
||||||
if (obj == null)
|
|
||||||
return false;
|
|
||||||
if (getClass() != obj.getClass())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
Instance other = (Instance) obj;
|
public void setFulltext(String fulltext) {
|
||||||
|
this.fulltext = fulltext;
|
||||||
return toComparableString().equals(other.toComparableString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,10 +2,11 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class Journal implements Serializable {
|
public class Journal implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -8476321782780781681L;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
private String issnPrinted;
|
private String issnPrinted;
|
||||||
|
@ -126,42 +127,4 @@ public class Journal implements Serializable {
|
||||||
this.dataInfo = dataInfo;
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,12 +3,9 @@ package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
|
|
||||||
public class KeyValue implements Serializable {
|
public class KeyValue implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1905267445569591240L;
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
private String value;
|
private String value;
|
||||||
|
@ -39,36 +36,4 @@ public class KeyValue implements Serializable {
|
||||||
this.dataInfo = dataInfo;
|
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());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,13 +4,12 @@ package eu.dnetlib.dhp.schema.oaf;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represent a measure, must be further described by a system available resource providing name and descriptions.
|
* Represent a measure, must be further described by a system available resource providing name and descriptions.
|
||||||
*/
|
*/
|
||||||
public class Measure implements Serializable {
|
public class Measure implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 8383308453679722661L;
|
||||||
/**
|
/**
|
||||||
* Unique measure identifier.
|
* Unique measure identifier.
|
||||||
*/
|
*/
|
||||||
|
@ -38,23 +37,4 @@ public class Measure implements Serializable {
|
||||||
this.unit = unit;
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,11 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class OAIProvenance implements Serializable {
|
public class OAIProvenance implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -767252660700352729L;
|
||||||
|
|
||||||
private OriginDescription originDescription;
|
private OriginDescription originDescription;
|
||||||
|
|
||||||
public OriginDescription getOriginDescription() {
|
public OriginDescription getOriginDescription() {
|
||||||
|
@ -16,18 +17,4 @@ public class OAIProvenance implements Serializable {
|
||||||
this.originDescription = originDescription;
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,15 +2,11 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
public abstract class Oaf implements Serializable {
|
public abstract class Oaf implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 94599232915572420L;
|
||||||
/**
|
/**
|
||||||
* The list of datasource id/name pairs providing this relationship.
|
* The list of datasource id/name pairs providing this relationship.
|
||||||
*/
|
*/
|
||||||
|
@ -44,59 +40,4 @@ public abstract class Oaf implements Serializable {
|
||||||
this.lastupdatetimestamp = lastupdatetimestamp;
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,12 +3,18 @@ package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
public abstract class OafEntity extends Oaf implements Serializable {
|
public abstract class OafEntity extends Oaf implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -7793594664115821897L;
|
||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MergedIds contains the list of the OpenAIRE IDs of the records merged into this one.
|
||||||
|
*/
|
||||||
|
private List<String> mergedIds;
|
||||||
|
|
||||||
private List<String> originalId;
|
private List<String> originalId;
|
||||||
|
|
||||||
private List<StructuredProperty> pid;
|
private List<StructuredProperty> pid;
|
||||||
|
@ -21,6 +27,52 @@ public abstract class OafEntity extends Oaf implements Serializable {
|
||||||
|
|
||||||
private OAIProvenance oaiprovenance;
|
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() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
@ -33,6 +85,14 @@ public abstract class OafEntity extends Oaf implements Serializable {
|
||||||
return originalId;
|
return originalId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getMergedIds() {
|
||||||
|
return mergedIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMergedIds(List<String> mergedIds) {
|
||||||
|
this.mergedIds = mergedIds;
|
||||||
|
}
|
||||||
|
|
||||||
public void setOriginalId(List<String> originalId) {
|
public void setOriginalId(List<String> originalId) {
|
||||||
this.originalId = originalId;
|
this.originalId = originalId;
|
||||||
}
|
}
|
||||||
|
@ -77,51 +137,19 @@ public abstract class OafEntity extends Oaf implements Serializable {
|
||||||
this.oaiprovenance = oaiprovenance;
|
this.oaiprovenance = oaiprovenance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mergeFrom(OafEntity e) {
|
@Override
|
||||||
super.mergeFrom(e);
|
public int hashCode() {
|
||||||
|
return Objects.hash(getId());
|
||||||
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
@SafeVarargs
|
|
||||||
protected final <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
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o)
|
if (this == o)
|
||||||
return true;
|
return true;
|
||||||
if (o == null || getClass() != o.getClass())
|
if (!(o instanceof OafEntity))
|
||||||
return false;
|
|
||||||
if (!super.equals(o))
|
|
||||||
return false;
|
return false;
|
||||||
OafEntity oafEntity = (OafEntity) o;
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
}
|
|
@ -6,6 +6,12 @@ import java.util.List;
|
||||||
|
|
||||||
public class Organization extends OafEntity implements Serializable {
|
public class Organization extends OafEntity implements Serializable {
|
||||||
|
|
||||||
|
public enum OrganizationType {
|
||||||
|
Archive, Company, Education, Facility, Government, Healthcare, Nonprofit, Other, Unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -9048723860770504113L;
|
||||||
|
|
||||||
private Field<String> legalshortname;
|
private Field<String> legalshortname;
|
||||||
|
|
||||||
private Field<String> legalname;
|
private Field<String> legalname;
|
||||||
|
@ -38,6 +44,8 @@ public class Organization extends OafEntity implements Serializable {
|
||||||
|
|
||||||
private Qualifier country;
|
private Qualifier country;
|
||||||
|
|
||||||
|
private OrganizationType organizationType;
|
||||||
|
|
||||||
public Field<String> getLegalshortname() {
|
public Field<String> getLegalshortname() {
|
||||||
return legalshortname;
|
return legalshortname;
|
||||||
}
|
}
|
||||||
|
@ -167,48 +175,11 @@ public class Organization extends OafEntity implements Serializable {
|
||||||
this.country = country;
|
this.country = country;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public OrganizationType getOrganizationType() {
|
||||||
public void mergeFrom(OafEntity e) {
|
return organizationType;
|
||||||
super.mergeFrom(e);
|
|
||||||
|
|
||||||
if (!Organization.class.isAssignableFrom(e.getClass())) {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final Organization o = (Organization) e;
|
public void setOrganizationType(OrganizationType organizationType) {
|
||||||
legalshortname = o.getLegalshortname() != null && compareTrust(this, e) < 0
|
this.organizationType = organizationType;
|
||||||
? 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,11 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class OriginDescription implements Serializable {
|
public class OriginDescription implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -7256156902727658863L;
|
||||||
|
|
||||||
private String harvestDate;
|
private String harvestDate;
|
||||||
|
|
||||||
private Boolean altered = true;
|
private Boolean altered = true;
|
||||||
|
@ -66,23 +67,4 @@ public class OriginDescription implements Serializable {
|
||||||
this.metadataNamespace = metadataNamespace;
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,8 @@ import eu.dnetlib.dhp.schema.common.ModelConstants;
|
||||||
|
|
||||||
public class OtherResearchProduct extends Result implements Serializable {
|
public class OtherResearchProduct extends Result implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -7611546868867175491L;
|
||||||
|
|
||||||
private List<Field<String>> contactperson;
|
private List<Field<String>> contactperson;
|
||||||
|
|
||||||
private List<Field<String>> contactgroup;
|
private List<Field<String>> contactgroup;
|
||||||
|
@ -42,19 +44,4 @@ public class OtherResearchProduct extends Result implements Serializable {
|
||||||
this.tool = tool;
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class Person extends OafEntity implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -2366333710489222265L;
|
||||||
|
|
||||||
|
private String givenName;
|
||||||
|
|
||||||
|
private String familyName;
|
||||||
|
|
||||||
|
private List<String> alternativeNames;
|
||||||
|
|
||||||
|
private String biography;
|
||||||
|
|
||||||
|
private List<PersonTopic> subject;
|
||||||
|
|
||||||
|
private Boolean consent;
|
||||||
|
|
||||||
|
public Person() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGivenName() {
|
||||||
|
return givenName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGivenName(String givenName) {
|
||||||
|
this.givenName = givenName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFamilyName() {
|
||||||
|
return familyName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFamilyName(String familyName) {
|
||||||
|
this.familyName = familyName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getAlternativeNames() {
|
||||||
|
return alternativeNames;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlternativeNames(List<String> alternativeNames) {
|
||||||
|
this.alternativeNames = alternativeNames;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBiography() {
|
||||||
|
return biography;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBiography(String biography) {
|
||||||
|
this.biography = biography;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<PersonTopic> getSubject() {
|
||||||
|
return subject;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubject(List<PersonTopic> subject) {
|
||||||
|
this.subject = subject;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getConsent() {
|
||||||
|
return consent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConsent(Boolean consent) {
|
||||||
|
this.consent = consent;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class PersonTopic implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 102011326860637199L;
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
private String schema;
|
||||||
|
|
||||||
|
private String fromYear;
|
||||||
|
|
||||||
|
private String toYear;
|
||||||
|
|
||||||
|
public PersonTopic() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSchema() {
|
||||||
|
return schema;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSchema(String schema) {
|
||||||
|
this.schema = schema;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFromYear() {
|
||||||
|
return fromYear;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFromYear(String fromYear) {
|
||||||
|
this.fromYear = fromYear;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getToYear() {
|
||||||
|
return toYear;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToYear(String toYear) {
|
||||||
|
this.toYear = toYear;
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,10 +4,10 @@ package eu.dnetlib.dhp.schema.oaf;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
public class Project extends OafEntity implements Serializable {
|
public class Project extends OafEntity implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 5783959097903529424L;
|
||||||
|
|
||||||
private Field<String> websiteurl;
|
private Field<String> websiteurl;
|
||||||
|
|
||||||
private Field<String> code;
|
private Field<String> code;
|
||||||
|
@ -298,64 +298,4 @@ public class Project extends OafEntity implements Serializable {
|
||||||
this.fundedamount = fundedamount;
|
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;
|
|
||||||
|
|
||||||
if (p.getH2020topiccode() != null && StringUtils.isEmpty(h2020topiccode)){
|
|
||||||
h2020topiccode = p.getH2020topiccode();
|
|
||||||
h2020topicdescription = p.getH2020topicdescription();
|
|
||||||
}
|
|
||||||
|
|
||||||
h2020classification = mergeLists(h2020classification, p.getH2020classification());
|
|
||||||
|
|
||||||
mergeOAFDataInfo(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,8 @@ import eu.dnetlib.dhp.schema.common.ModelConstants;
|
||||||
|
|
||||||
public class Publication extends Result implements Serializable {
|
public class Publication extends Result implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 4155353046627214846L;
|
||||||
|
|
||||||
// publication specific
|
// publication specific
|
||||||
private Journal journal;
|
private Journal journal;
|
||||||
|
|
||||||
|
@ -22,18 +24,4 @@ public class Publication extends Result implements Serializable {
|
||||||
this.journal = journal;
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,12 +3,8 @@ package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
|
|
||||||
public class Qualifier implements Serializable {
|
public class Qualifier implements Serializable {
|
||||||
|
private static final long serialVersionUID = 6632548656644563076L;
|
||||||
private String classid;
|
private String classid;
|
||||||
private String classname;
|
private String classname;
|
||||||
private String schemeid;
|
private String schemeid;
|
||||||
|
@ -46,42 +42,4 @@ public class Qualifier implements Serializable {
|
||||||
this.schemename = schemename;
|
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());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkArgument;
|
|
||||||
|
|
||||||
import java.text.ParseException;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import eu.dnetlib.dhp.schema.common.ModelSupport;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Relation models any edge between two nodes in the OpenAIRE graph. It has a source id and a target id pointing to
|
* Relation models any edge between two nodes in the OpenAIRE graph. It has a source id and a target id pointing to
|
||||||
* graph node identifiers and it is further characterised by the semantic of the link through the fields relType,
|
* graph node identifiers and it is further characterised by the semantic of the link through the fields relType,
|
||||||
|
@ -18,6 +13,8 @@ import eu.dnetlib.dhp.schema.common.ModelSupport;
|
||||||
*/
|
*/
|
||||||
public class Relation extends Oaf {
|
public class Relation extends Oaf {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -7061565324218172207L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main relationship classifier, values include 'resultResult', 'resultProject', 'resultOrganization', etc.
|
* Main relationship classifier, values include 'resultResult', 'resultProject', 'resultOrganization', etc.
|
||||||
*/
|
*/
|
||||||
|
@ -124,26 +121,9 @@ public class Relation extends Oaf {
|
||||||
this.validationDate = validationDate;
|
this.validationDate = validationDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mergeFrom(final Relation r) {
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
checkArgument(Objects.equals(getSource(), r.getSource()), "source ids must be equal");
|
return Objects.hash(getRelType(), getSubRelType(), getRelClass(), getSource(), getTarget());
|
||||||
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
|
@Override
|
||||||
|
@ -153,16 +133,11 @@ public class Relation extends Oaf {
|
||||||
if (o == null || getClass() != o.getClass())
|
if (o == null || getClass() != o.getClass())
|
||||||
return false;
|
return false;
|
||||||
Relation relation = (Relation) o;
|
Relation relation = (Relation) o;
|
||||||
return relType.equals(relation.relType)
|
return Objects.equals(getRelType(), relation.getRelType()) &&
|
||||||
&& subRelType.equals(relation.subRelType)
|
Objects.equals(getSubRelType(), relation.getSubRelType()) &&
|
||||||
&& relClass.equals(relation.relClass)
|
Objects.equals(getRelClass(), relation.getRelClass()) &&
|
||||||
&& source.equals(relation.source)
|
Objects.equals(getSource(), relation.getSource()) &&
|
||||||
&& target.equals(relation.target);
|
Objects.equals(getTarget(), relation.getTarget());
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(relType, subRelType, relClass, source, target, collectedfrom);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,358 +2,594 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import eu.dnetlib.dhp.schema.common.AccessRightComparator;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type Result.
|
||||||
|
*/
|
||||||
public class Result extends OafEntity implements Serializable {
|
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;
|
private List<Author> author;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Resulttype.
|
||||||
|
*/
|
||||||
// resulttype allows subclassing results into publications | datasets | software
|
// resulttype allows subclassing results into publications | datasets | software
|
||||||
private Qualifier resulttype;
|
private Qualifier resulttype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Temporary field suporting the analysis of the new COAR-based resource types
|
||||||
|
*/
|
||||||
|
private Qualifier metaResourceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Language.
|
||||||
|
*/
|
||||||
// common fields
|
// common fields
|
||||||
private Qualifier language;
|
private Qualifier language;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Country.
|
||||||
|
*/
|
||||||
private List<Country> country;
|
private List<Country> country;
|
||||||
|
|
||||||
private List<StructuredProperty> subject;
|
/**
|
||||||
|
* The Subject.
|
||||||
|
*/
|
||||||
|
private List<Subject> subject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Title.
|
||||||
|
*/
|
||||||
private List<StructuredProperty> title;
|
private List<StructuredProperty> title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Relevantdate.
|
||||||
|
*/
|
||||||
private List<StructuredProperty> relevantdate;
|
private List<StructuredProperty> relevantdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Description.
|
||||||
|
*/
|
||||||
private List<Field<String>> description;
|
private List<Field<String>> description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Dateofacceptance.
|
||||||
|
*/
|
||||||
private Field<String> dateofacceptance;
|
private Field<String> dateofacceptance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Publisher.
|
||||||
|
*/
|
||||||
private Field<String> publisher;
|
private Field<String> publisher;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Embargoenddate.
|
||||||
|
*/
|
||||||
private Field<String> embargoenddate;
|
private Field<String> embargoenddate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Source.
|
||||||
|
*/
|
||||||
private List<Field<String>> 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;
|
private List<Field<String>> format;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Contributor.
|
||||||
|
*/
|
||||||
private List<Field<String>> contributor;
|
private List<Field<String>> contributor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Resourcetype.
|
||||||
|
*/
|
||||||
private Qualifier resourcetype;
|
private Qualifier resourcetype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Coverage.
|
||||||
|
*/
|
||||||
private List<Field<String>> coverage;
|
private List<Field<String>> coverage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Bestaccessright.
|
||||||
|
*/
|
||||||
private Qualifier bestaccessright;
|
private Qualifier bestaccessright;
|
||||||
|
|
||||||
private List<Context> context;
|
/**
|
||||||
|
* The External reference.
|
||||||
|
*/
|
||||||
private List<ExternalReference> externalReference;
|
private List<ExternalReference> externalReference;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The most representative instanceType among the instances.
|
||||||
|
*/
|
||||||
|
private Qualifier bestInstancetype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Instance.
|
||||||
|
*/
|
||||||
private List<Instance> 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) {
|
public void setTransformativeAgreement(String transformativeAgreement) {
|
||||||
this.measures = measures;
|
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() {
|
public List<Author> getAuthor() {
|
||||||
return author;
|
return author;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets author.
|
||||||
|
*
|
||||||
|
* @param author the author
|
||||||
|
*/
|
||||||
public void setAuthor(List<Author> author) {
|
public void setAuthor(List<Author> author) {
|
||||||
this.author = author;
|
this.author = author;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets resulttype.
|
||||||
|
*
|
||||||
|
* @return the resulttype
|
||||||
|
*/
|
||||||
public Qualifier getResulttype() {
|
public Qualifier getResulttype() {
|
||||||
return resulttype;
|
return resulttype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets resulttype.
|
||||||
|
*
|
||||||
|
* @param resulttype the resulttype
|
||||||
|
*/
|
||||||
public void setResulttype(Qualifier resulttype) {
|
public void setResulttype(Qualifier resulttype) {
|
||||||
this.resulttype = 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() {
|
public Qualifier getLanguage() {
|
||||||
return language;
|
return language;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets language.
|
||||||
|
*
|
||||||
|
* @param language the language
|
||||||
|
*/
|
||||||
public void setLanguage(Qualifier language) {
|
public void setLanguage(Qualifier language) {
|
||||||
this.language = language;
|
this.language = language;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets country.
|
||||||
|
*
|
||||||
|
* @return the country
|
||||||
|
*/
|
||||||
public List<Country> getCountry() {
|
public List<Country> getCountry() {
|
||||||
return country;
|
return country;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets country.
|
||||||
|
*
|
||||||
|
* @param country the country
|
||||||
|
*/
|
||||||
public void setCountry(List<Country> country) {
|
public void setCountry(List<Country> country) {
|
||||||
this.country = country;
|
this.country = country;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<StructuredProperty> getSubject() {
|
/**
|
||||||
|
* Gets subject.
|
||||||
|
*
|
||||||
|
* @return the subject
|
||||||
|
*/
|
||||||
|
public List<Subject> getSubject() {
|
||||||
return subject;
|
return subject;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSubject(List<StructuredProperty> subject) {
|
/**
|
||||||
|
* Sets subject.
|
||||||
|
*
|
||||||
|
* @param subject the subject
|
||||||
|
*/
|
||||||
|
public void setSubject(List<Subject> subject) {
|
||||||
this.subject = subject;
|
this.subject = subject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets title.
|
||||||
|
*
|
||||||
|
* @return the title
|
||||||
|
*/
|
||||||
public List<StructuredProperty> getTitle() {
|
public List<StructuredProperty> getTitle() {
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets title.
|
||||||
|
*
|
||||||
|
* @param title the title
|
||||||
|
*/
|
||||||
public void setTitle(List<StructuredProperty> title) {
|
public void setTitle(List<StructuredProperty> title) {
|
||||||
this.title = title;
|
this.title = title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets relevantdate.
|
||||||
|
*
|
||||||
|
* @return the relevantdate
|
||||||
|
*/
|
||||||
public List<StructuredProperty> getRelevantdate() {
|
public List<StructuredProperty> getRelevantdate() {
|
||||||
return relevantdate;
|
return relevantdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets relevantdate.
|
||||||
|
*
|
||||||
|
* @param relevantdate the relevantdate
|
||||||
|
*/
|
||||||
public void setRelevantdate(List<StructuredProperty> relevantdate) {
|
public void setRelevantdate(List<StructuredProperty> relevantdate) {
|
||||||
this.relevantdate = relevantdate;
|
this.relevantdate = relevantdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets description.
|
||||||
|
*
|
||||||
|
* @return the description
|
||||||
|
*/
|
||||||
public List<Field<String>> getDescription() {
|
public List<Field<String>> getDescription() {
|
||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets description.
|
||||||
|
*
|
||||||
|
* @param description the description
|
||||||
|
*/
|
||||||
public void setDescription(List<Field<String>> description) {
|
public void setDescription(List<Field<String>> description) {
|
||||||
this.description = description;
|
this.description = description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets dateofacceptance.
|
||||||
|
*
|
||||||
|
* @return the dateofacceptance
|
||||||
|
*/
|
||||||
public Field<String> getDateofacceptance() {
|
public Field<String> getDateofacceptance() {
|
||||||
return dateofacceptance;
|
return dateofacceptance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets dateofacceptance.
|
||||||
|
*
|
||||||
|
* @param dateofacceptance the dateofacceptance
|
||||||
|
*/
|
||||||
public void setDateofacceptance(Field<String> dateofacceptance) {
|
public void setDateofacceptance(Field<String> dateofacceptance) {
|
||||||
this.dateofacceptance = dateofacceptance;
|
this.dateofacceptance = dateofacceptance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets publisher.
|
||||||
|
*
|
||||||
|
* @return the publisher
|
||||||
|
*/
|
||||||
public Field<String> getPublisher() {
|
public Field<String> getPublisher() {
|
||||||
return publisher;
|
return publisher;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets publisher.
|
||||||
|
*
|
||||||
|
* @param publisher the publisher
|
||||||
|
*/
|
||||||
public void setPublisher(Field<String> publisher) {
|
public void setPublisher(Field<String> publisher) {
|
||||||
this.publisher = publisher;
|
this.publisher = publisher;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets embargoenddate.
|
||||||
|
*
|
||||||
|
* @return the embargoenddate
|
||||||
|
*/
|
||||||
public Field<String> getEmbargoenddate() {
|
public Field<String> getEmbargoenddate() {
|
||||||
return embargoenddate;
|
return embargoenddate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets embargoenddate.
|
||||||
|
*
|
||||||
|
* @param embargoenddate the embargoenddate
|
||||||
|
*/
|
||||||
public void setEmbargoenddate(Field<String> embargoenddate) {
|
public void setEmbargoenddate(Field<String> embargoenddate) {
|
||||||
this.embargoenddate = embargoenddate;
|
this.embargoenddate = embargoenddate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets source.
|
||||||
|
*
|
||||||
|
* @return the source
|
||||||
|
*/
|
||||||
public List<Field<String>> getSource() {
|
public List<Field<String>> getSource() {
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets source.
|
||||||
|
*
|
||||||
|
* @param source the source
|
||||||
|
*/
|
||||||
public void setSource(List<Field<String>> source) {
|
public void setSource(List<Field<String>> source) {
|
||||||
this.source = source;
|
this.source = source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets fulltext.
|
||||||
|
*
|
||||||
|
* @return the fulltext
|
||||||
|
*/
|
||||||
public List<Field<String>> getFulltext() {
|
public List<Field<String>> getFulltext() {
|
||||||
return fulltext;
|
return fulltext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets fulltext.
|
||||||
|
*
|
||||||
|
* @param fulltext the fulltext
|
||||||
|
*/
|
||||||
public void setFulltext(List<Field<String>> fulltext) {
|
public void setFulltext(List<Field<String>> fulltext) {
|
||||||
this.fulltext = fulltext;
|
this.fulltext = fulltext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets format.
|
||||||
|
*
|
||||||
|
* @return the format
|
||||||
|
*/
|
||||||
public List<Field<String>> getFormat() {
|
public List<Field<String>> getFormat() {
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets format.
|
||||||
|
*
|
||||||
|
* @param format the format
|
||||||
|
*/
|
||||||
public void setFormat(List<Field<String>> format) {
|
public void setFormat(List<Field<String>> format) {
|
||||||
this.format = format;
|
this.format = format;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets contributor.
|
||||||
|
*
|
||||||
|
* @return the contributor
|
||||||
|
*/
|
||||||
public List<Field<String>> getContributor() {
|
public List<Field<String>> getContributor() {
|
||||||
return contributor;
|
return contributor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets contributor.
|
||||||
|
*
|
||||||
|
* @param contributor the contributor
|
||||||
|
*/
|
||||||
public void setContributor(List<Field<String>> contributor) {
|
public void setContributor(List<Field<String>> contributor) {
|
||||||
this.contributor = contributor;
|
this.contributor = contributor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets resourcetype.
|
||||||
|
*
|
||||||
|
* @return the resourcetype
|
||||||
|
*/
|
||||||
public Qualifier getResourcetype() {
|
public Qualifier getResourcetype() {
|
||||||
return resourcetype;
|
return resourcetype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets resourcetype.
|
||||||
|
*
|
||||||
|
* @param resourcetype the resourcetype
|
||||||
|
*/
|
||||||
public void setResourcetype(Qualifier resourcetype) {
|
public void setResourcetype(Qualifier resourcetype) {
|
||||||
this.resourcetype = resourcetype;
|
this.resourcetype = resourcetype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets coverage.
|
||||||
|
*
|
||||||
|
* @return the coverage
|
||||||
|
*/
|
||||||
public List<Field<String>> getCoverage() {
|
public List<Field<String>> getCoverage() {
|
||||||
return coverage;
|
return coverage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets coverage.
|
||||||
|
*
|
||||||
|
* @param coverage the coverage
|
||||||
|
*/
|
||||||
public void setCoverage(List<Field<String>> coverage) {
|
public void setCoverage(List<Field<String>> coverage) {
|
||||||
this.coverage = coverage;
|
this.coverage = coverage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets bestaccessright.
|
||||||
|
*
|
||||||
|
* @return the bestaccessright
|
||||||
|
*/
|
||||||
public Qualifier getBestaccessright() {
|
public Qualifier getBestaccessright() {
|
||||||
return bestaccessright;
|
return bestaccessright;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets bestaccessright.
|
||||||
|
*
|
||||||
|
* @param bestaccessright the bestaccessright
|
||||||
|
*/
|
||||||
public void setBestaccessright(Qualifier bestaccessright) {
|
public void setBestaccessright(Qualifier bestaccessright) {
|
||||||
this.bestaccessright = bestaccessright;
|
this.bestaccessright = bestaccessright;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Context> getContext() {
|
/**
|
||||||
return context;
|
* Gets external reference.
|
||||||
}
|
*
|
||||||
|
* @return the external reference
|
||||||
public void setContext(List<Context> context) {
|
*/
|
||||||
this.context = context;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ExternalReference> getExternalReference() {
|
public List<ExternalReference> getExternalReference() {
|
||||||
return externalReference;
|
return externalReference;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets external reference.
|
||||||
|
*
|
||||||
|
* @param externalReference the external reference
|
||||||
|
*/
|
||||||
public void setExternalReference(List<ExternalReference> externalReference) {
|
public void setExternalReference(List<ExternalReference> externalReference) {
|
||||||
this.externalReference = externalReference;
|
this.externalReference = externalReference;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Qualifier getBestInstancetype() {
|
||||||
|
return bestInstancetype;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBestInstancetype(Qualifier bestInstancetype) {
|
||||||
|
this.bestInstancetype = bestInstancetype;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets instance.
|
||||||
|
*
|
||||||
|
* @return the instance
|
||||||
|
*/
|
||||||
public List<Instance> getInstance() {
|
public List<Instance> getInstance() {
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets instance.
|
||||||
|
*
|
||||||
|
* @param instance the instance
|
||||||
|
*/
|
||||||
public void setInstance(List<Instance> instance) {
|
public void setInstance(List<Instance> instance) {
|
||||||
this.instance = instance;
|
this.instance = instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public List<EoscIfGuidelines> getEoscifguidelines() {
|
||||||
public void mergeFrom(OafEntity e) {
|
return eoscifguidelines;
|
||||||
super.mergeFrom(e);
|
|
||||||
|
|
||||||
if (!Result.class.isAssignableFrom(e.getClass())) {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Result r = (Result) e;
|
public void setEoscifguidelines(List<EoscIfGuidelines> eoscifguidelines) {
|
||||||
|
this.eoscifguidelines = eoscifguidelines;
|
||||||
measures = mergeLists(measures, r.getMeasures());
|
|
||||||
|
|
||||||
instance = mergeLists(instance, r.getInstance());
|
|
||||||
|
|
||||||
if (r.getBestaccessright() != null
|
|
||||||
&& new AccessRightComparator().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();
|
|
||||||
|
|
||||||
if (Objects.nonNull(r.getDateofacceptance())) {
|
|
||||||
if (Objects.isNull(getDateofacceptance())) {
|
|
||||||
dateofacceptance = r.getDateofacceptance();
|
|
||||||
} else if (compareTrust(this, r) < 0) {
|
|
||||||
dateofacceptance = r.getDateofacceptance();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
country = mergeLists(country, r.getCountry());
|
public Boolean getIsGreen() {
|
||||||
|
return isGreen;
|
||||||
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;
|
public void setIsGreen(Boolean green) {
|
||||||
if (r.getTitle() != null) {
|
isGreen = green;
|
||||||
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) {
|
public OpenAccessColor getOpenAccessColor() {
|
||||||
baseMainTitle = newMainTitle;
|
return openAccessColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
title = mergeLists(title, r.getTitle());
|
public void setOpenAccessColor(OpenAccessColor openAccessColor) {
|
||||||
if (title != null && baseMainTitle != null) {
|
this.openAccessColor = openAccessColor;
|
||||||
title.add(baseMainTitle);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
relevantdate = mergeLists(relevantdate, r.getRelevantdate());
|
public Boolean getIsInDiamondJournal() {
|
||||||
|
return isInDiamondJournal;
|
||||||
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());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Field<String>> longestLists(List<Field<String>> a, List<Field<String>> b) {
|
public void setIsInDiamondJournal(Boolean inDiamondJournal) {
|
||||||
if (a == null || b == null)
|
isInDiamondJournal = inDiamondJournal;
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private StructuredProperty getMainTitle(List<StructuredProperty> titles) {
|
public Boolean getPubliclyFunded() {
|
||||||
// need to check if the list of titles contains more than 1 main title? (in that case, we should chose which
|
return publiclyFunded;
|
||||||
// main title select in the list)
|
|
||||||
for (StructuredProperty t : titles) {
|
|
||||||
if (t.getQualifier() != null && t.getQualifier().getClassid() != null)
|
|
||||||
if (t.getQualifier().getClassid().equals("main title"))
|
|
||||||
return t;
|
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
|
public void setPubliclyFunded(Boolean publiclyFunded) {
|
||||||
|
this.publiclyFunded = publiclyFunded;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,8 @@ import eu.dnetlib.dhp.schema.common.ModelConstants;
|
||||||
|
|
||||||
public class Software extends Result implements Serializable {
|
public class Software extends Result implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -3096641763359312576L;
|
||||||
|
|
||||||
private List<Field<String>> documentationUrl;
|
private List<Field<String>> documentationUrl;
|
||||||
|
|
||||||
// candidate for removal
|
// candidate for removal
|
||||||
|
@ -54,27 +56,4 @@ public class Software extends Result implements Serializable {
|
||||||
this.programmingLanguage = programmingLanguage;
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,11 @@
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
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 {
|
public class StructuredProperty implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -8490243153237377762L;
|
||||||
|
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
private Qualifier qualifier;
|
private Qualifier qualifier;
|
||||||
|
@ -40,31 +37,4 @@ public class StructuredProperty implements Serializable {
|
||||||
this.dataInfo = dataInfo;
|
this.dataInfo = dataInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toComparableString() {
|
|
||||||
return Stream
|
|
||||||
.of(
|
|
||||||
getQualifier().toComparableString(),
|
|
||||||
Optional.ofNullable(getValue()).map(String::toLowerCase).orElse(""))
|
|
||||||
.filter(StringUtils::isNotBlank)
|
|
||||||
.collect(Collectors.joining("||"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@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());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
}
|
|
@ -1,74 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf.utils;
|
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import eu.dnetlib.dhp.schema.oaf.StructuredProperty;
|
|
||||||
|
|
||||||
public class CleaningFunctions {
|
|
||||||
|
|
||||||
public static final String DOI_PREFIX_REGEX = "(^10\\.|\\/10\\.)";
|
|
||||||
public static final String DOI_PREFIX = "10.";
|
|
||||||
|
|
||||||
public static final Set<String> PID_BLACKLIST = new HashSet<>();
|
|
||||||
|
|
||||||
static {
|
|
||||||
PID_BLACKLIST.add("none");
|
|
||||||
PID_BLACKLIST.add("na");
|
|
||||||
}
|
|
||||||
|
|
||||||
public CleaningFunctions() {}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Utility method that filter PID values on a per-type basis.
|
|
||||||
* @param s the PID whose value will be checked.
|
|
||||||
* @return false if the pid matches the filter criteria, true otherwise.
|
|
||||||
*/
|
|
||||||
public static boolean pidFilter(StructuredProperty s) {
|
|
||||||
final String pidValue = s.getValue();
|
|
||||||
if (Objects.isNull(s.getQualifier()) ||
|
|
||||||
StringUtils.isBlank(pidValue) ||
|
|
||||||
StringUtils.isBlank(pidValue.replaceAll("(?:\\n|\\r|\\t|\\s)", ""))) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (CleaningFunctions.PID_BLACKLIST.contains(pidValue)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return !PidBlacklistProvider.getBlacklist(s.getQualifier().getClassid()).contains(pidValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Utility method that normalises PID values on a per-type basis.
|
|
||||||
* @param pid the PID whose value will be normalised.
|
|
||||||
* @return the PID containing the normalised value.
|
|
||||||
*/
|
|
||||||
public static StructuredProperty normalizePidValue(StructuredProperty pid) {
|
|
||||||
pid.setValue(
|
|
||||||
normalizePidValue(
|
|
||||||
pid.getQualifier().getClassid(),
|
|
||||||
pid.getValue()));
|
|
||||||
|
|
||||||
return pid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String normalizePidValue(String pidType, String pidValue) {
|
|
||||||
String value = Optional
|
|
||||||
.ofNullable(pidValue)
|
|
||||||
.map(String::trim)
|
|
||||||
.orElseThrow(() -> new IllegalArgumentException("PID value cannot be empty"));
|
|
||||||
|
|
||||||
switch (pidType) {
|
|
||||||
|
|
||||||
// TODO add cleaning for more PID types as needed
|
|
||||||
case "doi":
|
|
||||||
return value.toLowerCase().replaceFirst(DOI_PREFIX_REGEX, DOI_PREFIX);
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,253 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf.utils;
|
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkArgument;
|
|
||||||
import static eu.dnetlib.dhp.schema.common.ModelConstants.*;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.security.MessageDigest;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.function.Function;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
import org.apache.commons.codec.binary.Hex;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import com.google.common.collect.HashBiMap;
|
|
||||||
import com.google.common.collect.Maps;
|
|
||||||
|
|
||||||
import eu.dnetlib.dhp.schema.common.ModelSupport;
|
|
||||||
import eu.dnetlib.dhp.schema.oaf.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Factory class for OpenAIRE identifiers in the Graph
|
|
||||||
*/
|
|
||||||
public class IdentifierFactory implements Serializable {
|
|
||||||
|
|
||||||
public static final String ID_SEPARATOR = "::";
|
|
||||||
public static final String ID_PREFIX_SEPARATOR = "|";
|
|
||||||
|
|
||||||
public static final int ID_PREFIX_LEN = 12;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Declares the associations PID_TYPE -> [DATASOURCE ID, NAME] considered authoritative for that PID_TYPE
|
|
||||||
*/
|
|
||||||
public static final Map<PidType, HashBiMap<String, String>> PID_AUTHORITY = Maps.newHashMap();
|
|
||||||
|
|
||||||
static {
|
|
||||||
PID_AUTHORITY.put(PidType.doi, HashBiMap.create());
|
|
||||||
PID_AUTHORITY.get(PidType.doi).put(CROSSREF_ID, "Crossref");
|
|
||||||
PID_AUTHORITY.get(PidType.doi).put(DATACITE_ID, "Datacite");
|
|
||||||
PID_AUTHORITY.get(PidType.doi).put(ZENODO_OD_ID, "ZENODO");
|
|
||||||
PID_AUTHORITY.get(PidType.doi).put(ZENODO_R3_ID, "Zenodo");
|
|
||||||
|
|
||||||
PID_AUTHORITY.put(PidType.pmc, HashBiMap.create());
|
|
||||||
PID_AUTHORITY.get(PidType.pmc).put(EUROPE_PUBMED_CENTRAL_ID, "Europe PubMed Central");
|
|
||||||
PID_AUTHORITY.get(PidType.pmc).put(PUBMED_CENTRAL_ID, "PubMed Central");
|
|
||||||
|
|
||||||
PID_AUTHORITY.put(PidType.pmid, HashBiMap.create());
|
|
||||||
PID_AUTHORITY.get(PidType.pmid).put(EUROPE_PUBMED_CENTRAL_ID, "Europe PubMed Central");
|
|
||||||
PID_AUTHORITY.get(PidType.pmid).put(PUBMED_CENTRAL_ID, "PubMed Central");
|
|
||||||
|
|
||||||
PID_AUTHORITY.put(PidType.arXiv, HashBiMap.create());
|
|
||||||
PID_AUTHORITY.get(PidType.arXiv).put(ARXIV_ID, "arXiv.org e-Print Archive");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Declares the associations PID_TYPE -> [DATASOURCE ID, PID SUBSTRING] considered as delegated authority for that
|
|
||||||
* PID_TYPE. Example, Zenodo is delegated to forge DOIs that contain the 'zenodo' word.
|
|
||||||
*/
|
|
||||||
public static final Map<PidType, Map<String, String>> DELEGATED_PID_AUTHORITY = Maps.newHashMap();
|
|
||||||
|
|
||||||
static {
|
|
||||||
DELEGATED_PID_AUTHORITY.put(PidType.doi, new HashMap<>());
|
|
||||||
DELEGATED_PID_AUTHORITY.get(PidType.doi).put(ZENODO_OD_ID, "zenodo");
|
|
||||||
DELEGATED_PID_AUTHORITY.get(PidType.doi).put(ZENODO_R3_ID, "zenodo");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<StructuredProperty> getPids(List<StructuredProperty> pid, KeyValue collectedFrom) {
|
|
||||||
return pidFromInstance(pid, collectedFrom, true).distinct().collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static <T extends Result> String createDOIBoostIdentifier(T entity) {
|
|
||||||
if (entity == null)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
StructuredProperty pid = null;
|
|
||||||
if (entity.getPid() != null) {
|
|
||||||
pid = entity
|
|
||||||
.getPid()
|
|
||||||
.stream()
|
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.filter(s -> s.getQualifier() != null && "doi".equalsIgnoreCase(s.getQualifier().getClassid()))
|
|
||||||
.filter(CleaningFunctions::pidFilter)
|
|
||||||
.findAny()
|
|
||||||
.orElse(null);
|
|
||||||
} else {
|
|
||||||
if (entity.getInstance() != null) {
|
|
||||||
pid = entity
|
|
||||||
.getInstance()
|
|
||||||
.stream()
|
|
||||||
.filter(i -> i.getPid() != null)
|
|
||||||
.flatMap(i -> i.getPid().stream())
|
|
||||||
.filter(CleaningFunctions::pidFilter)
|
|
||||||
.findAny()
|
|
||||||
.orElse(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (pid != null)
|
|
||||||
return idFromPid(entity, pid, true);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an identifier from the most relevant PID (if available) provided by a known PID authority in the given
|
|
||||||
* entity T. Returns entity.id when none of the PIDs meet the selection criteria is available.
|
|
||||||
*
|
|
||||||
* @param entity the entity providing PIDs and a default ID.
|
|
||||||
* @param <T> the specific entity type. Currently Organization and Result subclasses are supported.
|
|
||||||
* @param md5 indicates whether should hash the PID value or not.
|
|
||||||
* @return an identifier from the most relevant PID, entity.id otherwise
|
|
||||||
*/
|
|
||||||
public static <T extends OafEntity> String createIdentifier(T entity, boolean md5) {
|
|
||||||
|
|
||||||
checkArgument(StringUtils.isNoneBlank(entity.getId()), "missing entity identifier");
|
|
||||||
|
|
||||||
final Map<String, Set<StructuredProperty>> pids = extractPids(entity);
|
|
||||||
|
|
||||||
return pids
|
|
||||||
.values()
|
|
||||||
.stream()
|
|
||||||
.flatMap(Set::stream)
|
|
||||||
.min(new PidComparator<>(entity))
|
|
||||||
.map(
|
|
||||||
min -> Optional
|
|
||||||
.ofNullable(pids.get(min.getQualifier().getClassid()))
|
|
||||||
.map(
|
|
||||||
p -> p
|
|
||||||
.stream()
|
|
||||||
.sorted(new PidValueComparator())
|
|
||||||
.findFirst()
|
|
||||||
.map(s -> idFromPid(entity, s, md5))
|
|
||||||
.orElseGet(entity::getId))
|
|
||||||
.orElseGet(entity::getId))
|
|
||||||
.orElseGet(entity::getId);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static <T extends OafEntity> Map<String, Set<StructuredProperty>> extractPids(T entity) {
|
|
||||||
if (entity instanceof Result) {
|
|
||||||
return Optional
|
|
||||||
.ofNullable(((Result) entity).getInstance())
|
|
||||||
.map(IdentifierFactory::mapPids)
|
|
||||||
.orElse(new HashMap<>());
|
|
||||||
} else {
|
|
||||||
return entity
|
|
||||||
.getPid()
|
|
||||||
.stream()
|
|
||||||
.map(CleaningFunctions::normalizePidValue)
|
|
||||||
.filter(CleaningFunctions::pidFilter)
|
|
||||||
.collect(
|
|
||||||
Collectors
|
|
||||||
.groupingBy(
|
|
||||||
p -> p.getQualifier().getClassid(),
|
|
||||||
Collectors.mapping(p -> p, Collectors.toCollection(HashSet::new))));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Map<String, Set<StructuredProperty>> mapPids(List<Instance> instance) {
|
|
||||||
return instance
|
|
||||||
.stream()
|
|
||||||
.map(i -> pidFromInstance(i.getPid(), i.getCollectedfrom(), false))
|
|
||||||
.flatMap(Function.identity())
|
|
||||||
.collect(
|
|
||||||
Collectors
|
|
||||||
.groupingBy(
|
|
||||||
p -> p.getQualifier().getClassid(),
|
|
||||||
Collectors.mapping(p -> p, Collectors.toCollection(HashSet::new))));
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Stream<StructuredProperty> pidFromInstance(List<StructuredProperty> pid, KeyValue collectedFrom,
|
|
||||||
boolean mapHandles) {
|
|
||||||
return Optional
|
|
||||||
.ofNullable(pid)
|
|
||||||
.map(
|
|
||||||
pp -> pp
|
|
||||||
.stream()
|
|
||||||
// filter away PIDs provided by a DS that is not considered an authority for the
|
|
||||||
// given PID Type
|
|
||||||
.filter(p -> shouldFilterPidByAuthority(collectedFrom, p, mapHandles))
|
|
||||||
.map(CleaningFunctions::normalizePidValue)
|
|
||||||
.filter(p -> isNotFromDelegatedAuthority(collectedFrom, p))
|
|
||||||
.filter(CleaningFunctions::pidFilter))
|
|
||||||
.orElse(Stream.empty());
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean shouldFilterPidByAuthority(KeyValue collectedFrom, StructuredProperty p, boolean mapHandles) {
|
|
||||||
final PidType pType = PidType.tryValueOf(p.getQualifier().getClassid());
|
|
||||||
return (mapHandles && pType.equals(PidType.handle)) || Optional.ofNullable(collectedFrom).isPresent() &&
|
|
||||||
Optional
|
|
||||||
.ofNullable(PID_AUTHORITY.get(pType))
|
|
||||||
.map(authorities -> {
|
|
||||||
return authorities.containsKey(collectedFrom.getKey())
|
|
||||||
|| authorities.containsValue(collectedFrom.getValue());
|
|
||||||
})
|
|
||||||
.orElse(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean isNotFromDelegatedAuthority(KeyValue collectedFrom, StructuredProperty p) {
|
|
||||||
final PidType pType = PidType.tryValueOf(p.getQualifier().getClassid());
|
|
||||||
|
|
||||||
final Map<String, String> da = DELEGATED_PID_AUTHORITY.get(pType);
|
|
||||||
if (Objects.isNull(da)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (!da.containsKey(collectedFrom.getKey())) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return StringUtils.contains(p.getValue(), da.get(collectedFrom.getKey()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see {@link IdentifierFactory#createIdentifier(OafEntity, boolean)}
|
|
||||||
*/
|
|
||||||
public static <T extends OafEntity> String createIdentifier(T entity) {
|
|
||||||
|
|
||||||
return createIdentifier(entity, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static <T extends OafEntity> String idFromPid(T entity, StructuredProperty s, boolean md5) {
|
|
||||||
return idFromPid(ModelSupport.getIdPrefix(entity.getClass()), s.getQualifier().getClassid(), s.getValue(), md5);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String idFromPid(String numericPrefix, String pidType, String pidValue, boolean md5) {
|
|
||||||
return new StringBuilder()
|
|
||||||
.append(numericPrefix)
|
|
||||||
.append(ID_PREFIX_SEPARATOR)
|
|
||||||
.append(createPrefix(pidType))
|
|
||||||
.append(ID_SEPARATOR)
|
|
||||||
.append(md5 ? md5(pidValue) : pidValue)
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
// create the prefix (length = 12)
|
|
||||||
private static String createPrefix(String pidType) {
|
|
||||||
StringBuilder prefix = new StringBuilder(StringUtils.left(pidType, ID_PREFIX_LEN));
|
|
||||||
while (prefix.length() < ID_PREFIX_LEN) {
|
|
||||||
prefix.append("_");
|
|
||||||
}
|
|
||||||
return prefix.substring(0, ID_PREFIX_LEN);
|
|
||||||
}
|
|
||||||
|
|
||||||
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 Exception e) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf.utils;
|
|
||||||
|
|
||||||
public class ModelHardLimits {
|
|
||||||
|
|
||||||
private ModelHardLimits() {}
|
|
||||||
|
|
||||||
public static final String LAYOUT = "index";
|
|
||||||
public static final String INTERPRETATION = "openaire";
|
|
||||||
public static final String SEPARATOR = "-";
|
|
||||||
|
|
||||||
public static final int MAX_EXTERNAL_ENTITIES = 50;
|
|
||||||
public static final int MAX_AUTHORS = 200;
|
|
||||||
public static final int MAX_AUTHOR_FULLNAME_LENGTH = 1000;
|
|
||||||
public static final int MAX_TITLE_LENGTH = 5000;
|
|
||||||
public static final int MAX_TITLES = 10;
|
|
||||||
public static final int MAX_ABSTRACT_LENGTH = 150000;
|
|
||||||
public static final int MAX_INSTANCES = 10;
|
|
||||||
|
|
||||||
public static String getCollectionName(String format) {
|
|
||||||
return format + SEPARATOR + LAYOUT + SEPARATOR + INTERPRETATION;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf.utils;
|
|
||||||
|
|
||||||
import java.util.Comparator;
|
|
||||||
|
|
||||||
import eu.dnetlib.dhp.schema.oaf.StructuredProperty;
|
|
||||||
|
|
||||||
public class OrganizationPidComparator implements Comparator<StructuredProperty> {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int compare(StructuredProperty left, StructuredProperty right) {
|
|
||||||
|
|
||||||
PidType lClass = PidType.tryValueOf(left.getQualifier().getClassid());
|
|
||||||
PidType rClass = PidType.tryValueOf(right.getQualifier().getClassid());
|
|
||||||
|
|
||||||
if (lClass.equals(PidType.openorgs))
|
|
||||||
return -1;
|
|
||||||
if (rClass.equals(PidType.openorgs))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (lClass.equals(PidType.GRID))
|
|
||||||
return -1;
|
|
||||||
if (rClass.equals(PidType.GRID))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (lClass.equals(PidType.mag_id))
|
|
||||||
return -1;
|
|
||||||
if (rClass.equals(PidType.mag_id))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (lClass.equals(PidType.urn))
|
|
||||||
return -1;
|
|
||||||
if (rClass.equals(PidType.urn))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf.utils;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
|
|
||||||
public class PidBlacklist extends HashMap<String, HashSet<String>> {
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf.utils;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
|
|
||||||
public class PidBlacklistProvider {
|
|
||||||
|
|
||||||
private static final PidBlacklist blacklist;
|
|
||||||
|
|
||||||
static {
|
|
||||||
try {
|
|
||||||
String json = IOUtils.toString(IdentifierFactory.class.getResourceAsStream("pid_blacklist.json"));
|
|
||||||
blacklist = new ObjectMapper().readValue(json, PidBlacklist.class);
|
|
||||||
|
|
||||||
} catch (IOException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static PidBlacklist getBlacklist() {
|
|
||||||
return blacklist;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Set<String> getBlacklist(String pidType) {
|
|
||||||
return Optional
|
|
||||||
.ofNullable(getBlacklist().get(pidType))
|
|
||||||
.orElse(new HashSet<>());
|
|
||||||
}
|
|
||||||
|
|
||||||
private PidBlacklistProvider() {}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,48 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf.utils;
|
|
||||||
|
|
||||||
import java.util.Comparator;
|
|
||||||
|
|
||||||
import eu.dnetlib.dhp.schema.common.ModelSupport;
|
|
||||||
import eu.dnetlib.dhp.schema.oaf.OafEntity;
|
|
||||||
import eu.dnetlib.dhp.schema.oaf.Organization;
|
|
||||||
import eu.dnetlib.dhp.schema.oaf.Result;
|
|
||||||
import eu.dnetlib.dhp.schema.oaf.StructuredProperty;
|
|
||||||
|
|
||||||
public class PidComparator<T extends OafEntity> implements Comparator<StructuredProperty> {
|
|
||||||
|
|
||||||
private final T entity;
|
|
||||||
|
|
||||||
public PidComparator(T entity) {
|
|
||||||
this.entity = entity;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int compare(StructuredProperty left, StructuredProperty right) {
|
|
||||||
|
|
||||||
if (left == null && right == null)
|
|
||||||
return 0;
|
|
||||||
if (left == null)
|
|
||||||
return 1;
|
|
||||||
if (right == null)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (ModelSupport.isSubClass(entity, Result.class)) {
|
|
||||||
return compareResultPids(left, right);
|
|
||||||
}
|
|
||||||
if (ModelSupport.isSubClass(entity, Organization.class)) {
|
|
||||||
return compareOrganizationtPids(left, right);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Else (but unlikely), lexicographical ordering will do.
|
|
||||||
return left.getQualifier().getClassid().compareTo(right.getQualifier().getClassid());
|
|
||||||
}
|
|
||||||
|
|
||||||
private int compareResultPids(StructuredProperty left, StructuredProperty right) {
|
|
||||||
return new ResultPidComparator().compare(left, right);
|
|
||||||
}
|
|
||||||
|
|
||||||
private int compareOrganizationtPids(StructuredProperty left, StructuredProperty right) {
|
|
||||||
return new OrganizationPidComparator().compare(left, right);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,79 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf.utils;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.EnumUtils;
|
|
||||||
|
|
||||||
public enum PidType {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The DOI syntax shall be made up of a DOI prefix and a DOI suffix separated by a forward slash.
|
|
||||||
*
|
|
||||||
* There is no defined limit on the length of the DOI name, or of the DOI prefix or DOI suffix.
|
|
||||||
*
|
|
||||||
* The DOI name is case-insensitive and can incorporate any printable characters from the legal graphic characters
|
|
||||||
* of Unicode. Further constraints on character use (e.g. use of language-specific alphanumeric characters) can be
|
|
||||||
* defined for an application by the ISO 26324 Registration Authority.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* DOI prefix: The DOI prefix shall be composed of a directory indicator followed by a registrant code.
|
|
||||||
* These two components shall be separated by a full stop (period). The directory indicator shall be "10" and
|
|
||||||
* distinguishes the entire set of character strings (prefix and suffix) as digital object identifiers within the
|
|
||||||
* resolution system.
|
|
||||||
*
|
|
||||||
* Registrant code: The second element of the DOI prefix shall be the registrant code. The registrant code is a
|
|
||||||
* unique string assigned to a registrant.
|
|
||||||
*
|
|
||||||
* DOI suffix: The DOI suffix shall consist of a character string of any length chosen by the registrant.
|
|
||||||
* Each suffix shall be unique to the prefix element that precedes it. The unique suffix can be a sequential number,
|
|
||||||
* or it might incorporate an identifier generated from or based on another system used by the registrant
|
|
||||||
* (e.g. ISAN, ISBN, ISRC, ISSN, ISTC, ISNI; in such cases, a preferred construction for such a suffix can be
|
|
||||||
* specified, as in Example 1).
|
|
||||||
*
|
|
||||||
* Source: https://www.doi.org/doi_handbook/2_Numbering.html#2.2
|
|
||||||
*/
|
|
||||||
doi,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PubMed Unique Identifier (PMID)
|
|
||||||
*
|
|
||||||
* This field is a 1-to-8 digit accession number with no leading zeros. It is present on all records and is the
|
|
||||||
* accession number for managing and disseminating records. PMIDs are not reused after records are deleted.
|
|
||||||
*
|
|
||||||
* Beginning in February 2012 PMIDs include extensions following a decimal point to account for article versions
|
|
||||||
* (e.g., 21804956.2). All citations are considered version 1 until replaced. The extended PMID is not displayed
|
|
||||||
* on the MEDLINE format.
|
|
||||||
*
|
|
||||||
* View the citation in abstract format in PubMed to access additional versions when available (see the article in
|
|
||||||
* the Jan-Feb 2012 NLM Technical Bulletin).
|
|
||||||
*
|
|
||||||
* Source: https://www.nlm.nih.gov/bsd/mms/medlineelements.html#pmid
|
|
||||||
*/
|
|
||||||
pmid,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This field contains the unique identifier for the cited article in PubMed Central. The identifier begins with the
|
|
||||||
* prefix PMC.
|
|
||||||
*
|
|
||||||
* Source: https://www.nlm.nih.gov/bsd/mms/medlineelements.html#pmc
|
|
||||||
*/
|
|
||||||
pmc, handle, arXiv, nct, pdb,
|
|
||||||
|
|
||||||
// Organization
|
|
||||||
openorgs, corda, corda_h2020, GRID, mag_id, urn,
|
|
||||||
|
|
||||||
// Used by dedup
|
|
||||||
undefined, original;
|
|
||||||
|
|
||||||
public static boolean isValid(String type) {
|
|
||||||
return EnumUtils.isValidEnum(PidType.class, type);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static PidType tryValueOf(String s) {
|
|
||||||
try {
|
|
||||||
return PidType.valueOf(s);
|
|
||||||
} catch (Exception e) {
|
|
||||||
return PidType.original;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,33 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf.utils;
|
|
||||||
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
import eu.dnetlib.dhp.schema.oaf.StructuredProperty;
|
|
||||||
|
|
||||||
public class PidValueComparator implements Comparator<StructuredProperty> {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int compare(StructuredProperty left, StructuredProperty right) {
|
|
||||||
|
|
||||||
if (left == null && right == null)
|
|
||||||
return 0;
|
|
||||||
if (left == null)
|
|
||||||
return 1;
|
|
||||||
if (right == null)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
StructuredProperty l = CleaningFunctions.normalizePidValue(left);
|
|
||||||
StructuredProperty r = CleaningFunctions.normalizePidValue(right);
|
|
||||||
|
|
||||||
return Optional
|
|
||||||
.ofNullable(l.getValue())
|
|
||||||
.map(
|
|
||||||
lv -> Optional
|
|
||||||
.ofNullable(r.getValue())
|
|
||||||
.map(rv -> lv.compareTo(rv))
|
|
||||||
.orElse(-1))
|
|
||||||
.orElse(1);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,53 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf.utils;
|
|
||||||
|
|
||||||
import java.util.Comparator;
|
|
||||||
|
|
||||||
import eu.dnetlib.dhp.schema.oaf.StructuredProperty;
|
|
||||||
|
|
||||||
public class ResultPidComparator implements Comparator<StructuredProperty> {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int compare(StructuredProperty left, StructuredProperty right) {
|
|
||||||
|
|
||||||
PidType lClass = PidType.tryValueOf(left.getQualifier().getClassid());
|
|
||||||
PidType rClass = PidType.tryValueOf(right.getQualifier().getClassid());
|
|
||||||
|
|
||||||
if (lClass.equals(PidType.doi))
|
|
||||||
return -1;
|
|
||||||
if (rClass.equals(PidType.doi))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (lClass.equals(PidType.pmid))
|
|
||||||
return -1;
|
|
||||||
if (rClass.equals(PidType.pmid))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (lClass.equals(PidType.pmc))
|
|
||||||
return -1;
|
|
||||||
if (rClass.equals(PidType.pmc))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (lClass.equals(PidType.handle))
|
|
||||||
return -1;
|
|
||||||
if (rClass.equals(PidType.handle))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (lClass.equals(PidType.arXiv))
|
|
||||||
return -1;
|
|
||||||
if (rClass.equals(PidType.arXiv))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (lClass.equals(PidType.nct))
|
|
||||||
return -1;
|
|
||||||
if (rClass.equals(PidType.nct))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (lClass.equals(PidType.pdb))
|
|
||||||
return -1;
|
|
||||||
if (rClass.equals(PidType.pdb))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,77 +0,0 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf.utils;
|
|
||||||
|
|
||||||
import static eu.dnetlib.dhp.schema.common.ModelConstants.CROSSREF_ID;
|
|
||||||
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import eu.dnetlib.dhp.schema.common.ModelConstants;
|
|
||||||
import eu.dnetlib.dhp.schema.oaf.KeyValue;
|
|
||||||
import eu.dnetlib.dhp.schema.oaf.Result;
|
|
||||||
|
|
||||||
public class ResultTypeComparator implements Comparator<Result> {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int compare(Result left, Result right) {
|
|
||||||
|
|
||||||
if (left == null && right == null)
|
|
||||||
return 0;
|
|
||||||
if (left == null)
|
|
||||||
return 1;
|
|
||||||
if (right == null)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
HashSet<String> lCf = getCollectedFromIds(left);
|
|
||||||
HashSet<String> rCf = getCollectedFromIds(right);
|
|
||||||
|
|
||||||
if (lCf.contains(CROSSREF_ID) && !rCf.contains(CROSSREF_ID)) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (!lCf.contains(CROSSREF_ID) && rCf.contains(CROSSREF_ID)) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
String lClass = left.getResulttype().getClassid();
|
|
||||||
String rClass = right.getResulttype().getClassid();
|
|
||||||
|
|
||||||
if (lClass.equals(rClass))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (lClass.equals(ModelConstants.PUBLICATION_RESULTTYPE_CLASSID))
|
|
||||||
return -1;
|
|
||||||
if (rClass.equals(ModelConstants.PUBLICATION_RESULTTYPE_CLASSID))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (lClass.equals(ModelConstants.DATASET_RESULTTYPE_CLASSID))
|
|
||||||
return -1;
|
|
||||||
if (rClass.equals(ModelConstants.DATASET_RESULTTYPE_CLASSID))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (lClass.equals(ModelConstants.SOFTWARE_RESULTTYPE_CLASSID))
|
|
||||||
return -1;
|
|
||||||
if (rClass.equals(ModelConstants.SOFTWARE_RESULTTYPE_CLASSID))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (lClass.equals(ModelConstants.ORP_RESULTTYPE_CLASSID))
|
|
||||||
return -1;
|
|
||||||
if (rClass.equals(ModelConstants.ORP_RESULTTYPE_CLASSID))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
// Else (but unlikely), lexicographical ordering will do.
|
|
||||||
return lClass.compareTo(rClass);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected HashSet<String> getCollectedFromIds(Result left) {
|
|
||||||
return Optional
|
|
||||||
.ofNullable(left.getCollectedfrom())
|
|
||||||
.map(
|
|
||||||
cf -> cf
|
|
||||||
.stream()
|
|
||||||
.map(KeyValue::getKey)
|
|
||||||
.collect(Collectors.toCollection(HashSet::new)))
|
|
||||||
.orElse(new HashSet<>());
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
package eu.dnetlib.dhp.schema.solr;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to refer to the Article Processing Charge information. 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 static final long serialVersionUID = 8324447899738993669L;
|
||||||
|
|
||||||
|
private String currency;
|
||||||
|
|
||||||
|
private String amount;
|
||||||
|
|
||||||
|
public static APC newInstance(String currency, String amount) {
|
||||||
|
APC apc = new APC();
|
||||||
|
apc.setCurrency(currency);
|
||||||
|
apc.setAmount(amount);
|
||||||
|
return apc;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
|
||||||
|
package eu.dnetlib.dhp.schema.solr;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class models the access rights of research products.
|
||||||
|
*/
|
||||||
|
public class AccessRight implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 7995566912611238604L;
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
private String label;
|
||||||
|
|
||||||
|
private OpenAccessRoute openAccessRoute;
|
||||||
|
|
||||||
|
public static AccessRight newInstance(String code, String label, OpenAccessRoute openAccessRoute) {
|
||||||
|
AccessRight accessRight = new AccessRight();
|
||||||
|
accessRight.setCode(code);
|
||||||
|
accessRight.setLabel(label);
|
||||||
|
accessRight.setOpenAccessRoute(openAccessRoute);
|
||||||
|
return accessRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 OpenAccessRoute getOpenAccessRoute() {
|
||||||
|
return openAccessRoute;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOpenAccessRoute(OpenAccessRoute openAccessRoute) {
|
||||||
|
this.openAccessRoute = openAccessRoute;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,72 @@
|
||||||
|
package eu.dnetlib.dhp.schema.solr;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class Author implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 5482727671039062564L;
|
||||||
|
|
||||||
|
private String fullname;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private String surname;
|
||||||
|
|
||||||
|
private Integer rank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The author's persistent identifiers
|
||||||
|
*/
|
||||||
|
private List<Pid> pid;
|
||||||
|
|
||||||
|
public static Author newInstance(String fullname, String name, String surname, int rank, List<Pid> pid) {
|
||||||
|
Author a = new Author();
|
||||||
|
a.setFullname(fullname);
|
||||||
|
a.setName(name);
|
||||||
|
a.setSurname(surname);
|
||||||
|
a.setRank(rank);
|
||||||
|
a.setPid(pid);
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 List<Pid> getPid() {
|
||||||
|
return pid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPid(List<Pid> pid) {
|
||||||
|
this.pid = pid;
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue