org.openrdf.query.parser.sparql
Class SPARQLUtil

java.lang.Object
  extended by org.openrdf.query.parser.sparql.SPARQLUtil

public class SPARQLUtil
extends Object

SPARQL-related utility methods.

Author:
Arjohn Kampman

Constructor Summary
SPARQLUtil()
           
 
Method Summary
static String decodeString(String s)
          Decodes an encoded SPARQL string.
static String encodeString(String s)
          Encodes the supplied string for inclusion as a 'normal' string in a SPARQL query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPARQLUtil

public SPARQLUtil()
Method Detail

encodeString

public static String encodeString(String s)
Encodes the supplied string for inclusion as a 'normal' string in a SPARQL query.


decodeString

public static String decodeString(String s)
Decodes an encoded SPARQL string. Any \-escape sequences are substituted with their decoded value.

Parameters:
s - An encoded SPARQL string.
Returns:
The unencoded string.
Throws:
IllegalArgumentException - If the supplied string is not a correctly encoded SPARQL string.


Copyright © 2001-2008 Aduna. All Rights Reserved.