org.molgenis.semanticmapper.service.impl.AlgorithmTemplateServiceImpl Maven / Gradle / Ivy
package org.molgenis.semanticmapper.service.impl;
import static java.util.Objects.requireNonNull;
import static org.molgenis.script.core.ScriptMetadata.SCRIPT;
import static org.molgenis.script.core.ScriptMetadata.TYPE;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Stream;
import org.molgenis.data.DataService;
import org.molgenis.data.meta.model.Attribute;
import org.molgenis.data.support.QueryImpl;
import org.molgenis.js.magma.JsMagmaScriptRunner;
import org.molgenis.script.core.Script;
import org.molgenis.script.core.ScriptParameter;
import org.molgenis.semanticsearch.explain.bean.ExplainedAttribute;
import org.molgenis.semanticsearch.semantic.Hit;
import org.molgenis.semanticsearch.semantic.Hits;
public class AlgorithmTemplateServiceImpl implements AlgorithmTemplateService {
private final DataService dataService;
public AlgorithmTemplateServiceImpl(DataService dataService) {
this.dataService = requireNonNull(dataService);
}
@Override
public Stream find(Hits attrMatches) {
// get all algorithm templates
Stream