String structure = ""; if ( structuredQuery != null ) structure = structuredQuery.serialize(); if ( rawQuery != null ) structure = HandleAccessor.contentAsString(rawQuery.getHandle()); out.write(structure.getBytes("UTF-8")); out.flush();
String json = HandleAccessor.contentAsString(qdef.rawQuery.getHandle()); JsonNode rawQueryNode = mapper.readTree(json); JsonNode queryNode = rawQueryNode.get("query");
StructureWriteHandle handle = ((RawQueryDefinition) queryDef).getHandle(); baseHandle = HandleAccessor.checkHandle(handle, "search"); } else if (queryDef instanceof RawCtsQueryDefinition) {
public void init(RawQueryDefinition rawQuery, QueryOptionsWriteHandle options, String qtext, String sparql) { this.rawQuery = rawQuery; this.options = options; this.qtext = qtext; this.sparql = sparql; // if a query has been supplied, it's either in JSON or in XML if (rawQuery != null) { this.format = HandleAccessor.as(rawQuery.getHandle()).getFormat(); } else { if (options != null) { this.format = HandleAccessor.as(options).getFormat(); } else { // there's only qtext -- we choose format. this.format = Format.JSON; } } if ( format != Format.XML && format != Format.JSON ) { throw new IllegalArgumentException("Format of rawQuery must be XML or JSON"); } }
StructureWriteHandle handle = ((RawQueryDefinition) queryDef).getHandle(); baseHandle = HandleAccessor.checkHandle(handle, "match");
StructureWriteHandle handle = ((RawQueryDefinition) queryDef).getHandle(); baseHandle = HandleAccessor.checkHandle(handle, "match");
logger.debug("Raw uris query"); StructureWriteHandle input = ((RawQueryDefinition) qdef).getHandle();
((RawQueryDefinition) queryDef).getHandle();
StructureWriteHandle handle = ((RawQueryDefinition) queryDef).getHandle(); baseHandle = HandleAccessor.checkHandle(handle, "values"); } else {
StructureWriteHandle handle = ((RawQueryDefinition) queryDef).getHandle(); baseHandle = HandleAccessor.checkHandle(handle, "values"); } else if (queryDef instanceof RawCtsQueryDefinition) {