SHARE
TWEET

Untitled

a guest Jan 28th, 2020 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     String xqueryFilePath = "src/main/resources/xquery/splitArticleAndCL.xqy";
  2.     Author retval = null;
  3.     ArrayList<String> paramNames = new ArrayList<>();
  4.     ArrayList<String> paramValues = new ArrayList<>();
  5.     paramNames.add("username");
  6.     paramValues.add(neki username po zelji);
  7.     try {
  8.         ResourceSet queryResults = authorRepository.genericRepository.runXQuery(
  9.                 "/db/project/authors",
  10.                 xqueryFilePath, paramNames, paramValues);
  11.         ResourceIterator i = queryResults.getIterator();
  12.         String authorFullPath = (String)i.nextResource().getContent();
  13.         String[] authorPathSplit = authorFullPath.split("/");
  14.         String authorId = authorPathSplit[authorPathSplit.length - 1];
  15.         retval = authorRepository.find(authorId); //kako god si nazvao ovu methodu
  16.     } finally {
  17.         return retval;
  18.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top