@Test public void testRepoUriAndNameConstructorRejectsBadUris() { TestHelpers.assertThrows("Should reject dataset: URI", IllegalArgumentException.class, new Runnable() { @Override public void run() { new URIBuilder("dataset:file:/datasets/test-name", "ns", "test-name-2") .build(); } }); TestHelpers.assertThrows("Should reject view: URI", IllegalArgumentException.class, new Runnable() { @Override public void run() { new URIBuilder("view:file:/datasets/test-name?n=34", "ns", "test-name-2") .build(); } }); TestHelpers.assertThrows("Should reject null URI", NullPointerException.class, new Runnable() { @Override public void run() { new URIBuilder((String) null, "ns", "test-name").build(); } }); TestHelpers.assertThrows("Should reject null URI", NullPointerException.class, new Runnable() { @Override public void run() { new URIBuilder((URI) null, "ns", "test-name").build(); } }); TestHelpers.assertThrows("Should reject null namespace", NullPointerException.class, new Runnable() { @Override public void run() { new URIBuilder("repo:file:/datasets", null, "test-name").build(); } }); TestHelpers.assertThrows("Should reject null name", NullPointerException.class, new Runnable() { @Override public void run() { new URIBuilder("repo:file:/datasets", "ns", null).build(); } }); }
public static URI build(String repoUri, String namespace, String dataset) { return build(URI.create(repoUri), namespace, dataset); }
URIBuilder { public static URI build(String repoUri, String namespace, String dataset) { return build(URI.create(repoUri), namespace, dataset); } }
URIBuilder { public static URI build(String repoUri, String namespace, String dataset) { return build(URI.create(repoUri), namespace, dataset); } URIBuilder(String repoUri, String namespace, String datasetName);  URIBuilder(URI repoUri, String namespace, String dataset);  URIBuilder(String uri);  URIBuilder(URI uri); }
URIBuilder { public static URI build(String repoUri, String namespace, String dataset) { return build(URI.create(repoUri), namespace, dataset); } URIBuilder(String repoUri, String namespace, String datasetName);  URIBuilder(URI repoUri, String namespace, String dataset);  URIBuilder(String uri);  URIBuilder(URI uri); static URI build(String repoUri, String namespace, String dataset); static URI build(URI repoUri, String namespace, String dataset); URIBuilder with(String name, Object value); URIBuilder namespace(String namespace); URIBuilder dataset(String dataset); URI build(); }
URIBuilder { public static URI build(String repoUri, String namespace, String dataset) { return build(URI.create(repoUri), namespace, dataset); } URIBuilder(String repoUri, String namespace, String datasetName);  URIBuilder(URI repoUri, String namespace, String dataset);  URIBuilder(String uri);  URIBuilder(URI uri); static URI build(String repoUri, String namespace, String dataset); static URI build(URI repoUri, String namespace, String dataset); URIBuilder with(String name, Object value); URIBuilder namespace(String namespace); URIBuilder dataset(String dataset); URI build(); static final String DATASET_NAME_OPTION; static final String NAMESPACE_OPTION; static final String NAMESPACE_DEFAULT; static final String DATASET_SCHEME; static final String VIEW_SCHEME; static final String REPO_SCHEME; }