Skip to content

Commit

Permalink
Merged in dspacecris-7-DSC-1438 (pull request DSpace#1532)
Browse files Browse the repository at this point in the history
Update input form configuration according to input form xls file
  • Loading branch information
atarix83 committed Jan 9, 2024
2 parents 746cae5 + 1b6fdd9 commit 9386ca8
Show file tree
Hide file tree
Showing 9 changed files with 878 additions and 796 deletions.
22 changes: 22 additions & 0 deletions dspace-api/src/test/data/dspaceFolder/config/item-submission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,17 @@
<scope visibility="hidden" visibilityOutside="hidden">submission</scope>
</step-definition>

<step-definition id="green" mandatory="true">
<heading>submit.progressbar.describe.green</heading>
<processing-class>org.dspace.app.rest.submit.step.DescribeStep</processing-class>
<type>submission-form</type>
</step-definition>
<step-definition id="orange" mandatory="true">
<heading>submit.progressbar.describe.green</heading>
<processing-class>org.dspace.app.rest.submit.step.DescribeStep</processing-class>
<type>submission-form</type>
</step-definition>

</step-definitions>

<!-- The submission-definitions map lays out the detailed definition of -->
Expand Down Expand Up @@ -457,6 +468,17 @@
<step id="controlled-vocabulary-test"/>
</submission-process>

<submission-process name="green">
<step id="extractionstep" />
<step id="green" />
<step id="upload" />
</submission-process>
<submission-process name="orange">
<step id="extractionstep" />
<step id="orange" />
<step id="upload" />
</submission-process>

</submission-definitions>

</item-submission>
287 changes: 287 additions & 0 deletions dspace-api/src/test/data/dspaceFolder/config/submission-forms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2073,6 +2073,293 @@ it, please enter the types and the actual numbers or codes.</hint>
</row>
</form>

<form name="green">
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>identifier</dc-element>
<repeatable>true</repeatable>
<label>Identifiers</label>
<input-type value-pairs-name="common_identifiers">qualdrop_value</input-type>
<hint>If the item has any identification numbers or codes associated with
it, please enter the types and the actual numbers or codes.
</hint>
<required/>
</field>
</row>
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>title</dc-element>
<repeatable>false</repeatable>
<label>Title</label>
<input-type>onebox</input-type>
<hint>Enter the main title of the item.</hint>
<required>You must enter a main title for this item.</required>
</field>
</row>
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>title</dc-element>
<dc-qualifier>alternative</dc-qualifier>
<repeatable>true</repeatable>
<label>Other Titles</label>
<input-type>onebox</input-type>
<hint>If the item has any alternative titles, please enter them here.</hint>
<required/>
</field>
</row>
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>date</dc-element>
<dc-qualifier>issued</dc-qualifier>
<repeatable>false</repeatable>
<label>Date of Issue</label>
<input-type>date</input-type>
<hint>Please give the date of previous publication or public distribution.
You can leave out the day and/or month if they aren't
applicable.
</hint>
<required>You must enter at least the year.</required>
</field>
</row>
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>contributor</dc-element>
<dc-qualifier>author</dc-qualifier>
<repeatable>true</repeatable>
<label>Authors</label>
<input-type>group</input-type>
<hint>Enter the names of the authors of this item.</hint>
<required/>
</field>
</row>
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>contributor</dc-element>
<dc-qualifier>group</dc-qualifier>
<repeatable>true</repeatable>
<label>Editors</label>
<input-type>onebox</input-type>
<hint>The editors of this publication.</hint>
<required/>
</field>
</row>
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>type</dc-element>
<repeatable>false</repeatable>
<label>Type</label>
<input-type>onebox</input-type>
<hint>Select the type(s) of content of the item.</hint>
<required>You must select a publication type</required>
<vocabulary>publication-coar-types</vocabulary>
</field>
</row>
</form>
<form name="green-dc-contributor-author">
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>contributor</dc-element>
<dc-qualifier>author</dc-qualifier>
<repeatable>false</repeatable>
<label>Author</label>
<input-type>onebox</input-type>
<hint>Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh
or Smith, J].
</hint>
<required>You must enter at least the author.</required>
</field>
</row>
<row>
<field>
<dc-schema>oairecerif</dc-schema>
<dc-element>author</dc-element>
<dc-qualifier>affiliation</dc-qualifier>
<repeatable>false</repeatable>
<label>Affiliation</label>
<input-type>onebox</input-type>
<hint>Enter the affiliation of the author as stated on the publication.</hint>
<required/>
</field>
</row>
</form>
<form name="green-dc-contributor-editor">
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>contributor</dc-element>
<dc-qualifier>editor</dc-qualifier>
<repeatable>false</repeatable>
<label>Editor</label>
<input-type>onebox</input-type>
<hint>The editors of this publication.</hint>
<required>You must enter at least the author.</required>
</field>
</row>
<row>
<field>
<dc-schema>oairecerif</dc-schema>
<dc-element>editor</dc-element>
<dc-qualifier>affiliation</dc-qualifier>
<repeatable>false</repeatable>
<label>Affiliation</label>
<input-type>onebox</input-type>
<hint>Enter the affiliation of the editor as stated on the publication.</hint>
<required/>
</field>
</row>
</form>

<form name="orange">
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>identifier</dc-element>
<repeatable>true</repeatable>
<label>Identifiers</label>
<input-type value-pairs-name="common_identifiers">qualdrop_value</input-type>
<hint>If the item has any identification numbers or codes associated with
it, please enter the types and the actual numbers or codes.
</hint>
<required/>
</field>
</row>
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>title</dc-element>
<repeatable>false</repeatable>
<label>Title</label>
<input-type>onebox</input-type>
<hint>Enter the main title of the item.</hint>
<required>You must enter a main title for this item.</required>
</field>
</row>
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>title</dc-element>
<dc-qualifier>alternative</dc-qualifier>
<repeatable>true</repeatable>
<label>Other Titles</label>
<input-type>onebox</input-type>
<hint>If the item has any alternative titles, please enter them here.</hint>
<required/>
</field>
</row>
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>date</dc-element>
<dc-qualifier>issued</dc-qualifier>
<repeatable>false</repeatable>
<label>Date of Issue</label>
<input-type>date</input-type>
<hint>Please give the date of previous publication or public distribution.
You can leave out the day and/or month if they aren't
applicable.
</hint>
<required>You must enter at least the year.</required>
</field>
</row>
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>contributor</dc-element>
<dc-qualifier>author</dc-qualifier>
<repeatable>true</repeatable>
<label>Authors</label>
<input-type>group</input-type>
<hint>Enter the names of the authors of this item.</hint>
<required/>
</field>
</row>
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>contributor</dc-element>
<dc-qualifier>group</dc-qualifier>
<repeatable>true</repeatable>
<label>Editors</label>
<input-type>onebox</input-type>
<hint>The editors of this publication.</hint>
<required/>
</field>
</row>
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>type</dc-element>
<repeatable>false</repeatable>
<label>Type</label>
<input-type>onebox</input-type>
<hint>Select the type(s) of content of the item.</hint>
<required>You must select a publication type</required>
<vocabulary>publication-coar-types</vocabulary>
</field>
</row>
</form>
<form name="orange-dc-contributor-author">
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>contributor</dc-element>
<dc-qualifier>author</dc-qualifier>
<repeatable>false</repeatable>
<label>Author</label>
<input-type>onebox</input-type>
<hint>Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith,
J].
</hint>
<required>You must enter at least the author.</required>
</field>
</row>
<row>
<field>
<dc-schema>oairecerif</dc-schema>
<dc-element>author</dc-element>
<dc-qualifier>affiliation</dc-qualifier>
<repeatable>false</repeatable>
<label>Affiliation</label>
<input-type>onebox</input-type>
<hint>Enter the affiliation of the author as stated on the publication.</hint>
<required/>
</field>
</row>
</form>
<form name="orange-dc-contributor-editor">
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>contributor</dc-element>
<dc-qualifier>editor</dc-qualifier>
<repeatable>false</repeatable>
<label>Editor</label>
<input-type>onebox</input-type>
<hint>The editors of this publication.</hint>
<required>You must enter at least the author.</required>
</field>
</row>
<row>
<field>
<dc-schema>oairecerif</dc-schema>
<dc-element>editor</dc-element>
<dc-qualifier>affiliation</dc-qualifier>
<repeatable>false</repeatable>
<label>Affiliation</label>
<input-type>onebox</input-type>
<hint>Enter the affiliation of the editor as stated on the publication.</hint>
<required/>
</field>
</row>
</form>
</form-definitions>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public void testDisambiguationFromOrgUnitHierarchyOnEmploymentCreation() {
assertThat(organization.getDisambiguatedOrganization().getDisambiguatedOrganizationIdentifier(), is("12345"));
assertThat(organization.getDisambiguatedOrganization().getDisambiguationSource(), is("RINGGOLD"));
}

@Test
public void testDisambiguationFromOrgUnitHierarchyOnEmploymentCreationWithAncestor() {

Expand All @@ -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")
Expand Down Expand Up @@ -363,7 +362,7 @@ public void testDisambiguationFromOrgUnitHierarchyOnEmploymentCreationWithAncest
assertThat(organization.getDisambiguatedOrganization().getDisambiguatedOrganizationIdentifier(), is("12345"));
assertThat(organization.getDisambiguatedOrganization().getDisambiguationSource(), is("RINGGOLD"));
}

@Test
public void testDisambiguationFromOrgUnitHierarchyOnEmploymentCreationWithNoId() {

Expand Down Expand Up @@ -417,8 +416,6 @@ public void testDisambiguationFromOrgUnitHierarchyOnEmploymentCreationWithNoId()
assertThat(organization.getAddress().getCity(), is("Milan"));
assertThat(organization.getDisambiguatedOrganization(), nullValue());
}



@Test
public void testQualificationCreation() {
Expand Down
Loading

0 comments on commit 9386ca8

Please sign in to comment.