Dave wrote:
> On 21/02/12 14:33, Dick Murray wrote:
> > Hello all.
> >
> > I'm looking for a LiteralFactory.createLiteral(String v, String
> > language) equivalent. I know Model has a createLiteral(String v, String
> > language) but I don't have a Model at the point I need to create the
> > Literal. I've followed the Model createLiteral but either got lost or
> > confused or both!
>
> Looks like an omission from ResourceFactory.
>
> Possibly worth a Jira.
>
> As a work around you could do something like:
>
> public Literal createLangLiteral(String lex, String lang) {
> return new LiteralImpl( Node.createLiteral(lex, lang, null), null);
> }
Another workaround is to have a static empty Model lying around,
and ask it to create the literal.
Chris
--
"I know it was late, but Mountjoy never bothers, /Archer's Goon/
so long as it's the full two thousand words."
Epimorphics Ltd, http://www.epimorphics.com
Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT
Epimorphics Ltd. is a limited company registered in England (number 7016688)