Class OslcQueryResult

  • All Implemented Interfaces:
    Iterator<OslcQueryResult>

    public class OslcQueryResult
    extends Object
    implements 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 Detail

      • DEFAULT_MEMBER_PROPERTY

        public static final org.apache.jena.rdf.model.Property DEFAULT_MEMBER_PROPERTY
        The default member property to look for in OSLC query results (rdfs:member). Can be changed using setMemberProperty(String).
      • SELECT_ANY_MEMBER

        public static final 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:
        Constant Field Values
    • Constructor Detail

      • OslcQueryResult

        public OslcQueryResult​(OslcQuery query,
                               javax.ws.rs.core.Response response)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface Iterator<OslcQueryResult>
        Returns:
        whether there is another page of results after this
      • getMemberProperty

        public String getMemberProperty()
        Returns the member property to find query result resources.
        Returns:
        the member property URI
        See Also:
        setMemberProperty(String)
      • setMemberProperty

        public void setMemberProperty​(String memberPredicate)
        Sets the predicate to use to find query result resources. If unset, defaults to http://www.w3.org/2000/01/rdf-schema#member.
        Parameters:
        memberPredicate - the RDF predicate for member resources from the provider's query shape
        See Also:
        Specifying the sahpe of a query
      • getRawResponse

        public javax.ws.rs.core.Response getRawResponse()
        Get the raw Wink client response to a query. 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

        public String[] 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

        public <T> Iterable<T> getMembers​(Class<T> clazz)
        Return the enumeration of queried results from this page
        Returns:
        member statements from current page.
      • getMembers

        public Iterable<org.apache.jena.rdf.model.Resource> getMembers()
        Return the enumeration of queried results from this page
        Returns:
        member statements from current page.