RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
Query query = new Query(Constants.QUERY_LANG_LUCENE, luceneQuery);
QueryResult queryResult = repositoryService.query(STORE, query, false);
ResultSetRow row = queryResult.getResultSet().getRows(0);
Reference reference = new Reference();
reference.setStore(STORE);
reference.setUuid(row.getNode().getId());
ContentFormat contentFormat = new ContentFormat();
contentFormat.setEncoding("UTF-8");
contentFormat.setMimetype("text/plain");