Converters { public static Collection<Node> makeValueNodes( Iterator<?> iter, PrefixMapping prefixMapping ) { if (iter == null || !iter.hasNext()) { return null; } final List<Node> values = new ArrayList<Node>(); while (iter.hasNext()) { final Object o = iter.next(); if (o == null) { values.add( null ); } else { values.add( makeNode( o, prefixMapping )); } } return values; } private  Converters(); static Node checkVar(Node n ); static Node makeLiteral(Object o); static Node makeLiteral(String value, String typeUri); static Node makeNode(Object o, PrefixMapping pMapping); static Object makeNodeOrPath(Object o, PrefixMapping pMapping); static Var makeVar(Object o); static String quoted(String q); static Collection<Node> makeValueNodes( Iterator<?> iter, PrefixMapping prefixMapping );  }
@Test public void makeValueNodesTest() { PrefixMapping pMap = PrefixMapping.Factory.create(); pMap.setNsPrefixes(PrefixMapping.Standard ); List<Object> list = new ArrayList<Object>(); list.add( null); list.add( RDF.type ); Node n2 = NodeFactory.createBlankNode(); list.add( n2 ); pMap.setNsPrefix("demo", "http: list.add( "demo:type" ); list.add( "<one>" ); list.add( Integer.MAX_VALUE ); Collection<Node> result = Converters.makeValueNodes(list.iterator(), pMap); assertTrue( result.contains( null )); assertTrue( result.contains( RDF.type.asNode())); assertTrue( result.contains( n2 )); assertTrue( result.contains(NodeFactory.createURI("http: assertTrue( result.contains(NodeFactory.createURI("one"))); }