protected HttpUriRequest createGoodCoAnnotationRequest(int n) throws URISyntaxException { URIBuilder uriBuilder = new URIBuilder() .setScheme("http") .setHost("localhost") .setPort(9031) // .setPath("/owlsim/getCoAnnotationListForAttribute/"); .setPath("/owlsim/getCoAnnotatedClasses/"); List<OWLClass> allClasses = new ArrayList<OWLClass>(); allClasses.addAll(g.getAllOWLClasses()); Collections.shuffle(allClasses); int i = 0; /* for (OWLClass c : allClasses) { String id = g.getIdentifier(c); uriBuilder.addParameter("a", id); i++; if (i >= n) break; } */ // uriBuilder.addParameter("a","HP:0001252"); // uriBuilder.addParameter("a","HP:0001250"); // uriBuilder.addParameter("a","HP:0000252"); uriBuilder.addParameter("a", "MP:0002082"); uriBuilder.addParameter("limit", "5"); URI uri = uriBuilder.build(); LOG.info("Getting URL=" + uri); HttpUriRequest httpUriRequest = new HttpGet(uri); LOG.info("Got URL=" + uri); return httpUriRequest; }
protected HttpUriRequest createGoodAnnotSufRequest(int n) throws URISyntaxException { URIBuilder uriBuilder = new URIBuilder() .setScheme("http") .setHost("localhost") .setPort(9031) .setPath("/owlsim/getAnnotationSufficiencyScore/"); List<OWLClass> allClasses = new ArrayList<OWLClass>(); allClasses.addAll(g.getAllOWLClasses()); Collections.shuffle(allClasses); int i = 0; for (OWLClass c : allClasses) { String id = g.getIdentifier(c); uriBuilder.addParameter("a", id); i++; if (i >= n) break; } uriBuilder.addParameter("limit", "5"); URI uri = uriBuilder.build(); LOG.info("Getting URL=" + uri); HttpUriRequest httpUriRequest = new HttpGet(uri); LOG.info("Got URL=" + uri); return httpUriRequest; }
protected HttpUriRequest createBadAnnotProfileWithSubgraphsRequest(int n) throws URISyntaxException { URIBuilder uriBuilder = new URIBuilder() .setScheme("http") .setHost("localhost") .setPort(9031) .setPath("/owlsim/getAttributeInformationProfile/"); List<OWLClass> allClasses = new ArrayList<OWLClass>(); allClasses.addAll(g.getAllOWLClasses()); Collections.shuffle(allClasses); int i = 0; for (OWLClass c : allClasses) { String id = g.getIdentifier(c); uriBuilder.addParameter("a", id); // get at least one ancestor of each class OWLClass r = (OWLClass) g.getAncestors(c).iterator().next(); uriBuilder.addParameter("r", g.getIdentifier(r)); i++; if (i >= n) break; } uriBuilder.addParameter("a", "BOGUS:1234567"); uriBuilder.addParameter("r", "BOGUS:0000003"); Random rand = new Random(); int r = 0; // get some random classes for (i = 0; i < n; i++) { r = rand.nextInt(allClasses.size()); OWLClass c = allClasses.get(r); String id = g.getIdentifier(c); uriBuilder.addParameter("r", id); i++; if (i >= n) break; } uriBuilder.addParameter("limit", "5"); URI uri = uriBuilder.build(); LOG.info("Getting URL=" + uri); HttpUriRequest httpUriRequest = new HttpGet(uri); LOG.info("Got URL=" + uri); return httpUriRequest; }
protected HttpUriRequest createCompareByAttributeSetsRequest(int nA, int nB) throws URISyntaxException { URIBuilder uriBuilder = new URIBuilder() .setScheme("http") .setHost("localhost") .setPort(9031) .setPath("/owlsim/compareAttributeSets/"); List<OWLClass> allClasses = new ArrayList<OWLClass>(); allClasses.addAll(g.getAllOWLClasses()); Collections.shuffle(allClasses); int i = 0; for (OWLClass c : allClasses) { String id = g.getIdentifier(c); uriBuilder.addParameter("a", id); // get at least one ancestor of each class i++; if (i >= nA) break; } Collections.shuffle(allClasses); i = 0; for (OWLClass c : allClasses) { String id = g.getIdentifier(c); uriBuilder.addParameter("b", id); // get at least one ancestor of each class i++; if (i >= nB) break; } URI uri = uriBuilder.build(); LOG.info("Getting URL=" + uri); HttpUriRequest httpUriRequest = new HttpGet(uri); LOG.info("Got URL=" + uri); return httpUriRequest; }
protected HttpUriRequest createPartiallyBogusAnnotSufRequest(int n) throws URISyntaxException { URIBuilder uriBuilder = new URIBuilder() .setScheme("http") .setHost("localhost") .setPort(9031) .setPath("/owlsim/getAnnotationSufficiencyScore/"); int i = 0; for (OWLClass c : g.getAllOWLClasses()) { String id = g.getIdentifier(c); uriBuilder.addParameter("a", id); uriBuilder.addParameter("a", "BOGUS:000000" + i); i++; if (i >= n) break; } uriBuilder.addParameter("limit", "5"); URI uri = uriBuilder.build(); LOG.info("Getting URL=" + uri); HttpUriRequest httpUriRequest = new HttpGet(uri); LOG.info("Got URL=" + uri); return httpUriRequest; }