Examples of Dataset


Examples of org.eobjects.metamodel.data.DataSet

      Table table = dc.getDefaultSchema().getTables()[0];
      Column projectColumn = table.getColumnByName("Project");
      Column websiteColumn = table.getColumnByName("Website");
      Column licenseColumn = table.getColumnByName("License");
      Query q = dc.query().from(table).select(table.getColumns()).orderBy(projectColumn).asc().toQuery();
      DataSet ds = dc.executeQuery(q);
      while (ds.next()) {
        final LicensedProject licensedProject = new LicensedProject();
        final Row row = ds.getRow();
        final String licenseName = row.getValue(licenseColumn).toString();

        licensedProject.name = row.getValue(projectColumn).toString();
        licensedProject.websiteUrl = row.getValue(websiteColumn).toString();
        licensedProject.license = getLicense(licenseName);
View Full Code Here

Examples of org.eobjects.metamodel.data.DataSet

      }

      @Override
      protected void done() {
        try {
          DataSet dataSet = get();
          if (dataSet != null) {
            _previewTable.setModel(dataSet.toTableModel());
          }
        } catch (Throwable e) {
          if (e instanceof ExecutionException) {
            // get the cause of the execution exception (it's a
            // wrapper around the throwable)
View Full Code Here

Examples of org.eobjects.metamodel.data.DataSet

      columns = Arrays.copyOf(columns, getPreviewColumns());
    }
    Query q = dc.query().from(table).select(columns).toQuery();
    q.setMaxRows(7);

    DataSet dataSet = dc.executeQuery(q);

    dcp.close();

    return dataSet;
  }
View Full Code Here

Examples of org.g4studio.core.web.report.fcf.DataSet

   * @return
   */
  private List getFcfDataList4LineGroup(Dto pDto){
    pDto.put("rownum", "12");
    List dataList = new ArrayList();
    DataSet dataSet1 = new DataSet();
    dataSet1.setSeriesname("产品A");
    dataSet1.setColor("FDC12E");
    pDto.put("product", "1");
    List alist = g4Reader.queryForList("Demo.getFcfDataList", pDto);
    List aSetList = new ArrayList();
    for (int i = 0; i < alist.size(); i++) {
      Dto dto = (BaseDto)alist.get(i);
      Set set = new Set();
      set.setValue(dto.getAsString("value"));
      aSetList.add(set);
    }
    dataSet1.setData(aSetList);
    dataList.add(dataSet1);
   
    DataSet dataSet2 = new DataSet();
    dataSet2.setSeriesname("产品B");
    dataSet2.setColor("44BC2F");
    pDto.put("product", "2");
    List blist = g4Reader.queryForList("Demo.getFcfDataList", pDto);
    List bSetList = new ArrayList();
    for (int i = 0; i < blist.size(); i++) {
      Dto dto = (BaseDto)blist.get(i);
      Set set = new Set();
      set.setValue(dto.getAsString("value"));
      bSetList.add(set);
    }
    dataSet2.setData(bSetList);
    dataList.add(dataSet2);
    return dataList;
  }
View Full Code Here

Examples of org.gdal.gdal.Dataset

{
    public static void main(String args[])
    {
        gdal.AllRegister();
        Driver memDriver = gdal.GetDriverByName("MEM");
        Dataset ds1 = memDriver.Create("mem", 100, 100);
        ds1.SetGeoTransform(new double[] { 2, 0.01, 0, 49, 0, -0.01 });
        SpatialReference sr1 = new SpatialReference();
        sr1.ImportFromEPSG(4326);

        Dataset ds2 = memDriver.Create("mem2", 100, 100);
        ds2.SetGeoTransform(new double[] { 400000, 1000, 0, 5500000, 0, -1000 });
        SpatialReference sr2 = new SpatialReference();
        sr2.ImportFromEPSG(32631);

        Vector options = new Vector();
        options.add("SRC_SRS=" + sr1.ExportToWkt());
View Full Code Here

Examples of org.gumtree.data.gdm.core.Dataset

  public static void main(String[] args) throws FileAccessException {
    final long time = System.currentTimeMillis();
    final String filename = args[0];

    // Instantiate Dataset (Gumtree meaning) on file to be read
    Dataset dataset = Factory.getDataset(new File(filename).toURI());

    // Get the file root
    Group group = dataset.getRootGroup();

    // generate the file's dictionary starting from the file's root
    Map<String, String> dictionary = createDictionary(group);

    // Instantiate the dictionary
    IPathResolver pathResolver = new DictionaryPathResolver(dictionary);

    // Instantiation the "container" that links the dataset and the dictionary
    IDataContainer container = new DataContainer(dataset);

    // Set dictionary on the container
    container.setPathSolver(pathResolver);

    // Parse the file (using the dictionary) to display data
    for (String key : dictionary.keySet())
    {
      String value;
      try
      {
        // get the value of the dataset corresponding to the current key
        value = container.get(key).toString();
        System.out.println(key + ": " + (value.length() < 1000 ? value : "Data to long to be displayed using eclipse!") );
      }
      catch(DataModelException n)
      {
        System.out.println("ERROR on key: " + key);
        n.printStackTrace();
      }

      // Get the group node corresponding to the current key
      group = dataset.getRootGroup();
      DataItem toto = (DataItem) group.getObjectByPath(container.getPathResolver()
          .resolvePath(key));
      group = toto.getParentGroup();

      // Scan node's attribute
View Full Code Here

Examples of org.jboss.dashboard.dataset.DataSet

        try {
            // Ensure data retrieved is refreshed.
            Chronometer crono = new Chronometer();
            crono.start();
            DataSet ds = dataProvider.refreshDataSet();
            crono.stop();
            elapsedTime = crono.elapsedTime();
            nrows = 0;
            if (ds != null && ds.getProperties().length > 0) nrows = ds.getRowCount();
            loadAttemptOk = true;
        } catch (Exception e) {
            throw new Exception(e.getMessage() != null ? e.getMessage() : getErrorMessage("error5") );
        }
        return null;
View Full Code Here

Examples of org.jclouds.joyent.cloudapi.v6_5.domain.Dataset

@Test(testName = "DatasetToOperatingSystemTest")
public class DatasetToOperatingSystemTest {

   public void testCentos6() {

      Dataset datasetToConvert = new ParseDatasetTest().expected();

      OperatingSystem convertedOs = new DatasetToOperatingSystem(ImmutableMap.<OsFamily, Map<String, String>> of(
            OsFamily.CENTOS, ImmutableMap.of("6", "6.0"))).apply(datasetToConvert);

      assertEquals(convertedOs.getName(), datasetToConvert.getName());
      assertEquals(convertedOs.getFamily(), OsFamily.CENTOS);
      assertEquals(convertedOs.getDescription(), datasetToConvert.getUrn());
      assertEquals(convertedOs.getVersion(), "6.0");
      assertEquals(convertedOs.getArch(), null);
      assertTrue(convertedOs.is64Bit());
   }
View Full Code Here

Examples of org.jclouds.joyent.cloudapi.v6_5.domain.Dataset

   }

   @Override
   public DatasetInDatacenter getImage(String id) {
      DatacenterAndId datacenterAndId = DatacenterAndId.fromSlashEncoded(id);
      Dataset dataset = cloudApiApi.getDatasetApiForDatacenter(datacenterAndId.getDatacenter()).get(
            datacenterAndId.getId());
      return dataset == null ? null : new DatasetInDatacenter(dataset, datacenterAndId.getDatacenter());
   }
View Full Code Here

Examples of org.jclouds.joyent.cloudapi.v6_5.domain.Dataset

   @Override
   public Image apply(DatasetInDatacenter datasetInDatacenter) {
      Location location = locationIndex.get().get(datasetInDatacenter.getDatacenter());
      checkState(location != null, "location %s not in locationIndex: %s", datasetInDatacenter.getDatacenter(),
            locationIndex.get());
      Dataset dataset = datasetInDatacenter.get();
      return new ImageBuilder()
            .id(datasetInDatacenter.slashEncode())
            // note that it is urn that is the expected value!
            .providerId(dataset.getUrn())
            .name(dataset.getName())
            .operatingSystem(imageToOs.apply(dataset))
            .description(dataset.getDescription())
            .version(dataset.getVersion())
            .location(location)
            .status(Image.Status.AVAILABLE).build();
   }
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.