public void finishQuery() {
finishMigrationPathFilter();
finishDependencyLabelFilter();
finishHandlesMimetypes();
IndentedLineBuffer formatBuffer = new IndentedLineBuffer();
FormatterElement.format(formatBuffer, new SerializationContext(prefixMapping), query);
try {
String encqs = URLEncoder.encode(formatBuffer.toString(), "UTF-8");
String encpf = URLEncoder.encode(prefixes, "UTF-8");
resource = resource.queryParam(PREFIX_NAME, encpf).queryParam(QUERY_NAME, encqs);
} catch (UnsupportedEncodingException e) {
LOG.error("Error encoding query", e);
}