Package org.eclipse.lyo.client.query
Class OslcQueryResult
java.lang.Object
org.eclipse.lyo.client.query.OslcQueryResult
- All Implemented Interfaces:
Iterator<OslcQueryResult>
The results of an OSLC query. If the query was paged, subsequent pages can be retrieved using
the Iterator interface.
This class is not currently thread safe.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOslcQueryResult(OslcQuery query, Response response) Deprecated.OslcQueryResult(OslcQuery query, InputStream inputStream) -
Method Summary
Modifier and TypeMethodDescriptionReturns the member property to find query result resources.Return the enumeration of queried results from this page<T> Iterable<T> getMembers(Class<T> clazz) Return the enumeration of queried results from this pageString[]Return the subject URLs of the query response.getQuery()Deprecated.Get the raw Jakarta REST response to a query - if such a response was provided when creating this instance.booleanhasNext()next()voidremove()voidsetMemberProperty(String memberPredicate) Sets the predicate to use to find query result resources.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
DEFAULT_MEMBER_PROPERTY
The default member property to look for in OSLC query results (rdfs:member). Can be changed usingsetMemberProperty(String). -
SELECT_ANY_MEMBER
If system property "org.eclipse.lyo.client.oslc.query.selectAnyMember" is set to true, find any member in the- See Also:
-
-
Constructor Details
-
OslcQueryResult
Deprecated.UseOslcQueryResult(OslcQuery, InputStream)instead. -
OslcQueryResult
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<OslcQueryResult>- Returns:
- whether there is another page of results after this
-
next
- Specified by:
nextin interfaceIterator<OslcQueryResult>- Returns:
- the next page of results
-
remove
public void remove()- Specified by:
removein interfaceIterator<OslcQueryResult>- Throws:
UnsupportedOperationException- always
-
getQuery
-
getMemberProperty
Returns the member property to find query result resources.- Returns:
- the member property URI
- See Also:
-
setMemberProperty
Sets the predicate to use to find query result resources. If unset, defaults tohttp://www.w3.org/2000/01/rdf-schema#member.- Parameters:
memberPredicate- the RDF predicate for member resources from the provider's query shape- See Also:
-
getRawResponse
Deprecated.Get the raw Jakarta REST response to a query - if such a response was provided when creating this instance.NOTE: Using this method and consuming the response will make other methods which examine the response unavailable (Examples: getMemberUrls(), next() and hasNext()). When this method is invoked, the consumer is responsible for OSLC page processing
- Returns:
-
getMembersUrls
Return the subject URLs of the query response. The URLs are the location of all artifacts which satisfy the query conditions.NOTE: Using this method consumes the query response and makes other methods which examine the response unavailable (Example: getRawResponse().
- Returns:
-
getMembers
Return the enumeration of queried results from this page- Returns:
- member statements from current page.
-
getMembers
Return the enumeration of queried results from this page- Returns:
- member statements from current page.
-
OslcQueryResult(OslcQuery, InputStream)instead.