Examples of DataSource


Examples of com.adobe.dp.epub.io.DataSource

    this(new ZipContainerSource(file));
  }

  public Publication(ContainerSource containerSource) throws Exception {
    this.containerSource = containerSource;
    DataSource cont = containerSource.getDataSource("META-INF/container.xml");
    if (cont == null)
      throw new IOException("Not an EPUB file: META-INF/container.xml missing");
    String opfName = processOCF(cont.getInputStream());
    opf = new OPFResource(this, opfName);
    resourcesByName.put(opfName, opf);
    opf.load(containerSource, opfName);
    Iterator entries = containerSource.getResourceList();
    while (entries.hasNext()) {
View Full Code Here

Examples of com.aichamorro.dal.datasource.DataSource

  public static Test suite() {
    return new TestSuite( DataAccessLayerTest.class );
  }

  public void testDataAccessLayerAddDataSource() {
    DataSource ds = mock(DataSource.class);
    DataAccessLayer dal = new DataAccessLayer();
      dal.addDataSource(ds, "DataSourceId");

    assertEquals(dal.on("DataSourceId"), ds);
  }
View Full Code Here

Examples of com.clarkparsia.empire.ds.DataSource

          }
        }
      }
    }

    DataSource aSource = new JenaDataSource(aModel);

    //mSourceCache.put(theMap.get("files").toString(), aSource);

    return aSource;
  }
View Full Code Here

Examples of com.dotmarketing.portlets.report.struts.ReportForm.DataSource

    ReportForm rfm = (ReportForm) form;
    String owner = rfm.getOwner();
    ArrayList<String> ds = (DbConnectionFactory.getAllDataSources());
    ArrayList<DataSource> dsResults = new ArrayList<DataSource>();
    for (String dataSource : ds) {
      DataSource d = rfm.getNewDataSource();
      if (dataSource
          .equals(com.dotmarketing.util.Constants.DATABASE_DEFAULT_DATASOURCE)) {
        d.setDsName("DotCMS Datasource");
      } else {
        d.setDsName(dataSource);
      }
      dsResults.add(d);
    }
    rfm.setDataSources(dsResults);
    httpReq.setAttribute("dataSources", rfm.getDataSources());
View Full Code Here

Examples of com.eva.properties.DataSource

            /*
             * Try loading the properties for the given package form the
             * classpath using the naming convention "<package>/log.eva":
             */
            try {
                properties = new MapProperties(new DataSource(inClassLoader,
                        "classpath://" + inPackage.replace('.', '/') + "/"
                                + LOG_CONFIG_FILENAME));
            }
            catch(FileNotFoundException e) {
                DEFAULT_LOGGER.log(Level.CONFIG,
View Full Code Here

Examples of com.facebook.presto.execution.DataSource

    public void testNoPruning()
    {
        List<Partition> partitions = splitManager.getPartitions(tableHandle, Optional.<Map<ColumnHandle, Object>>of(ImmutableMap.<ColumnHandle, Object>of()));
        assertEquals(partitions.size(), 2);

        DataSource dataSource = splitManager.getSplits(session, tableHandle, BooleanLiteral.TRUE_LITERAL, BooleanLiteral.TRUE_LITERAL, Predicates.<Partition>alwaysTrue(), ImmutableMap.<Symbol, ColumnHandle>of(new Symbol("ds"), dsColumnHandle));
        List<Split> splits = ImmutableList.copyOf(dataSource.getSplits());
        assertEquals(splits.size(), 4);
    }
View Full Code Here

Examples of com.gentics.api.lib.datasource.Datasource

      final HttpServletResponse response) throws ServletException,
      IOException {

    String allString = request.getParameter(ALL_PARAMETER);
    if (allString != null && Boolean.parseBoolean(allString)) {
      Datasource ds = conf.getDatasource();
      CRDatabaseFactory.clearCache(ds);
      LOGGER.debug("Cleared the cache of the configured datasource for "
          + this.getServletName());
    } else {
      String[] contentids = request.getParameterValues(ID_PARAMETER);
      Datasource ds = conf.getDatasource();
      if (contentids != null) {
        for (String id : contentids) {
          CRDatabaseFactory.clearCache(ds, id);
          LOGGER.debug("Cleared " + id + " from the cache for "
              + this.getServletName());
View Full Code Here

Examples of com.google.code.javax.activation.DataSource

            } else {
                type = contentWithEncoding(type, encoding);
            }

            try {
                DataSource source = new ByteArrayDataSource(buf.toString(), type);
                part.setDataHandler(new DataHandler(source));
            } catch (final IOException IOE) {
                reportError(IOE.getMessage(), IOE, ErrorManager.FORMAT_FAILURE);
                part.setText(buf.toString(), encoding);
            }
View Full Code Here

Examples of com.google.gdata.data.analytics.DataSource

  * Note: the GA Export API currently has exactly one data source.
  * @param {DataFeed} feed Parameter passed
  *     back from the feed handler.
  */
  public static void outputFeedDataSources(DataFeed feed) {
    DataSource gaDataSource = feed.getDataSources().get(0);
    System.out.println(
      "\nTable Name      = " + gaDataSource.getTableName().getValue() +
      "\nTable ID        = " + gaDataSource.getTableId().getValue() +
      "\nWeb Property Id = " + gaDataSource.getProperty("ga:webPropertyId") +
      "\nProfile Id      = " + gaDataSource.getProperty("ga:profileId") +
      "\nAccount Name    = " + gaDataSource.getProperty("ga:accountName"));
  }
View Full Code Here

Examples of com.google.testing.testify.risk.frontend.model.DataSource

    LOG.info("Injecting standard datasources.");
    boolean admin = userService.hasAdministratorAccess();
    boolean devMode = userService.isDevMode();
    ServletUtils.requireAccess(admin || devMode);

    DataSource bugSource = new DataSource();
    bugSource.setInternalOnly(true);
    bugSource.setName("Bug Database");
    bugSource.setParameters(Lists.newArrayList("Path", "Hotlist"));

    DataSource testManager = new DataSource();
    testManager.setInternalOnly(true);
    testManager.setName("Test Database");
    testManager.setParameters(Lists.newArrayList("Label", "ProjectID", "SavedSearchID"));

    DataSource perforce = new DataSource();
    perforce.setInternalOnly(true);
    perforce.setName("Perforce");
    perforce.setParameters(Lists.newArrayList("Path"));

    DataSource issueTracker = new DataSource();
    issueTracker.setInternalOnly(false);
    issueTracker.setName("Issue Tracker");
    issueTracker.setParameters(Lists.newArrayList("Project", "Label", "Owner"));

    DataSource other = new DataSource();
    other.setInternalOnly(false);
    other.setName("Other...");
    other.setParameters(new ArrayList<String>());

    List<DataSource> all = Lists.newArrayList(
        bugSource, testManager, perforce, issueTracker, other);
    PersistenceManager pm = pmf.getPersistenceManager();
    try {
      // Remove any data source from what we will persist if it already exists.
      DataSource source;
      Iterator<DataSource> i = all.iterator();
      while (i.hasNext()) {
        source = i.next();
        Query query = pm.newQuery(DataSource.class);
        query.declareParameters("String nameParam");
        query.setFilter("name == nameParam");
        if (((List<DataSource>) query.execute(source.getName())).size() > 0) {
          i.remove();
        }
      }
      pm.makePersistentAll(all);
    } finally {
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.