protected CkanDataset createRandomDataset(int numResources) { CkanDataset ckanDataset = new CkanDataset("test-dataset-jackan-" + UUID.randomUUID().getMostSignificantBits()); List<CkanResource> resources = new ArrayList(); for (int i = 0; i < numResources; i++) { resources.add( new CkanResource(JACKAN_URL + "test-resources/#" + UUID.randomUUID().toString(), null)); } ckanDataset.setResources(resources); return client.createDataset(ckanDataset); }
protected CkanResource createRandomResource() { CkanDataset dataset = createRandomDataset(); CkanResource resource = new CkanResource(JACKAN_URL, dataset.getId()); return client.createResource(resource); }