Project

General

Profile

« Previous | Next » 

Revision 48294

Delete file when claim is deleted and result has no other links| change semantics | change the openaireId generation

View differences:

ExternalRecordParser.java
271 271
        }
272 272
            return result;
273 273
    }
274
    private static String createOpenaireId(String id){
274
    public static String createOpenaireId(String id){
275 275
        System.out.println("createOpenaireId from id:" +id);
276 276
        if(id==null){
277 277
            return null;
......
282 282
            m = MessageDigest.getInstance("MD5");
283 283
            m.update(id.getBytes(),0,id.length());
284 284
            openaireId = new BigInteger(1,m.digest()).toString(16);
285
            while(openaireId.length() < 32 ){
286
                openaireId = "0"+openaireId;
287
            }
285 288
        } catch (NoSuchAlgorithmException e) {
286 289
            logger.error("Couldn't instatiate md5 algorithm",e);
287 290
        }
288
        openaireId ="user:claim__"+openaireId;
291
        openaireId ="userclaim___::"+openaireId;
289 292
        return openaireId;
290 293
    }
291 294

  

Also available in: Unified diff