From b00d56a698c6fcff193b09a69d5d223b9095acd5 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Mon, 18 Dec 2023 18:34:09 +0100 Subject: [PATCH 01/21] [DSC-1438] Remove green orange configurations --- .../dspaceFolder/config/item-submission.xml | 22 + .../dspaceFolder/config/modules/authority.cfg | 285 ++ .../dspaceFolder/config/submission-forms.xml | 3935 +++++++++-------- .../dspaceFolder/config/item-submission.xml | 561 +-- dspace/config/item-submission.xml | 20 - dspace/config/modules/authority.cfg | 4 +- dspace/config/submission-forms.xml | 279 -- 7 files changed, 2719 insertions(+), 2387 deletions(-) create mode 100644 dspace-api/src/test/data/dspaceFolder/config/modules/authority.cfg diff --git a/dspace-api/src/test/data/dspaceFolder/config/item-submission.xml b/dspace-api/src/test/data/dspaceFolder/config/item-submission.xml index 64fbc551def6..d94d1145ee45 100644 --- a/dspace-api/src/test/data/dspaceFolder/config/item-submission.xml +++ b/dspace-api/src/test/data/dspaceFolder/config/item-submission.xml @@ -285,6 +285,17 @@ submission + + submit.progressbar.describe.green + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.green + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + @@ -457,6 +468,17 @@ + + + + + + + + + + + diff --git a/dspace-api/src/test/data/dspaceFolder/config/modules/authority.cfg b/dspace-api/src/test/data/dspaceFolder/config/modules/authority.cfg new file mode 100644 index 000000000000..10e4bc36fbb9 --- /dev/null +++ b/dspace-api/src/test/data/dspaceFolder/config/modules/authority.cfg @@ -0,0 +1,285 @@ +#---------------------------------------------------------------# +#----------------- AUTHORITY CONFIGURATIONS --------------------# +#---------------------------------------------------------------# +# These configs are used by the authority framework # +#---------------------------------------------------------------# + +## The DCInputAuthority plugin is automatically configured with every +## value-pairs element in input-forms.xml, namely: +## common_identifiers, common_types, common_iso_languages +## +## The DSpaceControlledVocabulary plugin is automatically configured +## with every *.xml file in [dspace]/config/controlled-vocabularies, +## and creates a plugin instance for each, using base filename as the name. +## eg: nsi, srsc. +## Each DSpaceControlledVocabulary plugin comes with three configuration options: +# vocabulary.plugin._plugin_.hierarchy.store = # default: true +# vocabulary.plugin._plugin_.hierarchy.suggest = # default: false +# vocabulary.plugin._plugin_.delimiter = "" # default: "::" +## +## An example using "srsc" can be found later in this section + +plugin.selfnamed.org.dspace.content.authority.ChoiceAuthority = \ + org.dspace.content.authority.DCInputAuthority, \ + org.dspace.content.authority.DSpaceControlledVocabulary + + ## +## This sets the default lowest confidence level at which a metadata value is included +## in an authority-controlled browse (and search) index. It is a symbolic +## keyword, one of the following values (listed in descending order): +## accepted +## uncertain +## ambiguous +## notfound +## failed +## rejected +## novalue +## unset +## See manual or org.dspace.content.authority.Choices source for descriptions. +authority.minconfidence = ambiguous + +# Configuration settings for ORCID based authority control. +# Uncomment the lines below to enable configuration +#choices.plugin.dc.contributor.author = SolrAuthorAuthority +#choices.presentation.dc.contributor.author = authorLookup +#authority.controlled.dc.contributor.author = true +#authority.author.indexer.field.1=dc.contributor.author + +## +## This sets the lowest confidence level at which a metadata value is included +## in an authority-controlled browse (and search) index. It is a symbolic +## keyword from the same set as for the default "authority.minconfidence" +#authority.minconfidence.dc.contributor.author = accepted + +## demo: subject code autocomplete, using srsc as authority +## (DSpaceControlledVocabulary plugin must be enabled) +## Warning: when enabling this feature any controlled vocabulary configuration in the input-forms.xml for the metadata field will be overridden. +#vocabulary.plugin.srsc.hierarchy.store = true +#vocabulary.plugin.srsc.hierarchy.suggest = true +#vocabulary.plugin.srsc.delimiter = "::" + +# publisher name lookup through SHERPA/RoMEO: +#choices.plugin.dc.publisher = SRPublisher +#choices.presentation.dc.publisher = suggest + +## demo: journal title lookup, with ISSN as authority +#choices.plugin.dc.title.alternative = SRJournalTitle +#choices.presentation.dc.title.alternative = suggest +#authority.controlled.dc.title.alternative = true + +##### Authority Control Settings ##### +#plugin.named.org.dspace.content.authority.ChoiceAuthority = \ +# org.dspace.content.authority.SampleAuthority = Sample, \ +# org.dspace.content.authority.SHERPARoMEOPublisher = SRPublisher, \ +# org.dspace.content.authority.SHERPARoMEOJournalTitle = SRJournalTitle, \ +# org.dspace.content.authority.SolrAuthority = SolrAuthorAuthority + +#Uncomment to enable ORCID authority control +#plugin.named.org.dspace.content.authority.ChoiceAuthority = \ +# org.dspace.content.authority.SolrAuthority = SolrAuthorAuthority + +##### Authority Control Settings ##### +plugin.named.org.dspace.content.authority.ChoiceAuthority = \ + org.dspace.content.authority.OrcidAuthority = AuthorAuthority,\ + org.dspace.content.authority.OrcidAuthority = EditorAuthority,\ + org.dspace.content.authority.OrcidAuthority = AuthorStrictMatchAuthority, \ + org.dspace.content.authority.OrcidAuthority = AuthorCoarseMatchAuthority, \ + org.dspace.content.authority.ItemAuthority = DataSetAuthority,\ + org.dspace.content.authority.ItemAuthority = JournalAuthority,\ + org.dspace.content.authority.RorOrgUnitAuthority = OrgUnitAuthority,\ + org.dspace.content.authority.ItemAuthority = ProjectAuthority,\ + org.dspace.content.authority.OpenAIREProjectAuthority = FundingAuthority,\ + org.dspace.content.authority.ItemAuthority = PublicationAuthority,\ + org.dspace.content.authority.ItemAuthority = EquipmentAuthority,\ + org.dspace.content.authority.EPersonAuthority = EPersonAuthority,\ + org.dspace.content.authority.GroupAuthority = GroupAuthority,\ + org.dspace.content.authority.ZDBAuthority = ZDBAuthority,\ + org.dspace.content.authority.SherpaAuthority = SherpaAuthority + +cris.ItemAuthority.forceInternalName = true + +# AuthorStrictMatchAuthority configuration +cris.ItemAuthority.AuthorStrictMatchAuthority.forceInternalName = false + +# AuthorCoarseMatchAuthority configuration +cris.ItemAuthority.AuthorCoarseMatchAuthority.forceInternalName = false + +cris.ItemAuthority.DataSetAuthority.entityType = Product +cris.ItemAuthority.JournalAuthority.entityType = Journal +cris.ItemAuthority.OrgUnitAuthority.entityType = OrgUnit +cris.ItemAuthority.ProjectAuthority.entityType = Project +cris.ItemAuthority.FundingAuthority.entityType = Funding +cris.ItemAuthority.PublicationAuthority.entityType = Publication +cris.ItemAuthority.EquipmentAuthority.entityType = Equipment + +## OrcidAuthority Extras configuration +# + +cris.OrcidAuthority.EditorAuthority.institution.key = oairecerif_editor_affiliation +cris.OrcidAuthority.AuthorAuthority.institution.key = oairecerif_author_affiliation + +#cris.OrcidAuthority.AuthorAuthority.institution.display = true +#cris.OrcidAuthority.AuthorAuthority.institution.as-data = true +# +#cris.OrcidAuthority.AuthorAuthority.orcid-id.key = person_identifier_orcid +#cris.OrcidAuthority.AuthorAuthority.orcid-id.display = true +#cris.OrcidAuthority.AuthorAuthority.orcid-id.as-data = true + + +cris.SherpaAuthority.entityType = Journal +cris.SherpaAuthority.local-item-choices-enabled = true + +ItemAuthority.reciprocalMetadata.Publication.dc.relation.product = dc.relation.publication +ItemAuthority.reciprocalMetadata.Product.dc.relation.publication = dc.relation.product + +choices.plugin.dc.contributor.author = AuthorAuthority +choices.presentation.dc.contributor.author = suggest +authority.controlled.dc.contributor.author = true + +choices.plugin.green.override.dc.contributor.author = AuthorStrictMatchAuthority +choices.plugin.orange.override.dc.contributor.author = AuthorCoarseMatchAuthority + +choices.plugin.oairecerif.author.affiliation = OrgUnitAuthority +choices.presentation.oairecerif.author.affiliation = suggest +authority.controlled.oairecerif.author.affiliation = true + +choices.plugin.dc.contributor.editor = EditorAuthority +choices.presentation.dc.contributor.editor = suggest +authority.controlled.dc.contributor.editor = true + +choices.plugin.oairecerif.editor.affiliation = OrgUnitAuthority +choices.presentation.oairecerif.editor.affiliation = suggest +authority.controlled.oairecerif.editor.affiliation = true + +choices.plugin.dc.relation.product = DataSetAuthority +choices.presentation.dc.relation.product = suggest +authority.controlled.dc.relation.product = true + +choices.plugin.dc.relation.publication = PublicationAuthority +choices.presentation.dc.relation.publication = suggest +authority.controlled.dc.relation.publication = true + +choices.plugin.dc.relation.journal = SherpaAuthority +choices.presentation.dc.relation.journal = suggest +authority.controlled.dc.relation.journal = true + +choices.plugin.dc.relation.project = ProjectAuthority +choices.presentation.dc.relation.project = suggest +authority.controlled.dc.relation.project = true + +choices.plugin.dc.relation.funding = FundingAuthority +choices.presentation.dc.relation.funding = suggest +# the externalsource provider identifier +choises.externalsource.dc.relation.funding = fundingAuthority +authority.controlled.dc.relation.funding = true + +choices.plugin.dc.description.sponsorship = OrgUnitAuthority +choices.presentation.dc.description.sponsorship = suggest +authority.controlled.dc.description.sponsorship = true + +### authorities required by Projects +choices.plugin.crispj.coordinator = OrgUnitAuthority +choices.presentation.crispj.coordinator = suggest +authority.controlled.crispj.coordinator = true + +choices.plugin.crispj.organization = OrgUnitAuthority +choices.presentation.crispj.organization = suggest +authority.controlled.crispj.organization = true + +choices.plugin.crispj.partnerou = OrgUnitAuthority +choices.presentation.crispj.partnerou = suggest +authority.controlled.crispj.partnerou = true + +choices.plugin.crispj.investigator = AuthorAuthority +choices.presentation.crispj.investigator = suggest +authority.controlled.crispj.investigator = true + +choices.plugin.crispj.coinvestigators = AuthorAuthority +choices.presentation.crispj.coinvestigators = suggest +authority.controlled.crispj.coinvestigators = true + +choices.plugin.dc.relation.equipment = EquipmentAuthority +choices.presentation.dc.relation.equipment = suggest +authority.controlled.dc.relation.equipment = true + +### authorities required by Person +choices.plugin.person.affiliation.name = OrgUnitAuthority +choices.presentation.person.affiliation.name = suggest +authority.controlled.person.affiliation.name = true + +choices.plugin.oairecerif.person.affiliation = OrgUnitAuthority +choices.presentation.oairecerif.person.affiliation = suggest +authority.controlled.oairecerif.person.affiliation = true + +#choices.plugin.crisrp.workgroup = OrgUnitAuthority +#choices.presentation.crisrp.workgroup = suggest +#authority.controlled.crisrp.workgroup = true + +#choices.plugin.crisrp.qualification = OrgUnitAuthority +#choices.presentation.crisrp.qualification = suggest +#authority.controlled.crisrp.qualification = true + +#choices.plugin.crisrp.education = OrgUnitAuthority +#choices.presentation.crisrp.education = suggest +#authority.controlled.crisrp.education = true + +### authorities required by OrgUnit +choices.plugin.organization.parentOrganization = OrgUnitAuthority +choices.presentation.organization.parentOrganization = suggest +authority.controlled.organization.parentOrganization = true + +choices.plugin.crisou.director= AuthorAuthority +choices.presentation.crisou.director = suggest +authority.controlled.crisou.director = true + +### authorities required by Funding +choices.plugin.oairecerif.funder = OrgUnitAuthority +choices.presentation.oairecerif.funder = suggest +authority.controlled.oairecerif.funder = true + +choices.plugin.oairecerif.fundingParent = FundingAuthority +choices.presentation.oairecerif.fundingParent = suggest +authority.controlled.oairecerif.fundingParent = true + +choices.plugin.crisfund.investigators = AuthorAuthority +choices.presentation.crisfund.investigators = suggest +authority.controlled.crisfund.investigators = true + +choices.plugin.crisfund.coinvestigators = AuthorAuthority +choices.presentation.crisfund.coinvestigators = suggest +authority.controlled.crisfund.coinvestigators = true + +choices.plugin.crisfund.leadorganizations = OrgUnitAuthority +choices.presentation.crisfund.leadorganizations = suggest +authority.controlled.crisfund.leadorganizations = true + +choices.plugin.crisfund.leadcoorganizations = OrgUnitAuthority +choices.presentation.crisfund.leadcoorganizations = suggest +authority.controlled.crisfund.leadcoorganizations = true + +### authorities required by cris features +choices.plugin.cris.policy.eperson = EPersonAuthority +choices.presentation.cris.policy.eperson = suggest +authority.controlled.cris.policy.eperson = true + +choices.plugin.cris.policy.group = GroupAuthority +choices.presentation.cris.policy.group = suggest +authority.controlled.cris.policy.group = true + +choices.plugin.dspace.object.owner = EPersonAuthority +choices.presentation.dspace.object.owner = suggest +authority.controlled.dspace.object.owner = true + +choices.plugin.dc.identifier.issn = ZDBAuthority +choices.presentation.dc.identifier.issn = suggest +authority.controlled.dc.identifier.issn = true + +choices.plugin.dc.relation.ispartof = SherpaAuthority +choices.presentation.dc.relation.ispartof = suggest +authority.controlled.dc.relation.ispartof = true + +authority.controlled.dc.type = true +choices.plugin.dc.type = ControlledVocabularyAuthority + +# DSpace-CRIS stores by default the authority of controlled vocabularies +vocabulary.plugin.authority.store = true diff --git a/dspace-api/src/test/data/dspaceFolder/config/submission-forms.xml b/dspace-api/src/test/data/dspaceFolder/config/submission-forms.xml index fe47289e4315..cc41ac0c6e18 100644 --- a/dspace-api/src/test/data/dspaceFolder/config/submission-forms.xml +++ b/dspace-api/src/test/data/dspaceFolder/config/submission-forms.xml @@ -4,688 +4,275 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - +
- - - dc - title - - false - - onebox - Enter the name of the file. - You must enter a main title for this item. - - - - - dc - description - true - - textarea - Enter a description for the file - - - -
- -
- - - - isAuthorOfPublication - person - true - true - - Add an author - - dc - contributor - author - name - - orcid,my_staff_db - - - - - - dc - title - - false - - onebox - Enter the main title of the item. - You must enter a main title for this item. - - - - - - dc - title - alternative - true - - onebox - If the item has any alternative titles, please enter them here. - - - - - - dc - date - issued - false - - - date - Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't - applicable. - You must enter at least the year. - - - - dc - publisher - - false - - - onebox - Enter the name of the publisher of the previously issued instance of this item. - - - - - - dc - identifier - citation - false - - onebox - Enter the standard citation for the previously issued instance of this item. - - - - - - dc - relation - ispartofseries - true - - Technical Report - series - Enter the series and number assigned to this item by your community. - - - - - - dc - identifier - - - true - - qualdrop_value - If the item has any identification numbers or codes associated with -it, please enter the types and the actual numbers or codes. - - - - - - dc - type - - true - - dropdown - Select the type(s) of content of the item. To select more than one value in the list, you may have to hold down the "CTRL" or "Shift" key. - - - - - - dc - language - iso - false - - dropdown - Select the language of the main content of the item. If the language does not appear in the list, please select 'Other'. If the content does not really have a language (for example, if it is a dataset or an image) please select 'N/A'. - - - -
- -
dc - contributor - author - - name + title + false - You must enter at least the author. - Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, J]. + + onebox + Enter the name of the file. + You must enter a main title for this item. - person - affiliation - name - - onebox - false - - Enter the affiliation of the author as stated on the publication. + dc + description + true + + textarea + Enter a description for the file +
-
+ + + + + isAuthorOfPublication + person + true + true + + Add an author + + dc + contributor + author + name + + orcid,my_staff_db + + + - orgunit - identifier - name - - onebox + dc + title + false - You must enter at least the Orgunit name. - Enter the name of the Orgunit of this item + + onebox + Enter the main title of the item. + You must enter a main title for this item. + - orgunit - identifier - id - + dc + title + alternative + true + onebox - false - - Enter the id of the Orgunit of this item + If the item has any alternative titles, please enter them here. + -
- -
- - - dc - contributor - author - true - - group - Enter the names of the authors of this item. - - - - - - dc - title - - false - - onebox - Enter the main title of the item. - You must enter a main title for this item. - - - - - - dc - title - alternative - true - - onebox - If the item has any alternative titles, please enter them here. - - - - - - dc - date - issued - false - - - date - Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't - applicable. - You must enter at least the year. - - - - dc - publisher - - false - - - onebox - Enter the name of the publisher of the previously issued instance of this item. - - - - - - dc - identifier - citation - false - - onebox - Enter the standard citation for the previously issued instance of this item. - - - - - - dc - relation - ispartofseries - true - - series - Enter the series and number assigned to this item by your community. - - - - - - dc - identifier - - - true - - qualdrop_value - If the item has any identification numbers or codes associated with -it, please enter the types and the actual numbers or codes. - - - - - - dc - type - - true - - dropdown - Select the type(s) of content of the item. To select more than one value in the list, you may have to hold down the "CTRL" or "Shift" key. - - - - - - dc - language - iso - false - - dropdown - Select the language of the main content of the item. If the language does not appear in the list, please select 'Other'. If the content does not really have a language (for example, if it is a dataset or an image) please select 'N/A'. - - - - - - orgunit - identifier - name - true - - inline-group - Enter the names of the orgunit of this item. - - - -
-
- - - dc - subject - - - true - - twobox - Enter appropriate subject keywords or phrases. - - srsc - - - - - dc - description - abstract - false - - textarea - Enter the abstract of the item. - - - - - - dc - description - sponsorship - false - - textarea - Enter the names of any sponsors and/or funding codes in the box. - - - - - - dc - description - - false - - textarea - Enter any other description or comments in this box. - - - -
-
- - - dc - subject - - - true - - twobox - Enter appropriate subject keywords or phrases. - - srsc - - - - - dc - description - abstract - false - - textarea - Enter the abstract of the item. - - - - - - dc - description - sponsorship - false - - textarea - Enter the names of any sponsors and/or funding codes in the box. - - - - - - dc - description - - false - - textarea - Enter any other description or comments in this box. - - - -
-
- - - dc - subject - - - true - - twobox - Enter appropriate subject keywords or phrases. - - srsc - - - - - dc - description - abstract - false - - textarea - Enter the abstract of the item. - - - - - - dc - description - sponsorship - false - - textarea - Enter the names of any sponsors and/or funding codes in the box. - - - - - - dc - description - - false - - textarea - Enter any other description or comments in this box. - - - -
-
- - - isJournalOfVolume - periodical - creativework.publisher:somepublishername - - Select the journal related to this volume. - - - - - - dc - title - - onebox - Enter the name of the journal volume - - - - - publicationVolume - volumeNumber - - onebox - Enter the volume of the journal volume - - - - - creativework - datePublished - - date - Enter the issue date of the journal volume - - - - - dc - description - - textarea - Enter the description of the journal volume - - -
- - -
dc - contributor - author - - onebox + date + issued false - You must enter at least the author. - Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, J]. + + + date + Please give the date of previous publication or public distribution. + You can leave out the day and/or month if they aren't + applicable. + + You must enter at least the year. + + + + dc + publisher + + false + + + onebox + Enter the name of the publisher of the previously issued instance of this item. + - oairecerif - author - affiliation - + dc + identifier + citation + false + onebox + Enter the standard citation for the previously issued instance of this item. + + + + + + dc + relation + ispartofseries + true + + Technical Report + series + Enter the series and number assigned to this item by your community. + + + + + + dc + identifier + + + true + + qualdrop_value + If the item has any identification numbers or codes associated with + it, please enter the types and the actual numbers or codes. + + + + + + + dc + type + + true + + dropdown + Select the type(s) of content of the item. To select more than one value in the list, you may + have to hold down the "CTRL" or "Shift" key. + + + + + + + dc + language + iso false - - Enter the affiliation of the author as stated on the publication. + + dropdown + Select the language of the main content of the item. If the language does not appear in the + list, please select 'Other'. If the content does not really have a language (for example, if it + is a dataset or an image) please select 'N/A'. + +
-
+ + dc contributor - editor - - onebox + author + + name false You must enter at least the author. - The editors of this publication. + Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh + or Smith, J]. + - oairecerif - editor - affiliation + person + affiliation + name onebox false - - Enter the affiliation of the editor as stated on the publication. + + Enter the affiliation of the author as stated on the publication.
-
+ + - dc - relation - project - + orgunit + identifier + name + onebox false - You must enter at least the project name. - Enter the name of project, if any, that has supported this publication + You must enter at least the Orgunit name. + Enter the name of the Orgunit of this item - dc - relation - grantno - + orgunit + identifier + id + onebox false - - + + Enter the id of the Orgunit of this item
-
+ + dc - identifier - - qualdrop_value + contributor + author true - - If the item has any identification numbers or codes associated with -it, please enter the types and the actual numbers or codes. + + group + Enter the names of the authors of this item. + dc title + + false onebox - false - You must enter a main title for this item. Enter the main title of the item. + You must enter a main title for this item. + @@ -693,11 +280,11 @@ it, please enter the types and the actual numbers or codes. dc title alternative + true onebox - true - If the item has any alternative titles, please enter them here. + @@ -705,74 +292,123 @@ it, please enter the types and the actual numbers or codes. dc date issued + false + date - false - You must enter at least the year. Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't - applicable. + You can leave out the day and/or month if they aren't + applicable. + + You must enter at least the year. + + + + dc + publisher + + false + + + onebox + Enter the name of the publisher of the previously issued instance of this item. + dc - contributor - author - - group + identifier + citation + false + + onebox + Enter the standard citation for the previously issued instance of this item. + + + + + + dc + relation + ispartofseries true - - Enter the names of the authors of this item. + + series + Enter the series and number assigned to this item by your community. + dc - contributor - editor - - group + identifier + + true - - The editors of this publication. + + qualdrop_value + If the item has any identification numbers or codes associated with + it, please enter the types and the actual numbers or codes. + + dc type + + true - onebox - false - You must select a publication type - Select the type of content of the item. - types + dropdown + Select the type(s) of content of the item. To select more than one value in the list, you may + have to hold down the "CTRL" or "Shift" key. + + -
-
dc language iso + false dropdown - false - - Select the language of the main content of the item. If the language does not appear in the list, please select 'Other'. If the content does not really have a language (for example, if it is a dataset or an image) please select 'N/A'. + Select the language of the main content of the item. If the language does not appear in the + list, please select 'Other'. If the content does not really have a language (for example, if it + is a dataset or an image) please select 'N/A'. + + + + + + + orgunit + identifier + name + true + + inline-group + Enter the names of the orgunit of this item. + +
+
dc subject - - tag + + true - + + twobox Enter appropriate subject keywords or phrases. + + srsc @@ -780,1329 +416,2016 @@ it, please enter the types and the actual numbers or codes. dc description abstract + false textarea - false - Enter the abstract of the item. + -
-
dc - relation - publication - - onebox + description + sponsorship false - - The publication where this publication is included. E.g. a book chapter lists here the book, a contribution to a conference lists here the conference proceeding. - book part + + textarea + Enter the names of any sponsors and/or funding codes in the box. + dc - relation - isbn - - onebox + description + false - - The ISBN of the book/report if it was not found in the system - book part + + textarea + Enter any other description or comments in this box. + +
+
dc - relation - doi - - onebox - false - - The DOI of the book/report if it was not found in the system - book part + subject + + + true + + twobox + Enter appropriate subject keywords or phrases. + + srsc dc - relation - ispartof - - onebox + description + abstract false - - The journal or Serie where this publication has been published + + textarea + Enter the abstract of the item. + dc - relation - ispartofseries - - series - true - - Enter the series and number assigned to this item by your community. + description + sponsorship + false + + textarea + Enter the names of any sponsors and/or funding codes in the box. + dc - relation - issn - - onebox + description + false - - The journal or Serie ISSN if it was not found in the system + + textarea + Enter any other description or comments in this box. + +
+
dc - coverage - publication - - onebox - false - - The publication object of the review - review,book review + subject + + + true + + twobox + Enter appropriate subject keywords or phrases. + + srsc dc - coverage - isbn - - onebox + description + abstract false - - The ISBN of the reviewed item if it was not found in the system - review,book review + + textarea + Enter the abstract of the item. + dc - coverage - doi - - onebox + description + sponsorship false - - The DOI of the reviewed item if it was not found in the system - review,book review + + textarea + Enter the names of any sponsors and/or funding codes in the box. + dc description - sponsorship - - onebox - true - - Enter the name of any sponsors. + + false + + textarea + Enter any other description or comments in this box. + +
+
+ + + isJournalOfVolume + periodical + creativework.publisher:somepublishername + + Select the journal related to this volume. + + + dc - description - volume + title + + onebox + Enter the name of the journal volume + + + + + publicationVolume + volumeNumber onebox - false - - If applicable, the volume of the publishing channel where this publication appeared + Enter the volume of the journal volume + + + + + creativework + datePublished + + date + Enter the issue date of the journal volume dc description - issue - - onebox - false - - If applicable, the issue of the publishing channel where this publication appeared + + textarea + Enter the description of the journal volume +
+ + +
dc - description - startpage - + contributor + author + onebox false - - If applicable, the page where this publication starts + You must enter at least the author. + Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh + or Smith, J]. + - dc - description - endpage - + oairecerif + author + affiliation + onebox false - - If applicable, the page where this publication ends + + Enter the affiliation of the author as stated on the publication.
-
+ dc - relation - project - - group - true - - Enter the name of project, if any, that has produced this publication. + contributor + editor + + onebox + false + You must enter at least the author. + The editors of this publication. + + + + + oairecerif + editor + affiliation + + onebox + false + + Enter the affiliation of the editor as stated on the publication. +
+
dc relation - conference - + project + onebox - true - - Enter the name of the conference where the item has been presented, if any. + false + You must enter at least the project name. + Enter the name of project, if any, that has supported this publication dc relation - product - + grantno + onebox - true - - Link the item to one or more existent dataset in the repository used or described by the publication or, put here the dataset citation + false + + +
+
dc identifier - citation - - onebox - false - - Enter the standard citation for the previously issued instance of this item. + + qualdrop_value + true + + If the item has any identification numbers or codes associated with + it, please enter the types and the actual numbers or codes. + dc - description - - textarea + title + + onebox false - - Enter any other description or comments in this box. + You must enter a main title for this item. + Enter the main title of the item. dc - description - sponsorship - + title + alternative + onebox true - - Enter the name of any sponsors. + + If the item has any alternative titles, please enter them here. -
- - -
- - - dc - title - - onebox - false - You must specify a title for the patent - The title of the patent - - - - - dcterms - dateAccepted - - date - false - - The Approval date. - You can leave out the day and/or month if they aren't applicable. - - - - - dc - date - issued - - date - false - - The registration date of the patent. - You can leave out the day and/or month if they aren't applicable. - - - - - dc - contributor - author - - name - true - - The inventor: The actual devisor of an invention that is the subject of a patent. - - - - - dcterms - rightsHolder - - onebox - true - - The holders of this patent - - - - - dc - publisher - - onebox - true - - The issuer of the patent: the patent office - - - - - dc - identifier - patentno - - onebox - false - - The patent number. - - - - - dc - identifier - patentnumber - - onebox - false - - The patent number. - - - - - dc - type - - dropdown - false - You must select a patent type - Select the type of content of the patent. - - - - - dc - identifier - applicationnumber - - onebox - false - - The Application number. - - - - - dc - date - filled - - date - false - - The date Filled. - - -
-
- - - dc - language - iso - - dropdown - false - - Select the country and its language. - - - - - dc - subject - - onebox - true - - Enter appropriate subject keywords or phrases. - - - - - dc - description - abstract - - textarea - false - - Enter the description of the patent. - - -
-
- - - dc - relation - - onebox - true - - Enter the name of project, if any, that has produced this patent. - - - - - dc - relation - patent - - onebox - true - - Patents that precede (i.e., have priority over) this patent - - - - - dc - relation - references - - onebox - true - - Result outputs that are referenced by this patent - - -
- -
dc - title - - name + date + issued + + date false - You must enter least at the Surname. - + You must enter at least the year. + Please give the date of previous publication or public distribution. + You can leave out the day and/or month if they aren't + applicable. + - crisrp - name - - name - false - - + dc + contributor + author + + group + true + + Enter the names of the authors of this item. - crisrp - name - translated - - name - false - - + dc + contributor + editor + + group + true + + The editors of this publication. - crisrp - name - variant - - name - true - - + dc + type + + onebox + false + You must select a publication type + Select the type of content of the item. + types +
+
- person - givenName - - onebox + dc + language + iso + + dropdown false - - + + Select the language of the main content of the item. If the language does not appear in the + list, please select 'Other'. If the content does not really have a language (for example, if it + is a dataset or an image) please select 'N/A'. + + + - person - familyName - - onebox - false - - + dc + subject + + tag + true + + Enter appropriate subject keywords or phrases. - person - birthDate - - date + dc + description + abstract + + textarea false - - + + Enter the abstract of the item. + +
+
+ - oairecerif - person - gender - - dropdown + dc + relation + publication + + onebox false - - + + The publication where this publication is included. E.g. a book chapter lists here the book, a + contribution to a conference lists here the conference proceeding. + + book part - person - jobTitle - + dc + relation + isbn + onebox false - - + + The ISBN of the book/report if it was not found in the system + book part + + - person - affiliation - name - + dc + relation + doi + onebox false - - + + The DOI of the book/report if it was not found in the system + book part - crisrp - workgroup - + dc + relation + ispartof + onebox - true - - + false + + The journal or Serie where this publication has been published - oairecerif - identifier - url - - group + dc + relation + ispartofseries + + series true - - + + Enter the series and number assigned to this item by your community. - person - email - + dc + relation + issn + onebox false - - + + The journal or Serie ISSN if it was not found in the system dc - subject - - tag - true - - + coverage + publication + + onebox + false + + The publication object of the review + review,book review - person - identifier - orcid - + dc + coverage + isbn + onebox false - - + + The ISBN of the reviewed item if it was not found in the system + review,book review - person - identifier - scopus-author-id - + dc + coverage + doi + onebox - true - - + false + + The DOI of the reviewed item if it was not found in the system + review,book review - person - identifier - rid - + dc + description + sponsorship + onebox true - - + + Enter the name of any sponsors. - oairecerif - person - affiliation - - group - true - - + dc + description + volume + + onebox + false + + If applicable, the volume of the publishing channel where this publication appeared dc description - abstract - - textarea + issue + + onebox false - - + + If applicable, the issue of the publishing channel where this publication appeared - crisrp - education - - group - true - - + dc + description + startpage + + onebox + false + + If applicable, the page where this publication starts - crisrp - country - + dc + description + endpage + onebox false - - + + If applicable, the page where this publication ends +
+
- crisrp - qualification - + dc + relation + project + group true - - + + Enter the name of project, if any, that has produced this publication. - person - knowsLanguage - - dropdown + dc + relation + conference + + onebox true - - + + Enter the name of the conference where the item has been presented, if any. - cris - policy - eperson - + dc + relation + product + onebox - false - - + true + + Link the item to one or more existent dataset in the repository used or described by the + publication or, put here the dataset citation + - cris - policy - group - + dc + identifier + citation + onebox false - - + + Enter the standard citation for the previously issued instance of this item. -
-
- - - oairecerif - affiliation - role - false - - - onebox - - - - - oairecerif - person - affiliation - false - - - onebox - - You must enter at least the organisation of your affiliation. - - - oairecerif - affiliation - startDate - false - - - date - - - - - oairecerif - affiliation - endDate - false - - - date - - - - -
-
- crisrp - qualification - - onebox - false - You must enter at least the qualification title. - - + dc + description + + textarea + false + + Enter any other description or comments in this box. + + + + + dc + description + sponsorship + + onebox + true + + Enter the name of any sponsors. + + +
+ + +
+ + + dc + title + + onebox + false + You must specify a title for the patent + The title of the patent + + + + + dcterms + dateAccepted + + date + false + + The Approval date. + You can leave out the day and/or month if they aren't applicable. + + + + + + dc + date + issued + + date + false + + The registration date of the patent. + You can leave out the day and/or month if they aren't applicable. + + + + + + dc + contributor + author + + name + true + + The inventor: The actual devisor of an invention that is the subject of a patent. + + + + + dcterms + rightsHolder + + onebox + true + + The holders of this patent + + + + + dc + publisher + + onebox + true + + The issuer of the patent: the patent office + + + + + dc + identifier + patentno + + onebox + false + + The patent number. + + + + + dc + identifier + patentnumber + + onebox + false + + The patent number. + + + + + dc + type + + dropdown + false + You must select a patent type + Select the type of content of the patent. + + + + + dc + identifier + applicationnumber + + onebox + false + + The Application number. + + + + + dc + date + filled + + date + false + + The date Filled. + + +
+
+ + + dc + language + iso + + dropdown + false + + Select the country and its language. + + + + + dc + subject + + onebox + true + + Enter appropriate subject keywords or phrases. + + + + + dc + description + abstract + + textarea + false + + Enter the description of the patent. + + +
+
+ + + dc + relation + + onebox + true + + Enter the name of project, if any, that has produced this patent. + + + + + dc + relation + patent + + onebox + true + + Patents that precede (i.e., have priority over) this patent + + + + + dc + relation + references + + onebox + true + + Result outputs that are referenced by this patent + + +
+ +
+ + + dc + title + + name + false + You must enter least at the Surname. + + crisrp - qualification - start - + name + + name + false + + + + + + + crisrp + name + translated + + name + false + + + + + + + crisrp + name + variant + + name + true + + + + + + + person + givenName + + onebox + false + + + + + person + familyName + + onebox + false + + + + + + + person + birthDate + date false - - + + + + + oairecerif + person + gender + + dropdown + false + + + + + + + person + jobTitle + + onebox + false + + + + + person + affiliation + name + + onebox + false + + + + + + + crisrp + workgroup + + onebox + true + + + + + + + oairecerif + identifier + url + + group + true + + + + + + + person + email + + onebox + false + + + + + + + dc + subject + + tag + true + + + + + + + person + identifier + orcid + + onebox + false + + + + + + + person + identifier + scopus-author-id + + onebox + true + + + + + + + person + identifier + rid + + onebox + true + + + + + + + oairecerif + person + affiliation + + group + true + + + + + + + dc + description + abstract + + textarea + false + + + + + + + crisrp + education + + group + true + + + + + + + crisrp + country + + onebox + false + + + + + + + crisrp + qualification + + group + true + + + + + + + person + knowsLanguage + + dropdown + true + + + + + + + cris + policy + eperson + + onebox + false + + + + + + + cris + policy + group + + onebox + false + + + + +
+
+ + + oairecerif + affiliation + role + false + + + onebox + + + + + oairecerif + person + affiliation + false + + + onebox + + You must enter at least the organisation of your affiliation. + + + oairecerif + affiliation + startDate + false + + + date + + + + + oairecerif + affiliation + endDate + false + + + date + + + + +
+
+ + + crisrp + qualification + + onebox + false + You must enter at least the qualification title. + + + + + + crisrp + qualification + start + + date + false + + + + + + + crisrp + qualification + end + + date + false + + + + +
+
+ + + crisrp + education + + onebox + false + You must enter at least the education title. + + + + + + crisrp + education + start + + date + false + + + + + crisrp + education + end + + date + false + + + + + + + crisrp + education + role + + onebox + false + + + + +
+
+ + + oairecerif + identifier + url + + onebox + false + You must enter at least the site url. + + + + + + crisrp + site + title + + onebox + false + + + + +
+ +
+ + + dc + identifier + + true + + qualdrop_value + If the item has any identification numbers or codes associated with + it, please enter the types and the actual numbers or codes. + + please give an identifier + + +
+ +
+ + + dc + title + + false + + onebox + Enter the main title of the item. + You must enter a main title for this item. + + + + + + dc + date + issued + false + + + date + Please give the date of previous publication or public distribution. + You can leave out the day and/or month if they aren't + applicable. + + You must enter at least the year. + + + + + dc + type + + true + + dropdown + Select the type(s) of content of the item. To select more than one value in the list, you may + have to hold down the "CTRL" or "Shift" key. + + + + + + + + dc + identifier + isbn + true + + Book + onebox + Enter the ISBN of the book. + An ISBN is required. + + + + dc + identifier + isbn + true + + Book chapter + onebox + Enter the ISBN of the book in which this chapter appears. + + + +
+ +
+ + + dc + contributor + author + + name + false + You must enter at least the author. + Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh + or Smith, J]. + + + + + + person + affiliation + name + + onebox + false + + Enter the affiliation of the author as stated on the publication. + + + + + dc + language + iso + false + + dropdown + Select the language of the item. + + + + + + + dc + type + + onebox + false + You must select a publication type + Select the type(s) of content of the item. + publication-coar-types + + +
+ +
+ + + dc + contributor + author + true + + onebox + Author field that can be associated with an authority providing suggestion + + + + + + dc + contributor + editor + false + + name + Editor field that can be associated with an authority providing the special name lookup + + + + + + dc + subject + true + + onebox + Subject field that can be associated with an authority providing lookup + + + +
+ +
+ + + dc + title + + false + + onebox + Enter the main title of the item. + You must enter a main title for this item. + + + + dc + subject + true + + onebox + Subject field that can be associated with an authority providing lookup + + + + dc + description + abstract + false + + textarea + Enter the abstract of the item. + + + + + + dc + date + issued + false + + + date + Please give the date of previous publication or public distribution. + You can leave out the day and/or month if they aren't applicable. + + You must enter at least the year. + + +
+
+ + + dc + title + + false + + onebox + Enter the main title of the item. + You must enter a main title for this item. + + + +
+ +
+ + + dc + title + + false + + onebox + + + dc + date + issued + false + + date + submission + submission + + + dc + type + true + + onebox + submission + + + dc + language + iso + true + + onebox + all + + + dc + contributor + author + true + + onebox + workflow + + + dc + contributor + editor + true + + onebox + submission + all + + + dc + subject + true + + onebox + workflow + workflow + + + dc + description + false + + onebox + workflow + submission + + +
+ +
+ + + dc + title + + false + + onebox + Enter the main title of the item. + You must enter a main title for this item. + + + + + dc + date + issued + false + + + date + Please give the date of previous publication or public distribution. + You can leave out the day and/or month if they aren't applicable. + + You must enter at least the year. + + + + + dc + type + + onebox + false + You must select a publication type + Select the type(s) of content of the item. + publication-coar-types + + +
+ +
+ + + dc + title + + false + + onebox + Field required + + +
+ +
+ + + dc + type + + false + + onebox + Field required + + +
+ +
+ + + dc + identifier + true + + qualdrop_value + If the item has any identification numbers or codes associated with + it, please enter the types and the actual numbers or codes. + + + + + + + dc + title + false + + onebox + Enter the main title of the item. + You must enter a main title for this item. + + + + + dc + title + alternative + true + + onebox + If the item has any alternative titles, please enter them here. + + + + + + dc + date + issued + false + + date + Please give the date of previous publication or public distribution. + You can leave out the day and/or month if they aren't + applicable. + + You must enter at least the year. + + + + + dc + contributor + author + true + + group + Enter the names of the authors of this item. + + + + + + dc + contributor + group + true + + onebox + The editors of this publication. + + + + + + dc + type + false + + onebox + Select the type(s) of content of the item. + You must select a publication type + publication-coar-types + + +
+
+ + + dc + contributor + author + false + + onebox + Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh + or Smith, J]. + + You must enter at least the author. + + + + + oairecerif + author + affiliation + false + + onebox + Enter the affiliation of the author as stated on the publication. + + + +
+
+ + + dc + contributor + editor + false + + onebox + The editors of this publication. + You must enter at least the author. + + + + + oairecerif + editor + affiliation + false + + onebox + Enter the affiliation of the editor as stated on the publication. + + + +
+ +
+ + + dc + identifier + true + + qualdrop_value + If the item has any identification numbers or codes associated with + it, please enter the types and the actual numbers or codes. + + - crisrp - qualification - end - - date + dc + title false - - + + onebox + Enter the main title of the item. + You must enter a main title for this item. -
-
- crisrp - education - + dc + title + alternative + true + onebox - false - You must enter at least the education title. - + If the item has any alternative titles, please enter them here. + - crisrp - education - start - - date + dc + date + issued false - - - - - crisrp - education - end - + date - false - - + Please give the date of previous publication or public distribution. + You can leave out the day and/or month if they aren't + applicable. + + You must enter at least the year. - crisrp - education - role - - onebox - false - - + dc + contributor + author + true + + group + Enter the names of the authors of this item. + -
-
- oairecerif - identifier - url - + dc + contributor + group + true + onebox - false - You must enter at least the site url. - + The editors of this publication. + - crisrp - site - title - - onebox + dc + type false - - + + onebox + Select the type(s) of content of the item. + You must select a publication type + publication-coar-types
- -
- - - dc - identifier - - true - - qualdrop_value - If the item has any identification numbers or codes associated with - it, please enter the types and the actual numbers or codes. - please give an identifier - - -
- -
- - - dc - title - - false - - onebox - Enter the main title of the item. - You must enter a main title for this item. - - - - - - dc - date - issued - false - - - date - Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't - applicable. - You must enter at least the year. - - - - - dc - type - - true - - dropdown - Select the type(s) of content of the item. To select more than one value in the list, you may have to hold down the "CTRL" or "Shift" key. - - - - - - - dc - identifier - isbn - true - - Book - onebox - Enter the ISBN of the book. - An ISBN is required. - - - - dc - identifier - isbn - true - - Book chapter - onebox - Enter the ISBN of the book in which this chapter appears. - - - -
- -
+ dc contributor author - - name false + + onebox + Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, + J]. + You must enter at least the author. - Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, J]. - person - affiliation - name + oairecerif + author + affiliation + false onebox - false - Enter the affiliation of the author as stated on the publication. + - - - dc - language - iso - false - - dropdown - Select the language of the item. - - - - +
+
dc - type - - onebox + contributor + editor false - You must select a publication type - Select the type(s) of content of the item. - publication-coar-types + + onebox + The editors of this publication. + You must enter at least the author. -
- -
- - - dc - contributor - author - true - - onebox - Author field that can be associated with an authority providing suggestion - - - - + - dc - contributor - editor - false - - name - Editor field that can be associated with an authority providing the special name lookup - + oairecerif + editor + affiliation + false + + onebox + Enter the affiliation of the editor as stated on the publication. + - - - - dc - subject - true - - onebox - Subject field that can be associated with an authority providing lookup - - - - - -
- - - dc - title - - false - - onebox - Enter the main title of the item. - You must enter a main title for this item. - - - - dc - subject - true - - onebox - Subject field that can be associated with an authority providing lookup - - - - dc - description - abstract - false - - textarea - Enter the abstract of the item. - - - - - - dc - date - issued - false - - - date - Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't applicable. - - You must enter at least the year. - - -
-
- - - dc - title - - false - - onebox - Enter the main title of the item. - You must enter a main title for this item. - - - -
- -
- - - dc - title - - false - - onebox - - - dc - date - issued - false - - date - submission - submission - - - dc - type - true - - onebox - submission - - - dc - language - iso - true - - onebox - all - - - dc - contributor - author - true - - onebox - workflow - - - dc - contributor - editor - true - - onebox - submission - all - - - dc - subject - true - - onebox - workflow - workflow - - - dc - description - false - - onebox - workflow - submission - - -
- -
- - - dc - title - - false - - onebox - Enter the main title of the item. - You must enter a main title for this item. - - - - - dc - date - issued - false - - - date - Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't applicable. - You must enter at least the year. - - - - - dc - type - - onebox - false - You must select a publication type - Select the type(s) of content of the item. - publication-coar-types - - -
- -
- - - dc - title - - false - - onebox - Field required - - -
- -
- - - dc - type - - false - - onebox - Field required - - +
- -
+
- - - - - - - - - - - - + + + + + + + + + + + + - - - - DOI - doi - - - Scopus ID - scopus - - - WOS ID - isi - + + + + DOI + doi + + + Scopus ID + scopus + + + WOS ID + isi + Ads Code adsbibcode @@ -2115,172 +2438,172 @@ it, please enter the types and the actual numbers or codes. arXiv ID arxiv - - ISSN - issn - - - Other - other - - - ISMN - ismn - - - Gov't Doc # - govdoc - - - URI - uri - - - ISBN - isbn - - + + ISSN + issn + + + Other + other + + + ISMN + ismn + + + Gov't Doc # + govdoc + + + URI + uri + + + ISBN + isbn + + - - - Animation - Animation - - - Article - Article - - - Book - Book - - - Book chapter - Book chapter - - - Dataset - Dataset - - - Learning Object - Learning Object - - - Image - Image - - - Image, 3-D - Image, 3-D - - - Map - Map - - - Musical Score - Musical Score - - - Plan or blueprint - Plan or blueprint - - - Preprint - Preprint - - - Presentation - Presentation - - - Recording, acoustical - Recording, acoustical - - - Recording, musical - Recording, musical - - - Recording, oral - Recording, oral - - - Software - Software - - - Technical Report - Technical Report - - - Thesis - Thesis - - - Video - Video - - - Working Paper - Working Paper - - - Other - Other - - + + + Animation + Animation + + + Article + Article + + + Book + Book + + + Book chapter + Book chapter + + + Dataset + Dataset + + + Learning Object + Learning Object + + + Image + Image + + + Image, 3-D + Image, 3-D + + + Map + Map + + + Musical Score + Musical Score + + + Plan or blueprint + Plan or blueprint + + + Preprint + Preprint + + + Presentation + Presentation + + + Recording, acoustical + Recording, acoustical + + + Recording, musical + Recording, musical + + + Recording, oral + Recording, oral + + + Software + Software + + + Technical Report + Technical Report + + + Thesis + Thesis + + + Video + Video + + + Working Paper + Working Paper + + + Other + Other + + - - - - N/A - - - - English (United States) - en_US - - - English - en - - - Spanish - es - - - German - de - - - French - fr - - - Italian - it - - - Japanese - ja - - - Chinese - zh - - - Turkish - tr - - - (Other) - other - - + + + + N/A + + + + English (United States) + en_US + + + English + en + + + Spanish + es + + + German + de + + + French + fr + + + Italian + it + + + Japanese + ja + + + Chinese + zh + + + Turkish + tr + + + (Other) + other + + Italia @@ -2302,9 +2625,9 @@ it, please enter the types and the actual numbers or codes. Botswana BW - - - + + + Use by owner Use by owner @@ -2500,7 +2823,7 @@ it, please enter the types and the actual numbers or codes. Unknown - + Male @@ -2516,6 +2839,6 @@ it, please enter the types and the actual numbers or codes. - +
diff --git a/dspace-server-webapp/src/test/data/dspaceFolder/config/item-submission.xml b/dspace-server-webapp/src/test/data/dspaceFolder/config/item-submission.xml index eca9acf79fd7..8956710a3e3a 100644 --- a/dspace-server-webapp/src/test/data/dspaceFolder/config/item-submission.xml +++ b/dspace-server-webapp/src/test/data/dspaceFolder/config/item-submission.xml @@ -7,285 +7,286 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.dspace.app.rest.submit.step.CollectionStep - collection - submission - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.steptwo - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - - submit.progressbar.upload - org.dspace.app.rest.submit.step.UploadStep - upload - - - submit.progressbar.license - org.dspace.app.rest.submit.step.LicenseStep - license - submission - - - - - - - - submit.progressbar.CClicense - org.dspace.app.rest.submit.step.CCLicenseStep - cclicense - - - - - - - - - - - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - - - submit.progressbar.identifiers - org.dspace.app.rest.submit.step.ShowIdentifiersStep - identifiers - - - - - Sample - org.dspace.submit.step.SampleStep - sample - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.dspace.app.rest.submit.step.CollectionStep + collection + submission + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.steptwo + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + + submit.progressbar.upload + org.dspace.app.rest.submit.step.UploadStep + upload + + + submit.progressbar.license + org.dspace.app.rest.submit.step.LicenseStep + license + submission + + + + + + + + + submit.progressbar.CClicense + org.dspace.app.rest.submit.step.CCLicenseStep + cclicense + + + + + + + + + + + + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + + + submit.progressbar.identifiers + org.dspace.app.rest.submit.step.ShowIdentifiersStep + identifiers + + + + + Sample + org.dspace.submit.step.SampleStep + sample + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dspace/config/item-submission.xml b/dspace/config/item-submission.xml index d2d159775ad2..6af3ca6d5a83 100644 --- a/dspace/config/item-submission.xml +++ b/dspace/config/item-submission.xml @@ -155,16 +155,6 @@ org.dspace.app.rest.submit.step.DescribeStep submission-form - - submit.progressbar.describe.green - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.green - org.dspace.app.rest.submit.step.DescribeStep - submission-form - submit.progressbar.describe.owner org.dspace.app.rest.submit.step.DescribeStep @@ -360,16 +350,6 @@ - - - - - - - - - - diff --git a/dspace/config/modules/authority.cfg b/dspace/config/modules/authority.cfg index 10e4bc36fbb9..99ccdbc025bb 100644 --- a/dspace/config/modules/authority.cfg +++ b/dspace/config/modules/authority.cfg @@ -136,8 +136,8 @@ choices.plugin.dc.contributor.author = AuthorAuthority choices.presentation.dc.contributor.author = suggest authority.controlled.dc.contributor.author = true -choices.plugin.green.override.dc.contributor.author = AuthorStrictMatchAuthority -choices.plugin.orange.override.dc.contributor.author = AuthorCoarseMatchAuthority +#choices.plugin.green.override.dc.contributor.author = AuthorStrictMatchAuthority +#choices.plugin.orange.override.dc.contributor.author = AuthorCoarseMatchAuthority choices.plugin.oairecerif.author.affiliation = OrgUnitAuthority choices.presentation.oairecerif.author.affiliation = suggest diff --git a/dspace/config/submission-forms.xml b/dspace/config/submission-forms.xml index 784b8ee301aa..ddf410abec3b 100644 --- a/dspace/config/submission-forms.xml +++ b/dspace/config/submission-forms.xml @@ -581,285 +581,6 @@ -
- - - dc - identifier - true - - qualdrop_value - If the item has any identification numbers or codes associated with - it, please enter the types and the actual numbers or codes. - - - - - - dc - title - false - - onebox - Enter the main title of the item. - You must enter a main title for this item. - - - - - dc - title - alternative - true - - onebox - If the item has any alternative titles, please enter them here. - - - - - - dc - date - issued - false - - date - Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't - applicable. - You must enter at least the year. - - - - - dc - contributor - author - true - - group - Enter the names of the authors of this item. - - - - - - dc - contributor - group - true - - onebox - The editors of this publication. - - - - - - dc - type - false - - onebox - Select the type(s) of content of the item. - You must select a publication type - publication-coar-types - - -
-
- - - dc - contributor - author - false - - onebox - Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, J]. - You must enter at least the author. - - - - - oairecerif - author - affiliation - false - - onebox - Enter the affiliation of the author as stated on the publication. - - - -
-
- - - dc - contributor - editor - false - - onebox - The editors of this publication. - You must enter at least the author. - - - - - oairecerif - editor - affiliation - false - - onebox - Enter the affiliation of the editor as stated on the publication. - - - -
-
- - - dc - identifier - true - - qualdrop_value - If the item has any identification numbers or codes associated with - it, please enter the types and the actual numbers or codes. - - - - - - dc - title - false - - onebox - Enter the main title of the item. - You must enter a main title for this item. - - - - - dc - title - alternative - true - - onebox - If the item has any alternative titles, please enter them here. - - - - - - dc - date - issued - false - - date - Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't - applicable. - You must enter at least the year. - - - - - dc - contributor - author - true - - group - Enter the names of the authors of this item. - - - - - - dc - contributor - group - true - - onebox - The editors of this publication. - - - - - - dc - type - false - - onebox - Select the type(s) of content of the item. - You must select a publication type - publication-coar-types - - -
-
- - - dc - contributor - author - false - - onebox - Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, J]. - You must enter at least the author. - - - - - oairecerif - author - affiliation - false - - onebox - Enter the affiliation of the author as stated on the publication. - - - -
-
- - - dc - contributor - editor - false - - onebox - The editors of this publication. - You must enter at least the author. - - - - - oairecerif - editor - affiliation - false - - onebox - Enter the affiliation of the editor as stated on the publication. - - - -
-
From 7b24d0e4b5bf5aa46705f580aba9daa59b686eb3 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Mon, 8 Jan 2024 15:38:18 +0100 Subject: [PATCH 02/21] [DSC-1438] Fix checkstyle --- .../service/OrcidProfileSectionFactoryServiceIT.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dspace-api/src/test/java/org/dspace/orcid/service/OrcidProfileSectionFactoryServiceIT.java b/dspace-api/src/test/java/org/dspace/orcid/service/OrcidProfileSectionFactoryServiceIT.java index 60122ba5dbde..a28c968eb992 100644 --- a/dspace-api/src/test/java/org/dspace/orcid/service/OrcidProfileSectionFactoryServiceIT.java +++ b/dspace-api/src/test/java/org/dspace/orcid/service/OrcidProfileSectionFactoryServiceIT.java @@ -298,7 +298,7 @@ public void testDisambiguationFromOrgUnitHierarchyOnEmploymentCreation() { assertThat(organization.getDisambiguatedOrganization().getDisambiguatedOrganizationIdentifier(), is("12345")); assertThat(organization.getDisambiguatedOrganization().getDisambiguationSource(), is("RINGGOLD")); } - + @Test public void testDisambiguationFromOrgUnitHierarchyOnEmploymentCreationWithAncestor() { @@ -310,14 +310,13 @@ public void testDisambiguationFromOrgUnitHierarchyOnEmploymentCreationWithAncest .withOrgUnitLocality("Milan") .withOrgUnitRinggoldIdentifier("12345") .build(); - + Item orgUnitFather = ItemBuilder.createItem(context, orgUnits) .withTitle("4Science without rin") .withOrgUnitCountry("IT") .withOrgUnitLocality("Milan") .withParentOrganization("4Science with rin", orgUnitGranfather.getID().toString()) .build(); - Item orgUnit = ItemBuilder.createItem(context, orgUnits) .withTitle("4Science") @@ -363,7 +362,7 @@ public void testDisambiguationFromOrgUnitHierarchyOnEmploymentCreationWithAncest assertThat(organization.getDisambiguatedOrganization().getDisambiguatedOrganizationIdentifier(), is("12345")); assertThat(organization.getDisambiguatedOrganization().getDisambiguationSource(), is("RINGGOLD")); } - + @Test public void testDisambiguationFromOrgUnitHierarchyOnEmploymentCreationWithNoId() { @@ -417,8 +416,6 @@ public void testDisambiguationFromOrgUnitHierarchyOnEmploymentCreationWithNoId() assertThat(organization.getAddress().getCity(), is("Milan")); assertThat(organization.getDisambiguatedOrganization(), nullValue()); } - - @Test public void testQualificationCreation() { From 2315b9acf4f8596435b9ec9e732f9bcd4fb36b5c Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Mon, 8 Jan 2024 18:40:17 +0100 Subject: [PATCH 03/21] [DSC-1438] Fix tests --- .../dspaceFolder/config/submission-forms.xml | 3642 ++++++++--------- .../SubmissionDefinitionsControllerIT.java | 12 +- .../app/rest/SubmissionFormsControllerIT.java | 26 +- 3 files changed, 1822 insertions(+), 1858 deletions(-) diff --git a/dspace-api/src/test/data/dspaceFolder/config/submission-forms.xml b/dspace-api/src/test/data/dspaceFolder/config/submission-forms.xml index cc41ac0c6e18..15c3574951d9 100644 --- a/dspace-api/src/test/data/dspaceFolder/config/submission-forms.xml +++ b/dspace-api/src/test/data/dspaceFolder/config/submission-forms.xml @@ -4,275 +4,688 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + + + + dc + title + + false + + onebox + Enter the name of the file. + You must enter a main title for this item. + + + + + dc + description + true + + textarea + Enter a description for the file + + + + + +
+ + + + isAuthorOfPublication + person + true + true + + Add an author + + dc + contributor + author + name + + orcid,my_staff_db + + + + + + dc + title + + false + + onebox + Enter the main title of the item. + You must enter a main title for this item. + + + + + + dc + title + alternative + true + + onebox + If the item has any alternative titles, please enter them here. + + + + + + dc + date + issued + false + + + date + Please give the date of previous publication or public distribution. + You can leave out the day and/or month if they aren't + applicable. + You must enter at least the year. + + + + dc + publisher + + false + + + onebox + Enter the name of the publisher of the previously issued instance of this item. + + + + + + dc + identifier + citation + false + + onebox + Enter the standard citation for the previously issued instance of this item. + + + + + + dc + relation + ispartofseries + true + + Technical Report + series + Enter the series and number assigned to this item by your community. + + + + + + dc + identifier + + + true + + qualdrop_value + If the item has any identification numbers or codes associated with +it, please enter the types and the actual numbers or codes. + + + + + + dc + type + + true + + dropdown + Select the type(s) of content of the item. To select more than one value in the list, you may have to hold down the "CTRL" or "Shift" key. + + + + + + dc + language + iso + false + + dropdown + Select the language of the main content of the item. If the language does not appear in the list, please select 'Other'. If the content does not really have a language (for example, if it is a dataset or an image) please select 'N/A'. + + + +
+ +
dc - title - + contributor + author + + name false - - onebox - Enter the name of the file. - You must enter a main title for this item. + You must enter at least the author. + Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, J]. - dc - description - true - - textarea - Enter a description for the file - + person + affiliation + name + + onebox + false + + Enter the affiliation of the author as stated on the publication.
-
- - - - isAuthorOfPublication - person - true - true - - Add an author - - dc - contributor - author - name - - orcid,my_staff_db - - - + - dc - title - - false - + orgunit + identifier + name + onebox - Enter the main title of the item. - You must enter a main title for this item. - + false + You must enter at least the Orgunit name. + Enter the name of the Orgunit of this item - dc - title - alternative - true - + orgunit + identifier + id + onebox - If the item has any alternative titles, please enter them here. - - - - - - dc - date - issued - false - - - date - Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't - applicable. - - You must enter at least the year. - - - - dc - publisher - false - - - onebox - Enter the name of the publisher of the previously issued instance of this item. - + + Enter the id of the Orgunit of this item +
+ +
+ + + dc + contributor + author + true + + group + Enter the names of the authors of this item. + + + + + + dc + title + + false + + onebox + Enter the main title of the item. + You must enter a main title for this item. + + + + + + dc + title + alternative + true + + onebox + If the item has any alternative titles, please enter them here. + + + + + + dc + date + issued + false + + + date + Please give the date of previous publication or public distribution. + You can leave out the day and/or month if they aren't + applicable. + You must enter at least the year. + + + + dc + publisher + + false + + + onebox + Enter the name of the publisher of the previously issued instance of this item. + + + + + + dc + identifier + citation + false + + onebox + Enter the standard citation for the previously issued instance of this item. + + + + + + dc + relation + ispartofseries + true + + series + Enter the series and number assigned to this item by your community. + + + + + + dc + identifier + + + true + + qualdrop_value + If the item has any identification numbers or codes associated with +it, please enter the types and the actual numbers or codes. + + + + + + dc + type + + true + + dropdown + Select the type(s) of content of the item. To select more than one value in the list, you may have to hold down the "CTRL" or "Shift" key. + + + + + + dc + language + iso + false + + dropdown + Select the language of the main content of the item. If the language does not appear in the list, please select 'Other'. If the content does not really have a language (for example, if it is a dataset or an image) please select 'N/A'. + + + + + + orgunit + identifier + name + true + + inline-group + Enter the names of the orgunit of this item. + + + +
+
+ + + dc + subject + + + true + + twobox + Enter appropriate subject keywords or phrases. + + srsc + + + + + dc + description + abstract + false + + textarea + Enter the abstract of the item. + + + + + + dc + description + sponsorship + false + + textarea + Enter the names of any sponsors and/or funding codes in the box. + + + + + + dc + description + + false + + textarea + Enter any other description or comments in this box. + + + +
+
+ + + dc + subject + + + true + + twobox + Enter appropriate subject keywords or phrases. + + srsc + + + + + dc + description + abstract + false + + textarea + Enter the abstract of the item. + + + + + + dc + description + sponsorship + false + + textarea + Enter the names of any sponsors and/or funding codes in the box. + + + + + + dc + description + + false + + textarea + Enter any other description or comments in this box. + + + +
+
+ + + dc + subject + + + true + + twobox + Enter appropriate subject keywords or phrases. + + srsc + + + + + dc + description + abstract + false + + textarea + Enter the abstract of the item. + + + + + + dc + description + sponsorship + false + + textarea + Enter the names of any sponsors and/or funding codes in the box. + + + + + + dc + description + + false + + textarea + Enter any other description or comments in this box. + + + +
+
+ + + isJournalOfVolume + periodical + creativework.publisher:somepublishername + + Select the journal related to this volume. + + + + + + dc + title + + onebox + Enter the name of the journal volume + + + + + publicationVolume + volumeNumber + + onebox + Enter the volume of the journal volume + + + + + creativework + datePublished + + date + Enter the issue date of the journal volume + + + + + dc + description + + textarea + Enter the description of the journal volume + + +
+ + +
dc - identifier - citation - false - + contributor + author + onebox - Enter the standard citation for the previously issued instance of this item. - - - - - - dc - relation - ispartofseries - true - - Technical Report - series - Enter the series and number assigned to this item by your community. - - - - - - dc - identifier - - - true - - qualdrop_value - If the item has any identification numbers or codes associated with - it, please enter the types and the actual numbers or codes. - - - - - - - dc - type - - true - - dropdown - Select the type(s) of content of the item. To select more than one value in the list, you may - have to hold down the "CTRL" or "Shift" key. - - + false + You must enter at least the author. + Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, J]. - dc - language - iso + oairecerif + author + affiliation + + onebox false - - dropdown - Select the language of the main content of the item. If the language does not appear in the - list, please select 'Other'. If the content does not really have a language (for example, if it - is a dataset or an image) please select 'N/A'. - - + + Enter the affiliation of the author as stated on the publication.
- -
+ dc contributor - author - - name + editor + + onebox false You must enter at least the author. - Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh - or Smith, J]. - + The editors of this publication. - person - affiliation - name + oairecerif + editor + affiliation onebox false - - Enter the affiliation of the author as stated on the publication. + + Enter the affiliation of the editor as stated on the publication.
- -
+ - orgunit - identifier - name - + dc + relation + project + onebox false - You must enter at least the Orgunit name. - Enter the name of the Orgunit of this item + You must enter at least the project name. + Enter the name of project, if any, that has supported this publication - orgunit - identifier - id - + dc + relation + grantno + onebox false - - Enter the id of the Orgunit of this item + +
- -
+ dc - contributor - author + identifier + + qualdrop_value true - - group - Enter the names of the authors of this item. - + + If the item has any identification numbers or codes associated with +it, please enter the types and the actual numbers or codes. dc title - - false onebox - Enter the main title of the item. + false You must enter a main title for this item. - + Enter the main title of the item. @@ -280,11 +693,11 @@ dc title alternative - true onebox + true + If the item has any alternative titles, please enter them here. - @@ -292,123 +705,74 @@ dc date issued - false - date - Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't - applicable. - - You must enter at least the year. - - - - dc - publisher - - false - - - onebox - Enter the name of the publisher of the previously issued instance of this item. - - - - - - dc - identifier - citation false - - onebox - Enter the standard citation for the previously issued instance of this item. - + You must enter at least the year. + Please give the date of previous publication or public distribution. + You can leave out the day and/or month if they aren't + applicable. dc - relation - ispartofseries + contributor + author + + group true - - series - Enter the series and number assigned to this item by your community. - + + Enter the names of the authors of this item. dc - identifier - - + contributor + editor + + group true - - qualdrop_value - If the item has any identification numbers or codes associated with - it, please enter the types and the actual numbers or codes. - - + + The editors of this publication. dc type - - true - dropdown - Select the type(s) of content of the item. To select more than one value in the list, you may - have to hold down the "CTRL" or "Shift" key. - - + onebox + false + You must select a publication type + Select the type of content of the item. + types +
+
dc language iso - false dropdown - Select the language of the main content of the item. If the language does not appear in the - list, please select 'Other'. If the content does not really have a language (for example, if it - is a dataset or an image) please select 'N/A'. - - - - - - - orgunit - identifier - name - true - - inline-group - Enter the names of the orgunit of this item. - + false + + Select the language of the main content of the item. If the language does not appear in the list, please select 'Other'. If the content does not really have a language (for example, if it is a dataset or an image) please select 'N/A'. -
-
dc subject - - - true - twobox + tag + true + Enter appropriate subject keywords or phrases. - - srsc @@ -416,1657 +780,1036 @@ dc description abstract - false textarea + false + Enter the abstract of the item. - +
+
dc - description - sponsorship + relation + publication + + onebox false - - textarea - Enter the names of any sponsors and/or funding codes in the box. - + + The publication where this publication is included. E.g. a book chapter lists here the book, a contribution to a conference lists here the conference proceeding. + book part dc - description - + relation + isbn + + onebox false - - textarea - Enter any other description or comments in this box. - - - -
-
- - - dc - subject - - - true - - twobox - Enter appropriate subject keywords or phrases. - - srsc + + The ISBN of the book/report if it was not found in the system + book part dc - description - abstract + relation + doi + + onebox false - - textarea - Enter the abstract of the item. - + + The DOI of the book/report if it was not found in the system + book part dc - description - sponsorship + relation + ispartof + + onebox false - - textarea - Enter the names of any sponsors and/or funding codes in the box. - + + The journal or Serie where this publication has been published dc - description - - false - - textarea - Enter any other description or comments in this box. - + relation + ispartofseries + + series + true + + Enter the series and number assigned to this item by your community. -
-
dc - subject - - - true - - twobox - Enter appropriate subject keywords or phrases. - - srsc + relation + issn + + onebox + false + + The journal or Serie ISSN if it was not found in the system dc - description - abstract + coverage + publication + + onebox false - - textarea - Enter the abstract of the item. - + + The publication object of the review + review,book review dc - description - sponsorship + coverage + isbn + + onebox false - - textarea - Enter the names of any sponsors and/or funding codes in the box. - + + The ISBN of the reviewed item if it was not found in the system + review,book review dc - description - + coverage + doi + + onebox false - - textarea - Enter any other description or comments in this box. - + + The DOI of the reviewed item if it was not found in the system + review,book review -
-
- - - isJournalOfVolume - periodical - creativework.publisher:somepublishername - - Select the journal related to this volume. - - - dc - title - + description + sponsorship + onebox - Enter the name of the journal volume + true + + Enter the name of any sponsors. - publicationVolume - volumeNumber + dc + description + volume onebox - Enter the volume of the journal volume - - - - - creativework - datePublished - - date - Enter the issue date of the journal volume + false + + If applicable, the volume of the publishing channel where this publication appeared dc description - - textarea - Enter the description of the journal volume + issue + + onebox + false + + If applicable, the issue of the publishing channel where this publication appeared -
- - -
dc - contributor - author - + description + startpage + onebox false - You must enter at least the author. - Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh - or Smith, J]. - + + If applicable, the page where this publication starts - oairecerif - author - affiliation - + dc + description + endpage + onebox false - - Enter the affiliation of the author as stated on the publication. + + If applicable, the page where this publication ends
-
+ dc - contributor - editor - - onebox - false - You must enter at least the author. - The editors of this publication. + relation + project + + group + true + + Enter the name of project, if any, that has produced this publication. - oairecerif - editor - affiliation - + dc + relation + conference + onebox - false - - Enter the affiliation of the editor as stated on the publication. + true + + Enter the name of the conference where the item has been presented, if any. -
-
dc relation - project - + product + onebox - false - You must enter at least the project name. - Enter the name of project, if any, that has supported this publication + true + + Link the item to one or more existent dataset in the repository used or described by the publication or, put here the dataset citation dc - relation - grantno - + identifier + citation + onebox false - - + + Enter the standard citation for the previously issued instance of this item. -
-
dc - identifier - - qualdrop_value - true - - If the item has any identification numbers or codes associated with - it, please enter the types and the actual numbers or codes. - + description + + textarea + false + + Enter any other description or comments in this box. dc - title - + description + sponsorship + onebox - false - You must enter a main title for this item. - Enter the main title of the item. + true + + Enter the name of any sponsors. +
+ + +
+ + + dc + title + + onebox + false + You must specify a title for the patent + The title of the patent + + + + + dcterms + dateAccepted + + date + false + + The Approval date. + You can leave out the day and/or month if they aren't applicable. + + + + + dc + date + issued + + date + false + + The registration date of the patent. + You can leave out the day and/or month if they aren't applicable. + + + + + dc + contributor + author + + name + true + + The inventor: The actual devisor of an invention that is the subject of a patent. + + + + + dcterms + rightsHolder + + onebox + true + + The holders of this patent + + + + + dc + publisher + + onebox + true + + The issuer of the patent: the patent office + + + + + dc + identifier + patentno + + onebox + false + + The patent number. + + + + + dc + identifier + patentnumber + + onebox + false + + The patent number. + + + + + dc + type + + dropdown + false + You must select a patent type + Select the type of content of the patent. + + + + + dc + identifier + applicationnumber + + onebox + false + + The Application number. + + + + + dc + date + filled + + date + false + + The date Filled. + + +
+
+ + + dc + language + iso + + dropdown + false + + Select the country and its language. + + + + + dc + subject + + onebox + true + + Enter appropriate subject keywords or phrases. + + + + + dc + description + abstract + + textarea + false + + Enter the description of the patent. + + +
+
+ + + dc + relation + + onebox + true + + Enter the name of project, if any, that has produced this patent. + + + + + dc + relation + patent + + onebox + true + + Patents that precede (i.e., have priority over) this patent + + + + + dc + relation + references + + onebox + true + + Result outputs that are referenced by this patent + + +
+ +
dc title - alternative - - onebox - true - - If the item has any alternative titles, please enter them here. - - - - - dc - date - issued - - date - false - You must enter at least the year. - Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't - applicable. - - - - - - dc - contributor - author - - group - true - - Enter the names of the authors of this item. - - - - - dc - contributor - editor - - group - true - - The editors of this publication. - - - - - dc - type - - onebox - false - You must select a publication type - Select the type of content of the item. - types - - -
-
- - - dc - language - iso - - dropdown - false - - Select the language of the main content of the item. If the language does not appear in the - list, please select 'Other'. If the content does not really have a language (for example, if it - is a dataset or an image) please select 'N/A'. - - - - - - dc - subject - - tag - true - - Enter appropriate subject keywords or phrases. - - - - - dc - description - abstract - - textarea - false - - Enter the abstract of the item. - - -
-
- - - dc - relation - publication - - onebox - false - - The publication where this publication is included. E.g. a book chapter lists here the book, a - contribution to a conference lists here the conference proceeding. - - book part - - - - - dc - relation - isbn - - onebox - false - - The ISBN of the book/report if it was not found in the system - book part - - - - - dc - relation - doi - - onebox - false - - The DOI of the book/report if it was not found in the system - book part - - - - - dc - relation - ispartof - - onebox - false - - The journal or Serie where this publication has been published - - - - - dc - relation - ispartofseries - - series - true - - Enter the series and number assigned to this item by your community. - - - - - dc - relation - issn - - onebox - false - - The journal or Serie ISSN if it was not found in the system - - - - - dc - coverage - publication - - onebox - false - - The publication object of the review - review,book review - - - - - dc - coverage - isbn - - onebox - false - - The ISBN of the reviewed item if it was not found in the system - review,book review - - - - - dc - coverage - doi - - onebox - false - - The DOI of the reviewed item if it was not found in the system - review,book review - - - - - dc - description - sponsorship - - onebox - true - - Enter the name of any sponsors. - - - - - dc - description - volume - - onebox - false - - If applicable, the volume of the publishing channel where this publication appeared - - - - - dc - description - issue - - onebox - false - - If applicable, the issue of the publishing channel where this publication appeared - - - - - dc - description - startpage - - onebox - false - - If applicable, the page where this publication starts - - - - - dc - description - endpage - - onebox - false - - If applicable, the page where this publication ends - - -
-
- - - dc - relation - project - - group - true - - Enter the name of project, if any, that has produced this publication. - - - - - dc - relation - conference - - onebox - true - - Enter the name of the conference where the item has been presented, if any. - - - - - dc - relation - product - - onebox - true - - Link the item to one or more existent dataset in the repository used or described by the - publication or, put here the dataset citation - - - - - - dc - identifier - citation - - onebox - false - - Enter the standard citation for the previously issued instance of this item. - - - - - dc - description - - textarea - false - - Enter any other description or comments in this box. - - - - - dc - description - sponsorship - - onebox - true - - Enter the name of any sponsors. - - -
- - -
- - - dc - title - - onebox - false - You must specify a title for the patent - The title of the patent - - - - - dcterms - dateAccepted - - date - false - - The Approval date. - You can leave out the day and/or month if they aren't applicable. - - - - - - dc - date - issued - - date - false - - The registration date of the patent. - You can leave out the day and/or month if they aren't applicable. - - - - - - dc - contributor - author - - name - true - - The inventor: The actual devisor of an invention that is the subject of a patent. - - - - - dcterms - rightsHolder - - onebox - true - - The holders of this patent - - - - - dc - publisher - - onebox - true - - The issuer of the patent: the patent office - - - - - dc - identifier - patentno - - onebox - false - - The patent number. - - - - - dc - identifier - patentnumber - - onebox - false - - The patent number. - - - - - dc - type - - dropdown - false - You must select a patent type - Select the type of content of the patent. - - - - - dc - identifier - applicationnumber - - onebox - false - - The Application number. - - - - - dc - date - filled - - date - false - - The date Filled. - - -
-
- - - dc - language - iso - - dropdown - false - - Select the country and its language. - - - - - dc - subject - - onebox - true - - Enter appropriate subject keywords or phrases. - - - - - dc - description - abstract - - textarea - false - - Enter the description of the patent. - - -
-
- - - dc - relation - - onebox - true - - Enter the name of project, if any, that has produced this patent. - - - - - dc - relation - patent - - onebox - true - - Patents that precede (i.e., have priority over) this patent - - - - - dc - relation - references - - onebox - true - - Result outputs that are referenced by this patent - - -
- -
- - - dc - title - - name - false - You must enter least at the Surname. - - - - - - crisrp - name - - name - false - - - - - - - crisrp - name - translated - - name - false - - - - - - - crisrp - name - variant - - name - true - - - - - - - person - givenName - - onebox - false - - - - - person - familyName - - onebox - false - - - - - - - person - birthDate - - date - false - - - - - oairecerif - person - gender - - dropdown - false - - - - - - - person - jobTitle - - onebox - false - - - - - person - affiliation - name - - onebox + + name false - - + You must enter least at the Surname. + crisrp - workgroup - - onebox - true - - - - - - - oairecerif - identifier - url - - group - true - - - - - - - person - email - - onebox - false - - - - - - - dc - subject - - tag - true - - - - - - - person - identifier - orcid - - onebox - false - - - - - - - person - identifier - scopus-author-id - - onebox - true - - - - - - - person - identifier - rid - - onebox - true - - - - - - - oairecerif - person - affiliation - - group - true - - - - - - - dc - description - abstract - - textarea + name + + name false - - - - - - - crisrp - education - - group - true - - + + crisrp - country - - onebox + name + translated + + name false - - + + crisrp - qualification - - group + name + variant + + name true - - + + person - knowsLanguage - - dropdown - true - - - - - - - cris - policy - eperson - - onebox - false - - - - - - - cris - policy - group - - onebox - false - - - - -
-
- - - oairecerif - affiliation - role - false - - - onebox - - - - - oairecerif - person - affiliation - false - - - onebox - - You must enter at least the organisation of your affiliation. - - - oairecerif - affiliation - startDate - false - - - date - - - - - oairecerif - affiliation - endDate - false - - - date - - - - -
-
- - - crisrp - qualification - + givenName + onebox false - You must enter at least the qualification title. - - - - - - crisrp - qualification - start - - date - false - - - - - - - crisrp - qualification - end - - date - false - - - - -
-
- - - crisrp - education - + + + + + person + familyName + onebox false - You must enter at least the education title. - + + - crisrp - education - start - + person + birthDate + date false - - + + - crisrp - education - end - - date + oairecerif + person + gender + + dropdown false - - + + - crisrp - education - role - + person + jobTitle + onebox false - - + + - -
-
- - oairecerif - identifier - url - + person + affiliation + name + onebox false - You must enter at least the site url. - + + crisrp - site - title - + workgroup + onebox - false - - + true + + -
- -
- dc + oairecerif identifier - + url + + group true - - qualdrop_value - If the item has any identification numbers or codes associated with - it, please enter the types and the actual numbers or codes. - - please give an identifier + + -
- -
- dc - title - - false - + person + email + onebox - Enter the main title of the item. - You must enter a main title for this item. - + false + + dc - date - issued - false - - - date - Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't - applicable. - - You must enter at least the year. + subject + + tag + true + + - dc - type - - true - - dropdown - Select the type(s) of content of the item. To select more than one value in the list, you may - have to hold down the "CTRL" or "Shift" key. - - + person + identifier + orcid + + onebox + false + + - - dc + person identifier - isbn - true - - Book + scopus-author-id + onebox - Enter the ISBN of the book. - An ISBN is required. + true + + - + + - dc + person identifier - isbn - true - - Book chapter + rid + onebox - Enter the ISBN of the book in which this chapter appears. - + true + + -
- -
- dc - contributor - author - - name - false - You must enter at least the author. - Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh - or Smith, J]. - + oairecerif + person + affiliation + + group + true + + - person - affiliation - name - - onebox + dc + description + abstract + + textarea false - - Enter the affiliation of the author as stated on the publication. + + - dc - language - iso - false - - dropdown - Select the language of the item. - - + crisrp + education + + group + true + + - dc - type - + crisrp + country + onebox false - You must select a publication type - Select the type(s) of content of the item. - publication-coar-types + + -
- -
- dc - contributor - author + crisrp + qualification + + group true - - onebox - Author field that can be associated with an authority providing suggestion - + + - dc - contributor - editor - false - - name - Editor field that can be associated with an authority providing the special name lookup - + person + knowsLanguage + + dropdown + true + + - dc - subject - true - + cris + policy + eperson + onebox - Subject field that can be associated with an authority providing lookup - + false + + -
- -
- dc - title - - false - + cris + policy + group + onebox - Enter the main title of the item. - You must enter a main title for this item. - + false + + + +
+
+ + + oairecerif + affiliation + role + false + + + onebox + + + + + oairecerif + person + affiliation + false + + + onebox + + You must enter at least the organisation of your affiliation. + + + oairecerif + affiliation + startDate + false + + + date + + + + + oairecerif + affiliation + endDate + false + + + date + + + + +
+
+ - dc - subject - true - + crisrp + qualification + onebox - Subject field that can be associated with an authority providing lookup - + false + You must enter at least the qualification title. + + + - dc - description - abstract + crisrp + qualification + start + + date false - - textarea - Enter the abstract of the item. - + + - dc - date - issued - false - - + crisrp + qualification + end + date - Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't applicable. - - You must enter at least the year. + false + +
-
+ - dc - title - - false - + crisrp + education + onebox - Enter the main title of the item. - You must enter a main title for this item. - + false + You must enter at least the education title. + -
- -
- dc - title - + crisrp + education + start + + date false - - onebox + + - dc - date - issued - false - + crisrp + education + end + date - submission - submission - - - dc - type - true - - onebox - submission - - - dc - language - iso - true - - onebox - all + false + + + + - dc - contributor - author - true - + crisrp + education + role + onebox - workflow + false + + + +
+
+ - dc - contributor - editor - true - + oairecerif + identifier + url + onebox - submission - all + false + You must enter at least the site url. + + + - dc - subject - true - + crisrp + site + title + onebox - workflow - workflow - - - dc - description false - - onebox - workflow - submission + +
-
+ + + + dc + identifier + + true + + qualdrop_value + If the item has any identification numbers or codes associated with + it, please enter the types and the actual numbers or codes. + please give an identifier + + +
+ +
+ + + dc + title + + false + + onebox + Enter the main title of the item. + You must enter a main title for this item. + + + + + + dc + date + issued + false + + + date + Please give the date of previous publication or public distribution. + You can leave out the day and/or month if they aren't + applicable. + You must enter at least the year. + + + + + dc + type + + true + + dropdown + Select the type(s) of content of the item. To select more than one value in the list, you may have to hold down the "CTRL" or "Shift" key. + + + + + + + dc + identifier + isbn + true + + Book + onebox + Enter the ISBN of the book. + An ISBN is required. + + + + dc + identifier + isbn + true + + Book chapter + onebox + Enter the ISBN of the book in which this chapter appears. + + + +
+ +
dc - title - + contributor + author + + name false - - onebox - Enter the main title of the item. - You must enter a main title for this item. + You must enter at least the author. + Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, J]. - dc - date - issued + person + affiliation + name + + onebox false - - - date - Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't applicable. - - You must enter at least the year. + + Enter the affiliation of the author as stated on the publication. + + + dc + language + iso + false + + dropdown + Select the language of the item. + + + + dc @@ -2081,32 +1824,253 @@
-
- + + - dc - title - - false - - onebox - Field required + dc + contributor + author + true + + onebox + Author field that can be associated with an authority providing suggestion + - + + + + dc + contributor + editor + false + + name + Editor field that can be associated with an authority providing the special name lookup + + + + + + dc + subject + true + + onebox + Subject field that can be associated with an authority providing lookup + + + +
+ +
+ + + dc + title + + false + + onebox + Enter the main title of the item. + You must enter a main title for this item. + + + + dc + subject + true + + onebox + Subject field that can be associated with an authority providing lookup + + + + dc + description + abstract + false + + textarea + Enter the abstract of the item. + + + + + + dc + date + issued + false + + + date + Please give the date of previous publication or public distribution. + You can leave out the day and/or month if they aren't applicable. + + You must enter at least the year. + + +
+
+ + + dc + title + + false + + onebox + Enter the main title of the item. + You must enter a main title for this item. + + + +
+ +
+ + + dc + title + + false + + onebox + + + dc + date + issued + false + + date + submission + submission + + + dc + type + true + + onebox + submission + + + dc + language + iso + true + + onebox + all + + + dc + contributor + author + true + + onebox + workflow + + + dc + contributor + editor + true + + onebox + submission + all + + + dc + subject + true + + onebox + workflow + workflow + + + dc + description + false + + onebox + workflow + submission + + +
+ +
+ + + dc + title + + false + + onebox + Enter the main title of the item. + You must enter a main title for this item. + + + + + dc + date + issued + false + + + date + Please give the date of previous publication or public distribution. + You can leave out the day and/or month if they aren't applicable. + You must enter at least the year. + + + + + dc + type + + onebox + false + You must select a publication type + Select the type(s) of content of the item. + publication-coar-types + + +
+ +
+ + + dc + title + + false + + onebox + Field required + +
- - - dc - type - - false - - onebox - Field required - - + + + dc + type + + false + + onebox + Field required + +
@@ -2396,36 +2360,36 @@
-
+
- - - - - - - - - - - - + + + + + + + + + + + + - - - - DOI - doi - - - Scopus ID - scopus - - - WOS ID - isi - + + + + DOI + doi + + + Scopus ID + scopus + + + WOS ID + isi + Ads Code adsbibcode @@ -2438,172 +2402,172 @@ arXiv ID arxiv - - ISSN - issn - - - Other - other - - - ISMN - ismn - - - Gov't Doc # - govdoc - - - URI - uri - - - ISBN - isbn - - + + ISSN + issn + + + Other + other + + + ISMN + ismn + + + Gov't Doc # + govdoc + + + URI + uri + + + ISBN + isbn + + - - - Animation - Animation - - - Article - Article - - - Book - Book - - - Book chapter - Book chapter - - - Dataset - Dataset - - - Learning Object - Learning Object - - - Image - Image - - - Image, 3-D - Image, 3-D - - - Map - Map - - - Musical Score - Musical Score - - - Plan or blueprint - Plan or blueprint - - - Preprint - Preprint - - - Presentation - Presentation - - - Recording, acoustical - Recording, acoustical - - - Recording, musical - Recording, musical - - - Recording, oral - Recording, oral - - - Software - Software - - - Technical Report - Technical Report - - - Thesis - Thesis - - - Video - Video - - - Working Paper - Working Paper - - - Other - Other - - + + + Animation + Animation + + + Article + Article + + + Book + Book + + + Book chapter + Book chapter + + + Dataset + Dataset + + + Learning Object + Learning Object + + + Image + Image + + + Image, 3-D + Image, 3-D + + + Map + Map + + + Musical Score + Musical Score + + + Plan or blueprint + Plan or blueprint + + + Preprint + Preprint + + + Presentation + Presentation + + + Recording, acoustical + Recording, acoustical + + + Recording, musical + Recording, musical + + + Recording, oral + Recording, oral + + + Software + Software + + + Technical Report + Technical Report + + + Thesis + Thesis + + + Video + Video + + + Working Paper + Working Paper + + + Other + Other + + - - - - N/A - - - - English (United States) - en_US - - - English - en - - - Spanish - es - - - German - de - - - French - fr - - - Italian - it - - - Japanese - ja - - - Chinese - zh - - - Turkish - tr - - - (Other) - other - - + + + + N/A + + + + English (United States) + en_US + + + English + en + + + Spanish + es + + + German + de + + + French + fr + + + Italian + it + + + Japanese + ja + + + Chinese + zh + + + Turkish + tr + + + (Other) + other + + Italia @@ -2625,9 +2589,9 @@ Botswana BW - - - + + + Use by owner Use by owner @@ -2823,7 +2787,7 @@ Unknown - + Male @@ -2839,6 +2803,6 @@ - +
diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionDefinitionsControllerIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionDefinitionsControllerIT.java index 9af95845d407..269de3aefb9d 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionDefinitionsControllerIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionDefinitionsControllerIT.java @@ -321,10 +321,10 @@ public void findAllPaginationTest() throws Exception { Matchers.containsString("page=1"), Matchers.containsString("size=1")))) .andExpect(jsonPath("$._links.last.href", Matchers.allOf( Matchers.containsString("/api/config/submissiondefinitions?"), - Matchers.containsString("page=16"), Matchers.containsString("size=1")))) + Matchers.containsString("page=18"), Matchers.containsString("size=1")))) .andExpect(jsonPath("$.page.size", is(1))) - .andExpect(jsonPath("$.page.totalElements", is(17))) - .andExpect(jsonPath("$.page.totalPages", is(17))) + .andExpect(jsonPath("$.page.totalElements", is(19))) + .andExpect(jsonPath("$.page.totalPages", is(19))) .andExpect(jsonPath("$.page.number", is(0))); getClient(tokenAdmin).perform(get("/api/config/submissiondefinitions") @@ -347,10 +347,10 @@ public void findAllPaginationTest() throws Exception { Matchers.containsString("page=1"), Matchers.containsString("size=1")))) .andExpect(jsonPath("$._links.last.href", Matchers.allOf( Matchers.containsString("/api/config/submissiondefinitions?"), - Matchers.containsString("page=16"), Matchers.containsString("size=1")))) + Matchers.containsString("page=18"), Matchers.containsString("size=1")))) .andExpect(jsonPath("$.page.size", is(1))) - .andExpect(jsonPath("$.page.totalElements", is(17))) - .andExpect(jsonPath("$.page.totalPages", is(17))) + .andExpect(jsonPath("$.page.totalElements", is(19))) + .andExpect(jsonPath("$.page.totalPages", is(19))) .andExpect(jsonPath("$.page.number", is(1))); } diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionFormsControllerIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionFormsControllerIT.java index 27a7ccb0985d..d817b573ff2b 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionFormsControllerIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionFormsControllerIT.java @@ -73,7 +73,7 @@ public void findAll() throws Exception { .andExpect(content().contentType(contentType)) //The configuration file for the test env includes PAGE_TOTAL_ELEMENTS forms .andExpect(jsonPath("$.page.size", is(20))) - .andExpect(jsonPath("$.page.totalElements", equalTo(34))) + .andExpect(jsonPath("$.page.totalElements", equalTo(40))) .andExpect(jsonPath("$.page.totalPages", equalTo(2))) .andExpect(jsonPath("$.page.number", is(0))) .andExpect( @@ -90,7 +90,7 @@ public void findAllWithNewlyCreatedAccountTest() throws Exception { .andExpect(status().isOk()) .andExpect(content().contentType(contentType)) .andExpect(jsonPath("$.page.size", is(20))) - .andExpect(jsonPath("$.page.totalElements", equalTo(34))) + .andExpect(jsonPath("$.page.totalElements", equalTo(40))) .andExpect(jsonPath("$.page.totalPages", equalTo(2))) .andExpect(jsonPath("$.page.number", is(0))) .andExpect(jsonPath("$._links.self.href", Matchers.startsWith(REST_SERVER_URL @@ -670,10 +670,10 @@ public void findAllPaginationTest() throws Exception { Matchers.containsString("page=1"), Matchers.containsString("size=2")))) .andExpect(jsonPath("$._links.last.href", Matchers.allOf( Matchers.containsString("/api/config/submissionforms?"), - Matchers.containsString("page=16"), Matchers.containsString("size=2")))) + Matchers.containsString("page=19"), Matchers.containsString("size=2")))) .andExpect(jsonPath("$.page.size", is(2))) - .andExpect(jsonPath("$.page.totalElements", equalTo(34))) - .andExpect(jsonPath("$.page.totalPages", equalTo(17))) + .andExpect(jsonPath("$.page.totalElements", equalTo(40))) + .andExpect(jsonPath("$.page.totalPages", equalTo(20))) .andExpect(jsonPath("$.page.number", is(0))); getClient(tokenAdmin).perform(get("/api/config/submissionforms") @@ -681,8 +681,8 @@ public void findAllPaginationTest() throws Exception { .param("page", "15")) .andExpect(status().isOk()) .andExpect(content().contentType(contentType)) - .andExpect(jsonPath("$._embedded.submissionforms[0].id", is("publication_indexing"))) - .andExpect(jsonPath("$._embedded.submissionforms[1].id", is("qualdroptest"))) + .andExpect(jsonPath("$._embedded.submissionforms[0].id", is("publication-dc-contributor-author"))) + .andExpect(jsonPath("$._embedded.submissionforms[1].id", is("publication-dc-contributor-editor"))) .andExpect(jsonPath("$._links.first.href", Matchers.allOf( Matchers.containsString("/api/config/submissionforms?"), Matchers.containsString("page=0"), Matchers.containsString("size=2")))) @@ -697,10 +697,10 @@ public void findAllPaginationTest() throws Exception { Matchers.containsString("page=16"), Matchers.containsString("size=2")))) .andExpect(jsonPath("$._links.last.href", Matchers.allOf( Matchers.containsString("/api/config/submissionforms?"), - Matchers.containsString("page=16"), Matchers.containsString("size=2")))) + Matchers.containsString("page=19"), Matchers.containsString("size=2")))) .andExpect(jsonPath("$.page.size", is(2))) - .andExpect(jsonPath("$.page.totalElements", equalTo(34))) - .andExpect(jsonPath("$.page.totalPages", equalTo(17))) + .andExpect(jsonPath("$.page.totalElements", equalTo(40))) + .andExpect(jsonPath("$.page.totalPages", equalTo(20))) .andExpect(jsonPath("$.page.number", is(15))); } @@ -744,10 +744,10 @@ public void visibilityTest() throws Exception { Matchers.containsString("page=4"), Matchers.containsString("size=2")))) .andExpect(jsonPath("$._links.last.href", Matchers.allOf( Matchers.containsString("/api/config/submissionforms?"), - Matchers.containsString("page=16"), Matchers.containsString("size=2")))) + Matchers.containsString("page=19"), Matchers.containsString("size=2")))) .andExpect(jsonPath("$.page.size", is(2))) - .andExpect(jsonPath("$.page.totalElements", equalTo(34))) - .andExpect(jsonPath("$.page.totalPages", equalTo(17))) + .andExpect(jsonPath("$.page.totalElements", equalTo(40))) + .andExpect(jsonPath("$.page.totalPages", equalTo(20))) .andExpect(jsonPath("$.page.number", is(4))); } } From 2482b012cd4adbe65f036281fce38365260ac50f Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Mon, 8 Jan 2024 18:57:30 +0100 Subject: [PATCH 04/21] [DSC-1438] Update input form configuration according to input form xls file --- dspace/config/item-submission.xml | 11 +- dspace/config/submission-forms.xml | 955 ++++++++++++++++------------- 2 files changed, 528 insertions(+), 438 deletions(-) diff --git a/dspace/config/item-submission.xml b/dspace/config/item-submission.xml index 6af3ca6d5a83..35c9ffdc8de4 100644 --- a/dspace/config/item-submission.xml +++ b/dspace/config/item-submission.xml @@ -1,6 +1,5 @@ - @@ -172,8 +171,8 @@ cclicense
- - submit.progressbar.accessCondition + + submit.progressbar.itemAccessConditions org.dspace.app.rest.submit.step.AccessConditionStep accessCondition @@ -192,12 +191,12 @@ submission - submit.progressbar.CustomUrlStep + submit.progressbar.custom-url org.dspace.app.rest.submit.step.CustomUrlStep custom-url - submit.progressbar.correction-step + submit.progressbar.correction org.dspace.app.rest.submit.step.CorrectionStep correction workflow @@ -212,6 +211,7 @@ + @@ -352,4 +352,3 @@ - diff --git a/dspace/config/submission-forms.xml b/dspace/config/submission-forms.xml index ac57d73923b5..86212e2f884c 100644 --- a/dspace/config/submission-forms.xml +++ b/dspace/config/submission-forms.xml @@ -1,6 +1,5 @@ -
@@ -8,33 +7,33 @@ dc title - false onebox - + false You must enter a title for the file. + dc description - false textarea - + false + dc type - false dropdown - Personal picture, logo, main article, etc. + false + Personal picture, logo, main article, etc. @@ -55,11 +54,11 @@ dc contributor author - false onebox - Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, J]. + false You must enter at least the author. + Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, J]. @@ -67,11 +66,11 @@ oairecerif author affiliation - false onebox - Enter the affiliation of the author as stated on the publication. + false + Enter the affiliation of the author as stated on the publication.
@@ -81,11 +80,11 @@ dc contributor editor - false onebox - The editors of this publication. + false You must enter at least the author. + The editors of this publication. @@ -93,11 +92,11 @@ oairecerif editor affiliation - false onebox - Enter the affiliation of the editor as stated on the publication. + false + Enter the affiliation of the editor as stated on the publication. @@ -107,11 +106,11 @@ dc relation funding - false onebox - Enter the name of funding, if any, that has supported this publication + false You must enter at least the funding name. + Enter the name of funding, if any, that has supported this publication @@ -119,11 +118,11 @@ dc relation grantno - false onebox - If the funding is not found in the system please enter the funding identifier / grant no + false + If the funding is not found in the system please enter the funding identifier / grant no @@ -133,11 +132,11 @@ dc relation funding - false onebox - Enter the name of funding, if any, that has supported this product + false You must enter at least the funding name. + Enter the name of funding, if any, that has supported this product @@ -145,11 +144,37 @@ dc relation grantno - false onebox + false + If the funding is not found in the system please enter the funding identifier / grant no + + + +
+ + + dc + relation + publication + + onebox + false + You must enter at least the publication title / citation + + Enter the publication title or citation, if any, that uses this product + + + dc + relation + doi + + onebox + false + + If the publication is not found in the system please enter the DOI identifier
@@ -159,11 +184,11 @@ dc relation funding - false onebox - Enter the name of funding, if any, that has supported this patent + false You must enter at least the funding name. + Enter the name of funding, if any, that has supported this patent @@ -171,11 +196,11 @@ dc relation grantno - false onebox - If the funding is not found in the system please enter the funding identifier / grant no + false + If the funding is not found in the system please enter the funding identifier / grant no @@ -233,45 +258,45 @@ oairecerif affiliation role - false - onebox - + false + + oairecerif person affiliation - false - onebox - + false You must enter at least the organisation of your affiliation. + + oairecerif affiliation startDate - false - date - + false + + oairecerif affiliation endDate - false - date - + false + + @@ -280,45 +305,45 @@ crisrp qualification - false - onebox - + false You must enter the organisation + + crisrp qualification role - false - onebox - + false You must enter the qualification title. + + crisrp qualification start - false - date - + false + + crisrp qualification end - false - date - + false + + @@ -328,44 +353,44 @@ crisrp education role - false - onebox - + false You must enter the degree/title + + crisrp education - false - onebox - + false You must enter the organisation + + crisrp education start - false - date - + false + + crisrp education end - false - date - + false + + @@ -375,11 +400,11 @@ dc contributor author - false - name - Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, J]. + onebox + false You must enter at least the author. + Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, J]. @@ -387,11 +412,11 @@ oairecerif author affiliation - false onebox - Enter the affiliation of the author as stated on the publication. + false + Enter the affiliation of the author as stated on the publication. @@ -401,11 +426,11 @@ dc contributor author - false - name - Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, J]. + onebox + false You must enter at least the inventor. + Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, J]. @@ -413,11 +438,11 @@ oairecerif author affiliation - false onebox - Enter the affiliation of the author as stated on the publication. + false + Enter the affiliation of the author as stated on the publication. @@ -427,11 +452,11 @@ oairecerif identifier url - false onebox - + false You must enter at least the site url. + @@ -439,11 +464,11 @@ crisrp site title - false onebox - + false + @@ -453,55 +478,55 @@ dc identifier issn - false onebox - + false + dc title - false onebox - + false You must enter a main title for this item. + dc publisher - false onebox - + false + dc subject - true tag - + true + dc description - false textarea - + false + @@ -510,23 +535,23 @@ dc identifier - true qualdrop_value - If the item has any identification numbers or codes associated with - it, please enter the types and the actual numbers or codes. + true + If the item has any identification numbers or codes associated with +it, please enter the types and the actual numbers or codes. dc title - false onebox - Enter the main title of the item. + false You must enter a main title for this item. + Enter the main title of the item. @@ -534,11 +559,11 @@ dc title alternative - true onebox - If the item has any alternative titles, please enter them here. + true + If the item has any alternative titles, please enter them here. @@ -546,13 +571,13 @@ dc date issued - false date - Please give the date of previous publication or public distribution. - You can leave out the day and/or month if they aren't - applicable. + false You must enter at least the year. + Please give the date of previous publication or public distribution. + You can leave out the day and/or month if they aren't + applicable. @@ -560,11 +585,11 @@ dc contributor author - true group - Enter the names of the authors of this item. + true + Enter the names of the authors of this item. @@ -572,22 +597,22 @@ dc contributor editor - true group - The editors of this publication. + true + The editors of this publication. dc type - false onebox - Select the type(s) of content of the item. + false You must select a publication type + Select the type(s) of content of the item. publication-coar-types @@ -598,22 +623,22 @@ dc language iso - false dropdown - Select the language of the main content of the item. If the language does not appear in the list, please select 'Other'. If the content does not really have a language (for example, if it is a dataset or an image) please select 'N/A'. + false + Select the language of the main content of the item. If the language does not appear in the list, please select 'Other'. If the content does not really have a language (for example, if it is a dataset or an image) please select 'N/A'. dc subject - true tag - Enter appropriate subject keywords or phrases. + true + Enter appropriate subject keywords or phrases. @@ -621,11 +646,11 @@ datacite subject fos - true onebox - + true + oecd @@ -634,11 +659,11 @@ dc description abstract - false textarea - Enter the abstract of the item. + false + Enter the abstract of the item. @@ -648,12 +673,12 @@ dc relation publication - false - publication-coar-types:c_3248,publication-coar-types:c_5794,publication-coar-types:c_6670 onebox - The publication where this publication is included. E.g. a book chapter lists here the book, a contribution to a conference lists here the conference proceeding. + false + The publication where this publication is included. E.g. a book chapter lists here the book, a contribution to a conference lists here the conference proceeding. + publication-coar-types:c_3248,publication-coar-types:c_5794,publication-coar-types:c_6670 @@ -661,12 +686,12 @@ dc relation isbn - false - publication-coar-types:c_3248,publication-coar-types:c_5794,publication-coar-types:c_6670 onebox - The ISBN of the book/report if it was not found in the system + false + The ISBN of the book/report if it was not found in the system + publication-coar-types:c_3248,publication-coar-types:c_5794,publication-coar-types:c_6670 @@ -674,12 +699,12 @@ dc relation doi - false - publication-coar-types:c_3248,publication-coar-types:c_5794,publication-coar-types:c_6670 onebox - The DOI of the book/report if it was not found in the system + false + The DOI of the book/report if it was not found in the system + publication-coar-types:c_3248,publication-coar-types:c_5794,publication-coar-types:c_6670 @@ -687,11 +712,11 @@ dc relation journal - false onebox - The journal or Serie where this publication has been published + false + The journal or Serie where this publication has been published @@ -699,11 +724,11 @@ dc relation ispartofseries - true series - Enter the series and number assigned to this item by your community. + true + Enter the series and number assigned to this item by your community. @@ -711,11 +736,11 @@ dc relation issn - false onebox - The journal or Serie ISSN if it was not found in the system + false + The journal or Serie ISSN if it was not found in the system @@ -723,12 +748,12 @@ dc coverage publication - false - publication-coar-types:c_efa0,publication-coar-types:c_ba08 onebox - The publication object of the review + false + The publication object of the review + publication-coar-types:c_efa0,publication-coar-types:c_ba08 @@ -736,12 +761,12 @@ dc coverage isbn - false - publication-coar-types:c_efa0,publication-coar-types:c_ba08 onebox - The ISBN of the reviewed item if it was not found in the system + false + The ISBN of the reviewed item if it was not found in the system + publication-coar-types:c_efa0,publication-coar-types:c_ba08 @@ -749,12 +774,12 @@ dc coverage doi - false - publication-coar-types:c_efa0,publication-coar-types:c_ba08 onebox - The DOI of the reviewed item if it was not found in the system + false + The DOI of the reviewed item if it was not found in the system + publication-coar-types:c_efa0,publication-coar-types:c_ba08 @@ -762,11 +787,11 @@ dc description sponsorship - true onebox - Enter the name of any sponsors. + true + Enter the name of any sponsors. @@ -774,11 +799,11 @@ oaire citation volume - false onebox - If applicable, the volume of the publishing channel where this publication appeared + false + If applicable, the volume of the publishing channel where this publication appeared @@ -786,11 +811,11 @@ oaire citation issue - false onebox - If applicable, the issue of the publishing channel where this publication appeared + false + If applicable, the issue of the publishing channel where this publication appeared @@ -798,11 +823,11 @@ oaire citation startPage - false onebox - If applicable, the page where this publication starts + false + If applicable, the page where this publication starts @@ -810,11 +835,11 @@ oaire citation endPage - false onebox - If applicable, the page where this publication ends + false + If applicable, the page where this publication ends @@ -824,11 +849,11 @@ dc relation funding - true group - Acknowledge the funding received for this publication. + true + Acknowledge the funding received for this publication. @@ -836,11 +861,11 @@ dc relation project - true onebox - Enter the name of project, if any, that has produced this publication. It is NOT necessary to list the projects connected with an acknowledge funding. + true + Enter the name of project, if any, that has produced this publication. It is NOT necessary to list the projects connected with an acknowledge funding. @@ -848,11 +873,11 @@ dc relation conference - true onebox - Enter the name of the conference where the item has been presented, if any. + true + Enter the name of the conference where the item has been presented, if any. @@ -860,11 +885,11 @@ dc relation product - true onebox - Link the item to one or more existent dataset in the repository used or described by the publication or, put here the dataset citation + true + Link the item to one or more existent dataset in the repository used or described by the publication or, put here the dataset citation @@ -872,22 +897,22 @@ dc identifier citation - false onebox - Enter the standard citation for the previously issued instance of this item. + false + Enter the standard citation for the previously issued instance of this item. dc description - false textarea - Enter any other description or comments in this box. + false + Enter any other description or comments in this box. @@ -895,11 +920,11 @@ dc description sponsorship - true onebox - Enter the name of any sponsors. + true + Enter the name of any sponsors. @@ -908,23 +933,23 @@ dc identifier - true qualdrop_value - If the item has any identification numbers or codes associated with - it, please enter the types and the actual numbers or codes. + true + If the item has any identification numbers or codes associated with +it, please enter the types and the actual numbers or codes. dc title - false onebox - Enter the main title of the item. + false You must enter a main title for this item. + Enter the main title of the item. @@ -932,11 +957,11 @@ dc title alternative - true onebox - If the item has any alternative titles, please enter them here. + true + If the item has any alternative titles, please enter them here. @@ -944,11 +969,11 @@ dc date issued - false date - Please give the date of previous publication or public distribution. You can leave out the day and/or month if they aren't applicable. + false You must enter at least the year. + Please give the date of previous publication or public distribution. You can leave out the day and/or month if they aren't applicable. @@ -956,11 +981,11 @@ dc description version - false onebox - If applicable, the version of the product + false + If applicable, the version of the product @@ -968,22 +993,22 @@ dc contributor author - true group - Enter the names of the authors of this item. + true + Enter the names of the authors of this item. dc type - false onebox - Nothing to do here. Note for administrators, this metadata could be completely hide using template item + false + Nothing to do here. Note for administrators, this metadata could be completely hide using template item product-coar-types @@ -994,22 +1019,22 @@ dc language iso - false dropdown - Select, if applicable, the language of the main content of the item. If the language does not appear in the list, please select 'Other'. If the content does not really have a language (for example, if it is a dataset or an image) please select 'N/A'. + false + Select, if applicable, the language of the main content of the item. If the language does not appear in the list, please select 'Other'. If the content does not really have a language (for example, if it is a dataset or an image) please select 'N/A'. dc subject - true tag - Enter appropriate subject keywords or phrases. + true + Enter appropriate subject keywords or phrases. @@ -1017,11 +1042,11 @@ datacite subject fos - true onebox - + true + oecd @@ -1030,11 +1055,22 @@ dc description abstract - false textarea + false + Enter the abstract of the item. + + + + + dc + description + + textarea + false + Enter any other relevant information about the dataset. @@ -1043,11 +1079,11 @@ dc publisher - true onebox - The publisher or publishers of this product + true + The publisher or publishers of this product @@ -1055,11 +1091,11 @@ dc relation ispartofseries - true series - Link to the research output of which this product is a part (e.g. a data set collection that contains it). + true + Link to the research output of which this product is a part (e.g. a data set collection that contains it). @@ -1067,11 +1103,11 @@ dc relation issn - false onebox - The journal or Serie ISSN if it was not found in the system + false + The journal or Serie ISSN if it was not found in the system @@ -1079,11 +1115,11 @@ dc relation funding - true group - Acknowledge the funding received for this product. + true + Acknowledge the funding received for this product. @@ -1091,11 +1127,11 @@ dc relation project - true onebox - Enter the name of project, if any, that has produced this product. It is NOT necessary to list the projects connected with an acknowledge funding. + true + Enter the name of project, if any, that has produced this product. It is NOT necessary to list the projects connected with an acknowledge funding. @@ -1103,11 +1139,11 @@ dc relation conference - false onebox - The event where this product was presented or that is recorded in the product. + false + The event where this product was presented or that is recorded in the product. @@ -1115,11 +1151,11 @@ dc relation equipment - true onebox - The equipment that generated this product + true + The equipment that generated this product @@ -1127,11 +1163,11 @@ dc relation references - true onebox - Result outputs that are referenced by this product + true + Result outputs that are referenced by this product @@ -1139,11 +1175,11 @@ dc relation publication - true - - onebox - Result outputs that use this product + + inline-group + true + Result outputs that use this product @@ -1153,11 +1189,11 @@ dc identifier patentno - false onebox - The patent number + false + The patent number @@ -1174,11 +1210,11 @@ dc identifier applicationnumber - false onebox - The application number + false + The application number dc @@ -1186,30 +1222,31 @@ issued date - Date on which the application was physically received at the Patent Authority. Also named Filling Date + false + Date on which the application was physically received at the Patent Authority. Also named Filling Date. dc title - false onebox - The title of the patent + false You must specify a title for the patent + The title of the patent dcterms dateAccepted - false date - Date on which the application has been granted by the Patent Office. + false + Date on which the application has been granted by the Patent Office. @@ -1218,8 +1255,9 @@ dateSubmitted date - Date of making available to the public by printing or similar process of a patent document on which grant has taken place on or before the said date + false + Date of making available to the public by printing or similar process of a patent document on which grant has taken place on or before the said date. @@ -1227,44 +1265,44 @@ dc contributor author - true group - The inventor: The actual devisor of an invention that is the subject of a patent. + true + The inventor: The actual devisor of an invention that is the subject of a patent. dcterms rightsHolder - true onebox - The holders of this patent + true + The holders of this patent dc publisher - true onebox - The issuer of the patent: the patent office + true + The issuer of the patent: the patent office dc type - false onebox - Select the type of content of the patent. + false You must select a patent type + Select the type of content of the patent. patent-coar-types @@ -1287,22 +1325,35 @@ dc language iso - false dropdown - Select the country and its language. + false + Select the country and its language. dc subject - true onebox + true + Enter appropriate subject keywords or phrases. + + + + + datacite + subject + fos + + onebox + true + + oecd @@ -1310,11 +1361,11 @@ dc description abstract - false textarea - Enter the description of the patent. + false + Enter the description of the patent. @@ -1324,11 +1375,11 @@ dc relation funding - true group - Acknowledge the funding received for this patent. + true + Acknowledge the funding received for this patent. @@ -1336,11 +1387,11 @@ dc relation project - true onebox - Enter the name of project, if any, that has produced this patent. It is NOT necessary to list the projects connected with an acknowledge funding. + true + Enter the name of project, if any, that has produced this patent. It is NOT necessary to list the projects connected with an acknowledge funding. @@ -1348,11 +1399,11 @@ dc relation patent - true onebox - Patents that precede (i.e., have priority over) this patent + true + Patents that precede (i.e., have priority over) this patent @@ -1360,11 +1411,11 @@ dc relation references - true onebox - Result outputs that are referenced by this patent + true + Result outputs that are referenced by this patent @@ -1373,22 +1424,22 @@ dc title - false name - + false You must enter least at the Surname. + crisrp name - false name - + false + @@ -1396,11 +1447,11 @@ crisrp name translated - false name - + false + @@ -1408,84 +1459,84 @@ crisrp name variant - true name - + true + person givenName - false onebox - + false + person familyName - false onebox - + false + person birthDate - false date - + false + oairecerif person gender - false dropdown - + false + person jobTitle - false onebox - + false + person affiliation name - false onebox - + false + crisrp workgroup - true onebox - + true + @@ -1493,33 +1544,33 @@ oairecerif identifier url - true group - + true + person email - false onebox - + false + dc subject - true tag - + true + @@ -1527,11 +1578,11 @@ datacite subject fos - true onebox - + true + oecd @@ -1540,11 +1591,11 @@ person identifier orcid - false onebox - Settable by connecting the entity with ORCID + false + Settable by connecting the entity with ORCID all @@ -1553,11 +1604,11 @@ person identifier scopus-author-id - true onebox - + true + @@ -1565,11 +1616,11 @@ person identifier rid - true onebox - + true + @@ -1577,11 +1628,11 @@ oairecerif person affiliation - true inline-group - + true + @@ -1589,55 +1640,55 @@ dc description abstract - false textarea - + false + crisrp education - true inline-group - + true + crisrp country - false dropdown - + false + crisrp qualification - true inline-group - + true + person knowsLanguage - true dropdown - + true + @@ -1645,11 +1696,11 @@ cris policy eperson - false onebox - + false + @@ -1657,11 +1708,11 @@ cris policy group - false onebox - + false + @@ -1670,77 +1721,77 @@ dc title - false onebox - + false You must enter the oganization name. + oairecerif acronym - false onebox - + false + organization parentOrganization - false onebox - + false + crisou director - false onebox - + false + organization foundingDate - false date - + false + crisou boards - true onebox - + true + organization identifier - true qualdrop_value - + true + @@ -1748,11 +1799,11 @@ oairecerif identifier url - true onebox - + true + @@ -1760,11 +1811,11 @@ dc description abstract - false textarea - + false + @@ -1772,32 +1823,32 @@ organization address addressLocality - false onebox - + false + organization address addressCountry - false dropdown - + false + dc type - false dropdown - + false You must specify the organisation type + @@ -1806,88 +1857,88 @@ dc title - false onebox - + false You must enter the project name. + oairecerif acronym - false onebox - + false + crispj coordinator - true onebox - + true + oairecerif internalid - false onebox - + false + crispj partnerou - true onebox - + true + crispj investigator - false onebox - + false You must enter the project coordinator. + crispj openaireid - false onebox - + false + crispj organization - true onebox - + true + @@ -1895,32 +1946,32 @@ oairecerif identifier url - true onebox - + true + oairecerif oamandate - false dropdown - + false + oairecerif oamandate url - false onebox - + false + @@ -1928,21 +1979,21 @@ oairecerif project startDate - false date - + false + oairecerif project endDate - false date - + false + @@ -1950,22 +2001,22 @@ oairecerif project status - false onebox - + false + dc type - false dropdown - + false + @@ -1973,33 +2024,33 @@ dc description abstract - false textarea - + false + crispj coinvestigators - true onebox - + true + dc subject - true tag - + true + @@ -2007,11 +2058,11 @@ datacite subject fos - true onebox - + true + oecd @@ -2020,11 +2071,11 @@ dc relation equipment - true onebox - + true + @@ -2033,31 +2084,31 @@ dc title - false onebox - + false You must enter the equipment name. + oairecerif acronym - false onebox - + false + oairecerif internalid - false onebox - + false + @@ -2065,31 +2116,31 @@ dc relation project - false onebox - + false + oairecerif funder - false onebox - + false + oairecerif fundingParent - false onebox - Link this funding with its upper level if applicable + false + Link this funding with its upper level if applicable @@ -2097,53 +2148,65 @@ crisfund award url - false onebox - + false The url preferably on the funder website of the award notice + + + + + + crisfund + award + uri + + onebox + false + The Award URI + oairecerif oamandate - false dropdown - + false + oairecerif oamandate url - false onebox - + false + oairecerif amount - false onebox - + false + oairecerif amount currency - false dropdown - + false + @@ -2151,97 +2214,97 @@ oairecerif funding identifier - false onebox - + false + oairecerif funding startDate - false date - + false + oairecerif funding endDate - false date - + false + dc type - false dropdown - + false + dc description - false textarea - + false + crisfund investigators - true onebox - + true + crisfund coinvestigators - true onebox - + true + crisfund leadorganizations - true onebox - + true + crisfund leadcoorganizations - true onebox - + true + @@ -2250,66 +2313,66 @@ dc title - false onebox - + false You must enter the equipment name. + oairecerif acronym - false onebox - + false + oairecerif internalid - false onebox - + false + crisequipment ownerou - false onebox - + false + crisequipment ownerrp - false onebox - + false + dc description - false textarea - + false + @@ -2318,33 +2381,33 @@ dc title - false onebox - + false + oairecerif acronym - false onebox - + false + dc type - false dropdown - + false + @@ -2352,21 +2415,21 @@ oairecerif event startDate - false date - + false + oairecerif event endDate - false date - + false + @@ -2374,11 +2437,11 @@ oairecerif event place - false onebox - + false + @@ -2386,77 +2449,77 @@ oairecerif event country - false dropdown - + false + crisevent organizerou - true onebox - + true + crisevent organizerpj - true onebox - + true + crisevent sponsorou - true onebox - + true + crisevent sponsorpj - true onebox - + true + crisevent partnerou - true onebox - + true + crisevent partnerpj - true onebox - + true + @@ -2464,22 +2527,22 @@ dc description abstract - false textarea - + false + dc subject - true tag - + true + @@ -2488,11 +2551,11 @@ cris owner - false onebox - + false + @@ -2653,6 +2716,10 @@ + + N/A + + English (United States) en_US @@ -3051,6 +3118,10 @@ + + Unspecified + + Academic Institute Academic Institute @@ -3105,6 +3176,10 @@ + + Unspecified + + basic research basic research @@ -3119,6 +3194,10 @@ + + Unspecified + + Gift Gift @@ -3141,6 +3220,10 @@ + + Unspecified + + Conference Conference @@ -3151,6 +3234,10 @@ + + Unspecified + + Afghanistan AF @@ -4149,6 +4236,10 @@ + + Unspecified + + Logo logo From 57841a22a1c51fae4e4f0931cdcaa86e6a61880e Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Tue, 9 Jan 2024 09:28:55 +0100 Subject: [PATCH 05/21] [DSC-1438] Remove authority.cfg from test folder --- .../dspaceFolder/config/modules/authority.cfg | 285 ------------------ dspace/config/modules/authority.cfg | 3 - 2 files changed, 288 deletions(-) delete mode 100644 dspace-api/src/test/data/dspaceFolder/config/modules/authority.cfg diff --git a/dspace-api/src/test/data/dspaceFolder/config/modules/authority.cfg b/dspace-api/src/test/data/dspaceFolder/config/modules/authority.cfg deleted file mode 100644 index 10e4bc36fbb9..000000000000 --- a/dspace-api/src/test/data/dspaceFolder/config/modules/authority.cfg +++ /dev/null @@ -1,285 +0,0 @@ -#---------------------------------------------------------------# -#----------------- AUTHORITY CONFIGURATIONS --------------------# -#---------------------------------------------------------------# -# These configs are used by the authority framework # -#---------------------------------------------------------------# - -## The DCInputAuthority plugin is automatically configured with every -## value-pairs element in input-forms.xml, namely: -## common_identifiers, common_types, common_iso_languages -## -## The DSpaceControlledVocabulary plugin is automatically configured -## with every *.xml file in [dspace]/config/controlled-vocabularies, -## and creates a plugin instance for each, using base filename as the name. -## eg: nsi, srsc. -## Each DSpaceControlledVocabulary plugin comes with three configuration options: -# vocabulary.plugin._plugin_.hierarchy.store = # default: true -# vocabulary.plugin._plugin_.hierarchy.suggest = # default: false -# vocabulary.plugin._plugin_.delimiter = "" # default: "::" -## -## An example using "srsc" can be found later in this section - -plugin.selfnamed.org.dspace.content.authority.ChoiceAuthority = \ - org.dspace.content.authority.DCInputAuthority, \ - org.dspace.content.authority.DSpaceControlledVocabulary - - ## -## This sets the default lowest confidence level at which a metadata value is included -## in an authority-controlled browse (and search) index. It is a symbolic -## keyword, one of the following values (listed in descending order): -## accepted -## uncertain -## ambiguous -## notfound -## failed -## rejected -## novalue -## unset -## See manual or org.dspace.content.authority.Choices source for descriptions. -authority.minconfidence = ambiguous - -# Configuration settings for ORCID based authority control. -# Uncomment the lines below to enable configuration -#choices.plugin.dc.contributor.author = SolrAuthorAuthority -#choices.presentation.dc.contributor.author = authorLookup -#authority.controlled.dc.contributor.author = true -#authority.author.indexer.field.1=dc.contributor.author - -## -## This sets the lowest confidence level at which a metadata value is included -## in an authority-controlled browse (and search) index. It is a symbolic -## keyword from the same set as for the default "authority.minconfidence" -#authority.minconfidence.dc.contributor.author = accepted - -## demo: subject code autocomplete, using srsc as authority -## (DSpaceControlledVocabulary plugin must be enabled) -## Warning: when enabling this feature any controlled vocabulary configuration in the input-forms.xml for the metadata field will be overridden. -#vocabulary.plugin.srsc.hierarchy.store = true -#vocabulary.plugin.srsc.hierarchy.suggest = true -#vocabulary.plugin.srsc.delimiter = "::" - -# publisher name lookup through SHERPA/RoMEO: -#choices.plugin.dc.publisher = SRPublisher -#choices.presentation.dc.publisher = suggest - -## demo: journal title lookup, with ISSN as authority -#choices.plugin.dc.title.alternative = SRJournalTitle -#choices.presentation.dc.title.alternative = suggest -#authority.controlled.dc.title.alternative = true - -##### Authority Control Settings ##### -#plugin.named.org.dspace.content.authority.ChoiceAuthority = \ -# org.dspace.content.authority.SampleAuthority = Sample, \ -# org.dspace.content.authority.SHERPARoMEOPublisher = SRPublisher, \ -# org.dspace.content.authority.SHERPARoMEOJournalTitle = SRJournalTitle, \ -# org.dspace.content.authority.SolrAuthority = SolrAuthorAuthority - -#Uncomment to enable ORCID authority control -#plugin.named.org.dspace.content.authority.ChoiceAuthority = \ -# org.dspace.content.authority.SolrAuthority = SolrAuthorAuthority - -##### Authority Control Settings ##### -plugin.named.org.dspace.content.authority.ChoiceAuthority = \ - org.dspace.content.authority.OrcidAuthority = AuthorAuthority,\ - org.dspace.content.authority.OrcidAuthority = EditorAuthority,\ - org.dspace.content.authority.OrcidAuthority = AuthorStrictMatchAuthority, \ - org.dspace.content.authority.OrcidAuthority = AuthorCoarseMatchAuthority, \ - org.dspace.content.authority.ItemAuthority = DataSetAuthority,\ - org.dspace.content.authority.ItemAuthority = JournalAuthority,\ - org.dspace.content.authority.RorOrgUnitAuthority = OrgUnitAuthority,\ - org.dspace.content.authority.ItemAuthority = ProjectAuthority,\ - org.dspace.content.authority.OpenAIREProjectAuthority = FundingAuthority,\ - org.dspace.content.authority.ItemAuthority = PublicationAuthority,\ - org.dspace.content.authority.ItemAuthority = EquipmentAuthority,\ - org.dspace.content.authority.EPersonAuthority = EPersonAuthority,\ - org.dspace.content.authority.GroupAuthority = GroupAuthority,\ - org.dspace.content.authority.ZDBAuthority = ZDBAuthority,\ - org.dspace.content.authority.SherpaAuthority = SherpaAuthority - -cris.ItemAuthority.forceInternalName = true - -# AuthorStrictMatchAuthority configuration -cris.ItemAuthority.AuthorStrictMatchAuthority.forceInternalName = false - -# AuthorCoarseMatchAuthority configuration -cris.ItemAuthority.AuthorCoarseMatchAuthority.forceInternalName = false - -cris.ItemAuthority.DataSetAuthority.entityType = Product -cris.ItemAuthority.JournalAuthority.entityType = Journal -cris.ItemAuthority.OrgUnitAuthority.entityType = OrgUnit -cris.ItemAuthority.ProjectAuthority.entityType = Project -cris.ItemAuthority.FundingAuthority.entityType = Funding -cris.ItemAuthority.PublicationAuthority.entityType = Publication -cris.ItemAuthority.EquipmentAuthority.entityType = Equipment - -## OrcidAuthority Extras configuration -# - -cris.OrcidAuthority.EditorAuthority.institution.key = oairecerif_editor_affiliation -cris.OrcidAuthority.AuthorAuthority.institution.key = oairecerif_author_affiliation - -#cris.OrcidAuthority.AuthorAuthority.institution.display = true -#cris.OrcidAuthority.AuthorAuthority.institution.as-data = true -# -#cris.OrcidAuthority.AuthorAuthority.orcid-id.key = person_identifier_orcid -#cris.OrcidAuthority.AuthorAuthority.orcid-id.display = true -#cris.OrcidAuthority.AuthorAuthority.orcid-id.as-data = true - - -cris.SherpaAuthority.entityType = Journal -cris.SherpaAuthority.local-item-choices-enabled = true - -ItemAuthority.reciprocalMetadata.Publication.dc.relation.product = dc.relation.publication -ItemAuthority.reciprocalMetadata.Product.dc.relation.publication = dc.relation.product - -choices.plugin.dc.contributor.author = AuthorAuthority -choices.presentation.dc.contributor.author = suggest -authority.controlled.dc.contributor.author = true - -choices.plugin.green.override.dc.contributor.author = AuthorStrictMatchAuthority -choices.plugin.orange.override.dc.contributor.author = AuthorCoarseMatchAuthority - -choices.plugin.oairecerif.author.affiliation = OrgUnitAuthority -choices.presentation.oairecerif.author.affiliation = suggest -authority.controlled.oairecerif.author.affiliation = true - -choices.plugin.dc.contributor.editor = EditorAuthority -choices.presentation.dc.contributor.editor = suggest -authority.controlled.dc.contributor.editor = true - -choices.plugin.oairecerif.editor.affiliation = OrgUnitAuthority -choices.presentation.oairecerif.editor.affiliation = suggest -authority.controlled.oairecerif.editor.affiliation = true - -choices.plugin.dc.relation.product = DataSetAuthority -choices.presentation.dc.relation.product = suggest -authority.controlled.dc.relation.product = true - -choices.plugin.dc.relation.publication = PublicationAuthority -choices.presentation.dc.relation.publication = suggest -authority.controlled.dc.relation.publication = true - -choices.plugin.dc.relation.journal = SherpaAuthority -choices.presentation.dc.relation.journal = suggest -authority.controlled.dc.relation.journal = true - -choices.plugin.dc.relation.project = ProjectAuthority -choices.presentation.dc.relation.project = suggest -authority.controlled.dc.relation.project = true - -choices.plugin.dc.relation.funding = FundingAuthority -choices.presentation.dc.relation.funding = suggest -# the externalsource provider identifier -choises.externalsource.dc.relation.funding = fundingAuthority -authority.controlled.dc.relation.funding = true - -choices.plugin.dc.description.sponsorship = OrgUnitAuthority -choices.presentation.dc.description.sponsorship = suggest -authority.controlled.dc.description.sponsorship = true - -### authorities required by Projects -choices.plugin.crispj.coordinator = OrgUnitAuthority -choices.presentation.crispj.coordinator = suggest -authority.controlled.crispj.coordinator = true - -choices.plugin.crispj.organization = OrgUnitAuthority -choices.presentation.crispj.organization = suggest -authority.controlled.crispj.organization = true - -choices.plugin.crispj.partnerou = OrgUnitAuthority -choices.presentation.crispj.partnerou = suggest -authority.controlled.crispj.partnerou = true - -choices.plugin.crispj.investigator = AuthorAuthority -choices.presentation.crispj.investigator = suggest -authority.controlled.crispj.investigator = true - -choices.plugin.crispj.coinvestigators = AuthorAuthority -choices.presentation.crispj.coinvestigators = suggest -authority.controlled.crispj.coinvestigators = true - -choices.plugin.dc.relation.equipment = EquipmentAuthority -choices.presentation.dc.relation.equipment = suggest -authority.controlled.dc.relation.equipment = true - -### authorities required by Person -choices.plugin.person.affiliation.name = OrgUnitAuthority -choices.presentation.person.affiliation.name = suggest -authority.controlled.person.affiliation.name = true - -choices.plugin.oairecerif.person.affiliation = OrgUnitAuthority -choices.presentation.oairecerif.person.affiliation = suggest -authority.controlled.oairecerif.person.affiliation = true - -#choices.plugin.crisrp.workgroup = OrgUnitAuthority -#choices.presentation.crisrp.workgroup = suggest -#authority.controlled.crisrp.workgroup = true - -#choices.plugin.crisrp.qualification = OrgUnitAuthority -#choices.presentation.crisrp.qualification = suggest -#authority.controlled.crisrp.qualification = true - -#choices.plugin.crisrp.education = OrgUnitAuthority -#choices.presentation.crisrp.education = suggest -#authority.controlled.crisrp.education = true - -### authorities required by OrgUnit -choices.plugin.organization.parentOrganization = OrgUnitAuthority -choices.presentation.organization.parentOrganization = suggest -authority.controlled.organization.parentOrganization = true - -choices.plugin.crisou.director= AuthorAuthority -choices.presentation.crisou.director = suggest -authority.controlled.crisou.director = true - -### authorities required by Funding -choices.plugin.oairecerif.funder = OrgUnitAuthority -choices.presentation.oairecerif.funder = suggest -authority.controlled.oairecerif.funder = true - -choices.plugin.oairecerif.fundingParent = FundingAuthority -choices.presentation.oairecerif.fundingParent = suggest -authority.controlled.oairecerif.fundingParent = true - -choices.plugin.crisfund.investigators = AuthorAuthority -choices.presentation.crisfund.investigators = suggest -authority.controlled.crisfund.investigators = true - -choices.plugin.crisfund.coinvestigators = AuthorAuthority -choices.presentation.crisfund.coinvestigators = suggest -authority.controlled.crisfund.coinvestigators = true - -choices.plugin.crisfund.leadorganizations = OrgUnitAuthority -choices.presentation.crisfund.leadorganizations = suggest -authority.controlled.crisfund.leadorganizations = true - -choices.plugin.crisfund.leadcoorganizations = OrgUnitAuthority -choices.presentation.crisfund.leadcoorganizations = suggest -authority.controlled.crisfund.leadcoorganizations = true - -### authorities required by cris features -choices.plugin.cris.policy.eperson = EPersonAuthority -choices.presentation.cris.policy.eperson = suggest -authority.controlled.cris.policy.eperson = true - -choices.plugin.cris.policy.group = GroupAuthority -choices.presentation.cris.policy.group = suggest -authority.controlled.cris.policy.group = true - -choices.plugin.dspace.object.owner = EPersonAuthority -choices.presentation.dspace.object.owner = suggest -authority.controlled.dspace.object.owner = true - -choices.plugin.dc.identifier.issn = ZDBAuthority -choices.presentation.dc.identifier.issn = suggest -authority.controlled.dc.identifier.issn = true - -choices.plugin.dc.relation.ispartof = SherpaAuthority -choices.presentation.dc.relation.ispartof = suggest -authority.controlled.dc.relation.ispartof = true - -authority.controlled.dc.type = true -choices.plugin.dc.type = ControlledVocabularyAuthority - -# DSpace-CRIS stores by default the authority of controlled vocabularies -vocabulary.plugin.authority.store = true diff --git a/dspace/config/modules/authority.cfg b/dspace/config/modules/authority.cfg index 99ccdbc025bb..037cf01e5d79 100644 --- a/dspace/config/modules/authority.cfg +++ b/dspace/config/modules/authority.cfg @@ -136,9 +136,6 @@ choices.plugin.dc.contributor.author = AuthorAuthority choices.presentation.dc.contributor.author = suggest authority.controlled.dc.contributor.author = true -#choices.plugin.green.override.dc.contributor.author = AuthorStrictMatchAuthority -#choices.plugin.orange.override.dc.contributor.author = AuthorCoarseMatchAuthority - choices.plugin.oairecerif.author.affiliation = OrgUnitAuthority choices.presentation.oairecerif.author.affiliation = suggest authority.controlled.oairecerif.author.affiliation = true From 4b62f7980d53b01030c02bdae7e22de28eb4d9bf Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Tue, 9 Jan 2024 13:43:09 +0100 Subject: [PATCH 06/21] [DSC-1438] Remove duplicated metadata --- dspace/config/submission-forms.xml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/dspace/config/submission-forms.xml b/dspace/config/submission-forms.xml index 86212e2f884c..45137c1ab15d 100644 --- a/dspace/config/submission-forms.xml +++ b/dspace/config/submission-forms.xml @@ -782,18 +782,6 @@ it, please enter the types and the actual numbers or codes. publication-coar-types:c_efa0,publication-coar-types:c_ba08 - - - dc - description - sponsorship - - onebox - true - - Enter the name of any sponsors. - - oaire From db42cf641c4b04d48450ffcf1a7f5093503d4b74 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Tue, 9 Jan 2024 14:34:03 +0100 Subject: [PATCH 07/21] [DSC-1438] Revert indentation changes --- .../dspaceFolder/config/item-submission.xml | 561 +++++++++--------- 1 file changed, 280 insertions(+), 281 deletions(-) diff --git a/dspace-server-webapp/src/test/data/dspaceFolder/config/item-submission.xml b/dspace-server-webapp/src/test/data/dspaceFolder/config/item-submission.xml index 8956710a3e3a..78d4eb9171c4 100644 --- a/dspace-server-webapp/src/test/data/dspaceFolder/config/item-submission.xml +++ b/dspace-server-webapp/src/test/data/dspaceFolder/config/item-submission.xml @@ -7,286 +7,285 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.dspace.app.rest.submit.step.CollectionStep - collection - submission - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.steptwo - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - - submit.progressbar.upload - org.dspace.app.rest.submit.step.UploadStep - upload - - - submit.progressbar.license - org.dspace.app.rest.submit.step.LicenseStep - license - submission - - - - - - - - - submit.progressbar.CClicense - org.dspace.app.rest.submit.step.CCLicenseStep - cclicense - - - - - - - - - - - - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - submit.progressbar.describe.stepone - org.dspace.app.rest.submit.step.DescribeStep - submission-form - - - - - submit.progressbar.identifiers - org.dspace.app.rest.submit.step.ShowIdentifiersStep - identifiers - - - - - Sample - org.dspace.submit.step.SampleStep - sample - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.dspace.app.rest.submit.step.CollectionStep + collection + submission + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.steptwo + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + + submit.progressbar.upload + org.dspace.app.rest.submit.step.UploadStep + upload + + + submit.progressbar.license + org.dspace.app.rest.submit.step.LicenseStep + license + submission + + + + + + + + submit.progressbar.CClicense + org.dspace.app.rest.submit.step.CCLicenseStep + cclicense + + + + + + + + + + + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + submit.progressbar.describe.stepone + org.dspace.app.rest.submit.step.DescribeStep + submission-form + + + + + submit.progressbar.identifiers + org.dspace.app.rest.submit.step.ShowIdentifiersStep + identifiers + + + + + Sample + org.dspace.submit.step.SampleStep + sample + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 975e0d4de824239b52791cefe1c6108c8f310e0f Mon Sep 17 00:00:00 2001 From: "aliaksei.bykau" Date: Fri, 22 Dec 2023 08:18:43 +0100 Subject: [PATCH 08/21] [DSC-1435] improve for email template for subscriptions_content and email about subscribed statistics update. --- .../main/java/org/dspace/subscriptions/ContentGenerator.java | 2 +- .../java/org/dspace/subscriptions/StatisticsGenerator.java | 4 +++- dspace/config/emails/subscriptions_content | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dspace-api/src/main/java/org/dspace/subscriptions/ContentGenerator.java b/dspace-api/src/main/java/org/dspace/subscriptions/ContentGenerator.java index 80e329ff63f4..65f1ae9dcf9b 100644 --- a/dspace-api/src/main/java/org/dspace/subscriptions/ContentGenerator.java +++ b/dspace-api/src/main/java/org/dspace/subscriptions/ContentGenerator.java @@ -85,7 +85,7 @@ private String generateBodyMail(String type, List subscription for (SubscriptionItem item : subscriptionItems) { out.write("\n".getBytes(UTF_8)); out.write("List of new content for the\n".getBytes(UTF_8)); - out.write((type + " " + item.getName() + " - " + item.getUrl() + "\n") + out.write((type + " \"" + item.getName() + "\" - " + item.getUrl() + "\n") .getBytes(UTF_8)); for (Entry entry : item.getItemUrlsByItemName().entrySet()) { diff --git a/dspace-api/src/main/java/org/dspace/subscriptions/StatisticsGenerator.java b/dspace-api/src/main/java/org/dspace/subscriptions/StatisticsGenerator.java index 842ff9aa0e8f..43ff6b71d4b5 100644 --- a/dspace-api/src/main/java/org/dspace/subscriptions/StatisticsGenerator.java +++ b/dspace-api/src/main/java/org/dspace/subscriptions/StatisticsGenerator.java @@ -51,8 +51,10 @@ public void notifyForSubscriptions(Context c, EPerson ePerson, List String name = configurationService.getProperty("dspace.name"); File attachment = generateExcel(crisMetricsList, c); email.addAttachment(attachment, "subscriptions.xlsx"); + email.setSubject(name + ": Statistics of records which you are subscribed"); email.setContent("intro", - "This automatic email is sent by " + name + " based on the subscribed statistics updates."); + "This automatic email is sent by " + name + " based on the subscribed statistics updates.\n\n" + + "See additional details in the file attached."); email.send(); } } catch (Exception ex) { diff --git a/dspace/config/emails/subscriptions_content b/dspace/config/emails/subscriptions_content index e76c8c311a4f..9d2d255c06d3 100644 --- a/dspace/config/emails/subscriptions_content +++ b/dspace/config/emails/subscriptions_content @@ -4,6 +4,7 @@ ## {1} Collections updates block ## {2} Communities updates block ## {3} Entity updates block +#set($subject = "${config.get('dspace.name')}: Statistics of updates on subscribed items") This email is sent from ${config.get('dspace.name')} based on the chosen subscription preferences. You can manage your subscription preferences from ${params[0]} From d50aa9d87fa0f79e1a7768624a89c9283ea83811 Mon Sep 17 00:00:00 2001 From: Andrea Bollini Date: Thu, 11 Jan 2024 22:06:25 +0100 Subject: [PATCH 09/21] DSC-1455 simplify the uuid iterator implementation retrieving just the uuid from the database initial query --- .../mediafilter/MediaFilterServiceImpl.java | 15 +-- .../dao/impl/RequestItemDAOImpl.java | 2 +- .../content/dao/impl/BitstreamDAOImpl.java | 35 +++--- .../dspace/content/dao/impl/ItemDAOImpl.java | 105 +++++++++++------- .../dao/impl/MetadataValueDAOImpl.java | 4 +- .../org/dspace/core/AbstractHibernateDAO.java | 15 ++- .../java/org/dspace/core/UUIDIterator.java | 76 ++----------- .../main/java/org/dspace/curate/Curator.java | 23 +--- 8 files changed, 126 insertions(+), 149 deletions(-) diff --git a/dspace-api/src/main/java/org/dspace/app/mediafilter/MediaFilterServiceImpl.java b/dspace-api/src/main/java/org/dspace/app/mediafilter/MediaFilterServiceImpl.java index 961cbaa7d0ee..3f898bd7d9f1 100644 --- a/dspace-api/src/main/java/org/dspace/app/mediafilter/MediaFilterServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/app/mediafilter/MediaFilterServiceImpl.java @@ -37,7 +37,6 @@ import org.dspace.core.Constants; import org.dspace.core.Context; import org.dspace.core.SelfNamedPlugin; -import org.dspace.core.UUIDIterator; import org.dspace.eperson.Group; import org.dspace.eperson.service.GroupService; import org.dspace.scripts.handler.DSpaceRunnableHandler; @@ -135,17 +134,13 @@ public void applyFiltersCommunity(Context context, Community community) throws Exception { //only apply filters if community not in skip-list if (!inSkipList(community.getHandle())) { List subcommunities = community.getSubcommunities(); - List collections = community.getCollections(); - - UUIDIterator communityIterator = new UUIDIterator<>(context, subcommunities, Community.class); - UUIDIterator collectionIterator = new UUIDIterator<>(context, collections, Collection.class); - - while (communityIterator.hasNext()) { - applyFiltersCommunity(context, communityIterator.next()); + for (Community subcommunity : subcommunities) { + applyFiltersCommunity(context, subcommunity); } - while (collectionIterator.hasNext()) { - applyFiltersCollection(context, collectionIterator.next()); + List collections = community.getCollections(); + for (Collection collection : collections) { + applyFiltersCollection(context, collection); } } } diff --git a/dspace-api/src/main/java/org/dspace/app/requestitem/dao/impl/RequestItemDAOImpl.java b/dspace-api/src/main/java/org/dspace/app/requestitem/dao/impl/RequestItemDAOImpl.java index a09a2bf250e5..008174ded88c 100644 --- a/dspace-api/src/main/java/org/dspace/app/requestitem/dao/impl/RequestItemDAOImpl.java +++ b/dspace-api/src/main/java/org/dspace/app/requestitem/dao/impl/RequestItemDAOImpl.java @@ -46,6 +46,6 @@ public RequestItem findByToken(Context context, String token) throws SQLExceptio public Iterator findByItem(Context context, Item item) throws SQLException { Query query = createQuery(context, "FROM RequestItem WHERE item_id= :uuid"); query.setParameter("uuid", item.getID()); - return iterate(context, query, RequestItem.class); + return iterate(query); } } diff --git a/dspace-api/src/main/java/org/dspace/content/dao/impl/BitstreamDAOImpl.java b/dspace-api/src/main/java/org/dspace/content/dao/impl/BitstreamDAOImpl.java index a4f61f0c6435..a3347a40ab93 100644 --- a/dspace-api/src/main/java/org/dspace/content/dao/impl/BitstreamDAOImpl.java +++ b/dspace-api/src/main/java/org/dspace/content/dao/impl/BitstreamDAOImpl.java @@ -27,6 +27,7 @@ import org.dspace.core.AbstractHibernateDSODAO; import org.dspace.core.Constants; import org.dspace.core.Context; +import org.dspace.core.UUIDIterator; /** * Hibernate implementation of the Database Access Object interface class for the Bitstream object. @@ -77,7 +78,7 @@ public List findBitstreamsWithNoRecentChecksum(Context context) throw @Override public Iterator findByCommunity(Context context, Community community) throws SQLException { - Query query = createQuery(context, "select b from Bitstream b " + + Query query = createQuery(context, "select b.id from Bitstream b " + "join b.bundles bitBundles " + "join bitBundles.items item " + "join item.collections itemColl " + @@ -85,40 +86,43 @@ public Iterator findByCommunity(Context context, Community community) "WHERE :community IN community"); query.setParameter("community", community); - - return iterate(context, query, Bitstream.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Bitstream.class, this); } @Override public Iterator findByCollection(Context context, Collection collection) throws SQLException { - Query query = createQuery(context, "select b from Bitstream b " + + Query query = createQuery(context, "select b.id from Bitstream b " + "join b.bundles bitBundles " + "join bitBundles.items item " + "join item.collections c " + "WHERE :collection IN c"); query.setParameter("collection", collection); - - return iterate(context, query, Bitstream.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Bitstream.class, this); } @Override public Iterator findByItem(Context context, Item item) throws SQLException { - Query query = createQuery(context, "select b from Bitstream b " + + Query query = createQuery(context, "select b.id from Bitstream b " + "join b.bundles bitBundles " + "join bitBundles.items item " + "WHERE :item IN item"); query.setParameter("item", item); - - return iterate(context, query, Bitstream.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Bitstream.class, this); } @Override public Iterator findShowableByItem(Context context, UUID itemId, String bundleName) throws SQLException { Query query = createQuery( context, - "select b from Bitstream b " + + "select b.id from Bitstream b " + "join b.bundles bitBundle " + "join bitBundle.items item " + "WHERE item.id = :itemId " + @@ -150,15 +154,18 @@ public Iterator findShowableByItem(Context context, UUID itemId, Stri query.setParameter("itemId", itemId); query.setParameter("bundleName", bundleName); - - return iterate(context, query, Bitstream.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Bitstream.class, this); } @Override public Iterator findByStoreNumber(Context context, Integer storeNumber) throws SQLException { - Query query = createQuery(context, "select b from Bitstream b where b.storeNumber = :storeNumber"); + Query query = createQuery(context, "select b.id from Bitstream b where b.storeNumber = :storeNumber"); query.setParameter("storeNumber", storeNumber); - return iterate(context, query, Bitstream.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Bitstream.class, this); } @Override diff --git a/dspace-api/src/main/java/org/dspace/content/dao/impl/ItemDAOImpl.java b/dspace-api/src/main/java/org/dspace/content/dao/impl/ItemDAOImpl.java index 443268cbbb7a..3b12c68dcedd 100644 --- a/dspace-api/src/main/java/org/dspace/content/dao/impl/ItemDAOImpl.java +++ b/dspace-api/src/main/java/org/dspace/content/dao/impl/ItemDAOImpl.java @@ -29,6 +29,7 @@ import org.dspace.content.dao.ItemDAO; import org.dspace.core.AbstractHibernateDSODAO; import org.dspace.core.Context; +import org.dspace.core.UUIDIterator; import org.dspace.eperson.EPerson; import org.hibernate.Criteria; import org.hibernate.criterion.Criterion; @@ -56,28 +57,34 @@ protected ItemDAOImpl() { @Override public Iterator findAll(Context context, boolean archived) throws SQLException { - Query query = createQuery(context, "FROM Item WHERE inArchive=:in_archive ORDER BY id"); + Query query = createQuery(context, "SELECT i.id FROM Item i WHERE inArchive=:in_archive ORDER BY id"); query.setParameter("in_archive", archived); - return iterate(context, query, Item.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); } @Override public Iterator findAll(Context context, boolean archived, int limit, int offset) throws SQLException { - Query query = createQuery(context, "FROM Item WHERE inArchive=:in_archive ORDER BY id"); + Query query = createQuery(context, "SELECT i.id FROM Item i WHERE inArchive=:in_archive ORDER BY id"); query.setParameter("in_archive", archived); query.setFirstResult(offset); query.setMaxResults(limit); - return iterate(context, query, Item.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); } @Override public Iterator findAll(Context context, boolean archived, boolean withdrawn) throws SQLException { Query query = createQuery(context, - "FROM Item WHERE inArchive=:in_archive or withdrawn=:withdrawn ORDER BY id"); + "SELECT i.id FROM Item i WHERE inArchive=:in_archive or withdrawn=:withdrawn ORDER BY id"); query.setParameter("in_archive", archived); query.setParameter("withdrawn", withdrawn); - return iterate(context, query, Item.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); } @Override @@ -86,12 +93,14 @@ public Iterator findAllRegularItems(Context context) throws SQLException { // It does not include workspace, workflow or template items. Query query = createQuery( context, - "SELECT i FROM Item as i " + + "SELECT i.id FROM Item as i " + "LEFT JOIN Version as v ON i = v.item " + "WHERE i.inArchive=true or i.withdrawn=true or (i.inArchive=false and v.id IS NOT NULL) " + "ORDER BY i.id" ); - return iterate(context, query, Item.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); } @Override @@ -99,7 +108,7 @@ public Iterator findAll(Context context, boolean archived, boolean withdrawn, boolean discoverable, Date lastModified) throws SQLException { StringBuilder queryStr = new StringBuilder(); - queryStr.append("SELECT i FROM Item i"); + queryStr.append("SELECT i.id FROM Item i"); queryStr.append(" WHERE (inArchive = :in_archive OR withdrawn = :withdrawn)"); queryStr.append(" AND discoverable = :discoverable"); @@ -115,16 +124,20 @@ public Iterator findAll(Context context, boolean archived, if (lastModified != null) { query.setParameter("last_modified", lastModified, TemporalType.TIMESTAMP); } - return iterate(context, query, Item.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); } @Override public Iterator findBySubmitter(Context context, EPerson eperson) throws SQLException { Query query = createQuery(context, - "FROM Item WHERE inArchive=:in_archive and submitter=:submitter ORDER BY id"); + "SELECT i.id FROM Item i WHERE inArchive=:in_archive and submitter=:submitter ORDER BY id"); query.setParameter("in_archive", true); query.setParameter("submitter", eperson); - return iterate(context, query, Item.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); } @Override @@ -133,16 +146,18 @@ public Iterator findBySubmitter(Context context, EPerson eperson, boolean if (!retrieveAllItems) { return findBySubmitter(context, eperson); } - Query query = createQuery(context, "FROM Item WHERE submitter=:submitter ORDER BY id"); + Query query = createQuery(context, "SELECT i.id FROM Item i WHERE submitter=:submitter ORDER BY id"); query.setParameter("submitter", eperson); - return iterate(context, query, Item.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); } @Override public Iterator findBySubmitter(Context context, EPerson eperson, MetadataField metadataField, int limit) throws SQLException { StringBuilder query = new StringBuilder(); - query.append("SELECT item FROM Item as item "); + query.append("SELECT item.id FROM Item as item "); addMetadataLeftJoin(query, Item.class.getSimpleName().toLowerCase(), Collections.singletonList(metadataField)); query.append(" WHERE item.inArchive = :in_archive"); query.append(" AND item.submitter =:submitter"); @@ -154,13 +169,15 @@ public Iterator findBySubmitter(Context context, EPerson eperson, Metadata hibernateQuery.setParameter("in_archive", true); hibernateQuery.setParameter("submitter", eperson); hibernateQuery.setMaxResults(limit); - return iterate(context, hibernateQuery, Item.class); + @SuppressWarnings("unchecked") + List uuids = hibernateQuery.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); } @Override public Iterator findByMetadataField(Context context, MetadataField metadataField, String value, boolean inArchive) throws SQLException { - String hqlQueryString = "SELECT item FROM Item as item join item.metadata metadatavalue " + + String hqlQueryString = "SELECT item.id FROM Item as item join item.metadata metadatavalue " + "WHERE item.inArchive=:in_archive AND metadatavalue.metadataField = :metadata_field"; if (value != null) { hqlQueryString += " AND STR(metadatavalue.value) = :text_value"; @@ -172,13 +189,15 @@ public Iterator findByMetadataField(Context context, MetadataField metadat if (value != null) { query.setParameter("text_value", value); } - return iterate(context, query, Item.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); } @Override public Iterator findByMetadataField(Context context, MetadataField metadataField, String value) throws SQLException { - String hqlQueryString = "SELECT item FROM Item as item join item.metadata metadatavalue " + + String hqlQueryString = "SELECT item.id FROM Item as item join item.metadata metadatavalue " + "WHERE metadatavalue.metadataField = :metadata_field"; if (value != null) { hqlQueryString += " AND STR(metadatavalue.value) = :text_value"; @@ -189,7 +208,9 @@ public Iterator findByMetadataField(Context context, MetadataField metadat if (value != null) { query.setParameter("text_value", value); } - return iterate(context, query, Item.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); } enum OP { @@ -310,20 +331,22 @@ public Iterator findByMetadataQuery(Context context, List findByAuthorityValue(Context context, MetadataField metadataField, String authority, boolean inArchive) throws SQLException { Query query = createQuery(context, - "SELECT item FROM Item as item join item.metadata metadatavalue " + + "SELECT item.id FROM Item as item join item.metadata metadatavalue " + "WHERE item.inArchive=:in_archive AND metadatavalue.metadataField = :metadata_field AND " + "metadatavalue.authority = :authority ORDER BY item.id"); query.setParameter("in_archive", inArchive); query.setParameter("metadata_field", metadataField); query.setParameter("authority", authority); - return iterate(context, query, Item.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); } @Override public Iterator findArchivedByCollection(Context context, Collection collection, Integer limit, Integer offset) throws SQLException { Query query = createQuery(context, - "select i from Item i join i.collections c " + + "select i.id from Item i join i.collections c " + "WHERE :collection IN c AND i.inArchive=:in_archive ORDER BY i.id"); query.setParameter("collection", collection); query.setParameter("in_archive", true); @@ -333,7 +356,9 @@ public Iterator findArchivedByCollection(Context context, Collection colle if (limit != null) { query.setMaxResults(limit); } - return iterate(context, query, Item.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); } @Override @@ -368,17 +393,18 @@ public int countArchivedByCollectionExcludingOwning(Context context, Collection @Override public Iterator findAllByCollection(Context context, Collection collection) throws SQLException { Query query = createQuery(context, - "select i from Item i join i.collections c WHERE :collection IN c ORDER BY i.id"); + "select i.id from Item i join i.collections c WHERE :collection IN c ORDER BY i.id"); query.setParameter("collection", collection); - - return iterate(context, query, Item.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); } @Override public Iterator findAllByCollection(Context context, Collection collection, Integer limit, Integer offset) throws SQLException { Query query = createQuery(context, - "select i from Item i join i.collections c WHERE :collection IN c ORDER BY i.id"); + "select i.id from Item i join i.collections c WHERE :collection IN c ORDER BY i.id"); query.setParameter("collection", collection); if (offset != null) { @@ -387,8 +413,9 @@ public Iterator findAllByCollection(Context context, Collection collection if (limit != null) { query.setMaxResults(limit); } - - return iterate(context, query, Item.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); } @Override @@ -424,9 +451,12 @@ public int countItems(Context context, List collections, boolean inc public Iterator findByLastModifiedSince(Context context, Date since) throws SQLException { Query query = createQuery(context, - "SELECT i FROM Item i WHERE last_modified > :last_modified ORDER BY id"); + "SELECT i.id FROM Item i WHERE last_modified > :last_modified ORDER BY id"); query.setParameter("last_modified", since, TemporalType.TIMESTAMP); - return iterate(context, query, Item.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); + } @Override @@ -462,22 +492,21 @@ public Iterator findByLikeAuthorityValue(Context context, String likeAuthority, Boolean inArchive) throws SQLException { String allItems = Objects.isNull(inArchive) ? "" : " item.inArchive=:in_archive AND "; Query query = createQuery(context, - "SELECT DISTINCT item FROM Item as item join item.metadata metadatavalue " + "SELECT DISTINCT item.id FROM Item as item join item.metadata metadatavalue " + "WHERE" + allItems + " metadatavalue.authority like :authority ORDER BY item.id"); if (Objects.nonNull(inArchive)) { query.setParameter("in_archive", inArchive); } query.setParameter("authority", likeAuthority); - return iterate(context, query, Item.class); + @SuppressWarnings("unchecked") + List uuids = query.getResultList(); + return new UUIDIterator(context, uuids, Item.class, this); } @Override public Iterator findByIds(Context context, List ids) throws SQLException { - Query query = createQuery(context, - "SELECT item " + "FROM Item as item WHERE item.id IN (:ids)"); - query.setParameter("ids", ids); - return iterate(context, query, Item.class); + return new UUIDIterator(context, ids, Item.class, this); } } diff --git a/dspace-api/src/main/java/org/dspace/content/dao/impl/MetadataValueDAOImpl.java b/dspace-api/src/main/java/org/dspace/content/dao/impl/MetadataValueDAOImpl.java index 2450db5bd19b..f37ced9ab7d4 100644 --- a/dspace-api/src/main/java/org/dspace/content/dao/impl/MetadataValueDAOImpl.java +++ b/dspace-api/src/main/java/org/dspace/content/dao/impl/MetadataValueDAOImpl.java @@ -58,7 +58,7 @@ public Iterator findItemValuesByFieldAndValue(Context context, Query query = createQuery(context, queryString); query.setParameter("metadata_field_id", metadataField.getID()); query.setParameter("text_value", value); - return iterate(context, query, MetadataValue.class); + return iterate(query); } @Override @@ -69,7 +69,7 @@ public Iterator findByValueLike(Context context, String value) th Query query = createQuery(context, queryString); query.setParameter("searchString", value); - return iterate(context, query, MetadataValue.class); + return iterate(query); } @Override diff --git a/dspace-api/src/main/java/org/dspace/core/AbstractHibernateDAO.java b/dspace-api/src/main/java/org/dspace/core/AbstractHibernateDAO.java index c217eed6ab92..c18f256d9564 100644 --- a/dspace-api/src/main/java/org/dspace/core/AbstractHibernateDAO.java +++ b/dspace-api/src/main/java/org/dspace/core/AbstractHibernateDAO.java @@ -26,6 +26,7 @@ import javax.persistence.criteria.Path; import javax.persistence.criteria.Root; +import com.google.common.collect.AbstractIterator; import org.apache.commons.collections.CollectionUtils; import org.hibernate.Session; @@ -341,14 +342,22 @@ public T uniqueResult(Query query) { * @param query * The query for which an Iterator will be made * @return The Iterator for the results of this query - * @throws SQLException */ - public Iterator iterate(Context ctx, Query query, Class entityType) throws SQLException { + public Iterator iterate(Query query) { @SuppressWarnings("unchecked") org.hibernate.query.Query hquery = query.unwrap(org.hibernate.query.Query.class); Stream stream = hquery.stream(); Iterator iter = stream.iterator(); - return new UUIDIterator(ctx, iter, entityType); + return new AbstractIterator () { + @Override + protected T computeNext() { + return iter.hasNext() ? iter.next() : endOfData(); + } + @Override + public void finalize() { + stream.close(); + } + }; } /** diff --git a/dspace-api/src/main/java/org/dspace/core/UUIDIterator.java b/dspace-api/src/main/java/org/dspace/core/UUIDIterator.java index f14ece677426..679f623eb850 100644 --- a/dspace-api/src/main/java/org/dspace/core/UUIDIterator.java +++ b/dspace-api/src/main/java/org/dspace/core/UUIDIterator.java @@ -8,20 +8,15 @@ package org.dspace.core; import java.sql.SQLException; -import java.util.Collection; import java.util.Iterator; -import java.util.LinkedList; import java.util.List; import java.util.UUID; import com.google.common.collect.AbstractIterator; import org.dspace.content.DSpaceObject; -import org.dspace.content.factory.ContentServiceFactory; -import org.dspace.content.service.DSpaceObjectService; +import org.dspace.core.exception.SQLRuntimeException; import org.springframework.beans.factory.annotation.Autowired; - - /** * Iterator implementation which allows to iterate over items and commit while * iterating. Using a list of UUID the iterator doesn't get invalidated after a @@ -30,77 +25,30 @@ * @author stefano.maffei at 4science.com * @param class type */ -public class UUIDIterator extends AbstractIterator { - - private Class entityTypeClass; - - private List cachedUUIDs = new LinkedList<>(); - - private Iterator uuidIterator; +public class UUIDIterator extends AbstractIterator { + private Class clazz; - private Iterator iterator; + private Iterator iterator; - @SuppressWarnings("rawtypes") @Autowired - private DSpaceObjectService dsoService; + private AbstractHibernateDSODAO dao; private Context ctx; - private boolean isSupportedUUIDIterator; - - public UUIDIterator(Context ctx, Iterator i, Class entityTypeClass) throws SQLException { + public UUIDIterator(Context ctx, List uuids, Class clazz, AbstractHibernateDSODAO dao) + throws SQLException { this.ctx = ctx; - - this.entityTypeClass = entityTypeClass; - isSupportedUUIDIterator = DSpaceObject.class.isAssignableFrom(this.entityTypeClass); - - if (isSupportedUUIDIterator) { - while (i.hasNext()) { - DSpaceObject dso = (DSpaceObject) i.next(); - if (dsoService == null) { - dsoService = ContentServiceFactory.getInstance().getDSpaceObjectService(dso); - } - cachedUUIDs.add(dso.getID()); - } - uuidIterator = cachedUUIDs.iterator(); - } else { - iterator = i; - } - - } - - public UUIDIterator(Context ctx, Collection collection, Class entityTypeClass) throws SQLException { - this.ctx = ctx; - - this.entityTypeClass = entityTypeClass; - isSupportedUUIDIterator = DSpaceObject.class.isAssignableFrom(this.entityTypeClass); - - if (isSupportedUUIDIterator) { - for (T obj : collection) { - DSpaceObject dso = (DSpaceObject) obj; - if (dsoService == null) { - dsoService = ContentServiceFactory.getInstance().getDSpaceObjectService(dso); - } - cachedUUIDs.add(dso.getID()); - } - uuidIterator = cachedUUIDs.iterator(); - } else { - throw new UnsupportedOperationException("Cannot generate iterator for this collection"); - } - + this.clazz = clazz; + this.dao = dao; + this.iterator = uuids.iterator(); } - @SuppressWarnings("unchecked") @Override protected T computeNext() { try { - if (isSupportedUUIDIterator) { - return uuidIterator.hasNext() ? (T) dsoService.find(ctx, uuidIterator.next()) : endOfData(); - } else { - return iterator.hasNext() ? (T) iterator.next() : endOfData(); - } + return iterator.hasNext() ? dao.findByID(ctx, clazz, iterator.next()) : endOfData(); } catch (SQLException e) { - throw new RuntimeException(e); + throw new SQLRuntimeException(e); } } diff --git a/dspace-api/src/main/java/org/dspace/curate/Curator.java b/dspace-api/src/main/java/org/dspace/curate/Curator.java index dc160c336d30..b8b174a12610 100644 --- a/dspace-api/src/main/java/org/dspace/curate/Curator.java +++ b/dspace-api/src/main/java/org/dspace/curate/Curator.java @@ -28,7 +28,6 @@ import org.dspace.content.service.ItemService; import org.dspace.core.Constants; import org.dspace.core.Context; -import org.dspace.core.UUIDIterator; import org.dspace.core.factory.CoreServiceFactory; import org.dspace.handle.factory.HandleServiceFactory; import org.dspace.handle.service.HandleService; @@ -464,10 +463,8 @@ protected boolean doSite(TaskRunner tr, Site site) throws IOException { //Then, perform this task for all Top-Level Communities in the Site // (this will recursively perform task for all objects in DSpace) - Iterator iterator = new UUIDIterator(ctx, communityService.findAllTop(ctx), - Community.class); - while (iterator.hasNext()) { - if (!doCommunity(tr, iterator.next())) { + for (Community subcomm : communityService.findAllTop(ctx)) { + if (!doCommunity(tr, subcomm)) { return false; } } @@ -488,24 +485,16 @@ protected boolean doSite(TaskRunner tr, Site site) throws IOException { * @throws SQLException */ protected boolean doCommunity(TaskRunner tr, Community comm) throws IOException, SQLException { - UUIDIterator subComIter = new UUIDIterator(curationContext(), comm.getSubcommunities(), - Community.class); - UUIDIterator collectionsIter = new UUIDIterator(curationContext(), - comm.getCollections(), - Collection.class); - if (!tr.run(comm)) { return false; } - - while (subComIter.hasNext()) { - if (!doCommunity(tr, subComIter.next())) { + for (Community subcomm : comm.getSubcommunities()) { + if (!doCommunity(tr, subcomm)) { return false; } } - - while (collectionsIter.hasNext()) { - if (!doCollection(tr, collectionsIter.next())) { + for (Collection coll : comm.getCollections()) { + if (!doCollection(tr, coll)) { return false; } } From ced78d38f670d7857af36b807e2f4e67c3825a93 Mon Sep 17 00:00:00 2001 From: Andrea Bollini Date: Fri, 12 Jan 2024 19:09:12 +0100 Subject: [PATCH 10/21] DS-1455 fix lazy initialization exception after commit iterating over communities/collections --- dspace-api/src/main/java/org/dspace/curate/Curator.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dspace-api/src/main/java/org/dspace/curate/Curator.java b/dspace-api/src/main/java/org/dspace/curate/Curator.java index b8b174a12610..737f2e2277e5 100644 --- a/dspace-api/src/main/java/org/dspace/curate/Curator.java +++ b/dspace-api/src/main/java/org/dspace/curate/Curator.java @@ -498,6 +498,8 @@ protected boolean doCommunity(TaskRunner tr, Community comm) throws IOException, return false; } } + Context context = curationContext(); + context.uncacheEntity(comm); return true; } @@ -524,6 +526,7 @@ protected boolean doCollection(TaskRunner tr, Collection coll) throws IOExceptio return false; } } + context.uncacheEntity(coll); } catch (SQLException sqlE) { throw new IOException(sqlE.getMessage(), sqlE); } @@ -542,6 +545,7 @@ protected void visit(DSpaceObject dso) throws IOException, SQLException { Context curCtx = curationContext(); if (curCtx != null && txScope.equals(TxScope.OBJECT)) { curCtx.commit(); + curCtx.reloadEntity(dso); } } From 8c1fa8a019fb974fa40471da094b88d4e8f998e9 Mon Sep 17 00:00:00 2001 From: Andrea Bollini Date: Fri, 12 Jan 2024 19:51:19 +0100 Subject: [PATCH 11/21] DSC-1455 improve handling of not existings ID and test that findByIds consider distinct uuid --- .../main/java/org/dspace/content/ItemServiceImpl.java | 2 +- .../src/main/java/org/dspace/core/UUIDIterator.java | 11 ++++++++++- .../org/dspace/app/rest/ItemRestRepositoryIT.java | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dspace-api/src/main/java/org/dspace/content/ItemServiceImpl.java b/dspace-api/src/main/java/org/dspace/content/ItemServiceImpl.java index c61d6e8c8c9f..6b3ef003edca 100644 --- a/dspace-api/src/main/java/org/dspace/content/ItemServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/content/ItemServiceImpl.java @@ -1844,7 +1844,7 @@ public boolean isItemListedForUser(Context context, Item item) { @Override public Iterator findByIds(Context context, List ids) throws SQLException { return itemDAO.findByIds(context, - ids.stream().map(uuid -> UUID.fromString(uuid)).collect(Collectors.toList())); + ids.stream().map(uuid -> UUID.fromString(uuid)).distinct().collect(Collectors.toList())); } @Override diff --git a/dspace-api/src/main/java/org/dspace/core/UUIDIterator.java b/dspace-api/src/main/java/org/dspace/core/UUIDIterator.java index 679f623eb850..7cd2616ff6e7 100644 --- a/dspace-api/src/main/java/org/dspace/core/UUIDIterator.java +++ b/dspace-api/src/main/java/org/dspace/core/UUIDIterator.java @@ -46,7 +46,16 @@ public UUIDIterator(Context ctx, List uuids, Class clazz, AbstractHiber @Override protected T computeNext() { try { - return iterator.hasNext() ? dao.findByID(ctx, clazz, iterator.next()) : endOfData(); + if (iterator.hasNext()) { + T item = dao.findByID(ctx, clazz, iterator.next()); + if (item != null) { + return item; + } else { + return computeNext(); + } + } else { + return endOfData(); + } } catch (SQLException e) { throw new SQLRuntimeException(e); } diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemRestRepositoryIT.java index 7e0edf08bac9..681967931f0e 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemRestRepositoryIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemRestRepositoryIT.java @@ -415,6 +415,8 @@ public void findAllByIdTest() throws Exception { getClient(token).perform(get("/api/core/items/search/findAllById") .param("id", publicItem1.getID().toString(), + publicItem1.getID().toString(), + UUID.randomUUID().toString(), publicItem2.getID().toString(), UUID.randomUUID().toString() )) From dd699c233948706684916398117ab1d3405d802c Mon Sep 17 00:00:00 2001 From: Andrea Bollini Date: Mon, 15 Jan 2024 10:47:32 +0100 Subject: [PATCH 12/21] DSC-1455 improve description of expected result --- .../test/java/org/dspace/app/rest/ItemRestRepositoryIT.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemRestRepositoryIT.java index 681967931f0e..f3877445895a 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemRestRepositoryIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ItemRestRepositoryIT.java @@ -411,7 +411,8 @@ public void findAllByIdTest() throws Exception { context.restoreAuthSystemState(); String token = getAuthToken(admin.getEmail(), password); - // We want to test that only and exclusively existing items are returned. + // We want to test that only and exclusively existing items are returned + // and each item is returned just one time getClient(token).perform(get("/api/core/items/search/findAllById") .param("id", publicItem1.getID().toString(), From 1b1fbacbd901238427ecb5b30aea41777b2ddcf6 Mon Sep 17 00:00:00 2001 From: Andrea Bollini Date: Mon, 15 Jan 2024 22:15:06 +0100 Subject: [PATCH 13/21] DSC-1455 fix lazy initialization iterating over the hierarchy with the object scope --- .../src/main/java/org/dspace/curate/Curator.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dspace-api/src/main/java/org/dspace/curate/Curator.java b/dspace-api/src/main/java/org/dspace/curate/Curator.java index 737f2e2277e5..670c9bcbe43f 100644 --- a/dspace-api/src/main/java/org/dspace/curate/Curator.java +++ b/dspace-api/src/main/java/org/dspace/curate/Curator.java @@ -464,6 +464,8 @@ protected boolean doSite(TaskRunner tr, Site site) throws IOException { //Then, perform this task for all Top-Level Communities in the Site // (this will recursively perform task for all objects in DSpace) for (Community subcomm : communityService.findAllTop(ctx)) { + // force a reload of the community in case a commit was performed + subcomm = ctx.reloadEntity(subcomm); if (!doCommunity(tr, subcomm)) { return false; } @@ -488,17 +490,22 @@ protected boolean doCommunity(TaskRunner tr, Community comm) throws IOException, if (!tr.run(comm)) { return false; } + Context context = curationContext(); + // force a reload in case we are committing after each object + comm = context.reloadEntity(comm); for (Community subcomm : comm.getSubcommunities()) { if (!doCommunity(tr, subcomm)) { return false; } } + // force a reload in case we are committing after each object + comm = context.reloadEntity(comm); for (Collection coll : comm.getCollections()) { + context.reloadEntity(coll); if (!doCollection(tr, coll)) { return false; } } - Context context = curationContext(); context.uncacheEntity(comm); return true; } @@ -545,7 +552,6 @@ protected void visit(DSpaceObject dso) throws IOException, SQLException { Context curCtx = curationContext(); if (curCtx != null && txScope.equals(TxScope.OBJECT)) { curCtx.commit(); - curCtx.reloadEntity(dso); } } From 0e88cf56b4a154a1b4f6075fa05fef5654b62007 Mon Sep 17 00:00:00 2001 From: Mattia Vianelli Date: Thu, 18 Jan 2024 17:24:52 +0100 Subject: [PATCH 14/21] DSC-1488 Added test for NPE in CrisLayoutBoxServiceImpl --- .../impl/CrisLayoutBoxServiceImplTest.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/dspace-api/src/test/java/org/dspace/layout/service/impl/CrisLayoutBoxServiceImplTest.java b/dspace-api/src/test/java/org/dspace/layout/service/impl/CrisLayoutBoxServiceImplTest.java index fd61aeb0a762..67872fb52330 100644 --- a/dspace-api/src/test/java/org/dspace/layout/service/impl/CrisLayoutBoxServiceImplTest.java +++ b/dspace-api/src/test/java/org/dspace/layout/service/impl/CrisLayoutBoxServiceImplTest.java @@ -291,6 +291,25 @@ public void testIiifBoxHasNoContentWithMetadataUndefined() { assertFalse(crisLayoutBoxService.hasContent(context, box, item)); } + @Test + public void testSingleMetadataboxBitstreamWithoutField() { + + CrisLayoutBox singleBitstreamBox = new CrisLayoutBox(); + singleBitstreamBox.setShortname("File"); + singleBitstreamBox.setType(null); + Item item = item(); + + CrisLayoutFieldBitstream fieldBitstream = new CrisLayoutFieldBitstream(); + fieldBitstream.setBundle("ORIGINAL"); + fieldBitstream.setMetadataValue(null); + fieldBitstream.setMetadataField(null); + fieldBitstream.setRendering("attachment"); + + singleBitstreamBox.addLayoutField(fieldBitstream); + + assertThat(crisLayoutBoxService.hasContent(context, singleBitstreamBox, item), is(true)); + } + private CrisLayoutBox crisLayoutMetadataBox(String shortname, MetadataField... metadataFields) { return crisLayoutBox(shortname, CrisLayoutBoxTypes.METADATA.name(), metadataFields); } From 6404c730371af4421ede693a277a3479e8d8b457 Mon Sep 17 00:00:00 2001 From: Mattia Vianelli Date: Thu, 18 Jan 2024 18:01:25 +0100 Subject: [PATCH 15/21] DSC-1488 Test fix --- .../layout/service/impl/CrisLayoutBoxServiceImplTest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dspace-api/src/test/java/org/dspace/layout/service/impl/CrisLayoutBoxServiceImplTest.java b/dspace-api/src/test/java/org/dspace/layout/service/impl/CrisLayoutBoxServiceImplTest.java index 67872fb52330..ce539cda67aa 100644 --- a/dspace-api/src/test/java/org/dspace/layout/service/impl/CrisLayoutBoxServiceImplTest.java +++ b/dspace-api/src/test/java/org/dspace/layout/service/impl/CrisLayoutBoxServiceImplTest.java @@ -292,12 +292,14 @@ public void testIiifBoxHasNoContentWithMetadataUndefined() { } @Test - public void testSingleMetadataboxBitstreamWithoutField() { + public void testSingleMetadataboxBitstreamWithoutField() throws SQLException { CrisLayoutBox singleBitstreamBox = new CrisLayoutBox(); singleBitstreamBox.setShortname("File"); singleBitstreamBox.setType(null); + Item item = item(); + Bitstream bitstream = mock(Bitstream.class); CrisLayoutFieldBitstream fieldBitstream = new CrisLayoutFieldBitstream(); fieldBitstream.setBundle("ORIGINAL"); @@ -307,7 +309,11 @@ public void testSingleMetadataboxBitstreamWithoutField() { singleBitstreamBox.addLayoutField(fieldBitstream); + when(bitstreamService.findShowableByItem(context, item.getID(), "ORIGINAL", Map.of())) + .thenReturn(List.of(bitstream)); + assertThat(crisLayoutBoxService.hasContent(context, singleBitstreamBox, item), is(true)); + } private CrisLayoutBox crisLayoutMetadataBox(String shortname, MetadataField... metadataFields) { From 71c8a1931a6039aa2c059a521c3a2594aaafe24f Mon Sep 17 00:00:00 2001 From: Mattia Vianelli Date: Thu, 18 Jan 2024 18:02:09 +0100 Subject: [PATCH 16/21] DSC-1488 Added fix for NPE in CrisLayoutBoxServiceImpl --- .../layout/service/impl/CrisLayoutBoxServiceImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dspace-api/src/main/java/org/dspace/layout/service/impl/CrisLayoutBoxServiceImpl.java b/dspace-api/src/main/java/org/dspace/layout/service/impl/CrisLayoutBoxServiceImpl.java index 269dd6601853..acd5d38c0b41 100644 --- a/dspace-api/src/main/java/org/dspace/layout/service/impl/CrisLayoutBoxServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/layout/service/impl/CrisLayoutBoxServiceImpl.java @@ -208,7 +208,13 @@ private boolean isMetadataFieldPresent(DSpaceObject item, MetadataField metadata } private boolean isBitstreamPresent(Context context, Item item, CrisLayoutFieldBitstream field) { - Map filters = Map.of(field.getMetadataField().toString('.'), field.getMetadataValue()); + + Map filters = Map.of(); + + if (field.getMetadataField() != null) { + filters = Map.of(field.getMetadataField().toString('.'), field.getMetadataValue()); + } + try { return bitstreamService.findShowableByItem(context, item.getID(), field.getBundle(), filters).size() > 0; } catch (SQLException e) { From ba6cdbf1f78a6f099b30336aa8f3bfe534207011 Mon Sep 17 00:00:00 2001 From: Andrea Bollini Date: Sat, 20 Jan 2024 15:51:06 +0100 Subject: [PATCH 17/21] DURACOM-225 add IT for the media filter script --- .../dspace/app/mediafilter/MediaFilterIT.java | 237 ++++++++++++++++++ .../org/dspace/builder/BitstreamBuilder.java | 14 ++ 2 files changed, 251 insertions(+) create mode 100644 dspace-api/src/test/java/org/dspace/app/mediafilter/MediaFilterIT.java diff --git a/dspace-api/src/test/java/org/dspace/app/mediafilter/MediaFilterIT.java b/dspace-api/src/test/java/org/dspace/app/mediafilter/MediaFilterIT.java new file mode 100644 index 000000000000..aef2476fdc45 --- /dev/null +++ b/dspace-api/src/test/java/org/dspace/app/mediafilter/MediaFilterIT.java @@ -0,0 +1,237 @@ +/** + * The contents of this file are subject to the license and copyright + * detailed in the LICENSE and NOTICE files at the root of the source + * tree and available online at + * + * http://www.dspace.org/license/ + */ +package org.dspace.app.mediafilter; + +import static org.junit.Assert.assertTrue; + +import java.io.IOException; +import java.io.InputStream; +import java.sql.SQLException; +import java.util.Iterator; +import java.util.List; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; +import org.dspace.AbstractIntegrationTestWithDatabase; +import org.dspace.authorize.AuthorizeException; +import org.dspace.builder.BitstreamBuilder; +import org.dspace.builder.CollectionBuilder; +import org.dspace.builder.CommunityBuilder; +import org.dspace.builder.ItemBuilder; +import org.dspace.content.Bitstream; +import org.dspace.content.Bundle; +import org.dspace.content.Collection; +import org.dspace.content.Community; +import org.dspace.content.DSpaceObject; +import org.dspace.content.Item; +import org.dspace.content.factory.ContentServiceFactory; +import org.dspace.content.service.BitstreamService; +import org.dspace.content.service.ItemService; +import org.junit.Before; +import org.junit.Test; + +/** + * Tests of {@link MediaFilterScript}. + * + * @author Andrea Bollini + */ +public class MediaFilterIT extends AbstractIntegrationTestWithDatabase { + + private ItemService itemService = ContentServiceFactory.getInstance().getItemService(); + private BitstreamService bitstreamService = ContentServiceFactory.getInstance().getBitstreamService(); + protected Community topComm1; + protected Community topComm2; + protected Community childComm1_1; + protected Community childComm1_2; + protected Collection col1_1; + protected Collection col1_2; + protected Collection col1_1_1; + protected Collection col1_1_2; + protected Collection col1_2_1; + protected Collection col1_2_2; + protected Collection col2_1; + protected Item item1_1_a; + protected Item item1_1_b; + protected Item item1_2_a; + protected Item item1_2_b; + protected Item item1_1_1_a; + protected Item item1_1_1_b; + protected Item item1_1_2_a; + protected Item item1_1_2_b; + protected Item item1_2_1_a; + protected Item item1_2_1_b; + protected Item item1_2_2_a; + protected Item item1_2_2_b; + protected Item item2_1_a; + protected Item item2_1_b; + + @Before + public void setup() throws IOException, SQLException, AuthorizeException { + context.turnOffAuthorisationSystem(); + topComm1 = CommunityBuilder.createCommunity(context).withName("Parent Community1").build(); + topComm2 = CommunityBuilder.createCommunity(context).withName("Parent Community2").build(); + childComm1_1 = CommunityBuilder.createCommunity(context).withName("Child Community1_1") + .addParentCommunity(context, topComm1).build(); + childComm1_2 = CommunityBuilder.createCommunity(context).withName("Child Community1_2") + .addParentCommunity(context, topComm1).build(); + col1_1 = CollectionBuilder.createCollection(context, topComm1).withName("Collection 1_1").build(); + col1_2 = CollectionBuilder.createCollection(context, topComm1).withName("Collection 1_2").build(); + col1_1_1 = CollectionBuilder.createCollection(context, childComm1_1).withName("Collection 1_1_1").build(); + col1_1_2 = CollectionBuilder.createCollection(context, childComm1_1).withName("Collection 1_1_2").build(); + col1_2_1 = CollectionBuilder.createCollection(context, childComm1_2).withName("Collection 1_1_1").build(); + col1_2_2 = CollectionBuilder.createCollection(context, childComm1_2).withName("Collection 1_2").build(); + col2_1 = CollectionBuilder.createCollection(context, topComm2).withName("Collection 2_1").build(); + + // Create two items in each collection, one with the test.csv file and one with the test.txt file + item1_1_a = ItemBuilder.createItem(context, col1_1).withTitle("Item 1_1_a").withIssueDate("2017-10-17").build(); + item1_1_b = ItemBuilder.createItem(context, col1_1).withTitle("Item 1_1_b").withIssueDate("2017-10-17").build(); + item1_1_1_a = ItemBuilder.createItem(context, col1_1_1).withTitle("Item 1_1_1_a").withIssueDate("2017-10-17") + .build(); + item1_1_1_b = ItemBuilder.createItem(context, col1_1_1).withTitle("Item 1_1_1_b").withIssueDate("2017-10-17") + .build(); + item1_1_2_a = ItemBuilder.createItem(context, col1_1_2).withTitle("Item 1_1_2_a").withIssueDate("2017-10-17") + .build(); + item1_1_2_b = ItemBuilder.createItem(context, col1_1_2).withTitle("Item 1_1_2_b").withIssueDate("2017-10-17") + .build(); + item1_2_a = ItemBuilder.createItem(context, col1_2).withTitle("Item 1_2_a").withIssueDate("2017-10-17").build(); + item1_2_b = ItemBuilder.createItem(context, col1_2).withTitle("Item 1_2_b").withIssueDate("2017-10-17").build(); + item1_2_1_a = ItemBuilder.createItem(context, col1_2_1).withTitle("Item 1_2_1_a").withIssueDate("2017-10-17") + .build(); + item1_2_1_b = ItemBuilder.createItem(context, col1_2_1).withTitle("Item 1_2_1_b").withIssueDate("2017-10-17") + .build(); + item1_2_2_a = ItemBuilder.createItem(context, col1_2_2).withTitle("Item 1_2_2_a").withIssueDate("2017-10-17") + .build(); + item1_2_2_b = ItemBuilder.createItem(context, col1_2_2).withTitle("Item 1_2_2_b").withIssueDate("2017-10-17") + .build(); + item2_1_a = ItemBuilder.createItem(context, col2_1).withTitle("Item 2_1_a").withIssueDate("2017-10-17").build(); + item2_1_b = ItemBuilder.createItem(context, col2_1).withTitle("Item 2_1_b").withIssueDate("2017-10-17").build(); + addBitstream(item1_1_a, "test.csv"); + addBitstream(item1_1_b, "test.txt"); + addBitstream(item1_2_a, "test.csv"); + addBitstream(item1_2_b, "test.txt"); + addBitstream(item1_1_1_a, "test.csv"); + addBitstream(item1_1_1_b, "test.txt"); + addBitstream(item1_1_2_a, "test.csv"); + addBitstream(item1_1_2_b, "test.txt"); + addBitstream(item1_2_1_a, "test.csv"); + addBitstream(item1_2_1_b, "test.txt"); + addBitstream(item1_2_2_a, "test.csv"); + addBitstream(item1_2_2_b, "test.txt"); + addBitstream(item2_1_a, "test.csv"); + addBitstream(item2_1_b, "test.txt"); + context.restoreAuthSystemState(); + } + + private void addBitstream(Item item, String filename) throws SQLException, AuthorizeException, IOException { + BitstreamBuilder.createBitstream(context, item, getClass().getResourceAsStream(filename)).withName(filename) + .guessFormat().build(); + } + + @Test + public void mediaFilterScriptAllItemsTest() throws Exception { + performMediaFilterScript(null); + Iterator items = itemService.findAll(context); + while (items.hasNext()) { + Item item = items.next(); + checkItemHasBeenProcessed(item); + } + } + + @Test + public void mediaFilterScriptIdentifiersTest() throws Exception { + // process the item 1_1_a and verify that no other items has been processed using the "closer" one + performMediaFilterScript(item1_1_a); + checkItemHasBeenProcessed(item1_1_a); + checkItemHasBeenNotProcessed(item1_1_b); + // process the collection 1_1_1 and verify that items in another collection has not been processed + performMediaFilterScript(col1_1_1); + checkItemHasBeenProcessed(item1_1_1_a); + checkItemHasBeenProcessed(item1_1_1_b); + checkItemHasBeenNotProcessed(item1_1_2_a); + checkItemHasBeenNotProcessed(item1_1_2_b); + // process a top community with only collections + performMediaFilterScript(topComm2); + checkItemHasBeenProcessed(item2_1_a); + checkItemHasBeenProcessed(item2_1_b); + // verify that the other items have not been processed yet + checkItemHasBeenNotProcessed(item1_1_b); + checkItemHasBeenNotProcessed(item1_2_a); + checkItemHasBeenNotProcessed(item1_2_b); + checkItemHasBeenNotProcessed(item1_1_2_a); + checkItemHasBeenNotProcessed(item1_1_2_b); + checkItemHasBeenNotProcessed(item1_2_1_a); + checkItemHasBeenNotProcessed(item1_2_1_b); + checkItemHasBeenNotProcessed(item1_2_2_a); + checkItemHasBeenNotProcessed(item1_2_2_b); + // process a more structured community and verify that all the items at all levels are processed + performMediaFilterScript(topComm1); + // items that were already processed should stay processed + checkItemHasBeenProcessed(item1_1_a); + checkItemHasBeenProcessed(item1_1_1_a); + checkItemHasBeenProcessed(item1_1_1_b); + // residual items should have been processed as well now + checkItemHasBeenProcessed(item1_1_b); + checkItemHasBeenProcessed(item1_2_a); + checkItemHasBeenProcessed(item1_2_b); + checkItemHasBeenProcessed(item1_1_2_a); + checkItemHasBeenProcessed(item1_1_2_b); + checkItemHasBeenProcessed(item1_2_1_a); + checkItemHasBeenProcessed(item1_2_1_b); + checkItemHasBeenProcessed(item1_2_2_a); + checkItemHasBeenProcessed(item1_2_2_b); + } + + private void checkItemHasBeenNotProcessed(Item item) throws IOException, SQLException, AuthorizeException { + List textBundles = item.getBundles("TEXT"); + assertTrue("The item " + item.getName() + " should NOT have the TEXT bundle", textBundles.size() == 0); + } + + private void checkItemHasBeenProcessed(Item item) throws IOException, SQLException, AuthorizeException { + String expectedFileName = StringUtils.endsWith(item.getName(), "_a") ? "test.csv.txt" : "test.txt.txt"; + String expectedContent = StringUtils.endsWith(item.getName(), "_a") ? "data3,3" : "quick brown fox"; + List textBundles = item.getBundles("TEXT"); + assertTrue("The item " + item.getName() + " has NOT the TEXT bundle", textBundles.size() == 1); + List bitstreams = textBundles.get(0).getBitstreams(); + assertTrue("The item " + item.getName() + " has NOT exactly 1 bitstream in the TEXT bundle", + bitstreams.size() == 1); + assertTrue("The text bistream in the " + item.getName() + " is NOT named properly [" + expectedFileName + "]", + StringUtils.equals(bitstreams.get(0).getName(), expectedFileName)); + assertTrue("The text bistream in the " + item.getName() + " doesn't contain the proper content [" + + expectedContent + "]", StringUtils.contains(getContent(bitstreams.get(0)), expectedContent)); + } + + private CharSequence getContent(Bitstream bitstream) throws IOException, SQLException, AuthorizeException { + try (InputStream input = bitstreamService.retrieve(context, bitstream)) { + return IOUtils.toString(input, "UTF-8"); + } + } + + private void performMediaFilterScript(DSpaceObject dso) throws Exception { + if (dso != null) { + runDSpaceScript("filter-media", "-i", dso.getHandle()); + } else { + runDSpaceScript("filter-media"); + } + // reload our items to see the changes + item1_1_a = context.reloadEntity(item1_1_a); + item1_1_b = context.reloadEntity(item1_1_b); + item1_2_a = context.reloadEntity(item1_2_a); + item1_2_b = context.reloadEntity(item1_2_b); + item1_1_1_a = context.reloadEntity(item1_1_1_a); + item1_1_1_b = context.reloadEntity(item1_1_1_b); + item1_1_2_a = context.reloadEntity(item1_1_2_a); + item1_1_2_b = context.reloadEntity(item1_1_2_b); + item1_2_1_a = context.reloadEntity(item1_2_1_a); + item1_2_1_b = context.reloadEntity(item1_2_1_b); + item1_2_2_a = context.reloadEntity(item1_2_2_a); + item1_2_2_b = context.reloadEntity(item1_2_2_b); + item2_1_a = context.reloadEntity(item2_1_a); + item2_1_b = context.reloadEntity(item2_1_b); + + } +} diff --git a/dspace-api/src/test/java/org/dspace/builder/BitstreamBuilder.java b/dspace-api/src/test/java/org/dspace/builder/BitstreamBuilder.java index a4775c4b8358..dbcf3a7972b7 100644 --- a/dspace-api/src/test/java/org/dspace/builder/BitstreamBuilder.java +++ b/dspace-api/src/test/java/org/dspace/builder/BitstreamBuilder.java @@ -20,6 +20,7 @@ import org.dspace.content.MetadataField; import org.dspace.content.MetadataValue; import org.dspace.content.factory.ContentServiceFactory; +import org.dspace.content.service.BitstreamFormatService; import org.dspace.content.service.DSpaceObjectService; import org.dspace.content.service.MetadataValueService; import org.dspace.core.Constants; @@ -167,6 +168,19 @@ public BitstreamBuilder withMimeType(String mimeType) throws SQLException { return this; } + /** + * Guess the bitstream format as during the submission via the + * {@link BitstreamFormatService#guessFormat(Context, Bitstream)} + * + * @return the BitstreamBuilder with the format set according to + * {@link BitstreamFormatService#guessFormat(Context, Bitstream)} + * @throws SQLException + */ + public BitstreamBuilder guessFormat() throws SQLException { + bitstream.setFormat(context, bitstreamFormatService.guessFormat(context, bitstream)); + return this; + } + public BitstreamBuilder withFormat(String format) throws SQLException { bitstreamService.addMetadata(context, bitstream, "dc", "format", null, null, format); From c706135fa22b97a554c0b4ef7aea60a8db8138d1 Mon Sep 17 00:00:00 2001 From: Andrea Bollini Date: Sat, 20 Jan 2024 17:51:33 +0100 Subject: [PATCH 18/21] DSC-1496 fix lazy initialization traversing comms/colls --- .../app/mediafilter/MediaFilterServiceImpl.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dspace-api/src/main/java/org/dspace/app/mediafilter/MediaFilterServiceImpl.java b/dspace-api/src/main/java/org/dspace/app/mediafilter/MediaFilterServiceImpl.java index 3f898bd7d9f1..974dc784bd4f 100644 --- a/dspace-api/src/main/java/org/dspace/app/mediafilter/MediaFilterServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/app/mediafilter/MediaFilterServiceImpl.java @@ -132,12 +132,18 @@ public void applyFiltersAllItems(Context context) throws Exception { @Override public void applyFiltersCommunity(Context context, Community community) throws Exception { //only apply filters if community not in skip-list + // ensure that the community is attached to the current hibernate session + // as we are committing after each item (handles, sub-communties and + // collections are lazy attributes) + community = context.reloadEntity(community); if (!inSkipList(community.getHandle())) { List subcommunities = community.getSubcommunities(); for (Community subcommunity : subcommunities) { applyFiltersCommunity(context, subcommunity); } - + // ensure that the community is attached to the current hibernate session + // as we are committing after each item + community = context.reloadEntity(community); List collections = community.getCollections(); for (Collection collection : collections) { applyFiltersCollection(context, collection); @@ -148,6 +154,9 @@ public void applyFiltersCommunity(Context context, Community community) @Override public void applyFiltersCollection(Context context, Collection collection) throws Exception { + // ensure that the collection is attached to the current hibernate session + // as we are committing after each item (handles are lazy attributes) + collection = context.reloadEntity(collection); //only apply filters if collection not in skip-list if (!inSkipList(collection.getHandle())) { Iterator itemIterator = itemService.findAllByCollection(context, collection); From 5e40130458ddd8713831229bebdbada51dfd0461 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Thu, 25 Jan 2024 09:42:53 +0100 Subject: [PATCH 19/21] [DSC-1503] Add in-collection item filter --- .../content/logic/InCollectionFilter.java | 125 ++++++++++++++++++ dspace/config/spring/api/item-filters.xml | 16 +++ 2 files changed, 141 insertions(+) create mode 100644 dspace-api/src/main/java/org/dspace/content/logic/InCollectionFilter.java diff --git a/dspace-api/src/main/java/org/dspace/content/logic/InCollectionFilter.java b/dspace-api/src/main/java/org/dspace/content/logic/InCollectionFilter.java new file mode 100644 index 000000000000..6fdc53460f82 --- /dev/null +++ b/dspace-api/src/main/java/org/dspace/content/logic/InCollectionFilter.java @@ -0,0 +1,125 @@ +/** + * The contents of this file are subject to the license and copyright + * detailed in the LICENSE and NOTICE files at the root of the source + * tree and available online at + * + * http://www.dspace.org/license/ + */ +package org.dspace.content.logic; + +import java.sql.SQLException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.dspace.content.Collection; +import org.dspace.content.DSpaceObject; +import org.dspace.content.Item; +import org.dspace.content.logic.LogicalStatementException; +import org.dspace.content.service.CollectionService; +import org.dspace.content.service.ItemService; +import org.dspace.core.Context; +import org.dspace.handle.service.HandleService; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * A condition that accepts a list of collection handles and returns true + * if the item belongs to any of them. + * + * @author Kim Shepherd + * @author Giuseppe Digilio + */ +public class InCollectionFilter implements Filter { + + @Autowired(required = true) + protected ItemService itemService; + @Autowired(required = true) + protected CollectionService collectionService; + @Autowired(required = true) + protected HandleService handleService; + + private String name; + private Map parameters = new HashMap<>(); + private static Logger log = LogManager.getLogger(InCollectionFilter.class); + + /** + * Get parameters set by spring configuration in item-filters.xml + * These could be any kind of map that the extending condition class needs for evaluation + * @return map of parameters + * @throws LogicalStatementException + */ + public Map getParameters() throws LogicalStatementException { + return this.parameters; + } + + /** + * Set parameters - used by Spring when creating beans from item-filters.xml + * These could be any kind of map that the extending condition class needs for evaluation + * @param parameters + * @throws LogicalStatementException + */ + @Autowired(required = true) + public void setParameters(Map parameters) throws LogicalStatementException { + this.parameters = parameters; + } + + /** + * Return true if item is in one of the specified collections + * Return false if not + * @param context DSpace context + * @param item Item to evaluate + * @return boolean result of evaluation + * @throws LogicalStatementException + */ + @Override + public Boolean getResult(Context context, Item item) throws LogicalStatementException { + + List collectionHandles = (List)getParameters().get("collections"); + List itemCollections = item.getCollections(); + for (Collection collection : itemCollections) { + if (collectionHandles.contains(collection.getHandle())) { + log.debug("item " + item.getHandle() + " is in collection " + + collection.getHandle() + ", returning true"); + return true; + } + } + + // Look for the parent object of the item. This is important as the item.getOwningCollection method + // may return null, even though the item itself does have a parent object, at the point of archival + try { + DSpaceObject parent = itemService.getParentObject(context, item); + if (parent != null) { + log.debug("Got parent DSO for item: " + parent.getID().toString()); + log.debug("Parent DSO handle: " + parent.getHandle()); + if (collectionHandles.contains(parent.getHandle())) { + log.debug("item " + item.getHandle() + " is in collection " + + parent.getHandle() + ", returning true"); + return true; + } + } else { + log.debug("Parent DSO is null..."); + } + } catch (SQLException e) { + log.error("Error obtaining parent DSO", e); + throw new LogicalStatementException(e); + } + + // If we reach this statement, the item did not appear in any of the collections from the parameters + log.debug("item " + item.getHandle() + " not found in the passed collection handle list"); + + return false; + } + + @Override + public void setBeanName(String name) { + log.debug("Initialize bean " + name); + this.name = name; + } + + @Override + public String getName() { + return name; + } +} diff --git a/dspace/config/spring/api/item-filters.xml b/dspace/config/spring/api/item-filters.xml index d494d0c1c2ed..2514304151ae 100644 --- a/dspace/config/spring/api/item-filters.xml +++ b/dspace/config/spring/api/item-filters.xml @@ -408,4 +408,20 @@ + + + From 9cae03593a0918d599ede39f27582c9df1f9ad11 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Thu, 25 Jan 2024 11:09:34 +0100 Subject: [PATCH 20/21] [DSC-1503] Fix checkstyle --- .../main/java/org/dspace/content/logic/InCollectionFilter.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dspace-api/src/main/java/org/dspace/content/logic/InCollectionFilter.java b/dspace-api/src/main/java/org/dspace/content/logic/InCollectionFilter.java index 6fdc53460f82..c7697ce82fa1 100644 --- a/dspace-api/src/main/java/org/dspace/content/logic/InCollectionFilter.java +++ b/dspace-api/src/main/java/org/dspace/content/logic/InCollectionFilter.java @@ -17,7 +17,6 @@ import org.dspace.content.Collection; import org.dspace.content.DSpaceObject; import org.dspace.content.Item; -import org.dspace.content.logic.LogicalStatementException; import org.dspace.content.service.CollectionService; import org.dspace.content.service.ItemService; import org.dspace.core.Context; @@ -43,7 +42,7 @@ public class InCollectionFilter implements Filter { private String name; private Map parameters = new HashMap<>(); private static Logger log = LogManager.getLogger(InCollectionFilter.class); - + /** * Get parameters set by spring configuration in item-filters.xml * These could be any kind of map that the extending condition class needs for evaluation From 9d5fa139452b78b33c9858111a30e68dca85ff9b Mon Sep 17 00:00:00 2001 From: Andrea Bollini Date: Sun, 28 Jan 2024 18:04:05 +0100 Subject: [PATCH 21/21] DSC-1515 allows to configure a sync ExecutorService mainly for testing purpose --- .../src/test/data/dspaceFolder/config/local.cfg | 5 ++++- dspace-services/pom.xml | 12 ++++++++++++ .../dspace/services/events/SystemEventService.java | 7 ++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/dspace-api/src/test/data/dspaceFolder/config/local.cfg b/dspace-api/src/test/data/dspaceFolder/config/local.cfg index 3618d405f7f2..2f3a64218dbf 100644 --- a/dspace-api/src/test/data/dspaceFolder/config/local.cfg +++ b/dspace-api/src/test/data/dspaceFolder/config/local.cfg @@ -223,4 +223,7 @@ orcid.synchronization-enabled = true # These settings ensure "dspace.object.owner" field are indexed by Authority Control choices.plugin.dspace.object.owner = EPersonAuthority choices.presentation.dspace.object.owner = suggest -authority.controlled.dspace.object.owner = true \ No newline at end of file +authority.controlled.dspace.object.owner = true + +# force the event system to work synchronously during test +system-event.thread.size = 0 \ No newline at end of file diff --git a/dspace-services/pom.xml b/dspace-services/pom.xml index 867ac1dc1a7e..39e2ccf36f38 100644 --- a/dspace-services/pom.xml +++ b/dspace-services/pom.xml @@ -154,5 +154,17 @@ ${spring-boot.version} + + com.google.guava + guava + + + + org.checkerframework + checker-qual + + + + diff --git a/dspace-services/src/main/java/org/dspace/services/events/SystemEventService.java b/dspace-services/src/main/java/org/dspace/services/events/SystemEventService.java index 5a4f118fcdc3..322b0dc8be20 100644 --- a/dspace-services/src/main/java/org/dspace/services/events/SystemEventService.java +++ b/dspace-services/src/main/java/org/dspace/services/events/SystemEventService.java @@ -15,6 +15,7 @@ import java.util.function.Supplier; import javax.annotation.PreDestroy; +import com.google.common.util.concurrent.MoreExecutors; import org.apache.commons.lang3.ArrayUtils; import org.dspace.services.ConfigurationService; import org.dspace.services.EventService; @@ -107,7 +108,11 @@ private void initExecutor() { } ConfigurationService configurationService = DSpaceServicesFactory.getInstance().getConfigurationService(); int threadSize = configurationService.getIntProperty("system-event.thread.size", DEFAULT_THREAD_SIZE); - this.executorService = Executors.newFixedThreadPool(threadSize); + if (threadSize == 0) { + this.executorService = MoreExecutors.newDirectExecutorService(); + } else { + this.executorService = Executors.newFixedThreadPool(threadSize); + } } /* (non-Javadoc)