|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.lyo.core.query.QueryUtils
public class QueryUtils
Utility methods for parsing various OSLC HTTP query parameter clauses; e.g. oslc.where
Field Summary | |
---|---|
static Properties |
WILDCARD_PROPERTY_LIST
A property list that selects all properties |
Constructor Summary | |
---|---|
QueryUtils()
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Properties WILDCARD_PROPERTY_LIST
Constructor Detail |
---|
public QueryUtils()
Method Detail |
---|
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 expression
ParseException
public 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 URLs
ParseException
public 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 URLs
ParseException
public 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 URLs
ParseException
public 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 URLs
ParseException
public 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_WILDCARD
- if all
properties at this level are to be output. No recursion
below this level is to be done.OSLC4JConstants.OSL4J_PROPERTY_SINGLETON
- if only
the named property is to be output, without recursion
properties
-
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
parameter
ParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |