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