logger.debug("compute the steiner tree from the alignment tree with input nodes as steiner nodes ...");
UndirectedGraph<Node, LabeledLink> undirectedGraph =
new AsUndirectedGraph<Node, LabeledLink>(treeModel);
List<Node> steinerNodes = inputNodes;
SteinerTree steinerTree = new SteinerTree(GraphUtil.asDefaultGraph(undirectedGraph), steinerNodes);
Model m = new Model("inputModel");
if (steinerTree == null || steinerTree.getLabeledSteinerTree() == null)
return m;
for (Node n : steinerTree.getLabeledSteinerTree().vertexSet()) {
inputModelVertexes.add(n.getId());
if (n instanceof ColumnNode || n instanceof LiteralNode)
continue;
if (vertexIdToArgument.get(n.getId()) == null)
continue;
Label classPredicate = new Label(n.getLabel().getUri(), n.getLabel().getNs(), n.getLabel().getPrefix());
ClassAtom classAtom = new ClassAtom(classPredicate, vertexIdToArgument.get(n.getId()));
m.getAtoms().add(classAtom);
}
for (LabeledLink e : steinerTree.getLabeledSteinerTree().edgeSet()) {
inputModelEdges.add(e.getId());
if (vertexIdToArgument.get(e.getSource().getId()) == null ||
vertexIdToArgument.get(e.getTarget().getId()) == null)