Project

General

Profile

« Previous | Next » 

Revision 54390

updated resolver and Trying to allow mdstore plugin to print progress information on UI

View differences:

AbstractRecordResolver.java
13 13
import java.util.List;
14 14
import java.util.Map;
15 15
import java.util.concurrent.BlockingQueue;
16
import java.util.function.Function;
16 17

  
17 18
public abstract class AbstractRecordResolver implements RecordResolver {
18 19

  
......
28 29
        this.timestamp = ts;
29 30
    }
30 31

  
31
    protected String resolveRelations(String inputRecord, ResolvedObject inputObject, boolean shouldUpdate) {
32
    protected String resolveRelations(String inputRecord, ResolvedObject inputObject, boolean shouldUpdate, Function<String,String> getInverseRelation) {
32 33
        if (inputObject.getRelations() != null) {
33 34
            for (ObjectRelation rel : inputObject.getRelations()) {
34 35
                final Map<String, ObjectType> resolvedRelation = tryToResolveRelation(rel.getTargetPID());
......
37 38
                            .forEach(e -> {
38 39
                                rel.setTargetPID(new PID(e.getKey(), "dnet"));
39 40
                                rel.setTargetType(e.getValue());
41
                                rel.setInverseRelation(getInverseRelation.apply(rel.getRelationSemantics()));
42

  
40 43
                            });
41 44
                    shouldUpdate = true;
42 45
                }

Also available in: Unified diff