Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
289cce9
Allowed CitacePRO
jr-rk Jul 22, 2025
e972ff2
VSB-TUO/Added workflow dispatch (#1025)
Kasinhou Jul 28, 2025
4b92c01
Allowed CitacePRO
jr-rk Jul 22, 2025
87d6baf
VSB-TUO/Added workflow dispatch (#1025)
Kasinhou Jul 28, 2025
c2944bd
Merge branch 'customer/vsb-tuo' of github.com:dataquest-dev/DSpace in…
milanmajchrak Aug 12, 2025
8f6c43e
Added flyway script to fix database sequences
milanmajchrak Aug 12, 2025
e12617e
VSB-TUO/Customize configs (#1043)
milanmajchrak Aug 19, 2025
ee679a8
Merge branch 'customer/vsb-tuo' of github.com:dataquest-dev/DSpace in…
milanmajchrak Aug 19, 2025
e8d2b51
Removed duplicated facet in the discovery.xml
milanmajchrak Aug 19, 2025
5dda555
croswallks files should have *.xsl, not *.xml
milanmajchrak Aug 20, 2025
b901cf5
VSB-TUO/Changed dspace.server.url to localhost (#1044)
jr-rk Aug 21, 2025
45860f3
S3 synchronisation should be disabled by default
milanmajchrak Aug 21, 2025
fb76ff4
Commented out using of the S3BitstoreStorage
milanmajchrak Aug 21, 2025
2997a2f
Do not use SyncBitstorageService
milanmajchrak Aug 21, 2025
e2fb083
Do not use public schema for the database tables. Some customers coul…
milanmajchrak Sep 2, 2025
7b56d1d
Use db schema_dspacedb not public
milanmajchrak Sep 2, 2025
46b3684
VSB-TUO/Submission configuration (#1042)
milanmajchrak Sep 2, 2025
ef8650f
VSB-TUO/Oai-phm nusl does not work (#1045)
Paurikova2 Sep 5, 2025
a097b03
Added logs to see more info about ldap error
milanmajchrak Sep 8, 2025
40e30e6
Try to fix LDAP auth issue - not updated email
milanmajchrak Sep 8, 2025
7e40ded
Added more logs about ldap error
milanmajchrak Sep 8, 2025
b64b785
Use PasswordAuthentication when LDAP failed
milanmajchrak Sep 8, 2025
4284dd2
VSB-TUO/db.schema edit (#1054)
jr-rk Sep 9, 2025
83a925f
VSB-TUO/Configured Creative Commons license for the submission forms …
milanmajchrak Sep 10, 2025
edb11a0
UFAL/Fix CMDI crosswalk - fix saxon configuration issue in dspace oai…
Paurikova2 Aug 18, 2025
fd951c3
VSB-TUO/Added openaire filter for specific collection (#1056)
milanmajchrak Sep 10, 2025
ae921a8
Fixed custom openAIRE collection for OAI-PMH
milanmajchrak Sep 11, 2025
4b3b0bf
Removed openaire_data from the context
milanmajchrak Sep 11, 2025
c8f0806
Added including ORCID cfg into dspace.cfg
milanmajchrak Sep 12, 2025
d9e72fe
Integration tests took so long, it could be happening because of LDAP…
milanmajchrak Sep 12, 2025
9ce9799
VSB-TUO/SAF import - import with embargo (#1058)
milanmajchrak Sep 12, 2025
8445f04
Use international license 4.0. instead of czech 3.0. (#1059)
milanmajchrak Sep 16, 2025
8403b9f
VSB-TUO/Changed value of themed.by.company.name to + dataquest (#1062)
jr-rk Sep 17, 2025
7c11cc3
VSB-TUO/Fixed unit tests
Paurikova2 Sep 18, 2025
a1c78b3
VSB-TUO/Set default local language to english for tests (#1076)
Paurikova2 Sep 18, 2025
1906795
VSB-TUO/Replaced admin name (#1072)
Kasinhou Sep 18, 2025
7b5d636
VSB-TUO/Configurable total downloads feature (#1066)
jr-rk Sep 18, 2025
4e3496b
Commented out CLARIN pid.community.configurations, which defines the …
milanmajchrak Sep 19, 2025
4c0756a
Partially fixed ClarinDiscoveryRestControllerIT.java
milanmajchrak Sep 19, 2025
ab8cb4c
Fixed conflicts
milanmajchrak Sep 19, 2025
19ec74e
VSB-TUO/Set repository name for oai identity (#1068)
Paurikova2 Sep 19, 2025
3eca5fb
VSB-TUO/Fix integration tests SubmissionFormsControllerIT (#1081)
Paurikova2 Sep 19, 2025
ebd18a2
VSB-TUO/fix test createWorkspaceWithoutFiles_UploadRequired (#1083)
Paurikova2 Sep 19, 2025
085eaac
VSB-TUO/Set orcid domain to domain from orcid.cfg (#1084)
Paurikova2 Sep 19, 2025
b015317
VSB-TUO/Disabled user registration (#1082)
Kasinhou Sep 22, 2025
6698d88
VSB-TUO/Disable matomo statistics (#1078)
Paurikova2 Sep 22, 2025
0436fac
VSB-TUO/Added czech email templates (#1079)
Kasinhou Sep 22, 2025
4e4a308
VSB-TUO/Fixed IT - Added test configuration (#1090)
Paurikova2 Sep 23, 2025
f363f7d
VSB-TUO/Fixed IT - Set config (#1086)
Paurikova2 Sep 23, 2025
575424e
VSB-TUO/Enable user registration for tests (#1089)
Paurikova2 Sep 23, 2025
c9fc9f2
VSB-TUO/Fix test config (#1087)
Paurikova2 Sep 23, 2025
820dfa7
VSB-TUO/Added logs for time messure (#1091)
Paurikova2 Sep 23, 2025
1711ddc
VSB-TUO/Fixed IT - Removed redundanced dataissuedfacedcontroll (#1093)
Paurikova2 Sep 23, 2025
2a4e362
VSB-TUO/Fixed IT - Aadded test discovery (#1094)
Paurikova2 Sep 23, 2025
a9d8350
VSB-TUO/Checkstyle (#1096)
Paurikova2 Sep 23, 2025
f3cdff0
VSB-TUO/Created feature for editing actual dspace configuration files…
milanmajchrak Sep 24, 2025
b57fa5a
VSB-TUO/Integration tests fixed
Paurikova2 Sep 24, 2025
8a71c1e
VSB-TUO/Used test config for test (#1100)
Paurikova2 Sep 25, 2025
c04a92d
VSB-TUO/Added input forms validation for codes (#1102)
milanmajchrak Sep 27, 2025
d83913c
VSB-TUO/Added an option to define working directory for the Python sc…
milanmajchrak Sep 27, 2025
1047f4d
Added LDAP into dockerfile
milanmajchrak Oct 2, 2025
8845ddd
VSB-TUO/Restore changes from commit solr logs (#1112)
Paurikova2 Oct 9, 2025
91d914a
VSB-TUO/Added commits to track ORCID requests (#1123)
milanmajchrak Oct 15, 2025
acc6d73
VSB-TUO/Context language when sending the archive email upon submissi…
Paurikova2 Oct 16, 2025
e1ae029
VSB-TUO/Added missing input fields (#1126)
milanmajchrak Oct 20, 2025
c291837
VSB-TUO/Commented out not wanted ORCID requests (#1128)
milanmajchrak Oct 22, 2025
de5e250
Commented out tests failing because of updated ORCID requests (#1129)
milanmajchrak Oct 22, 2025
3045281
VSB-TUO/Health report item summary (#1133)
Paurikova2 Oct 30, 2025
a4beb63
VSB-TUO/Health report license summary (#1135)
Paurikova2 Nov 3, 2025
5932e53
VSB-TUO/update solf config bat (#1121)
Paurikova2 Nov 4, 2025
945e9cf
VSB-TUO/Fix bitstreamuuid query (#1140)
Paurikova2 Nov 4, 2025
2b44211
VSB-TUO/Disable hierarchical browsing for the subject (#1151)
milanmajchrak Nov 5, 2025
8a5c48c
Fix integration tests - they failed because the browsing was updated
milanmajchrak Nov 5, 2025
bad9532
VSB-TUO/leaving property webui.browse.vocabularies.disabled empty for…
Paurikova2 Dec 11, 2025
b05dc46
VSB-TUO/VSB-TUO/Fix CurationScriptIT failed
Paurikova2 Jan 8, 2026
7f18108
VSB-TUO/Cherrypick log rotating (#1224)
Paurikova2 Jan 8, 2026
f9c119c
VSB-TUO/Load url from config (#1110)
Paurikova2 Jan 12, 2026
c80db21
new choice authority class, choose authority based on metadatavalue t…
Paurikova2 Feb 5, 2026
80dcc18
added using metadatavaluebasedchoiceauthority as default authority ch…
Paurikova2 Feb 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- dtq-dev
- customer/*
pull_request:
workflow_dispatch:

permissions:
contents: read # to fetch code (actions/checkout)
Expand Down
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,16 @@ ENV DSPACE_INSTALL=/dspace
# Copy the /dspace directory from 'ant_build' container to /dspace in this container
COPY --from=ant_build /dspace $DSPACE_INSTALL
# Need host command for "[dspace]/bin/make-handle-config"
# Install LDAP utilities and configure LDAP TLS
RUN apt-get update \
&& apt-get install -y --no-install-recommends host \
&& apt-get install -y --no-install-recommends host ldap-utils \
&& apt-get purge -y --auto-remove \
&& rm -rf /var/lib/apt/lists/*
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /etc/ldap \
&& echo "TLS_CACERT /etc/ssl/certs/ca-certificates.crt" >> /etc/ldap/ldap.conf
# Set LDAP TLS environment variable
ENV LDAPTLS_CACERT=/etc/ssl/certs/ca-certificates.crt
# Expose Tomcat port (8080) and AJP port (8009) and Handle Server HTTP port (8000)
EXPOSE 8080 8009 8000
# Give java extra memory (2GB)
Expand Down
203 changes: 203 additions & 0 deletions convert_forms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
#!/usr/bin/env python3
"""
Script to convert v5 DSpace form definitions to v7 format
"""
import os
import re
import xml.etree.ElementTree as ET
from pathlib import Path

def is_v5_form_file(file_path):
"""Check if a file contains v5 form definitions (has <page number=> structure)"""
try:
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
return '<page number=' in content and '<form name=' in content
except:
return False

def is_v7_form_file(file_path):
"""Check if a file contains v7 form definitions (has <form-definitions> structure)"""
try:
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
return '<form-definitions>' in content or ('<form name=' in content and '<row>' in content)
except:
return False

def extract_form_code_from_filename(filename):
"""Extract form code from filename patterns like evyuka_form_HGF.xml"""
# Match patterns like evyuka_form_XXX.xml, form_XXX.xml, etc.
patterns = [
r'evyuka_form_([^.]+)\.xml',
r'form_([^.]+)\.xml',
r'([^_]+)_form\.xml',
r'([^.]+)\.xml'
]

for pattern in patterns:
match = re.search(pattern, filename)
if match:
return match.group(1)

# Fallback: use filename without extension
return Path(filename).stem

def extract_form_name_from_content(content):
"""Extract the original form name from v5 content"""
form_match = re.search(r'<form name="([^"]+)">', content)
if form_match:
return form_match.group(1)
return None

def convert_form_to_v7(input_file, output_file, form_code=None):
"""Convert a v5 form file to v7 format"""

# Read the original v5 form
with open(input_file, 'r', encoding='utf-8') as f:
content = f.read()

# Extract form name from content
original_form_name = extract_form_name_from_content(content)
if not original_form_name:
print(f"Could not find form name in {input_file}")
return False

# If no form_code provided, try to extract from filename or use original form name
if not form_code:
form_code = extract_form_code_from_filename(input_file.name)

# Extract all fields from all pages
page_pattern = r'<page number="(\d+)">(.*?)</page>'
pages = re.findall(page_pattern, content, re.DOTALL)

if not pages:
print(f"No pages found in {input_file}")
return False

# Start building the v7 form
v7_content = '''<?xml version="1.0"?>
<!DOCTYPE form-definitions SYSTEM "submission-forms.dtd">

<form-definitions>
'''

# Process each page and distribute fields across 3 forms
all_fields = []
for page_num, page_content in pages:
field_pattern = r'<field>(.*?)</field>'
fields = re.findall(field_pattern, page_content, re.DOTALL)
all_fields.extend(fields)

if not all_fields:
print(f"No fields found in {input_file}")
return False

# Distribute fields across 3 pages (or the number of original pages if less than 3)
num_target_pages = max(3, len(pages))
fields_per_page = len(all_fields) // num_target_pages
remainder = len(all_fields) % num_target_pages

page_field_counts = [fields_per_page] * num_target_pages
for i in range(remainder):
page_field_counts[i] += 1

# Generate form names based on the original form name
page_names = []
if 'e-vyuka' in original_form_name:
# Handle evyuka forms specially
base_name = original_form_name.replace('e-vyuka-', '').replace('e-vyuka', form_code)
page_names = [f"e-vyuka-{form_code}page{word}" for word in ['one', 'two', 'three']]
else:
# Generic form naming
page_names = [f"{original_form_name}page{word}" for word in ['one', 'two', 'three']]

# Ensure we have enough page names
while len(page_names) < num_target_pages:
page_names.append(f"{original_form_name}page{len(page_names)+1}")

field_index = 0
for page_num in range(num_target_pages):
if page_num < len(page_names):
page_name = page_names[page_num]
else:
page_name = f"{original_form_name}page{page_num+1}"

v7_content += f' <form name="{page_name}">\n'

# Add fields for this page
fields_added = 0
target_fields = page_field_counts[page_num] if page_num < len(page_field_counts) else 0

while fields_added < target_fields and field_index < len(all_fields):
field_content = all_fields[field_index].strip()
# Convert field to row format
v7_content += ' <row>\n'
v7_content += ' <field>\n'

# Clean up the field content and add proper indentation
field_lines = field_content.split('\n')
for line in field_lines:
cleaned_line = line.strip()
if cleaned_line:
v7_content += ' ' + cleaned_line + '\n'

v7_content += ' </field>\n'
v7_content += ' </row>\n\n'
field_index += 1
fields_added += 1

v7_content += ' </form>\n\n'

v7_content += '</form-definitions>'

# Write the converted form
with open(output_file, 'w', encoding='utf-8') as f:
f.write(v7_content)

print(f"Converted {input_file} to v7 format -> {output_file}")
return True

def find_all_form_files(directory):
"""Find all XML files that contain DSpace form definitions"""
form_files = []
directory = Path(directory)

for xml_file in directory.glob('*.xml'):
if is_v5_form_file(xml_file):
form_files.append(xml_file)
elif is_v7_form_file(xml_file):
print(f"Skipping {xml_file.name} - already in v7 format")

return form_files

def main():
"""Main function to convert all form files"""
vsb_dir = Path('C:/dspace-be/dspace/config/vsb')

if not vsb_dir.exists():
print(f"Directory {vsb_dir} does not exist")
return

# Find all v5 form definition files
v5_form_files = find_all_form_files(vsb_dir)

if not v5_form_files:
print("No v5 form definition files found for conversion")
return

print(f"Found {len(v5_form_files)} v5 form files to convert:")
for file in v5_form_files:
print(f" - {file.name}")

# Convert each file
converted_count = 0
for input_file in v5_form_files:
form_code = extract_form_code_from_filename(input_file.name)
if convert_form_to_v7(input_file, input_file, form_code):
converted_count += 1

print(f"\nConversion complete: {converted_count}/{len(v5_form_files)} files converted successfully")

if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* 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.configuration.exception;

/**
* Exception thrown when access to a configuration file is not allowed
*
* @author Milan Majchrak (dspace at dataquest.sk)
*/
public class ConfigFileNotAllowedException extends Exception {

public ConfigFileNotAllowedException(String message) {
super(message);
}

public ConfigFileNotAllowedException(String message, Throwable cause) {
super(message, cause);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* 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.configuration.exception;

/**
* Exception thrown when a requested configuration file is not found
*
* @author Milan Majchrak (dspace at dataquest.sk)
*/
public class ConfigFileNotFoundException extends Exception {

public ConfigFileNotFoundException(String message) {
super(message);
}

public ConfigFileNotFoundException(String message, Throwable cause) {
super(message, cause);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* 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.configuration.exception;

/**
* Exception thrown when a configuration file update operation fails
*
* @author Milan Majchrak (dspace at dataquest.sk)
*/
public class ConfigFileUpdateException extends Exception {

public ConfigFileUpdateException(String message) {
super(message);
}

public ConfigFileUpdateException(String message, Throwable cause) {
super(message, cause);
}
}
Loading
Loading