Examples of DataSource


Examples of de.fuberlin.wiwiss.pubby.sources.DataSource

 

  private DataSource buildDataSource(Configuration configuration) {
    requireExactlyOneOf(CONF.sparqlEndpoint, CONF.loadRDF);

    DataSource result;
    if (hasProperty(CONF.sparqlEndpoint)) {
     
      // SPARQL data source
      String endpointURL = getIRI(CONF.sparqlEndpoint);
      String defaultGraphURI = getIRI(CONF.sparqlDefaultGraph);
View Full Code Here

Examples of de.mhus.lib.form2.DataSource

  private HashMap<String, DataSource> packages = new HashMap<String, DataSource>();
  private DataSource defaultSource;
 
  @Override
  public Object getProperty(String name) {
    DataSource pack = getPack(name);
    name = fixName(pack,name);
    return pack.getProperty(name);
  }
View Full Code Here

Examples of edu.isi.karma.rep.sources.DataSource

      logger.error("The alignment tree is null.");
      return new UpdateContainer(new ErrorUpdate(
        "Error occured while populating the source. The alignment model is null."));
    }

    DataSource source = new DataSource(wk.getTitle(), tree);
   
    Map<WebService, Map<String, String>> servicesAndMappings =
      WebServiceLoader.getInstance().getServicesWithInputContainedInModel(source.getModel(), null);
   
    if (servicesAndMappings == null) {
      logger.error("Cannot find any services to be invoked according to this source model.");
      return new UpdateContainer(new ErrorUpdate(
        "Error occured while populating the source. Cannot find any services to be invoked according to this source model."));
View Full Code Here

Examples of io.druid.query.DataSource

      throw new ISE("Unknown query type[%s].", query.getClass());
    }

    final QueryToolChest<T, Query<T>> toolChest = factory.getToolchest();

    DataSource dataSource = query.getDataSource();
    if (!(dataSource instanceof TableDataSource)) {
      throw new UnsupportedOperationException("data source type '" + dataSource.getClass().getName() + "' unsupported");
    }
    String dataSourceName = getDataSourceName(dataSource);

    final VersionedIntervalTimeline<String, ReferenceCountingSegment> timeline = dataSources.get(dataSourceName);
View Full Code Here

Examples of it.eng.spagobi.tools.datasource.bo.DataSource

      String sqlQuery = statement.getSqlQueryString();
      UserProfile userProfile = (UserProfile)getEnv().get(EngineConstants.ENV_USER_PROFILE);
     
      ConnectionDescriptor connection = (ConnectionDescriptor)getDataSource().getConfiguration().loadDataSourceProperties().get("connection");
      DataSource dataSource = getDataSource(connection);
     
      String sqlStatement = buildSqlStatement(crosstabDefinition, query, sqlQuery, statement);
      logger.debug("Querying temporary table: user [" + userProfile.getUserId() + "] (SQL): [" + sqlStatement + "]");
     
      if (!TemporaryTableManager.isEnabled()) {
View Full Code Here

Examples of javax.activation.DataSource

               
                // retrieve config
                taskStatus = _taskStatusMap.get(CONFIGURATION_TASK);
                _config = null;
                try {
                    DataSource source = _server.getServices().getWGAConfiguration(_server.getSession());
                    _config = WGAConfiguration.read(source.getInputStream());
                    taskStatus.setSeverity(TaskStatus.OK);
                    taskStatus.setMessage("OK");
                    //taskStatus.setSeverityLabel("retrieved");
                    _multiTaskStatusControl.update(taskStatus);                   
                }
View Full Code Here

Examples of javax.activation.DataSource

        MimeMultipart content = new MimeMultipart("related");

        //Create attachments
        DataSource[] attachments = mailMessage.getAttachments();
        for (int i = 0; i < attachments.length; i++) {
            DataSource attachment = attachments[i];
            MimeBodyPart attachmentPart = createAttachmentPart(attachment);
            content.addBodyPart(attachmentPart);
        }
       
        //Create message body
View Full Code Here

Examples of javax.activation.DataSource

  public IStorage getStorage(IProgressMonitor monitor) {
    if (_server != null) {
      try {
        monitor.beginTask("Retrieving content of design resource '" + _state.getPath() + "'.", 1);
        _server.connectToServer();
        DataSource source = _server.getServices().retrieveFSDesignResourceContent(_server.getSession(), _state);
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        WGUtils.inToOut(source.getInputStream(), out, 1024);
        monitor.worked(1);
        return new WGAFSDesignResourceStorage(_state, out.toByteArray());
      } catch (Exception e) {
        monitor.setCanceled(true);
        return null;
View Full Code Here

Examples of javax.activation.DataSource

  public byte[] asBytes() {
    if (_server != null) {
      try {
        _server.connectToServer();
        DataSource source = _server.getServices().retrieveFSDesignResourceContent(_server.getSession(), _state);
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        WGUtils.inToOut(source.getInputStream(), out, 1024);
        return out.toByteArray();
      } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
View Full Code Here

Examples of javax.activation.DataSource

                  monitor.setTaskName("adding '" + remotePath + "'.");
                } else {
                  monitor.setTaskName("updating '" + remotePath + "'.");
                }
                if (resource.getType() == IResource.FILE) {
                  DataSource content = new FileDataSource(((IFile)resource).getLocation().toFile());
                  wgaSyncInfo.getServer().getServices().updateFSDesignResource(session, remotePath, content, resource.getLocalTimeStamp());
                  committedResources.add(resource);
                } else if (resource.getType() == IResource.FOLDER) {
                  wgaSyncInfo.getServer().getServices().mkFSDesignDir(session, remotePath);
                  committedResources.add(resource);
                }             
              }
            }
           
          } catch (Exception e) {
            throw new InvocationTargetException(e);
          }       
        } else if (info instanceof WGAPluginResourceSyncInfo) {
            try {
                WGAPluginResourceSyncInfo wgaSyncInfo = (WGAPluginResourceSyncInfo) info;
                if ((wgaSyncInfo.getKind() & SyncInfo.CONFLICTING) != SyncInfo.CONFLICTING) {
                    int change = SyncInfo.getChange(wgaSyncInfo.getKind());
                            if (change == SyncInfo.DELETION) {
                                WGARemoteServer remote = wgaSyncInfo.getServer();
                                remote.getServices().deactivatePlugin(remote.getSession(), ((WGAPluginResourceVariant)wgaSyncInfo.getRemote()).getPluginInfo());    
                                committedResources.add(wgaSyncInfo.getLocal());
                            } else if (change == SyncInfo.ADDITION) {
                                WGARemoteServer local = wgaSyncInfo.getRuntime().createRemoteServer();
                                local.connectToServer();
                                DataSource plugin = local.getServices().downloadPlugin(local.getSession(), wgaSyncInfo.getLocalPluginInfo());
                                WGARemoteServer remote = wgaSyncInfo.getServer();
                                remote.getServices().installPlugins(remote.getSession(), Collections.singletonList(plugin));
                                remote.getServices().activatePlugin(remote.getSession(), wgaSyncInfo.getLocalPluginInfo());
                                committedResources.add(wgaSyncInfo.getLocal());
                            }
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.