Refactored the usages of MetadataSchema.DC to use the enum instead

This commit is contained in:
Raf Ponsaerts
2018-11-21 09:35:11 +01:00
parent b8d6fa2fba
commit b905f69d63
51 changed files with 229 additions and 185 deletions

View File

@@ -203,7 +203,7 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl<Bitstream> imp
@Override
public void setUserFormatDescription(Context context, Bitstream bitstream, String desc) throws SQLException {
setFormat(context, bitstream, null);
setMetadataSingleValue(context, bitstream, MetadataSchema.DC_SCHEMA, "format", null, null, desc);
setMetadataSingleValue(context, bitstream, MetadataSchemaEnum.DC.getName(), "format", null, null, desc);
}
@Override
@@ -233,7 +233,7 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl<Bitstream> imp
}
// Remove user type description
clearMetadata(context, bitstream, MetadataSchema.DC_SCHEMA, "format", null, Item.ANY);
clearMetadata(context, bitstream, MetadataSchemaEnum.DC.getName(), "format", null, Item.ANY);
// Update the ID in the table row
bitstream.setFormat(bitstreamFormat);