ArrayList<Relation<?>> reps = ResultUtil.filterResults(result, Relation.class);
for(Relation<?> rep : reps) {
if(DBID.class.isAssignableFrom(rep.getDataTypeInformation().getRestrictionClass())) {
Iterator<ScatterPlotProjector<?>> ps = ResultUtil.filteredResults(baseResult, ScatterPlotProjector.class);
for(ScatterPlotProjector<?> p : IterableUtil.fromIterator(ps)) {
final VisualizationTask task = new VisualizationTask(NAME_ID, rep, p.getRelation(), this);
task.put(VisualizationTask.META_TOOL, true);
baseResult.getHierarchy().add(rep, task);
baseResult.getHierarchy().add(p, task);
}
}
if(ClassLabel.class.isAssignableFrom(rep.getDataTypeInformation().getRestrictionClass())) {
Iterator<ScatterPlotProjector<?>> ps = ResultUtil.filteredResults(baseResult, ScatterPlotProjector.class);
for(ScatterPlotProjector<?> p : IterableUtil.fromIterator(ps)) {
final VisualizationTask task = new VisualizationTask(NAME_CLASS, rep, p.getRelation(), this);
task.put(VisualizationTask.META_TOOL, true);
baseResult.getHierarchy().add(rep, task);
baseResult.getHierarchy().add(p, task);
}
}
if(LabelList.class.isAssignableFrom(rep.getDataTypeInformation().getRestrictionClass())) {
Iterator<ScatterPlotProjector<?>> ps = ResultUtil.filteredResults(baseResult, ScatterPlotProjector.class);
for(ScatterPlotProjector<?> p : IterableUtil.fromIterator(ps)) {
final VisualizationTask task = new VisualizationTask(NAME_LABEL, rep, p.getRelation(), this);
task.put(VisualizationTask.META_TOOL, true);
baseResult.getHierarchy().add(rep, task);
baseResult.getHierarchy().add(p, task);
}
}
if(ExternalID.class.isAssignableFrom(rep.getDataTypeInformation().getRestrictionClass())) {
Iterator<ScatterPlotProjector<?>> ps = ResultUtil.filteredResults(baseResult, ScatterPlotProjector.class);
for(ScatterPlotProjector<?> p : IterableUtil.fromIterator(ps)) {
final VisualizationTask task = new VisualizationTask(NAME_EID, rep, p.getRelation(), this);
task.put(VisualizationTask.META_TOOL, true);
baseResult.getHierarchy().add(rep, task);
baseResult.getHierarchy().add(p, task);
}
}
}