SimpleQuantityRanker { public String rank(final Collection<String> uris) { Map<Integer, String> uriToQuantity = new HashMap<>(); for (String it : uris) { ArrayList<RDFNode> answers; try { answers = new ArrayList<>(sparql.sparql(constructQuery(it))); System.out.println(constructQuery(it)); RDFNode node = answers.get(0); uriToQuantity.put(((Integer) node.asLiteral().getValue()), it); } catch (ExecutionException e) { e.printStackTrace(); } } List<Integer> sorted = new ArrayList<>(uriToQuantity.keySet()); Collections.sort(sorted); return uriToQuantity.get(Iterables.getLast(sorted)); }  String rank(final Collection<String> uris); boolean disambiguateOntologyIsProperty(final String uri); boolean disambiguateOntologyIsClass(final String uri);  }
@Test public void test() { ArrayList<String> uris = new ArrayList<>(); uris.add("http: uris.add("http: Assert.assertTrue(ranker.rank(uris).equals(uris.get(0))); }