public class HtsgetPOSTRequest extends HtsgetRequest
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.
ACCEPT_TYPE, dataClass, fields, format, interval, notags, PROTOCOL_VERSION, tags, UNMAPPED_UNPLACED_INTERVAL
Constructor and Description |
---|
HtsgetPOSTRequest(HtsgetRequest req) |
HtsgetPOSTRequest(java.net.URI endpoint)
Construct an HtsgetRequest from a URI identifying a valid resource on a htsget server
|
Modifier and Type | Method and Description |
---|---|
void |
addInterval(Locatable interval) |
void |
addIntervals(java.util.Collection<Locatable> intervals) |
protected java.net.HttpURLConnection |
getConnection() |
mjson.Json |
queryBody() |
void |
setInterval(Locatable interval) |
java.net.URI |
toURI()
Convert request to a URI which can be used to make http request for data blocks
|
void |
validateRequest()
Validates that the user query obeys htsget spec
|
HtsgetPOSTRequest |
withDataClass(HtsgetClass dataClass) |
HtsgetPOSTRequest |
withField(HtsgetRequestField field) |
HtsgetPOSTRequest |
withFields(java.util.Collection<HtsgetRequestField> fields) |
HtsgetPOSTRequest |
withFormat(HtsgetFormat format) |
HtsgetPOSTRequest |
withInterval(Locatable interval) |
HtsgetPOSTRequest |
withIntervals(java.util.Collection<Locatable> intervals) |
HtsgetPOSTRequest |
withNotag(java.lang.String notag) |
HtsgetPOSTRequest |
withNotags(java.util.Collection<java.lang.String> notags) |
HtsgetPOSTRequest |
withTag(java.lang.String tag) |
HtsgetPOSTRequest |
withTags(java.util.Collection<java.lang.String> tags) |
addField, addFields, addNotag, addNotags, addTag, addTags, getDataClass, getEndpoint, getFields, getFormat, getInterval, getNoTags, getResponse, getTags, setDataClass, setFormat
public HtsgetPOSTRequest(java.net.URI endpoint)
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 referenceNamepublic HtsgetPOSTRequest(HtsgetRequest req)
public void setInterval(Locatable interval)
setInterval
in class HtsgetRequest
public void addInterval(Locatable interval)
public void addIntervals(java.util.Collection<Locatable> intervals)
public HtsgetPOSTRequest withFormat(HtsgetFormat format)
withFormat
in class HtsgetRequest
public HtsgetPOSTRequest withDataClass(HtsgetClass dataClass)
withDataClass
in class HtsgetRequest
public HtsgetPOSTRequest withInterval(Locatable interval)
withInterval
in class HtsgetRequest
public HtsgetPOSTRequest withIntervals(java.util.Collection<Locatable> intervals)
public HtsgetPOSTRequest withField(HtsgetRequestField field)
withField
in class HtsgetRequest
public HtsgetPOSTRequest withFields(java.util.Collection<HtsgetRequestField> fields)
withFields
in class HtsgetRequest
public HtsgetPOSTRequest withTag(java.lang.String tag)
withTag
in class HtsgetRequest
public HtsgetPOSTRequest withTags(java.util.Collection<java.lang.String> tags)
withTags
in class HtsgetRequest
public HtsgetPOSTRequest withNotag(java.lang.String notag)
withNotag
in class HtsgetRequest
public HtsgetPOSTRequest withNotags(java.util.Collection<java.lang.String> notags)
withNotags
in class HtsgetRequest
public void validateRequest()
HtsgetRequest
validateRequest
in class HtsgetRequest
public java.net.URI toURI()
HtsgetRequest
toURI
in class HtsgetRequest
public mjson.Json queryBody()
protected java.net.HttpURLConnection getConnection()
getConnection
in class HtsgetRequest