Skip to content
Snippets Groups Projects
Commit 4f855424 authored by Stefan E. Funk's avatar Stefan E. Funk
Browse files

Merge branch 'develop' into 'main'

New RELEASE :-D

See merge request dariah-de/dariah-de-oai-pmh-services!82
parents f768967d b1f6c5c0
No related branches found
No related tags found
No related merge requests found
Pipeline #342480 passed
...@@ -181,7 +181,7 @@ public class RecordDelivererDatacite extends RecordDelivererAbstract { ...@@ -181,7 +181,7 @@ public class RecordDelivererDatacite extends RecordDelivererAbstract {
Resource result = new Resource(); Resource result = new Resource();
Titles titles = addTitles(); Titles titles = addTitles();
if (!titles.getTitle().isEmpty()) { if (titles != null && !titles.getTitle().isEmpty()) {
result.setTitles(titles); result.setTitles(titles);
} }
String publisher = addPublisher(); String publisher = addPublisher();
...@@ -193,11 +193,11 @@ public class RecordDelivererDatacite extends RecordDelivererAbstract { ...@@ -193,11 +193,11 @@ public class RecordDelivererDatacite extends RecordDelivererAbstract {
result.setPublicationYear(publicationYear); result.setPublicationYear(publicationYear);
} }
Dates dates = this.addDates(); Dates dates = this.addDates();
if (!dates.getDate().isEmpty()) { if (dates != null && !dates.getDate().isEmpty()) {
result.setDates(dates); result.setDates(dates);
} }
Contributors contributors = addContributors(); Contributors contributors = addContributors();
if (!contributors.getContributor().isEmpty()) { if (contributors != null && !contributors.getContributor().isEmpty()) {
result.setContributors(contributors); result.setContributors(contributors);
} }
String language = addLanguage(); String language = addLanguage();
...@@ -205,39 +205,40 @@ public class RecordDelivererDatacite extends RecordDelivererAbstract { ...@@ -205,39 +205,40 @@ public class RecordDelivererDatacite extends RecordDelivererAbstract {
result.setLanguage(language); result.setLanguage(language);
} }
AlternateIdentifiers alternateIdentifiers = addAlternateIdentifiers(); AlternateIdentifiers alternateIdentifiers = addAlternateIdentifiers();
if (!alternateIdentifiers.getAlternateIdentifier().isEmpty()) { if (alternateIdentifiers != null && !alternateIdentifiers.getAlternateIdentifier().isEmpty()) {
result.setAlternateIdentifiers(alternateIdentifiers); result.setAlternateIdentifiers(alternateIdentifiers);
} }
Formats formats = addFormats(); Formats formats = addFormats();
if (!formats.getFormat().isEmpty()) { if (formats != null && !formats.getFormat().isEmpty()) {
result.setFormats(formats); result.setFormats(formats);
} }
RightsList rights = addRights(); RightsList rights = addRights();
if (!rights.getRights().isEmpty()) { if (rights != null && !rights.getRights().isEmpty()) {
result.setRightsList(rights); result.setRightsList(rights);
} }
Descriptions descriptions = addDescriptions(); Descriptions descriptions = addDescriptions();
if (!descriptions.getDescription().isEmpty()) { if (descriptions != null && !descriptions.getDescription().isEmpty()) {
result.setDescriptions(descriptions); result.setDescriptions(descriptions);
} }
RelatedIdentifiers relatedIdentifiers = addRelatedIdentifiers(); RelatedIdentifiers relatedIdentifiers = addRelatedIdentifiers();
if (!relatedIdentifiers.getRelatedIdentifier().isEmpty()) { if (relatedIdentifiers != null && !relatedIdentifiers.getRelatedIdentifier().isEmpty()) {
result.setRelatedIdentifiers(relatedIdentifiers); result.setRelatedIdentifiers(relatedIdentifiers);
} }
Identifier identifier = addIdentifier(); Identifier identifier = addIdentifier();
if (!identifier.getValue().isEmpty() && !identifier.getIdentifierType().isEmpty()) { if (identifier != null && !identifier.getValue().isEmpty()
&& identifier.getIdentifierType() != null && !identifier.getIdentifierType().isEmpty()) {
result.setIdentifier(identifier); result.setIdentifier(identifier);
} }
Creators creators = addCreators(); Creators creators = addCreators();
if (!creators.getCreator().isEmpty()) { if (creators != null && !creators.getCreator().isEmpty()) {
result.setCreators(creators); result.setCreators(creators);
} }
GeoLocations geoLocations = addGeoLocation(); GeoLocations geoLocations = addGeoLocation();
if (!geoLocations.getGeoLocation().isEmpty()) { if (geoLocations != null && !geoLocations.getGeoLocation().isEmpty()) {
result.setGeoLocations(geoLocations); result.setGeoLocations(geoLocations);
} }
ResourceType resourceType = addResourceType(); ResourceType resourceType = addResourceType();
if (!resourceType.getValue().isEmpty()) { if (resourceType != null && !resourceType.getValue().isEmpty()) {
result.setResourceType(resourceType); result.setResourceType(resourceType);
} }
String version = addVersion(); String version = addVersion();
...@@ -245,11 +246,11 @@ public class RecordDelivererDatacite extends RecordDelivererAbstract { ...@@ -245,11 +246,11 @@ public class RecordDelivererDatacite extends RecordDelivererAbstract {
result.setVersion(version); result.setVersion(version);
} }
Subjects subjects = addSubjects(); Subjects subjects = addSubjects();
if (!subjects.getSubject().isEmpty()) { if (subjects != null && !subjects.getSubject().isEmpty()) {
result.setSubjects(subjects); result.setSubjects(subjects);
} }
Sizes sizes = addSizes(); Sizes sizes = addSizes();
if (!sizes.getSize().isEmpty()) { if (sizes != null && !sizes.getSize().isEmpty()) {
result.setSizes(sizes); result.setSizes(sizes);
} }
......
...@@ -48,8 +48,8 @@ public class OaipmhUtilitiesOnline { ...@@ -48,8 +48,8 @@ public class OaipmhUtilitiesOnline {
// ## CHANGE SETTINGS BELOW FOR SETTING TEST SCOPE --------------------------------------------- // ## CHANGE SETTINGS BELOW FOR SETTING TEST SCOPE ---------------------------------------------
// public static final String PROPERTIES_FILE = "oaipmh.test.textgridlab-org.properties"; public static final String PROPERTIES_FILE = "oaipmh.test.textgridlab-org.properties";
public static final String PROPERTIES_FILE = "oaipmh.test.dev-textgridlab-org.properties"; // public static final String PROPERTIES_FILE = "oaipmh.test.dev-textgridlab-org.properties";
public static final boolean TEST_ALL_PAGES = false; public static final boolean TEST_ALL_PAGES = false;
// public static final boolean TEST_ALL_PAGES = true; // public static final boolean TEST_ALL_PAGES = true;
......
...@@ -6,7 +6,7 @@ checkGetRecordDC = textgrid:vqn0.0 ...@@ -6,7 +6,7 @@ checkGetRecordDC = textgrid:vqn0.0
expectedGetRecordDC = Heidi expectedGetRecordDC = Heidi
checkGetRecordDatacite = textgrid:mq05.0 checkGetRecordDatacite = textgrid:mq05.0
expectedGetRecordDatacite = Weise Klugredenn expectedGetRecordDatacite = Wer dich kennt - der kaufft dich nit
checkGetRecordIdiom = textgrid:2sg18.0 checkGetRecordIdiom = textgrid:2sg18.0
expectedGetRecordIdiom = Aguateca expectedGetRecordIdiom = Aguateca
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment