Package htsjdk.samtools.util.htsget
Class HtsgetPOSTRequest
java.lang.Object
htsjdk.samtools.util.htsget.HtsgetRequest
htsjdk.samtools.util.htsget.HtsgetPOSTRequest
Builder for an htsget POST request that allows opening a connection
using the request after validating that it is properly formed.
This class is experimental and subject to change as the POST api evolves.
See https://github.com/samtools/hts-specs/pull/285 for the API specification.
-
Field Summary
Fields inherited from class htsjdk.samtools.util.htsget.HtsgetRequest
ACCEPT_TYPE, dataClass, fields, format, interval, notags, PROTOCOL_VERSION, tags, UNMAPPED_UNPLACED_INTERVAL
-
Constructor Summary
ConstructorDescriptionHtsgetPOSTRequest
(URI endpoint) Construct an HtsgetRequest from a URI identifying a valid resource on a htsget server -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInterval
(Locatable interval) void
addIntervals
(Collection<Locatable> intervals) protected HttpURLConnection
org.json.JSONObject
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) withIntervals
(Collection<Locatable> intervals) withNotags
(Collection<String> notags) withTags
(Collection<String> tags) Methods inherited from class htsjdk.samtools.util.htsget.HtsgetRequest
addField, addFields, addNotag, addNotags, addTag, addTags, getDataClass, getEndpoint, getFields, getFormat, getInterval, getNoTags, getResponse, getTags, setDataClass, setFormat
-
Constructor Details
-
HtsgetPOSTRequest
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
-
HtsgetPOSTRequest
-
-
Method Details
-
setInterval
- Overrides:
setInterval
in classHtsgetRequest
-
addInterval
-
addIntervals
-
withFormat
- Overrides:
withFormat
in classHtsgetRequest
-
withDataClass
- Overrides:
withDataClass
in classHtsgetRequest
-
withInterval
- Overrides:
withInterval
in classHtsgetRequest
-
withIntervals
-
withField
- Overrides:
withField
in classHtsgetRequest
-
withFields
- Overrides:
withFields
in classHtsgetRequest
-
withTag
- Overrides:
withTag
in classHtsgetRequest
-
withTags
- Overrides:
withTags
in classHtsgetRequest
-
withNotag
- Overrides:
withNotag
in classHtsgetRequest
-
withNotags
- Overrides:
withNotags
in classHtsgetRequest
-
validateRequest
public void validateRequest()Description copied from class:HtsgetRequest
Validates that the user query obeys htsget spec- Overrides:
validateRequest
in classHtsgetRequest
-
toURI
Description copied from class:HtsgetRequest
Convert request to a URI which can be used to make http request for data blocks- Overrides:
toURI
in classHtsgetRequest
-
queryBody
public org.json.JSONObject queryBody() -
getConnection
- Overrides:
getConnection
in classHtsgetRequest
-