public class QueryUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static Properties |
WILDCARD_PROPERTY_LIST
A property list that selects all properties
|
| Constructor and Description |
|---|
QueryUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,Object> |
invertSelectedProperties(Properties properties)
Create a map representation of the
Properties returned
from parsing oslc.properties or olsc.select URL query
parameters suitable for generating a property result from an
HTTP GET request. |
static OrderByClause |
parseOrderBy(String orderByExpression,
Map<String,String> prefixMap)
Parse a oslc.orderBy expression
|
static Map<String,String> |
parsePrefixes(String prefixExpression)
Parse a oslc.prefix clause into a map between prefixes
and corresponding URIs
|
static PropertiesClause |
parseProperties(String propertiesExpression,
Map<String,String> prefixMap)
Parse a oslc.properties expression
|
static SearchTermsClause |
parseSearchTerms(String searchTermsExpression)
Parse a oslc.searchTerms expression
|
static SelectClause |
parseSelect(String selectExpression,
Map<String,String> prefixMap)
Parse a oslc.select expression
|
static WhereClause |
parseWhere(String whereExpression,
Map<String,String> prefixMap)
Parse a oslc.where expression
|
public static final Properties WILDCARD_PROPERTY_LIST
public static Map<String,String> parsePrefixes(String prefixExpression) throws ParseException
Note: Object.toString() of result has been overridden to
return input expression.
prefixExpression - the oslc.prefix expressionParseExceptionpublic static WhereClause parseWhere(String whereExpression, Map<String,String> prefixMap) throws ParseException
whereExpression - contents of an oslc.where HTTP query
parameterprefixMap - map between XML namespace prefixes and
associated URLsParseExceptionpublic static SelectClause parseSelect(String selectExpression, Map<String,String> prefixMap) throws ParseException
selectExpression - contents of an oslc.select HTTP query
parameterprefixMap - map between XML namespace prefixes and
associated URLsParseExceptionpublic static PropertiesClause parseProperties(String propertiesExpression, Map<String,String> prefixMap) throws ParseException
propertiesExpression - contents of an oslc.properties HTTP query
parameterprefixMap - map between XML namespace prefixes and
associated URLsParseExceptionpublic static OrderByClause parseOrderBy(String orderByExpression, Map<String,String> prefixMap) throws ParseException
orderByExpression - contents of an oslc.orderBy HTTP query
parameterprefixMap - map between XML namespace prefixes and
associated URLsParseExceptionpublic static Map<String,Object> invertSelectedProperties(Properties properties)
Properties returned
from parsing oslc.properties or olsc.select URL query
parameters suitable for generating a property result from an
HTTP GET request.The map keys are the property names; i.e. the local name of the property concatenated to the XML namespace of the property. The values of the map are:
OSLC4JConstants.OSL4J_PROPERTY_SINGLETON - if only
the named property is to be output, without recursionproperties - public static SearchTermsClause parseSearchTerms(String searchTermsExpression) throws ParseException
Note: Object.toString() of result has been overridden to
return input expression.
searchTermsExpression - contents of an oslc.searchTerms HTTP query
parameterParseExceptionCopyright © 2016. All rights reserved.