Class TPFResponseImpl
java.lang.Object
se.liu.ida.hefquin.engine.federation.access.impl.response.DataRetrievalResponseBase<Iterable<Triple>>
se.liu.ida.hefquin.engine.federation.access.impl.response.TPFResponseImpl
- All Implemented Interfaces:
 DataRetrievalResponse<Iterable<Triple>>,TPFResponse,TriplesResponse
public class TPFResponseImpl
extends DataRetrievalResponseBase<Iterable<Triple>>
implements TPFResponse
- 
Field Summary
FieldsFields inherited from class se.liu.ida.hefquin.engine.federation.access.impl.response.DataRetrievalResponseBase
data, errorDescription, errorStatusCode - 
Constructor Summary
ConstructorsConstructorDescriptionTPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, int tripleCount, FederationMember fm, DataRetrievalRequest request, Date requestStartTime) Constructs a response with the given matching triples, metadata triples, next page URL, triple count, federation member, request, and request start time.TPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, int tripleCount, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Integer errorStatusCode, String errorDescription) Constructs a response with the given matching triples, metadata triples, next page URL, triple count, federation member, request, request start time, and error details.TPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, int tripleCount, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Date retrievalEndTime) Constructs a response with the given matching triples, metadata triples, next page URL, triple count, federation member, request, request start time, and retrieval end time.TPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, int tripleCount, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Date retrievalEndTime, Integer errorStatusCode, String errorDescription) Constructs a response with the given matching triples, metadata triples, next page URL, triple count, federation member, request, request start time, retrieval end time, and error details.TPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, FederationMember fm, DataRetrievalRequest request, Date requestStartTime) Constructs a response with the given matching triples, metadata triples, next page URL, federation member, request, and request start time.TPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, int errorStatusCode, String errorDescription) Constructs a response with the given matching triples, metadata triples, next page URL, federation member, request, request start time, and error details.TPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Date retrievalEndTime) Constructs a response with the given matching triples, metadata triples, next page URL, federation member, request, request start time, and retrieval end time.TPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Date retrievalEndTime, Integer errorStatusCode, String errorDescription) Constructs a response with the given matching triples, metadata triples, next page URL, federation member, request, request start time, retrieval end time, and error details. - 
Method Summary
Modifier and TypeMethodDescriptionReturns the cardinality estimate provided as metadata in the given TPF response.Returns an iterator over all metadata triples contained in the given TPF response.Returns the URL via which the next page of the TPF can be requested.Returns an iterator over the matched triples in the TPF response.Returns an iterator over all triples contained in the TPF response, concatenating the payload and metadata into a single iterable.Returnstrueif the metadata of the given TPF response indicates that this response is the last page of matching triples.Methods inherited from class se.liu.ida.hefquin.engine.federation.access.impl.response.DataRetrievalResponseBase
getErrorDescription, getErrorStatusCode, getFederationMember, getRequest, getRequestStartTime, getRetrievalEndTimeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface se.liu.ida.hefquin.engine.federation.access.DataRetrievalResponse
getErrorDescription, getErrorStatusCode, getFederationMember, getRequest, getRequestDuration, getRequestStartTime, getRetrievalEndTime, isErrorMethods inherited from interface se.liu.ida.hefquin.engine.federation.access.TPFResponse
getMetadataSize, getPayloadSize, getSize 
- 
Field Details
- 
metadataTriples
 - 
cardEstimate
 - 
nextPageURL
 
 - 
 - 
Constructor Details
- 
TPFResponseImpl
public TPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, FederationMember fm, DataRetrievalRequest request, Date requestStartTime) Constructs a response with the given matching triples, metadata triples, next page URL, federation member, request, and request start time. The retrieval end time is automatically set to the current time at the moment of construction. This constructor assumes no error occurred.- Parameters:
 matchingTriples- the list of triples matching the request pattern (must not be null)metadataTriples- the list of metadata triples (must not be null)nextPageURL- the URL for the next page of results, ornullif there is nonefm- the federation member from which the data was retrievedrequest- the original data retrieval requestrequestStartTime- the timestamp when the request started
 - 
TPFResponseImpl
public TPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Date retrievalEndTime) Constructs a response with the given matching triples, metadata triples, next page URL, federation member, request, request start time, and retrieval end time. This constructor assumes no error occurred.- Parameters:
 matchingTriples- the list of triples matching the request pattern (must not be null)metadataTriples- the list of metadata triples (must not be null)nextPageURL- the URL for the next page of results, ornullif there is nonefm- the federation member from which the data was retrievedrequest- the original data retrieval requestrequestStartTime- the timestamp when the request startedretrievalEndTime- the time at which the retrieval of this response was completed (must not benull)
 - 
TPFResponseImpl
public TPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, int tripleCount, FederationMember fm, DataRetrievalRequest request, Date requestStartTime) Constructs a response with the given matching triples, metadata triples, next page URL, triple count, federation member, request, and request start time. The retrieval end time is automatically set to the current time at the moment of construction. This constructor assumes no error occurred.- Parameters:
 matchingTriples- the list of triples matching the request pattern (must not be null)metadataTriples- the list of metadata triples (must not be null)nextPageURL- the URL for the next page of results, ornullif there is nonetripleCount- the triple countfm- the federation member from which the data was retrievedrequest- the original data retrieval requestrequestStartTime- the timestamp when the request started
 - 
TPFResponseImpl
public TPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, int tripleCount, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Date retrievalEndTime) Constructs a response with the given matching triples, metadata triples, next page URL, triple count, federation member, request, request start time, and retrieval end time. This constructor assumes no error occurred.- Parameters:
 matchingTriples- the list of triples matching the request pattern (must not be null)metadataTriples- the list of metadata triples (must not be null)nextPageURL- the URL for the next page of results, ornullif there is nonetripleCount- the triple countfm- the federation member from which the data was retrievedrequest- the original data retrieval requestrequestStartTime- the timestamp when the request startedretrievalEndTime- the time at which the retrieval of this response was completed (must not benull)
 - 
TPFResponseImpl
public TPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, int errorStatusCode, String errorDescription) Constructs a response with the given matching triples, metadata triples, next page URL, federation member, request, request start time, and error details. The retrieval end time is automatically set to the current time at the moment of construction.- Parameters:
 matchingTriples- the list of triples matching the request pattern (must not be null)metadataTriples- the list of metadata triples (must not be null)nextPageURL- the URL for the next page of results, ornullif there is nonefm- the federation member from which the data was retrievedrequest- the original data retrieval requestrequestStartTime- the timestamp when the request startederrorStatusCode- the HTTP status code representing an error, ornullif no error occurrederrorDescription- a short description of the error, ornullif no error occurred
 - 
TPFResponseImpl
public TPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Date retrievalEndTime, Integer errorStatusCode, String errorDescription) Constructs a response with the given matching triples, metadata triples, next page URL, federation member, request, request start time, retrieval end time, and error details.- Parameters:
 matchingTriples- the list of triples matching the request pattern (must not be null)metadataTriples- the list of metadata triples (must not be null)nextPageURL- the URL for the next page of results, ornullif there is nonefm- the federation member from which the data was retrievedrequest- the original data retrieval requestrequestStartTime- the timestamp when the request startedretrievalEndTime- the time at which the retrieval of this response was completed (must not benull)errorStatusCode- the HTTP status code representing an error, ornullif no error occurrederrorDescription- a short description of the error, ornullif no error occurred
 - 
TPFResponseImpl
public TPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, int tripleCount, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Integer errorStatusCode, String errorDescription) Constructs a response with the given matching triples, metadata triples, next page URL, triple count, federation member, request, request start time, and error details. The retrieval end time is automatically set to the current time at the moment of construction.- Parameters:
 matchingTriples- the list of triples matching the request pattern (must not be null)metadataTriples- the list of metadata triples (must not be null)nextPageURL- the URL for the next page of results, ornullif there is nonetripleCount- the triple countfm- the federation member from which the data was retrievedrequest- the original data retrieval requestrequestStartTime- the timestamp when the request startederrorStatusCode- the HTTP status code representing an error, ornullif no error occurrederrorDescription- a short description of the error, ornullif no error occurred
 - 
TPFResponseImpl
public TPFResponseImpl(List<Triple> matchingTriples, List<Triple> metadataTriples, String nextPageURL, int tripleCount, FederationMember fm, DataRetrievalRequest request, Date requestStartTime, Date retrievalEndTime, Integer errorStatusCode, String errorDescription) Constructs a response with the given matching triples, metadata triples, next page URL, triple count, federation member, request, request start time, retrieval end time, and error details.- Parameters:
 matchingTriples- the list of triples matching the request pattern (must not be null)metadataTriples- the list of metadata triples (must not be null)nextPageURL- the URL for the next page of results, ornullif there is nonetripleCount- the triple countfm- the federation member from which the data was retrievedrequest- the original data retrieval requestrequestStartTime- the timestamp when the request startedretrievalEndTime- the time at which the retrieval of this response was completed (must not benull)errorStatusCode- the HTTP status code representing an error, ornullif no error occurrederrorDescription- a short description of the error, ornullif no error occurred
 
 - 
 - 
Method Details
- 
getMetadata
Description copied from interface:TPFResponseReturns an iterator over all metadata triples contained in the given TPF response.- Specified by:
 getMetadatain interfaceTPFResponse
 - 
isLastPage
Description copied from interface:TPFResponseReturnstrueif the metadata of the given TPF response indicates that this response is the last page of matching triples. Returnsnullof there is no metadata related to paging.- Specified by:
 isLastPagein interfaceTPFResponse
 - 
getNextPageURL
Description copied from interface:TPFResponseReturns the URL via which the next page of the TPF can be requested. Returnsnullof no such URL is mentioned in the metadata.- Specified by:
 getNextPageURLin interfaceTPFResponse
 - 
getCardinalityEstimate
Description copied from interface:TPFResponseReturns the cardinality estimate provided as metadata in the given TPF response. Returnsnullif there is no metadata with a cardinality estimate.- Specified by:
 getCardinalityEstimatein interfaceTPFResponse
 - 
getResponseData
Returns an iterator over all triples contained in the TPF response, concatenating the payload and metadata into a single iterable.- Specified by:
 getResponseDatain interfaceDataRetrievalResponse<Iterable<Triple>>- Overrides:
 getResponseDatain classDataRetrievalResponseBase<Iterable<Triple>>- Returns:
 - the data retrieved in this response
 - Throws:
 UnsupportedOperationDueToRetrievalError
 - 
getPayload
Returns an iterator over the matched triples in the TPF response.- Specified by:
 getPayloadin interfaceTPFResponse- Throws:
 UnsupportedOperationDueToRetrievalError
 
 -