3 |
3 |
import java.util.ArrayList;
|
4 |
4 |
import java.util.List;
|
5 |
5 |
import java.util.Set;
|
|
6 |
import java.util.stream.Collectors;
|
6 |
7 |
|
7 |
8 |
import javax.annotation.Resource;
|
8 |
9 |
|
... | ... | |
77 |
78 |
+ " return concat($format,'-',$layout,'-',$interpretation,'::', $id) ";
|
78 |
79 |
log.debug("Executing lookup query" + xquery);
|
79 |
80 |
|
80 |
|
return Lists.transform(quickSearchProfile(xquery), new Function<String, MdFormatInfo>() {
|
81 |
|
|
82 |
|
@Override
|
83 |
|
public MdFormatInfo apply(final String input) {
|
84 |
|
return MdFormatInfo.initFromXqueryResult(input);
|
85 |
|
}
|
86 |
|
});
|
|
81 |
return quickSearchProfile(xquery).stream()
|
|
82 |
.map(MdFormatInfo::initFromXqueryResult)
|
|
83 |
.collect(Collectors.toList());
|
87 |
84 |
}
|
88 |
85 |
|
89 |
86 |
/**
|
... | ... | |
107 |
104 |
+ "return concat($format, ':-:',$layout,':-:',$interpretation,':-:',$id,':-:',$backendid,':-:',$size)";
|
108 |
105 |
log.debug("Executing lookup query" + String.format(xquery, backend));
|
109 |
106 |
|
110 |
|
Function<String, IndexInfo> function = new Function<String, IndexInfo>() {
|
111 |
|
|
112 |
|
@Override
|
113 |
|
public IndexInfo apply(final String input) {
|
114 |
|
return IndexInfo.newInstanceFromString(input);
|
115 |
|
}
|
116 |
|
};
|
117 |
|
return Lists.transform(quickSearchProfile(String.format(xquery, backend)), function);
|
|
107 |
return quickSearchProfile(String.format(xquery, backend)).stream()
|
|
108 |
.map(IndexInfo::newInstanceFromString)
|
|
109 |
.collect(Collectors.toList());
|
118 |
110 |
}
|
119 |
111 |
|
120 |
112 |
/**
|
some java8 syntax here and there