Tim,

There's a NodeFactory static:

com.hp.hpl.jena.sparql.util.
NodeFactory.parseNode(String str)

Theer is also the older way Node SSE.parseNode(String) which taps into the SSE [*] parser. SSE is an odd name for this - code ended up there and it just stayed there.

The other way is:

TokenizerFactory.makeTokenizerString("...").next() ;

Tokenizers give varuious ways to handle a stream of tokens. One way is from a string.

        Andy

[*] http://openjena.org/wiki/SSE

On 17/06/11 00:58, Tim Harsch wrote:
If I have text in any of the various supported forms for RDF literals.  What
method can I call to parse that text into a Node_Literal?  It should be able to
recognize the lang tag and the typed literal string and act appropriately.  I've
found NodeFactory.createLiteralNode(String lex, String lang, String datatypeURI)
but it requires you've already parsed the literal into its lexical form, lang
tag and datatypeURI to use...

Thanks,
tim

Reply via email to