Examples of Dataset


Examples of org.openbravo.model.ad.utility.DataSet

   *          the xml is written to this writer
   * @see #CLIENT_DATA_SET_NAME
   * @see #CLIENT_ID_PARAMETER_NAME
   */
  public void exportClientToXML(Map<String, Object> parameters, boolean exportAuditInfo, Writer out) {
    DataSet dataSet = null;
    final boolean prevMode = OBContext.getOBContext().setInAdministratorMode(true);
    try {
      final OBCriteria<DataSet> obc = OBDal.getInstance().createCriteria(DataSet.class);
      obc.add(Expression.eq("name", CLIENT_DATA_SET_NAME));
      if (obc.list().size() == 0) {
        throw new OBException("No dataset found with name " + CLIENT_DATA_SET_NAME);
      }
      dataSet = obc.list().get(0);

      // read the client
      final Client client = OBDal.getInstance().get(Client.class,
          parameters.get(CLIENT_ID_PARAMETER_NAME));

      // the export part may not be run as superuser
      log.debug("Exporting dataset " + dataSet.getName());
      final EntityXMLConverter exc = EntityXMLConverter.newInstance();
      exc.setOptionExportClientOrganizationReferences(true);
      exc.setOptionMinimizeXMLSize(true);
      exc.setOptionIncludeChildren(false);
      exc.setOptionIncludeReferenced(true);
      exc.setOptionExportTransientInfo(false);
      exc.setOptionExportAuditInfo(exportAuditInfo);
      exc.setAddSystemAttributes(false);
      exc.setOutput(out);
      exc.setClient(client);

      final List<DataSetTable> dts = dataSet.getDataSetTableList();
      Collections.sort(dts, new DatasetTableComparator());

      final Set<BaseOBObject> toExport = new LinkedHashSet<BaseOBObject>();
      for (final DataSetTable dt : dts) {
        final List<BaseOBObject> list = DataSetService.getInstance().getExportableObjects(dt, null,
View Full Code Here

Examples of org.openmuc.j62056.DataSet

              dataSets = reader.read();
              cache.put(meterName, dataSets);
            }
            String obis = provider.getObis(itemName);
            if (obis != null && dataSets.containsKey(obis)) {
              DataSet dataSet = dataSets.get(obis);
              if(logger.isDebugEnabled())
                logger.debug("Updateing item " + itemName + " with OBIS code " + obis + " and value " + dataSet.getValue());
              Class<? extends Item> itemType = provider
                  .getItemType(itemName);
              if (itemType.isAssignableFrom(NumberItem.class)) {
                eventPublisher.postUpdate(itemName,
                    new DecimalType(dataSet.getValue()));
              }
              if (itemType.isAssignableFrom(StringItem.class)) {
                String value = dataSet.getValue();
                eventPublisher.postUpdate(itemName, new StringType(
                    value));
              }
            }
          }
View Full Code Here

Examples of org.openrdf.query.Dataset

      else {
        throw new RuntimeException("Unexpected query type: " + queryNode.getClass());
      }

      // Handle dataset declaration
      Dataset dataset = DatasetDeclProcessor.process(qc);
      if (dataset != null) {
        query.setDefaultGraphs(dataset.getDefaultGraphs());
        query.setNamedGraphs(dataset.getNamedGraphs());
      }

      return query;
    }
    catch (ParseException e) {
View Full Code Here

Examples of org.openstreetmap.josm.data.osm.DataSet

    setAlwaysOnTop(true);
    setResizable(false);
    iconTransparente = LogicConstants.getIcon("48x48_transparente");
    iconEnviando = LogicConstants.getIcon("anim_calculando");
    try {
      route = new OsmDataLayer(new DataSet(), "route",
          File.createTempFile("route", "route"));
    } catch (IOException e) {
      log.error(e.getMessage(), e);
    }
    setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
View Full Code Here

Examples of org.timepedia.chronoscope.client.Dataset

    Set<String> localRangeAxisIds = new HashSet<String>();

    RangeAxisPanel axisPanel = null;

    for (int i = 0; i < datasets.size(); i++) {
      Dataset dataset = datasets.get(i);

      final String rangeAxisId = dataset.getAxisId(0);
      RangeAxis rangeAxis = id2rangeAxis.get(rangeAxisId);

      // Determine if the rangeAxis should be added to the left or right range panel
      int numLeftAxes = leftPanel.getChildCount();
      int numRightAxes = rightPanel.getChildCount();
      boolean useLeftPanel = (numLeftAxes <= numRightAxes);
      CompositeAxisPanel compositePanel = useLeftPanel || !plot.isMultiaxis() ? leftPanel : rightPanel;

      if (rangeAxis == null) {
        rangeAxis = new RangeAxis(dataset.getRangeLabel(), rangeAxisId);
        rangeAxis.setPlot(plot);
        rangeAxis.setView(view);
        rangeAxis.setAxisIndex(i);
        id2rangeAxis.put(rangeAxisId, rangeAxis);
      }
View Full Code Here

Examples of org.timepedia.chronoscope.client.Dataset

        q.send(new QueryResponseHandler() {
              public void onQueryResponse(QueryResponse response) {
                try {
                  setTitle.setTitle(prefs.chartTitle().getValue());
                  DataTable table = response.getDataTable();
                  Dataset ds[] = DataTableParser.parseDatasets(table, null);
                  final Marker ms[] = DataTableParser.parseMarkers(table, table, null);

                  ChartPanel cp = Chronoscope.createTimeseriesChart(ds,
                      Window.getClientWidth(), Window.getClientHeight());
                    GssContext gssContext = prefs.chartStyle().getValue().getGssContext();
View Full Code Here

Examples of org.timepedia.chronoscope.client.Dataset

  /**
   * shim for UI binder
   */
  private GssProperties shimGssProperties(GssProperties gssProperties){
      Datasets datasets = getChart().getPlot().getDatasets();
      Dataset shim = datasets.getById("shim__");
      // if ((datasets.size() > 0) && (simulationLoaded != null)) {
      //     gssProperties.setTransparency(0.0);
      // }
      return gssProperties;
   }
View Full Code Here

Examples of org.timepedia.chronoscope.client.Dataset

   */
  private void adjustAbsRanges() {
    this.setAbsRange(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY);
    Datasets datasets = plot.getDatasets();
    for (int i = 0; i < datasets.size(); i++) {
      Dataset dataset = datasets.get(i);
      if (dataset.getAxisId(0).equals(this.getAxisId())) {
        this.adjustAbsRange(dataset);
      }
    }
  }
View Full Code Here

Examples of org.timepedia.chronoscope.client.Dataset

public class ChronoscopeImageUtil {

  public static void main(String[] args) {
    JFrame jf = new JFrame();
    jf.setSize(800, 400);
    Dataset dff = new MockDatasetFactory(ServerChronoscope.get().getComponentFactory().getDatasetFactory()).getBasicDataset();
    Dataset ds[] = new Dataset[1];
    ds[0] = dff;
    double domainOrigin = 0;
    double currentDomain = 0;
    Image im = renderChronoscopeImage(ds, 400, 300, null, true, domainOrigin,
        currentDomain, false);
View Full Code Here

Examples of org.timepedia.chronoscope.client.Dataset

       
        theplot.setAutoZoomVisibleRange(0, true);
        theplot.setAnimationPreview(false);

        Datasets datasets = theplot.getDatasets();
        Dataset d = theplot.getDatasets().get(0);
        d.setIncrementalHandler(new IncrementalHandler() {
          public void onDataNeeded(Interval domain, Dataset dataset,
              IncrementalDataResponse response) {
          }
        });
        view.getChart().redraw();
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.