org.openanzo.model.impl.query
Class QueryEncoder

java.lang.Object
  extended by org.openanzo.model.impl.query.QueryEncoder

public class QueryEncoder
extends java.lang.Object

Encodes a Literal for use in a SPARQL query.

Author:
Joe Betz

Constructor Summary
QueryEncoder()
           
 
Method Summary
static java.lang.String encodeForQuery(java.lang.String literalString)
          Encodes a String instance of the xsd:String type for use in SPARQL.
static java.lang.String encodeForQuery(org.openrdf.model.Value value)
          Encapsulate Value into string representation valid for SPARQL query
static java.lang.String encodeRegex(java.lang.String literal)
          Encode literal string that might contain regex expressions with escaped version of string
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryEncoder

public QueryEncoder()
Method Detail

encodeForQuery

public static java.lang.String encodeForQuery(org.openrdf.model.Value value)
Encapsulate Value into string representation valid for SPARQL query

Parameters:
value - Value to convert
Returns:
String representation of value

encodeRegex

public static java.lang.String encodeRegex(java.lang.String literal)
Encode literal string that might contain regex expressions with escaped version of string

Parameters:
literal - string to encode with escaped values
Returns:
literal string encoded with escaped values

encodeForQuery

public static java.lang.String encodeForQuery(java.lang.String literalString)
Encodes a String instance of the xsd:String type for use in SPARQL.

Parameters:
literalString - string to encode with escaped values
Returns:
literal string encoded with escaped values


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.