comments removed & if supportlevel is -1 (not given), set to UNKNOWN

This commit is contained in:
Marie Verdonck
2019-05-31 14:48:29 +02:00
parent 198b97de6d
commit e4f1ed698a

View File

@@ -33,7 +33,11 @@ public class BitstreamFormatConverter implements DSpaceConverter<BitstreamFormat
bf.setDescription(obj.getDescription());
bf.setMimetype(obj.getMIMEType());
bf.setInternal(obj.isInternal());
bf.setSupportLevel(bitstreamFormatService.getSupportLevelString(obj.getSupportLevel()));
if (obj.getSupportLevel() > 0) {
bf.setSupportLevel(bitstreamFormatService.getSupportLevelText(obj));
} else {
bf.setSupportLevel("UNKNOWN");
}
bf.setExtensions(obj.getExtensions());
return bf;
}
@@ -41,9 +45,6 @@ public class BitstreamFormatConverter implements DSpaceConverter<BitstreamFormat
@Override
public BitstreamFormat toModel(BitstreamFormatRest obj) {
// TODO Auto-generated method stub
//Creation of BitstreamFormats protected by bitstreamFormatService, which requires context (not all users are
// authorized to create new BitstreamFormats), not sure if logic for that should be here;
// currently in BitstreamFormatRestRepository
return null;
}
}