use of org.codice.alliance.nsili.endpoint.requests.SubmitQueryRequestImpl in project alliance by codice.
the class CatalogMgrImpl method submit_query.
@Override
public SubmitQueryRequest submit_query(Query aQuery, String[] result_attributes, SortAttribute[] sort_attributes, NameValue[] properties) throws ProcessingFault, InvalidInputParameter, SystemFault {
BqsConverter bqsConverter = new BqsConverter(filterBuilder, removeSourceLibrary);
SubmitQueryRequestImpl submitQueryRequest = new SubmitQueryRequestImpl(aQuery, filterBuilder, bqsConverter, catalogFramework, querySources);
submitQueryRequest.set_number_of_hits(maxNumResults);
submitQueryRequest.setTimeout(defaultTimeout);
submitQueryRequest.setOutgoingValidationEnabled(outgoingValidationEnabled);
submitQueryRequest.setResultAttributes(result_attributes);
String queryId = UUID.randomUUID().toString();
try {
poa.activate_object_with_id(queryId.getBytes(Charset.forName(NsiliEndpoint.ENCODING)), submitQueryRequest);
} catch (ServantAlreadyActive | ObjectAlreadyActive | WrongPolicy e) {
LOGGER.debug("submit_query : Unable to activate submitQueryRequest object.", e);
}
org.omg.CORBA.Object obj = poa.create_reference_with_id(queryId.getBytes(Charset.forName(NsiliEndpoint.ENCODING)), SubmitQueryRequestHelper.id());
SubmitQueryRequest queryRequest = SubmitQueryRequestHelper.narrow(obj);
return queryRequest;
}
Aggregations