case PREFIXED_NAME :
if ( pmap == null )
return Node.createURI("urn:prefixed-name:"+tokenImage+":"+tokenImage2) ;
String x = pmap.expand(tokenImage, tokenImage2) ;
if ( x == null )
throw new RiotException("Can't expand prefixed name: "+this) ;
return Node.createURI(x) ;
case DECIMAL : return Node.createLiteral(tokenImage, null, XSDDatatype.XSDdecimal) ;
case DOUBLE : return Node.createLiteral(tokenImage, null, XSDDatatype.XSDdouble) ;
case INTEGER: return Node.createLiteral(tokenImage, null, XSDDatatype.XSDinteger) ;
case LITERAL_DT :
{
if ( pmap == null && getSubToken().hasType(TokenType.PREFIXED_NAME) )
// Must be able to resolve the datattype else we can't find it's datatype.
throw new RiotException("Invalid token: "+this) ;
Node n = getSubToken().asNode(pmap);
if ( ! n.isURI() )
throw new RiotException("Invalid token: "+this) ;
RDFDatatype dt = TypeMapper.getInstance().getSafeTypeByName(n.getURI()) ;
return Node.createLiteral(tokenImage, null, dt) ;
}
case LITERAL_LANG : return Node.createLiteral(tokenImage, tokenImage2, null) ;
case STRING: