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 CkanDataset createRandomDataset() { CkanDataset ckanDataset = new CkanDataset("test-dataset-jackan-" + UUID.randomUUID().getMostSignificantBits()); return client.createDataset(ckanDataset); }
protected CkanTag createRandomTag() { CkanVocabulary voc = createRandomVocabulary(); CkanTag tag = new CkanTag("test-tag-" + randomUUID(), voc.getId()); return client.createTag(tag); }
protected CkanUser createRandomUser() { CkanUser voc = new CkanUser("test-user-" + randomUUID(), "*****@*****.**", "abracadabra"); return client.createUser(voc); }
protected CkanVocabulary createRandomVocabulary() { CkanVocabulary voc = new CkanVocabulary("test-vocabulary-" + randomUUID(), new ArrayList()); return client.createVocabulary(voc); }
protected CkanGroup createRandomGroup() { CkanGroup group = new CkanGroup("test-group-" + randomUUID()); return client.createGroup(group); }
protected CkanOrganization createRandomOrganization() { CkanOrganization organization = new CkanOrganization("test-org-" + randomUUID()); return client.createOrganization(organization); }
protected CkanResource createRandomResource() { CkanDataset dataset = createRandomDataset(); CkanResource resource = new CkanResource(JACKAN_URL, dataset.getId()); return client.createResource(resource); }