Interface TPFResponse
- All Superinterfaces:
DataRetrievalResponse<Iterable<Triple>>,TriplesResponse
- All Known Implementing Classes:
TPFResponseImpl
-
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.default intReturns the number of triples that are returned bygetMetadata().Returns the URL via which the next page of the TPF can be requested.WhileDataRetrievalResponse.getResponseData()returns an iterator over all triples contained in the given TPF response, this method here returns an iterator only over the matching triples that have been requested.default intReturns the number of triples that are returned bygetPayload().default intgetSize()Returns the number of triples contained in this response, which considers both the payload and the metadata.Returnstrueif the metadata of the given TPF response indicates that this response is the last page of matching triples.Methods inherited from interface se.liu.ida.hefquin.federation.access.DataRetrievalResponse
getErrorDescription, getErrorStatusCode, getException, getRequestDuration, getRequestStartTime, getResponseData, getRetrievalEndTime, isDefective, isError
-
Method Details
-
getSize
Returns the number of triples contained in this response, which considers both the payload and the metadata.- Specified by:
getSizein interfaceTriplesResponse- Throws:
UnsupportedOperationDueToRetrievalError- if the response to the corresponding request was an error message (seeDataRetrievalResponse.isError()) or the response is defective (seeDataRetrievalResponse.isDefective()).
-
getPayload
WhileDataRetrievalResponse.getResponseData()returns an iterator over all triples contained in the given TPF response, this method here returns an iterator only over the matching triples that have been requested.- Throws:
UnsupportedOperationDueToRetrievalError- if the response to the corresponding request was an error message (seeDataRetrievalResponse.isError()) or the response is defective (seeDataRetrievalResponse.isDefective()).
-
getPayloadSize
Returns the number of triples that are returned bygetPayload().- Throws:
UnsupportedOperationDueToRetrievalError- if the response to the corresponding request was an error message (seeDataRetrievalResponse.isError()) or the response is defective (seeDataRetrievalResponse.isDefective()).
-
getMetadata
Returns an iterator over all metadata triples contained in the given TPF response.- Throws:
UnsupportedOperationDueToRetrievalError- if the response to the corresponding request was an error message (seeDataRetrievalResponse.isError()) or the response is defective (seeDataRetrievalResponse.isDefective()).
-
getMetadataSize
Returns the number of triples that are returned bygetMetadata().- Throws:
UnsupportedOperationDueToRetrievalError- if the response to the corresponding request was an error message (seeDataRetrievalResponse.isError()) or the response is defective (seeDataRetrievalResponse.isDefective()).
-
isLastPage
Returnstrueif 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.- Throws:
UnsupportedOperationDueToRetrievalError- if the response to the corresponding request was an error message (seeDataRetrievalResponse.isError()) or the response is defective (seeDataRetrievalResponse.isDefective()).
-
getNextPageURL
Returns the URL via which the next page of the TPF can be requested. Returnsnullof no such URL is mentioned in the metadata.- Throws:
UnsupportedOperationDueToRetrievalError- if the response to the corresponding request was an error message (seeDataRetrievalResponse.isError()) or the response is defective (seeDataRetrievalResponse.isDefective()).
-
getCardinalityEstimate
Returns the cardinality estimate provided as metadata in the given TPF response. Returnsnullif there is no metadata with a cardinality estimate.- Throws:
UnsupportedOperationDueToRetrievalError- if the response to the corresponding request was an error message (seeDataRetrievalResponse.isError()) or the response is defective (seeDataRetrievalResponse.isDefective()).
-