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
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected HtsgetClassprotected final EnumSet<HtsgetRequestField>protected HtsgetFormatprotected Locatableprotected static final Stringstatic final Interval -
Constructor Summary
ConstructorsConstructorDescriptionHtsgetRequest(URI endpoint) Construct an HtsgetRequest from a URI identifying a valid resource on a htsget server -
Method Summary
Modifier and TypeMethodDescriptionvoidaddField(HtsgetRequestField field) voidaddFields(Collection<HtsgetRequestField> fields) voidvoidaddNotags(Collection<String> notags) voidvoidaddTags(Collection<String> tags) protected HttpURLConnectionAttempt to make htsget request and return response if there are no errorsgetTags()voidsetDataClass(HtsgetClass dataClass) voidsetFormat(HtsgetFormat format) voidsetInterval(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) 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
-