Skip to content

Commit

Permalink
Merge pull request #971 from kosarko/clariah_submission
Browse files Browse the repository at this point in the history
Clariah submission
  • Loading branch information
kosarko authored Mar 19, 2021
2 parents 6d29225 + 1968793 commit 3137a42
Show file tree
Hide file tree
Showing 7 changed files with 175 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package cz.cuni.mff.ufal.dspace.app.xmlui.aspect.submission.submit;

import org.dspace.app.xmlui.aspect.submission.AbstractSubmissionStep;
import org.dspace.app.xmlui.utils.UIException;
import org.dspace.app.xmlui.wing.Message;
import org.dspace.app.xmlui.wing.WingException;
import org.dspace.app.xmlui.wing.element.Body;
import org.dspace.app.xmlui.wing.element.Division;
import org.dspace.app.xmlui.wing.element.List;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Collection;
import org.xml.sax.SAXException;

import java.io.IOException;
import java.sql.SQLException;

public class ShowInfoStep extends AbstractSubmissionStep
{

/** Language Strings **/
protected static final Message T_head =
message("xmlui.Submission.submit.ShowInfoStep.head");
protected static final Message T_info1 =
message("xmlui.Submission.submit.ShowInfoStep.info1");


@Override
public void addBody(Body body) throws SAXException, WingException,
UIException, SQLException, IOException, AuthorizeException
{
Collection collection = submission.getCollection();
String actionURL = contextPath + "/handle/"+collection.getHandle() + "/submit/" + knot.getId() + ".continue";

Division div = body.addInteractiveDivision("submit-showinfo",actionURL, Division.METHOD_POST,
"primary submission");

div.setHead(T_head);

div.addPara(T_info1);

// add standard control/paging buttons
List list = div.addList( "submit-showinfo-controls", List.TYPE_FORM );
addControlButtons(list);
}

@Override
public List addReviewSection(List reviewList) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException {
return null;
}
}
40 changes: 32 additions & 8 deletions dspace-xmlui/src/main/webapp/i18n/messages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3037,7 +3037,16 @@
institution. Start typing the publisher and use autocomplete form that will appear if
applicable. End your input by pressing ESC if you don't want to use the preselected value.
</message>
<message key="input_forms.field.dc.publisher.clariah.hint">The name of the publisher of the original analog or born
digital object. Use your home institution if this is a born digital object being published now. Start typing the
publisher and use autocomplete form that will appear if applicable. End your input by pressing ESC if you
don't want to use the preselected value.
</message>
<message key="input_forms.field.dc.publisher.required">You must enter the name of the publisher.</message>
<message key="input_forms.field.local.dataProvider.label">Data provider</message>
<message key="input_forms.field.local.dataProvider.hint">This concerns the digital object (not the analog
original). An institution from which the data come. Used eg. to give proper attribution. Generally
different from publisher.</message>
<message key="input_forms.field.local.contact.person.label">Contact person</message>
<message key="input_forms.field.local.contact.person.hint">Person to contact in case of any issues with this submission.</message>
<message key="input_forms.field.local.contact.person.required">Please fill all the fields for the contact person.</message>
Expand Down Expand Up @@ -3237,7 +3246,8 @@

<message key="input_forms.field.edm.type.label">Select the kind of resource you are submitting</message>
<message key="input_forms.field.edm.type.hint">Choose one of TEXT, VIDEO, SOUND, IMAGE, 3D. If choosing
TEXT consider adding the resource among other Language Resources.</message>
TEXT consider adding the resource among other Language Resources. Images are visual resources for users to
look at. Text materials are meant to be read and not looked at.</message>
<message key="input_forms.field.edm.type.required">Please select one of the options.</message>
<message key="input_forms.value_pairs.edm_types.text">TEXT</message>
<message key="input_forms.value_pairs.edm_types.video">VIDEO</message>
Expand All @@ -3262,20 +3272,34 @@
typing the language and use autocomplete form that will appear if applicable. Better to list all the languages then to use the 'mul' iso code (if there are too many, contact support).
</message>

<message key="input_forms.field.dc.coverage.spatial.label">Spatial coverage</message>
<message key="input_forms.field.dc.coverage.spatial.hint">Optionally, describe places and locations the
resource is about.</message>

<message key="input_forms.field.dc.coverage.temporal.label">Temporal coverage</message>
<message key="input_forms.field.dc.coverage.temporal.hint">Optionally, describe dates or periods the resources is
about.
<message key="input_forms.field.dc.subject.clariah.hint">Enter appropriate subject keyword or phrase and press
the Add button. Use keywords to specify also people, places and times (period, era, date range etc) the resource
is about. You can use hierarchical subjects, separate the hierarchy levels with two colons (::). Eg.
People::John Doe, Places::New York, Times::WWII.
You can repeat it for multiple keywords or use separators i.e., comma and semicolon, which will split it accordingly.
Start typing the keyword and use autocomplete form that will appear. End your input by pressing
ESC if you don't want to use the preselected value.
</message>

<message key="input_forms.field.dc.alternate.identifiers.label">Alternate identifiers</message>
<message key="input_forms.field.dc.alternate.identifiers.hint">The item will get a handle. If the item has any
identification numbers or codes associated with it, please enter the types and the actual numbers or codes.
</message>

<!-- cz.cuni.mff.ufal.ContractPage -->
<message key="xmlui.ContractPage.title">Distribution License Agreement</message>
<message key="xmlui.ContractPage.trail">Distribution License Agreement</message>
<message key="xmlui.ContractPage.head">Distribution License Agreement</message>
<message key="xmlui.ContractPage.collection_name">{0}</message>

<!-- cz.cuni.mff.ufal.dspace.app.xmlui.aspect.submission.submit.ShowInfoStep -->
<message key="xmlui.Submission.submit.progressbar.showinfo">Notice</message>
<message key="xmlui.Submission.submit.ShowInfoStep.head">Notice</message>
<message key="xmlui.Submission.submit.ShowInfoStep.info1">The submission process for digital humanities
collections is still being fine tuned. If you find yourself not being able to continue the submission,
because you can't provide the required information, or because the required format for a field is too strict, or
because there's no appropriate field for your information or for any other reason,
<a class="helpdesk-tolink">let us know</a>.</message>

</catalogue>

48 changes: 23 additions & 25 deletions dspace/config/input-forms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,24 @@
<repeatable>true</repeatable>
<label>input_forms.field.dc.publisher.label</label>
<input-type>onebox</input-type>
<hint>input_forms.field.dc.publisher.hint</hint>
<hint>input_forms.field.dc.publisher.clariah.hint</hint>
<autocomplete>solr-publisher_ac</autocomplete>
<required>input_forms.field.dc.publisher.required</required>
</field>


<field>
<dc-schema>local</dc-schema>
<dc-element>dataProvider</dc-element>
<dc-qualifier/>
<repeatable>false</repeatable>
<label>input_forms.field.local.dataProvider.label</label>
<input-type>onebox</input-type>
<hint>input_forms.field.local.dataProvider.hint</hint>
<autocomplete>solr-dataProvider_ac</autocomplete>
<required/>
</field>

<field>
<dc-schema>local</dc-schema>
<dc-element>contact</dc-element>
Expand Down Expand Up @@ -583,33 +596,22 @@
<repeatable-parse>true</repeatable-parse>
<label>input_forms.field.dc.subject.label</label>
<input-type>twobox</input-type>
<hint>input_forms.field.dc.subject.hint</hint>
<hint>input_forms.field.dc.subject.clariah.hint</hint>
<autocomplete>solr-subject_ac</autocomplete>
<required>input_forms.field.dc.subject.required</required>
</field>

<field>
<dc-schema>dc</dc-schema>
<dc-element>coverage</dc-element>
<dc-qualifier>spatial</dc-qualifier>
<!-- An input-type of twobox MUST be marked as repeatable -->
<repeatable>true</repeatable>
<repeatable-parse>true</repeatable-parse>
<label>input_forms.field.dc.coverage.spatial.label</label>
<input-type>twobox</input-type>
<hint>input_forms.field.dc.coverage.spatial.hint</hint>
</field>

<field>
<dc-schema>dc</dc-schema>
<dc-element>coverage</dc-element>
<dc-qualifier>temporal</dc-qualifier>
<!-- An input-type of twobox MUST be marked as repeatable -->
<dc-element>identifier</dc-element>
<dc-qualifier>other</dc-qualifier>
<repeatable>true</repeatable>
<repeatable-parse>true</repeatable-parse>
<label>input_forms.field.dc.coverage.temporal.label</label>
<input-type>twobox</input-type>
<hint>input_forms.field.dc.coverage.temporal.hint</hint>
<label>input_forms.field.dc.alternate.identifiers.label</label>
<!-- qualdrop_value on dc.identifier messes with how we use dc.identifier.uri, even if uri is not
in the pairs it's showed in submission and you can delete it.-->
<input-type>onebox</input-type>
<hint>input_forms.field.dc.alternate.identifiers.hint</hint>
<required/>
</field>

<field>
Expand Down Expand Up @@ -805,10 +807,6 @@
<displayed-value>input_forms.value_pairs.common_identifiers.govdoc</displayed-value>
<stored-value>govdoc</stored-value>
</pair>
<pair>
<displayed-value>input_forms.value_pairs.common_identifiers.uri</displayed-value>
<stored-value>uri</stored-value>
</pair>
<pair>
<displayed-value>input_forms.value_pairs.common_identifiers.isbn</displayed-value>
<stored-value>isbn</stored-value>
Expand Down
23 changes: 23 additions & 0 deletions dspace/config/item-submission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,15 @@
<workflow-editable>true</workflow-editable>
</step>

<!-- just display some information; no processing -->
<step id="showinfo">
<heading>submit.progressbar.showinfo</heading>
<!-- returns complete; and just one page -->
<processing-class>org.dspace.submit.step.SampleStep</processing-class>
<xmlui-binding>cz.cuni.mff.ufal.dspace.app.xmlui.aspect.submission.submit.ShowInfoStep</xmlui-binding>
<workflow-editable>true</workflow-editable>
</step>

</step-definitions>

<!-- The submission-definitions map lays out the detailed definition of -->
Expand Down Expand Up @@ -262,6 +271,20 @@
<step id="review" />

</submission-process>
<!--
the same steps as traditional; there's an extra first step that just displays extra information about the
submission. It can be remove when the process (input-forms) for clariah is fine tuned.
-->
<submission-process name="clariah">

<step id="showinfo" />
<step id="describe" />
<step id="upload" />
<step id="license" />
<step id="moredetails" />
<step id="review" />

</submission-process>

</submission-definitions>

Expand Down
6 changes: 6 additions & 0 deletions dspace/config/registries/local-types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@
<scope_note>If the default refbox citation is not enough, use this field to provide a format string
. Check/extend html.xsl for available variables.</scope_note>
</dc-type>
<dc-type>
<schema>local</schema>
<element>dataProvider</element>
<scope_note>Where the data comes from, and who to attribute. Filled in especially when different
from dc.publisher</scope_note>
</dc-type>
</dspace-dc-types>


12 changes: 12 additions & 0 deletions dspace/config/spring/api/discovery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
<ref bean="searchFilterLanguage" />
<ref bean="searchFilterType" />
<ref bean="searchFacetDcType" />
<ref bean="searchFacetDataProvider" />
</list>
</property>
<!--The sort filters for the discovery search-->
Expand Down Expand Up @@ -625,6 +626,17 @@
<property name="sortOrder" value="COUNT"/>
</bean>

<bean id="searchFacetDataProvider" class="org.dspace.discovery.configuration.DiscoverySearchFilterFacet">
<property name="indexFieldName" value="dataProvider"/>
<property name="metadataFields">
<list>
<value>local.dataProvider</value>
</list>
</property>
<property name="facetLimit" value="20"/>
<property name="sortOrder" value="COUNT"/>
</bean>

<bean id="searchFacetFile" class="org.dspace.discovery.configuration.DiscoverySearchFilterFacet">
<property name="indexFieldName" value="hasfile"/>
<property name="metadataFields">
Expand Down
35 changes: 29 additions & 6 deletions dspace/modules/xmlui/src/main/webapp/i18n/messages_cs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3313,7 +3313,14 @@
<message key="input_forms.field.dc.contributor.author.required">Uveďte prosím autora(y)</message>
<message key="input_forms.field.dc.publisher.label">Vydavatel</message>
<message key="input_forms.field.dc.publisher.hint">Uveďte vydavatele předchozího vydání, nebo vaši domovskou instituci. Začnete-li vyplňovat vydavatele, objeví se nápověda. Nechcete-li nápovědu využít, stiskněte ESC.</message>
<message key="input_forms.field.dc.publisher.clariah.hint">Uveďte vydavatele analogového originálu, případně
vydavatele "born digital" originálu. Pokud se jedná o právě zrozený zdroj, uveďte vaši domovskou instituci. Začnete-li
vyplňovat vydavatele, objeví se nápověda. Nechcete-li nápovědu využít, stiskněte ESC.</message>
<message key="input_forms.field.dc.publisher.required">Musíte uvést vydavatele.</message>
<message key="input_forms.field.local.dataProvider.label">Poskytovatel dat</message>
<message key="input_forms.field.local.dataProvider.hint">Týká se digitálního objektu, nikoliv analogového
originálu. Instituce, od které data pocházejí. Např. pro uvedení původu u některých licencí. Obecně se bude
lišit od vydavatele.</message>
<message key="input_forms.field.local.contact.person.label">Kontaktní osoba</message>
<message key="input_forms.field.local.contact.person.hint">Osoba, která bude kontaktována v případě problémů s tímto záznamem.</message>
<message key="input_forms.field.local.contact.person.required">Vyplňte prosím všechna pole u kontaktní osoby</message>
Expand Down Expand Up @@ -3500,7 +3507,8 @@

<message key="input_forms.field.edm.type.label">Zvolte druh záznamu</message>
<message key="input_forms.field.edm.type.hint">Vyberte z TEXT, VIDEO, ZVUK, OBRAZ, 3D. Pokud zvolíte TEXT,
zvažte, jestli se nejedná o Language Resource (Jazykový zdroj).</message>
zvažte, jestli se nejedná o Language Resource (jazykový zdroj). Obrazy jsou vizuální materiály, na které se
uživatelé mohou dívat. Textové materiály jsou určeny ke čtení a nikoli k dívání.</message>
<message key="input_forms.field.edm.type.required">Zvolte prosím jednu z možností</message>
<message key="input_forms.value_pairs.edm_types.text">TEXT</message>
<message key="input_forms.value_pairs.edm_types.video">VIDEO</message>
Expand All @@ -3520,12 +3528,18 @@
<message key="input_forms.field.dc.language.iso1.clariah.label">Jazyk</message>
<message key="input_forms.field.dc.language.iso1.clariah.hint">Volitelné. Vyberte jazyky, jichž se data tohoto záznamu týkají. Je možné zvolit více jazyků. Začnete-li psát, objeví se nápověda. Je lepší vyjmenovat všechny dotčené jazyky (pokud jich je větší množství, kontaktujte podporu), než používat iso kód 'mul'. </message>

<message key="input_forms.field.dc.coverage.spatial.label">Místa</message>
<message key="input_forms.field.dc.coverage.spatial.hint">Volitelné. Uveďte místa, o kterých zdroj je.</message>
<message key="input_forms.field.dc.subject.clariah.hint">Uveďte vhodná klíčová slova, nebo fráze a zmáčkněte
tlačítko přidat.
Klíčová slova využijte také pro lidi, místa a časy (období, éry, rozsah dat apod.) o kterých záznam je.
Možnost využítvat hierarchické předměty. Oddělte jednotlivé úrovně hierarchie dvěma dvojtečkami (::).
Např. People::Jára Cimrman, Places::Liptákov, Times::počátek 20. století.
Klíčová slova buď přidávejte po jednom, nebo je oddělte čárkou, nebo středníkem. Začnete-li psát, objeví se nápověda.
</message>

<message key="input_forms.field.dc.coverage.temporal.label">Období</message>
<message key="input_forms.field.dc.coverage.temporal.hint">Volitelné. Uveďte data, období, epochy apod., o
kterých zdroj je.</message>
<message key="input_forms.field.dc.alternate.identifiers.label">Jiné identifikátory</message>
<message key="input_forms.field.dc.alternate.identifiers.hint">Pro tento záznam bude vytvořen handle. Pokud má
zdroj přidělený jiný identifikátor, nebo kód, uveďte jej i jeho typ.
</message>

<!-- cz.cuni.mff.ufal.ContractPage -->
<message key="xmlui.ContractPage.title">Smlouva o distribuci dat</message>
Expand All @@ -3534,4 +3548,13 @@
<message key="xmlui.ContractPage.collection_name">{0}</message>
<message key="xmlui.ContractPage.explain_non_localized_license">Smlouva se uzavírá v angličtině a její plné znění naleznete níže. Následující český překlad je pouze orientační. V případě rozporů platí anglická verze. </message>

<!-- cz.cuni.mff.ufal.dspace.app.xmlui.aspect.submission.submit.ShowInfoStep -->
<message key="xmlui.Submission.submit.progressbar.showinfo">Upozornění</message>
<message key="xmlui.Submission.submit.ShowInfoStep.head">Upozornění</message>
<message key="xmlui.Submission.submit.ShowInfoStep.info1">Proces přidávání záznamů do kolekcí "digital
humanities" stále ladíme. Pokud se vám nedaří přidat záznam, protože nemáte požadované informace, nebo
protože některé z polí má příliš přísné požadavky na formát, nebo protože chybí pole, do kterého by se dala
vaše informace zachytit, nebo z jakéhokoliv jiného důvodu, <a class="helpdesk-tolink">kontaktujte nás</a>.
</message>

</catalogue>

0 comments on commit 3137a42

Please sign in to comment.