store place in relation virtual metadata

This commit is contained in:
Ben Bosman
2019-04-29 17:59:38 +02:00
parent ccbf681f96
commit 9a40fd817c

View File

@@ -1450,7 +1450,7 @@ prevent the generation of resource policy entry values with null dspace_object a
relationship.getID(), place)); relationship.getID(), place));
} }
RelationshipMetadataValue relationMetadataFromOtherItem = RelationshipMetadataValue relationMetadataFromOtherItem =
getRelationMetadataFromOtherItem(context, otherItem, relationName, relationship.getID()); getRelationMetadataFromOtherItem(context, otherItem, relationName, relationship.getID(), place);
if (relationMetadataFromOtherItem != null) { if (relationMetadataFromOtherItem != null) {
resultingMetadataValueList.add(relationMetadataFromOtherItem); resultingMetadataValueList.add(relationMetadataFromOtherItem);
} }
@@ -1487,13 +1487,14 @@ prevent the generation of resource policy entry values with null dspace_object a
private RelationshipMetadataValue getRelationMetadataFromOtherItem(Context context, Item otherItem, private RelationshipMetadataValue getRelationMetadataFromOtherItem(Context context, Item otherItem,
String relationName, String relationName,
Integer relationshipId) { Integer relationshipId, int place) {
RelationshipMetadataValue metadataValue = constructMetadataValue(context, RelationshipMetadataValue metadataValue = constructMetadataValue(context,
MetadataSchemaEnum.RELATION MetadataSchemaEnum.RELATION
.getName() + "." + relationName); .getName() + "." + relationName);
if (metadataValue != null) { if (metadataValue != null) {
metadataValue.setAuthority(Constants.VIRTUAL_AUTHORITY_PREFIX + relationshipId); metadataValue.setAuthority(Constants.VIRTUAL_AUTHORITY_PREFIX + relationshipId);
metadataValue.setValue(otherItem.getID().toString()); metadataValue.setValue(otherItem.getID().toString());
metadataValue.setPlace(place);
return metadataValue; return metadataValue;
} }
return null; return null;