Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/clarin-dev' into clarin
Browse files Browse the repository at this point in the history
  • Loading branch information
kosarko committed Jun 18, 2024
2 parents 8a6ba5c + dcbe87e commit b7047d7
Show file tree
Hide file tree
Showing 25 changed files with 2,738 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public enum ExtraLicenseField {
EXTRA_EMAIL (new EmailValidator(), true, "Please enter a valid email address.", null),
ORGANIZATION (new LengthValidator(), true, "Please enter organization."),
REQUIRED_ORGANIZATION (new RequiredValidator(), true, "Organization is required."),
INTENDED_USE (new LengthValidator(), true, "Please state your intended use of this item.");

INTENDED_USE (new LengthValidator(), true, "Please state your intended use of this item."),
ACA_ORG_NAME_AND_SEAT(new RequiredValidator(), true, "Please fill in the name and the seat of your academic institution organization name and seat.");
private Validator validator = null;
private Action action = null;
private boolean metadata = true;
Expand Down
1 change: 1 addition & 0 deletions dspace-api/src/main/java/org/dspace/core/Email.java
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ private static class BurstDelayQueue extends DelayQueue<DelayedEmail> {
public BurstDelayQueue(int burstSize){
super();
this.burstSize = burstSize;
log.info("BurstDelayQueue initiated with burstSize=" + burstSize);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,13 @@ public void addBody(Body body) throws WingException {
List i = licences_div.addList("licenses-url", List.TYPE_FORM);

for (LicenseDefinition license : licenses) {
i.addItem( "license-to-sign", "alert text-center" ).addXref(
license.getDefinition(), " " + license.getName(), "target_blank label-big btn licence_to_sign fa fa-search fa-1x");


final org.dspace.app.xmlui.wing.element.Item li = i.addItem("license-to-sign", "alert text-center");
//this is a link to the license text page
li.addXref(license.getDefinition(), " " + license.getName(), "target_blank label-big btn licence_to_sign fa fa-search fa-1x");
//this is the license text if any
li.addContent(new Message(getDefaultMessageCatalogue(), license.getDefinition(), " "));
//XXX cumulate the extra requirements from all(?) licenses
String lr = license.getRequiredInfo();
if(lr!=null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ private static InputSource pathToInputSource(String documentPath) throws IOExcep

private static Node documentRead(InputSource is) throws ParserConfigurationException, IOException, SAXException {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(is);
return doc.getDocumentElement();
Expand Down
16 changes: 16 additions & 0 deletions dspace-xmlui/src/main/java/org/dspace/app/xmlui/wing/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public class Message implements Serializable
/** The key to look up in the catalogue. */
protected final String key;

/** To generate <i18n:text key="{key}">{text}</i18n:text> **/
private final String text;

/**
* Create a new translatable element.
*
Expand All @@ -42,9 +45,15 @@ public class Message implements Serializable
* The key to look up in the catalogue.
*/
public Message(String catalogue, String key)
{
this(catalogue, key, null);
}

public Message(String catalogue, String key, String text)
{
this.catalogue = catalogue;
this.key = key;
this.text = text;
}

/**
Expand All @@ -65,6 +74,13 @@ public String getKey()
return this.key;
}

public boolean hasText(){
return this.text != null;
}
public String getText(){
return this.text;
}

/**
*
* Parameterize this translate key by specifying
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public class Data extends AbstractWingElement
/** The number parameter type */
private static final String TYPE_NUMBER = "number";

private static final String A_KEY = "key";


/** Translated data key. */
private final Message message;
Expand Down Expand Up @@ -123,19 +125,26 @@ else if (this.message != null)
String catalogue = message.getCatalogue();
Object[] dictionaryParameters = message.getDictionaryParameters();

final AttributeMap attributes = new AttributeMap();
attributes.setNamespace(WingConstants.I18N);
attributes.put(A_CATALOGUE, catalogue);
final String i18nTextContent;
if(message.hasText()){
attributes.put(A_KEY, message.getKey());
i18nTextContent = message.getText();
}else {
i18nTextContent = message.getKey();
}

if (dictionaryParameters == null
|| dictionaryParameters.length == 0)
{
// No parameters, we can use the simple method
// <i18n:text> Text to be translated </i18n:text>

AttributeMap attributes = new AttributeMap();
attributes.setNamespace(WingConstants.I18N);
attributes.put(A_CATALOGUE, catalogue);

startElement(contentHandler, namespaces, WingConstants.I18N,
E_TEXT, attributes);
sendCharacters(contentHandler, message.getKey());
sendCharacters(contentHandler, i18nTextContent);
endElement(contentHandler, namespaces, WingConstants.I18N,
E_TEXT);

Expand All @@ -152,13 +161,9 @@ else if (this.message != null)
startElement(contentHandler, namespaces, WingConstants.I18N,
E_TRANSLATE, null);

AttributeMap attributes = new AttributeMap();
attributes.setNamespace(WingConstants.I18N);
attributes.put(A_CATALOGUE, catalogue);

startElement(contentHandler, namespaces, WingConstants.I18N,
E_TEXT, attributes);
sendCharacters(contentHandler, message.getKey());
sendCharacters(contentHandler, i18nTextContent);
endElement(contentHandler, namespaces, WingConstants.I18N,
E_TEXT);

Expand Down
49 changes: 49 additions & 0 deletions dspace-xmlui/src/main/webapp/i18n/messages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1939,6 +1939,8 @@
<message key="xmlui.ExtraLicenseField.LicenseForm.EXTRA_EMAIL">Ask user for another email address</message>
<message key="xmlui.ExtraLicenseField.LicenseForm.ORGANIZATION">Ask user for organization (optional).</message>
<message key="xmlui.ExtraLicenseField.LicenseForm.REQUIRED_ORGANIZATION">Ask user for organization (mandatory).</message>
<message key="xmlui.ExtraLicenseField.LicenseForm.ACA_ORG_NAME_AND_SEAT">Ask for the name and seat
(address) of user's academic institution.</message>
<message key="xmlui.ExtraLicenseField.LicenseForm.INTENDED_USE">Ask user for his intentions with the item.</message>

<!-- These keys will map to the labels for extra license fields during LicenseStep in submission -->
Expand All @@ -1950,6 +1952,8 @@
<message key="xmlui.ExtraLicenseField.submission.EXTRA_EMAIL">Email</message>
<message key="xmlui.ExtraLicenseField.submission.ORGANIZATION">Organization</message>
<message key="xmlui.ExtraLicenseField.submission.REQUIRED_ORGANIZATION">Organization</message>
<message key="xmlui.ExtraLicenseField.submission.ACA_ORG_NAME_AND_SEAT">Name and seat (address) of your
academic institution.</message>
<message key="xmlui.ExtraLicenseField.submission.INTENDED_USE">Intended use</message>

<!-- org.dspace.app.xmlui.administrative.item.FindItemForm -->
Expand Down Expand Up @@ -3307,6 +3311,51 @@
provide the required information, because the required format for a field is too strict, because there's
no appropriate field for your information, or for any other reason
<a class="helpdesk-tolink">let us know</a>.</message>
<message key="https://lindat.mff.cuni.cz/repository/xmlui/page/szn-dataset-licence">
<h2>Terms of Use and License Terms</h2>
<p>
These Terms of Use and License Terms (hereinafter referred to as "<b>Terms</b>") regulate the terms and conditions for downloading and using the Dataset, which consists of articles from the Novinky.cz and Seznamzpravy.cz websites (hereinafter referred to as "<b>Dataset</b>").
</p>
<p>
All rights to individual articles of the Dataset are held by Seznam.cz, a.s., with its registered office at Praha 5 – Smíchov, Radlická 3294/10, Postcode 15000, Company ID No. 26168685, registered in the Commercial Register maintained by the Municipal Court in Prague, Section B, Entry 6493 (hereinafter referred to as "<b>Seznam.cz</b>") as the operator of the Novinky.cz portal, and further, according to the type of media: <b>Seznam Zprávy, a.s.</b>, with its registered office at Praha 5 – Smíchov, Radlická 3294/10, Postcode 15000, Company ID No. 13974475, registered in the Commercial Register maintained by the Municipal Court in Prague, Section B, Entry 26792, (hereinafter referred to as "<b>Seznam Zprávy</b>" ) as a content supplier for Seznamzpravy.cz; or <b>BORGIS a.s.</b>, with its registered office at Praha 2, Slezská 2127/13, Postcode 12150, Company ID No. 00564893, registered in the Commercial Register maintained by the Municipal Court in Prague, Section B, Entry 267 (hereinafter referred to as "<b>BORGIS</b>" ) as a content supplier for Novinky.cz. (Seznam.cz, Seznam Zprávy and BORGIS are hereinafter jointly referred to as „<b>Providers</b> “).
</p>
<p>
By registering, the user (hereinafter referred to as "<b>User</b>") expresses their agreement with these Terms and confirms that they are fully responsible for the use of the Dataset in accordance with these Terms. The Terms apply to the Dataset as a whole and to its components.
</p>
<p>
The User acknowledges that the Dataset is protected by Copyright and Trademark Acts, is subject to the rights of the Providers, contains personal data therefore its handling is restricted. The Dataset and its contents may only be used in the manner and the scope specified in these Terms.
</p>
<p>
Download and subsequent use of the Dataset is possible as follows:
The User is entitled to use the Dataset exclusively for scientific and research purposes, in particular in connection with research on multimodal aggregation, which are not intended to achieve direct or indirect commercial benefit. The User shall not be entitled to use the Dataset in such a way that would: breach the legislation of the Czech Republic; infringe third party rights or violating the rights of third parties; breach good manners or threaten public order, might harm the Providers or third parties; breach the rules or conditions determined by the Providers, the Providers’ interests or interests of third parties. The Dataset or any component may not be used for training or be any part of a publicly available artificial intelligence language model.
</p>
<p>
The User shall not replicate the Dataset in any way or otherwise make it available to the public or place it on other websites.
</p>
<p>
The User undertakes to respect the personal and property rights of the authors, Providers, and all data subjects.
If the Faculty of Mathematics and Physics of Charles University notifies Users of an update of the version of the Dataset, in particular if any of the data subjects exercise their rights, the User is obliged to remove the original version and use the updated version.
</p>
<p>
All rights to use the Dataset are non-exclusive, non-transferable, and non-assignable. The User is not entitled to grant a sub-license to a third party.
</p>
<p>
The Providers make no warranties concerning the functionality, quality, content, availability, or performance in relation to the foregoing purpose of use and shall not be liable for any damage or injury (including lost profits or other claims) that may arise to the User in connection with the use of the Dataset.
</p>
<p>
Providers do not process Users' personal data in any way. The Faculty of Mathematics and Physics of Charles University is responsible for ensuring the processing of personal data in accordance with the legal regulations governing the protection of personal data.
</p>
<p>
These Terms shall be governed by applicable laws and regulations of the Czech Republic and are binding on all parties.
</p>
<p>
By accepting these Terms, the User confirms that he/she has read these Terms in full and agrees to be bound by them.
</p>
<p>
These Terms come into force and take effect on Oct 10, 2023.
</p>
</message>


</catalogue>

Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ <h3 id="preservation-policy">Preservation Policy</h3>
</p>
<p>
In order to stay a reliable and trustworthy repository, we undergo periodical assessments by CLARIN ERIC and
<a href="https://www.coretrustseal.org/wp-content/uploads/2019/08/LINDAT-CLARIN.pdf">CTS</a> (formerly DSA).
<a href="https://hdl.handle.net/11234/6-CTS">CTS</a> (formerly DSA).
</p>
<p>
To fulfill the commitments, the repository ensures that datasets are ingested and distributed in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h3 id="preservation-policy">Pravidla pro uchovávání dat</h3>
</p>
<p>
Abychom zůstali spolehlivým a důvěryhodným úložištěm, podstupujeme pravidelná hodnocení ze strany CLARIN ERIC a
<a href="https://www.coretrustseal.org/wp-content/uploads/2019/08/LINDAT-CLARIN.pdf">CTS</a> (dříve DSA).
<a href="https://hdl.handle.net/11234/6-CTS">CTS</a> (dříve DSA).
</p>
<p>
Abychom mohli plnit naše závazky, repozitář zajišťuje, že přijatá data mají licenci a pod touto licencí
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div id="faq-like">
<div class="well">
<i18n:text xmlns:i18n="http://apache.org/cocoon/i18n/2.1">https://lindat.mff.cuni.cz/repository/xmlui/page/szn-dataset-licence</i18n:text>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<page>
<title>Licenční podmínky k přístupu k Datasetu</title>
<title-menu>Licenční podmínky k přístupu k Datasetu</title-menu>
</page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<div id="faq-like">

<h2 id="ufal-point-faq">HPLT Dataset License v1.0</h2>
<div>
(2023/10/02)
</div>

<hr />

<div class="well">
<h3>Terms</h3>
<p>
These data are released under this licensing scheme:
<ul>
<li>We do not own any of the text from which these text data has been extracted.<sup><a href="#note1">*</a></sup></li>
<li>We license the actual packaging of these text data under the <a href="https://creativecommons.org/publicdomain/zero/1.0/">Creative Commons CC0 license ("no rights reserved")</a>.</li>
</ul>
</p>

<h3>Notice and take down policy</h3>
<p>
Notice: Should you consider that our data contains material that is owned by you and should therefore not be reproduced here, please:
<ul>
<li>Clearly identify yourself, with detailed contact data such as an address, telephone number or email address at which you can be contacted.</li>
<li>Clearly identify the copyrighted work claimed to be infringed.</li>
<li>Clearly identify the material that is claimed to be infringing and information reasonably sufficient to allow us to locate the material.</li>
</ul>
</p>

<p>You can reach us at <a href="mailto:hplt-datasets@ufal.mff.cuni.cz">hplt-datasets@ufal.mff.cuni.cz</a></p>

<p>Take down: We will comply to legitimate requests by removing the affected sources from the next release of the corpora.</p>

<p id="note1"><sup>*</sup> It is you resposibility that any use of the data complies with any applicable legal framework, such as, among others, the EU Copyright Directive 2019/790 and the General Data Protection Regulation 2018, as amended.</p>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<page>
<title>HPLT Dataset License v1.0</title>
<title-menu>HPLT Dataset License v1.0</title-menu>
</page>


Loading

0 comments on commit b7047d7

Please sign in to comment.