### Question:
NodeDictionary { public static String nodeToStr(Node node, PrefixMapping map) { if(node.isURI()) { return map.expandPrefix(node.getURI()); } else { return nodeToStr(node); } } NodeDictionary(Dictionary dictionary); Node getNode(HDTId hdtid); Node getNode(long l, TripleComponentRole role); long getIntID(Node node, TripleComponentRole role); long getIntID(Node node, PrefixMapping map, TripleComponentRole role); long getIntID(String str, TripleComponentRole role); static String nodeToStr(Node node, PrefixMapping map); static String nodeToStr(Node node); TripleID getTripleID(Triple triple, PrefixMapping map); TripleID getTriplePatID(Triple jenaTriple); static PrefixMapping getMapping(ExecutionContext ctx); static final Var asVar(Node node); static long translate(NodeDictionary dictionary, HDTId id, TripleComponentRole role);  }### Answer:
@Test public void testLang() { RDFNode object = ResourceFactory.createLangLiteral("Hello", "en"); String s = NodeDictionary.nodeToStr(object.asNode()); System.out.println(s); assertEquals("\"Hello\"@en", s); }
@Test public void testNormal() { RDFNode object = ResourceFactory.createPlainLiteral("Hello"); String s = NodeDictionary.nodeToStr(object.asNode()); System.out.println(s); assertEquals("\"Hello\"", s); }
@Test public void testTyped() { System.out.println(); XSDDatatype type = XSDDatatype.XSDnonNegativeInteger; RDFNode object = ResourceFactory.createTypedLiteral("2", type); String s = NodeDictionary.nodeToStr(object.asNode()); System.out.println(s); assertEquals("\"2\"^^<http: }