On 11/01/2017 15:59, A. Soroka wrote:
> Perhaps parse it as a Jena Literal (e.g. using 
> ResourceFactory.createTypedLiteral() ), then use Literal.getString() to get 
> the value you seek.

then I need to know the type. The issue is that I wanted to know if
there is any Jena function that directly parses the literal in the
Turtle (or any other) form and get the object type.

> ---
> A. Soroka
> The University of Virginia Library
> 
>> On Jan 11, 2017, at 9:55 AM, George News <george.n...@gmx.net> wrote:
>>
>> Hi,
>>
>> I have this literal:
>> http://hola^^http://www.w3.org/2001/XMSchema#anyURI
>>
>> And I want to create a URI from it. Is there any way to do so?
>>
>> I have tried
>> URI z = (URI) XSDDatatype.XSDanyURI.parseValidated(literalString);
>>
>> but I get:
>> java.lang.ClassCastException: java.lang.String cannot be cast to
>> java.net.URI
>>
>> I don't know if I should take the shortcut, that is, remove everything
>> after ^^ using substring, and then URI.create(shortenedLiteralString).
>>
>> Any help is welcome.
>> Jorge
> 
> 

Reply via email to