Package htsjdk.samtools.util.htsget
Class HtsgetRequest
- java.lang.Object
-
- htsjdk.samtools.util.htsget.HtsgetRequest
-
public class HtsgetRequest extends Object
Builder for an htsget request that allows converting the request to a URI 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
Fields Modifier and Type Field Description static Interval
UNMAPPED_UNPLACED_INTERVAL
-
Constructor Summary
Constructors Constructor Description HtsgetRequest(URI endpoint)
Construct an HtsgetRequest from a URI identifying a valid resource on a htsget server
-
Method Summary
-
-
-
Field Detail
-
UNMAPPED_UNPLACED_INTERVAL
public static final Interval UNMAPPED_UNPLACED_INTERVAL
-
-
Constructor Detail
-
HtsgetRequest
public HtsgetRequest(URI endpoint)
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 Detail
-
getEndpoint
public URI getEndpoint()
-
getFormat
public HtsgetFormat getFormat()
-
getDataClass
public HtsgetClass getDataClass()
-
getInterval
public Locatable getInterval()
-
getFields
public Set<HtsgetRequestField> getFields()
-
setFormat
public void setFormat(HtsgetFormat format)
-
setDataClass
public void setDataClass(HtsgetClass dataClass)
-
setInterval
public void setInterval(Interval interval)
-
addField
public void addField(HtsgetRequestField field)
-
addFields
public void addFields(Collection<HtsgetRequestField> fields)
-
addTag
public void addTag(String tag)
-
addTags
public void addTags(Collection<String> tags)
-
addNotag
public void addNotag(String notag)
-
addNotags
public void addNotags(Collection<String> notags)
-
withFormat
public HtsgetRequest withFormat(HtsgetFormat format)
-
withDataClass
public HtsgetRequest withDataClass(HtsgetClass dataClass)
-
withInterval
public HtsgetRequest withInterval(Locatable interval)
-
withField
public HtsgetRequest withField(HtsgetRequestField field)
-
withFields
public HtsgetRequest withFields(Collection<HtsgetRequestField> fields)
-
withTag
public HtsgetRequest withTag(String tag)
-
withTags
public HtsgetRequest withTags(Collection<String> tags)
-
withNotag
public HtsgetRequest withNotag(String notag)
-
withNotags
public HtsgetRequest withNotags(Collection<String> notags)
-
toURI
public URI toURI()
Convert request to a URI which can be used to make http request for data blocks
-
getResponse
public HtsgetResponse 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
-
-