mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Merged entities-PR2 into virtual-metadata-update
This commit is contained in:
@@ -705,11 +705,12 @@ public class MetadataImport {
|
||||
boolean left = false;
|
||||
List<RelationshipType> acceptableRelationshipTypes = new LinkedList<>();
|
||||
String url = handleService.resolveToURL(c, value);
|
||||
if (UUIDUtils.fromString(value) == null && StringUtils.isNotBlank(url)) {
|
||||
UUID uuid = UUIDUtils.fromString(value);
|
||||
if (uuid == null && StringUtils.isNotBlank(url)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Entity relationEntity = entityService.findByItemId(c, UUID.fromString(value));
|
||||
Entity relationEntity = entityService.findByItemId(c, uuid);
|
||||
|
||||
|
||||
List<RelationshipType> leftRelationshipTypesForEntity = entityService.getLeftRelationshipTypes(c, entity);
|
||||
|
@@ -40,7 +40,6 @@ import org.dspace.content.service.ItemService;
|
||||
import org.dspace.content.service.MetadataSchemaService;
|
||||
import org.dspace.content.service.RelationshipService;
|
||||
import org.dspace.content.service.WorkspaceItemService;
|
||||
import org.dspace.content.virtual.Concatenate;
|
||||
import org.dspace.content.virtual.VirtualBean;
|
||||
import org.dspace.content.virtual.VirtualMetadataPopulator;
|
||||
import org.dspace.core.Constants;
|
||||
@@ -1328,7 +1327,8 @@ prevent the generation of resource policy entry values with null dspace_object a
|
||||
if (StringUtils.isNotBlank(entityType)) {
|
||||
List<Relationship> relationships = relationshipService.findByItem(context, item);
|
||||
for (Relationship relationship : relationships) {
|
||||
fullMetadataValueList.addAll(handleItemRelationship(context, item, entityType, relationship, extra));
|
||||
fullMetadataValueList.addAll(handleItemRelationship(context, item,
|
||||
entityType, relationship, extra));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1406,7 +1406,8 @@ prevent the generation of resource policy entry values with null dspace_object a
|
||||
return entityType;
|
||||
}
|
||||
|
||||
private MetadataValue constructResultingMetadataValue(Context context, Item item, Item otherItem, VirtualBean virtualBean,
|
||||
private MetadataValue constructResultingMetadataValue(Context context, Item item,
|
||||
Item otherItem, VirtualBean virtualBean,
|
||||
MetadataValue metadataValue) throws SQLException {
|
||||
metadataValue.setValue(virtualBean.getValue(context, otherItem));
|
||||
metadataValue.setAuthority("virtual");
|
||||
|
@@ -84,14 +84,6 @@ public class Relationship implements ReloadableEntity<Integer> {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Standard setter for the ID field
|
||||
* @param id The ID to be set
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Standard getter for the leftItem field
|
||||
* @return The leftItem Item object in this relationship
|
||||
|
Reference in New Issue
Block a user