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
ConstructorsConstructorDescriptionHtsgetPOSTRequest(URI endpoint) Construct an HtsgetRequest from a URI identifying a valid resource on a htsget server -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInterval(Locatable interval) voidaddIntervals(Collection<Locatable> intervals) protected HttpURLConnectionmjson.JsonvoidsetInterval(Locatable interval) toURI()Convert request to a URI which can be used to make http request for data blocksvoidValidates 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:
setIntervalin classHtsgetRequest
-
addInterval
-
addIntervals
-
withFormat
- Overrides:
withFormatin classHtsgetRequest
-
withDataClass
- Overrides:
withDataClassin classHtsgetRequest
-
withInterval
- Overrides:
withIntervalin classHtsgetRequest
-
withIntervals
-
withField
- Overrides:
withFieldin classHtsgetRequest
-
withFields
- Overrides:
withFieldsin classHtsgetRequest
-
withTag
- Overrides:
withTagin classHtsgetRequest
-
withTags
- Overrides:
withTagsin classHtsgetRequest
-
withNotag
- Overrides:
withNotagin classHtsgetRequest
-
withNotags
- Overrides:
withNotagsin classHtsgetRequest
-
validateRequest
public void validateRequest()Description copied from class:HtsgetRequestValidates that the user query obeys htsget spec- Overrides:
validateRequestin classHtsgetRequest
-
toURI
Description copied from class:HtsgetRequestConvert request to a URI which can be used to make http request for data blocks- Overrides:
toURIin classHtsgetRequest
-
queryBody
public mjson.Json queryBody() -
getConnection
- Overrides:
getConnectionin classHtsgetRequest
-