287 |
287 |
semantics="resultResult_"+targetType+sourceType+"_isRelatedTo";
|
288 |
288 |
}
|
289 |
289 |
else if((targetType.equals(ClaimUtils.PUBLICATION)||targetType.equals(ClaimUtils.DATASET))&&(sourceType.equals(ClaimUtils.PROJECT))){
|
290 |
|
semantics="resultProject_outcome_isProducedBy";
|
|
290 |
semantics= "resultProject_outcome_produces"; //"resultProject_outcome_isProducedBy";
|
291 |
291 |
}
|
|
292 |
else if((targetType.equals(ClaimUtils.PUBLICATION)||targetType.equals(ClaimUtils.DATASET))&&(sourceType.equals(ClaimUtils.CONTEXT))){
|
|
293 |
semantics= "isRelevantTo";
|
|
294 |
}
|
292 |
295 |
|
293 |
|
|
294 |
296 |
return semantics;
|
295 |
297 |
}
|
296 |
298 |
/* public String generateInsertClaimResultQuery(Result targetResult, Result sourceResult, Claim claim) {
|
... | ... | |
456 |
458 |
*/
|
457 |
459 |
public String generateSelectRelationEnrichedWithDMFClaimsQuery(Integer limit) {
|
458 |
460 |
return " select rel.*, dmf.dmf from (Select * from "+this.migrationTable+" where type='rels2actions' order by id) as rel left outer join \n" +
|
459 |
|
"(Select DISTINCT ON (resultid) resultid,date, xml as dmf from "+this.migrationTable+" where type='dmf2actions' and xml NOT ILIKE '%<oaf:concept%' order by resultid,date desc , xml) as dmf on rel.resultid=dmf.resultid"
|
|
461 |
"(Select DISTINCT ON (resultid) resultid,date, xml as dmf from "+this.migrationTable+" where type='dmf2actions' and xml NOT ILIKE '%<oaf:concept%' order by resultid,date desc , xml) as dmf on rel.resultid=dmf.resultid "+
|
|
462 |
" order by rel.id "
|
460 |
463 |
+(limit>0?" limit "+limit:"");
|
461 |
464 |
|
462 |
465 |
}
|
... | ... | |
469 |
472 |
public String generateSelectConceptClaimsEnrichedWithDMFClaimsQuery(Integer limit) {
|
470 |
473 |
return " select rel.*, dmf.dmf from (Select * from "+this.migrationTable+" where ( type='dmf2actions' or type='updates2actions' ) and xml LIKE '%<oaf:concept%' order by id) as rel left outer join \n" +
|
471 |
474 |
"(Select DISTINCT ON (resultid) resultid,date, xml as dmf from "+this.migrationTable+" where type='dmf2actions' and xml NOT ILIKE '%<oaf:concept%' order by resultid,date desc , xml) as dmf on rel.resultid=dmf.resultid"
|
|
475 |
+" order by rel.id "
|
472 |
476 |
+(limit>0?" limit "+limit:"");
|
473 |
477 |
|
474 |
478 |
}
|
change record path to relative | change semantics for projects and contexts | for migration fetch claims ordered by id