Package com.socrata.api

Examples of com.socrata.api.SodaDdl.loadDatasetInfo()


      final SodaWorkflow workflower = SodaWorkflow.newWorkflow(connectionInfo.getUrl(), connectionInfo.getUser(),
          connectionInfo.getPassword(), connectionInfo.getToken());

      boolean noExceptions = false;
      try {
        DatasetInfo datasetInfo = updater.loadDatasetInfo(datasetID);

        if (datasetInfo == null) {
          runErrorMessage = "Dataset with that ID does not exist or you do not have permission to publish to it";
          runStatus = JobStatus.PUBLISH_ERROR;
        }
View Full Code Here


          runStatus = JobStatus.PUBLISH_ERROR;
        }
        else {
          if (datasetInfo.PUBLISHED.equals(datasetInfo.getPublicationStage())) {
            DatasetInfo workingCopyDatasetInfo = workflower.createWorkingCopy(datasetInfo.getId());
            datasetInfo = updater.loadDatasetInfo(workingCopyDatasetInfo.getId());
            workingCopyDatasetId = datasetInfo.getId();
          }

          datasetInfo.setName(title);
          datasetInfo.setDescription(description);
View Full Code Here

  public String loadCurrentMetadata() {
    try {
      SocrataConnectionInfo connectionInfo = userPrefs.getConnectionInfo();
      final SodaDdl sodaDdl = SodaDdl.newDdl(connectionInfo.getUrl(), connectionInfo.getUser(),
          connectionInfo.getPassword(), connectionInfo.getToken());
      readDatasetInfo(sodaDdl.loadDatasetInfo(datasetID));
      return "";
    }
    catch(Exception e) {
      return e.getMessage();
    }
View Full Code Here

        //System.out.println(IntegrationUtility.getFieldNamesString(ddl, "6qkn-8xvw"));
        final SodaDdl ddl = createSodaDdl();
        String datasetFieldNamesString = DatasetUtils.getFieldNamesString(DOMAIN, UNITTEST_DATASET_ID);
        TestCase.assertEquals("\"id\",\"name\",\"another_name\",\"date\"", datasetFieldNamesString);

        Dataset datasetInfo = (Dataset) ddl.loadDatasetInfo(UNITTEST_DATASET_ID);
        String[] datasetFieldNames = DatasetUtils.getFieldNamesArray(datasetInfo);
        TestCase.assertEquals("id", datasetFieldNames[0]);
        TestCase.assertEquals("name", datasetFieldNames[1]);
        TestCase.assertEquals("another_name", datasetFieldNames[2]);
    }
View Full Code Here

    }

    @Test
    public void testGetDatasetHasLocationColumn() throws IOException, SodaError, InterruptedException {
        final SodaDdl ddl = createSodaDdl();
        Dataset datasetInfoNoLocation = (Dataset) ddl.loadDatasetInfo(UNITTEST_DATASET_ID);
        Dataset datasetInfoWithLocation = (Dataset) ddl.loadDatasetInfo(UNITTEST_DATASET_ID_LOCATION_COL);
        TestCase.assertFalse(DatasetUtils.hasLocationColumn(datasetInfoNoLocation));
        TestCase.assertTrue(DatasetUtils.hasLocationColumn(datasetInfoWithLocation));
    }
View Full Code Here

    @Test
    public void testGetDatasetHasLocationColumn() throws IOException, SodaError, InterruptedException {
        final SodaDdl ddl = createSodaDdl();
        Dataset datasetInfoNoLocation = (Dataset) ddl.loadDatasetInfo(UNITTEST_DATASET_ID);
        Dataset datasetInfoWithLocation = (Dataset) ddl.loadDatasetInfo(UNITTEST_DATASET_ID_LOCATION_COL);
        TestCase.assertFalse(DatasetUtils.hasLocationColumn(datasetInfoNoLocation));
        TestCase.assertTrue(DatasetUtils.hasLocationColumn(datasetInfoWithLocation));
    }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.