mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Remove unnecessary DescribeStep change
As far as I can tell this never did anything - `relationship.*` is not a valid MDF, so it's unclear what it was supposed to do - everything keeps working if I leave this part out
This commit is contained in:

committed by
Alexandre Vryghem

parent
3ab0c812a6
commit
1b1830f037
@@ -7,9 +7,6 @@
|
||||
*/
|
||||
package org.dspace.app.rest.submit.step;
|
||||
|
||||
import static org.apache.commons.collections4.CollectionUtils.isEmpty;
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -31,10 +28,8 @@ import org.dspace.app.util.DCInputsReader;
|
||||
import org.dspace.app.util.DCInputsReaderException;
|
||||
import org.dspace.app.util.SubmissionStepConfig;
|
||||
import org.dspace.content.InProgressSubmission;
|
||||
import org.dspace.content.Item;
|
||||
import org.dspace.content.MetadataValue;
|
||||
import org.dspace.content.RelationshipMetadataService;
|
||||
import org.dspace.content.RelationshipMetadataValue;
|
||||
import org.dspace.content.factory.ContentServiceFactory;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.core.Utils;
|
||||
@@ -147,26 +142,6 @@ public class DescribeStep extends AbstractProcessingStep {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (input.isRelationshipField() && isBlank(input.getFieldName())) {
|
||||
Item item = obj.getItem();
|
||||
String key = "relationship." + input.getRelationshipType();
|
||||
if (isEmpty(data.getMetadata().get(key))) {
|
||||
data.getMetadata().put(key, new ArrayList<>());
|
||||
}
|
||||
for (RelationshipMetadataValue metadataValue :
|
||||
relationshipMetadataService.getRelationshipMetadata(item, true)) {
|
||||
if (metadataValue.getMetadataField().getElement().equals(input.getRelationshipType())) {
|
||||
MetadataValueRest dto = new MetadataValueRest();
|
||||
dto.setAuthority(metadataValue.getAuthority());
|
||||
dto.setConfidence(metadataValue.getConfidence());
|
||||
dto.setLanguage(metadataValue.getLanguage());
|
||||
dto.setPlace(metadataValue.getPlace());
|
||||
dto.setValue(metadataValue.getValue());
|
||||
data.getMetadata().get(key).add(dto);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user