@Test public void testGetBaseUrl() throws Exception { assertEquals(baseUrl, resolver.getBaseUrl(new URI(annotationUrl))); }
public String getBaseUrl(URI uri) { if (uri == null) { return null; } try { String url = uri.toURL().toString(); if (url.contains(NUXEO_ANNOTATIONS)) { return url.substring(0, url.indexOf(NUXEO_ANNOTATIONS) + NUXEO_ANNOTATIONS.length()); } else { return url.substring(0, url.indexOf("nuxeo") + "nuxeo".length()); } } catch (MalformedURLException e) { return null; } }
DefaultUriResolver implements UriResolver { public String getBaseUrl(URI uri) { if (uri == null) { return null; } try { String url = uri.toURL().toString(); if (url.contains(NUXEO_ANNOTATIONS)) { return url.substring(0, url.indexOf(NUXEO_ANNOTATIONS) + NUXEO_ANNOTATIONS.length()); } else { return url.substring(0, url.indexOf("nuxeo") + "nuxeo".length()); } } catch (MalformedURLException e) { return null; } } }
DefaultUriResolver implements UriResolver { public String getBaseUrl(URI uri) { if (uri == null) { return null; } try { String url = uri.toURL().toString(); if (url.contains(NUXEO_ANNOTATIONS)) { return url.substring(0, url.indexOf(NUXEO_ANNOTATIONS) + NUXEO_ANNOTATIONS.length()); } else { return url.substring(0, url.indexOf("nuxeo") + "nuxeo".length()); } } catch (MalformedURLException e) { return null; } }  }
DefaultUriResolver implements UriResolver { public String getBaseUrl(URI uri) { if (uri == null) { return null; } try { String url = uri.toURL().toString(); if (url.contains(NUXEO_ANNOTATIONS)) { return url.substring(0, url.indexOf(NUXEO_ANNOTATIONS) + NUXEO_ANNOTATIONS.length()); } else { return url.substring(0, url.indexOf("nuxeo") + "nuxeo".length()); } } catch (MalformedURLException e) { return null; } }  String getBaseUrl(URI uri); List<URI> getSearchURI(URI uri); URI translateFromGraphURI(URI uri, String baseUrl); URI translateToGraphURI(URI uri); }
DefaultUriResolver implements UriResolver { public String getBaseUrl(URI uri) { if (uri == null) { return null; } try { String url = uri.toURL().toString(); if (url.contains(NUXEO_ANNOTATIONS)) { return url.substring(0, url.indexOf(NUXEO_ANNOTATIONS) + NUXEO_ANNOTATIONS.length()); } else { return url.substring(0, url.indexOf("nuxeo") + "nuxeo".length()); } } catch (MalformedURLException e) { return null; } }  String getBaseUrl(URI uri); List<URI> getSearchURI(URI uri); URI translateFromGraphURI(URI uri, String baseUrl); URI translateToGraphURI(URI uri);  }