Package htsjdk.samtools.util.htsget
Class HtsgetRequest
java.lang.Object
htsjdk.samtools.util.htsget.HtsgetRequest
- Direct Known Subclasses:
HtsgetPOSTRequest
Builder for an htsget GET request that allows opening a connection
using the request after validating that it is properly formed.
This class currently supports version 1.2.0 of the spec as defined in https://samtools.github.io/hts-specs/htsget.html
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected HtsgetClass
protected final EnumSet<HtsgetRequestField>
protected HtsgetFormat
protected Locatable
protected static final String
static final Interval
-
Constructor Summary
ConstructorDescriptionHtsgetRequest
(URI endpoint) Construct an HtsgetRequest from a URI identifying a valid resource on a htsget server -
Method Summary
Modifier and TypeMethodDescriptionvoid
addField
(HtsgetRequestField field) void
addFields
(Collection<HtsgetRequestField> fields) void
void
addNotags
(Collection<String> notags) void
void
addTags
(Collection<String> tags) protected HttpURLConnection
Attempt to make htsget request and return response if there are no errorsgetTags()
void
setDataClass
(HtsgetClass dataClass) void
setFormat
(HtsgetFormat format) void
setInterval
(Locatable interval) toURI()
Convert request to a URI which can be used to make http request for data blocksvoid
Validates that the user query obeys htsget specwithDataClass
(HtsgetClass dataClass) withField
(HtsgetRequestField field) withFields
(Collection<HtsgetRequestField> fields) withFormat
(HtsgetFormat format) withInterval
(Locatable interval) withNotags
(Collection<String> notags) withTags
(Collection<String> tags)
-
Field Details
-
UNMAPPED_UNPLACED_INTERVAL
-
PROTOCOL_VERSION
- See Also:
-
ACCEPT_TYPE
- See Also:
-
format
-
dataClass
-
interval
-
fields
-
tags
-
notags
-
-
Constructor Details
-
HtsgetRequest
Construct an HtsgetRequest from a URI identifying a valid resource on a htsget server- Parameters:
endpoint
- the full URI including both server path and the ID of the htsget resource, without the filtering parameters defined in the htsget spec such as start or referenceName
-
-
Method Details
-
getEndpoint
-
getFormat
-
getDataClass
-
getInterval
-
getFields
-
getTags
-
getNoTags
-
setFormat
-
setDataClass
-
setInterval
-
addField
-
addFields
-
addTag
-
addTags
-
addNotag
-
addNotags
-
withFormat
-
withDataClass
-
withInterval
-
withField
-
withFields
-
withTag
-
withTags
-
withNotag
-
withNotags
-
validateRequest
public void validateRequest()Validates that the user query obeys htsget spec -
toURI
Convert request to a URI which can be used to make http request for data blocks -
getConnection
-
getResponse
Attempt to make htsget request and return response if there are no errors- Returns:
- the response from the htsget server if request is successful as an HtsgetResponse object
-