Examples of DataSource


Examples of org.pentaho.reporting.engine.classic.core.filter.DataSource

   * @param element
   * @return the raw data.
   */
  public Object getRawValue(final ExpressionRuntime runtime, final Element element)
  {
    final DataSource source = element.getDataSource();
    if (source instanceof RawDataSource)
    {
      RawDataSource rds = (RawDataSource) source;
      return rds.getRawValue(runtime, element);
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.filter.DataSource

   */
  public FormatSpecification getFormatString(final ExpressionRuntime runtime,
                                             final Element element,
                                             FormatSpecification formatSpecification)
  {
    final DataSource source = element.getDataSource();
    if (source instanceof RawDataSource)
    {
      RawDataSource rds = (RawDataSource) source;
      return rds.getFormatString(runtime, element, formatSpecification);
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.filter.DataSource

        processRootBand((Band) element);
      }
      else if (element instanceof Element)
      {
        final Element e = (Element) element;
        final DataSource source = e.getElementType();
        if (source instanceof RawDataSource)
        {
          final ElementStyleSheet style = element.getStyle();
          final String oldFormat = (String)
              style.getStyleProperty(ElementStyleKeys.EXCEL_DATA_FORMAT_STRING);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.filter.DataSource

  {
    if (e == null)
    {
      throw new NullPointerException();
    }
    DataSource s = e.getDataSource();
    while (s instanceof DataTarget)
    {
      final DataTarget tgt = (DataTarget) s;
      s = tgt.getDataSource();
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.filter.DataSource

              "Update your report definition.");
      processAnchor((Anchor) value, parentRenderBox, element, stateKey);
    }
    else
    {
      final DataSource dataSource = element.getElementType();
      final Object rawValue;
      if (dataSource instanceof RawDataSource)
      {
        final RawDataSource rds = (RawDataSource) dataSource;
        rawValue = rds.getRawValue(runtime, element);
View Full Code Here

Examples of org.persvr.datasource.DataSource

   * persisted in the class's table (when the current transaction is committed).
   * @param className  The name of the class from which to instantiate.
   * @return the newly created instance object
   */
  public static Persistable newObject(String className) {
    DataSource source = DataSourceManager.getSource(className);
    if(source == null)
      throw new RuntimeException("The table " + className + " was not found");
    Persistable object = newObject(source);
    ((PersistableClass)object.getSchema()).doConstruction(PersevereContextFactory.getContext(), GlobalData.getGlobalScope(), object, new Object[]{});
    return object;
View Full Code Here

Examples of org.ribax.datasources.DataSource

        if (tlist != null)
          params.addAll(tlist);
      }
     
        // get a data source for the given URL
      DataSource  dataSource = DataSourceFactory.getDataSource(url,name);
     
      try {
            // get the input stream and return it
        return dataSource.getInputStream(params);
       
      } catch (IOException ex) {
        LOG.error(Messages.getString("DataUtils.0")+url,ex); //$NON-NLS-1$
        throw(ex);
     
View Full Code Here

Examples of org.sgx.yuigwt.yui.datasource.DataSource

  public void ready(final YuiContext Y) { 
    final Console console1 = Y.newConsole(ConsoleConfig.create().collapsed(true)).render().cast();
   
    //test 1 : Using DataSource.Local
    JavaScriptObject data1 = data1();
    DataSource ds1 = Y.newDataSourceLocal(DataSourceConfig.create().source(data1));
    ds1.sendRequest(DataSourceRequest.create().callback(new DataSourceCallbackAdapter() {
      @Override
      public void success(DataSourceEvent e) {
        console1.log("success1: "+JsUtil.dumpObj(e.response().meta())+
          " - "+JsUtil.dumpObj(e.response().results(), true));
      }
      @Override
      public void failure(DataSourceEvent e) {
        Window.alert("failure1: "+JsUtil.dumpObj(e));
      }
    }));
   
    //test2: use DataSource.Get for getting data from datatables.org:
    String ds2url =  "http://query.yahooapis.com/v1/public/yql?format=json&",
      yqlQuery = "show tables";
    DataSource ds2 = Y.newDataSourceGet(DataSourceConfig.create().source(ds2url));
    ds2.sendRequest(DataSourceRequest.create()
      .request("q="+yqlQuery)
      .callback(new DataSourceCallbackAdapter() {
      @Override
      public void success(DataSourceEvent e) {
//        JsArray<Result> results = e.response().results().cast();
View Full Code Here

Examples of org.teiid.test.framework.datasource.DataSource

    // }

    public synchronized Connection createDriverConnection(String identifier)
      throws QueryTestFailedException {

  DataSource ds = null;
  if (identifier != null) {
      ds = DataSourceMgr.getInstance().getDataSource(identifier);
  }
  if (ds == null) {
      throw new TransactionRuntimeException(
        "Program Error: DataSource is not mapped to Identifier "
          + identifier);
  }

  Connection conn = ds.getConnection();

  if (conn != null)
      return conn;

  ConnectionStrategy cs = null;
  if (identifier == null) {
      cs = new DriverConnection(ds.getProperties());

  } else {
      cs = new DriverConnection(ds.getProperties());
  }

//  conn = cs.getConnection();
//
//  conn = (Connection) Proxy.newProxyInstance(Thread.currentThread()
//    .getContextClassLoader(),
//    new Class[] { java.sql.Connection.class },
//    new CloseInterceptor(conn));

  ds.setConnection(cs.getConnection());

  return ds.getConnection();

    }
View Full Code Here

Examples of org.tmatesoft.hg.internal.DataSerializer.DataSource

    // Register new/changed
    FNCacheFile.Mediator fncache = new FNCacheFile.Mediator(repo, transaction);
    ArrayList<Path> touchInDirstate = new ArrayList<Path>();
    for (Pair<HgDataFile, DataSource> e : files.values()) {
      HgDataFile df = e.first();
      DataSource bds = e.second();
      Pair<Integer, Integer> fp = fileParents.get(df.getPath());
      if (fp == null) {
        // NEW FILE, either just added or resurrected from p2
        Nodeid fileRevInP2;
        if ((fileRevInP2 = c2Manifest.nodeid(df.getPath())) != null) {
          fp = new Pair<Integer, Integer>(df.getRevisionIndex(fileRevInP2), NO_REVISION);
        } else {
          // brand new
          fp = new Pair<Integer, Integer>(NO_REVISION, NO_REVISION);
        }
      }
      // TODO if fp.first() != NO_REVISION and fp.second() != NO_REVISION check if one
      // revision is ancestor of another and use the latest as p1, then
      Nodeid fileRev = null;
      final boolean isNewFile = !df.exists();
      if (fp.first() != NO_REVISION && fp.second() == NO_REVISION && !isNewFile) {
        // compare file contents to see if anything has changed, and reuse old revision, if unchanged.
        // XXX ineffective, need better access to revision conten
        ByteArraySerializer bas = new ByteArraySerializer();
        bds.serialize(bas);
        final byte[] newContent = bas.toByteArray();
        // unless there's a way to reset DataSource, replace it with the content just read
        bds = new DataSerializer.ByteArrayDataSource(newContent);
        if (new ComparatorChannel(newContent).same(df, fp.first())) {
          fileRev = df.getRevision(fp.first());
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.