### Question:
RDFUtils { public static SingleDTGraph statements2Graph(Set<Statement> stmts, int literalOption, List<Resource> instances, boolean simplifyInstanceNodes) { List<DTNode<String,String>> instanceNodes = new ArrayList<DTNode<String,String>>(); DTGraph<String,String> graph = new LightDTGraph<String,String>(); Map<String, DTNode<String,String>> nodeMap = new HashMap<String, DTNode<String,String>>(); for (Resource instance : instances) { if (simplifyInstanceNodes) { nodeMap.put(instance.toString(), graph.add(KernelUtils.ROOTID)); } else { nodeMap.put(instance.toString(), graph.add(instance.toString())); } instanceNodes.add(nodeMap.get(instance.toString())); } for (Statement s : stmts) { if (s.getObject() instanceof Literal && literalOption != NO_LITERALS) { if (literalOption == REGULAR_LITERALS) { addStatement(graph, s, false, false, nodeMap); } if (literalOption == REGULAR_SPLIT_LITERALS) { addStatement(graph, s, false, true, nodeMap); } if (literalOption == REPEAT_LITERALS) { addStatement(graph, s, true, false, nodeMap); } if (literalOption == REPEAT_SPLIT_LITERALS) { addStatement(graph, s, true, true, nodeMap); } } else if (!(s.getObject() instanceof Literal)){ addStatement(graph, s, false, false, nodeMap); } } return new SingleDTGraph(graph, instanceNodes); }  static GraphList<DTGraph<ApproxStringLabel,ApproxStringLabel>> getSubGraphsApproxStringLabel(DTGraph<String,String> graph, List<DTNode<String,String>> instances, int depth); static GraphList<DTGraph<String,String>> getSubGraphs(DTGraph<String,String> graph, List<DTNode<String,String>> instances, int depth); static GraphList<DTGraph<ApproxStringLabel,ApproxStringLabel>> getSubTreesApproxStringLabel(DTGraph<String,String> graph, List<DTNode<String,String>> instances, int depth); static GraphList<DTGraph<String,String>> getSubTrees(DTGraph<String,String> graph, List<DTNode<String,String>> instances, int depth); static SingleDTGraph blankLabels(SingleDTGraph graph); static DTGraph<String,String> simplifyInstanceNodeLabels(DTGraph<String,String> oldGraph, List<DTNode<String,String>> instanceNodes); static List<DTNode<String,String>> findInstances(DTGraph<String,String> graph, List<Resource> instances); static SingleDTGraph statements2Graph(Set<Statement> stmts, int literalOption, List<Resource> instances, boolean simplifyInstanceNodes); static DTGraph<String,String> statements2Graph(Set<Statement> stmts, int literalOption); static Set<Statement> getStatements4Depth(RDFDataSet ts, List<Resource> instances, int depth, boolean inference); static final int NO_LITERALS; static final int REPEAT_LITERALS; static final int REGULAR_LITERALS; static final int REPEAT_SPLIT_LITERALS; static final int REGULAR_SPLIT_LITERALS; }### Answer:
@Test public void test() { RDFDataSet tripleStore = new RDFFileDataSet(AIFB_FILE, RDFFormat.N3); DTGraph<String,String> graph = RDFUtils.statements2Graph(new HashSet<Statement>(tripleStore.getFullGraph()), RDFUtils.REGULAR_SPLIT_LITERALS); for (DTNode<String,String> n : graph.nodes()) { System.out.println(n); } }