Package uk.org.ogsadai.client.toolkit.activities.delivery

Examples of uk.org.ogsadai.client.toolkit.activities.delivery.DeliverToRequestStatus


            ServerProxy server,
            DataRequestExecutionResource drer)
    throws Exception
    {    
        CreateDataCache createCache = new CreateDataCache();
        DeliverToRequestStatus deliver = new DeliverToRequestStatus();
        deliver.connectInput(createCache.getResultOutput());
       
        PipelineWorkflow workflow = new PipelineWorkflow();
        workflow.add(createCache);
        workflow.add(deliver);
        executeWorkflow(drer, workflow);
        ResourceID cacheID = createCache.nextResult();
       
        String sql = "SELECT name, address FROM littleblackbook WHERE id=7958";
        SQLQuery query = new SQLQuery();
        query.addExpression(sql);
        query.setResourceID("MySQLResource");
        WriteToDataCache write = new WriteToDataCache();
        write.setResourceID(cacheID);
        write.connectDataInput(query.getDataOutput());
       
        PipelineWorkflow toCache = new PipelineWorkflow();
        toCache.add(query);
        toCache.add(write);
        executeWorkflow(drer, toCache);

        ReadFromDataCache read = new ReadFromDataCache();
        read.setResourceID(cacheID);
        TupleToWebRowSetCharArrays tupleToWRS = new TupleToWebRowSetCharArrays();
        tupleToWRS.connectDataInput(read.getResultOutput());
        deliver = new DeliverToRequestStatus();
        deliver.connectInput(tupleToWRS.getResultOutput());
       
        PipelineWorkflow fromCache = new PipelineWorkflow();
        fromCache.add(read);
        fromCache.add(tupleToWRS);
        fromCache.add(deliver);

        long start = System.currentTimeMillis();
        executeWorkflow(drer, fromCache);
        long stop = System.currentTimeMillis();
       
        server.getDataResource(cacheID).destroy();

       
        System.out.println("DATA CACHE: " + (stop-start) + "ms");
       
        query = new SQLQuery();
        query.addExpression(sql);
        query.setResourceID("MySQLResource");
        tupleToWRS = new TupleToWebRowSetCharArrays();
        tupleToWRS.connectDataInput(query.getDataOutput());
        deliver = new DeliverToRequestStatus();
        deliver.connectInput(tupleToWRS.getResultOutput());

        workflow = new PipelineWorkflow();
        workflow.add(query);
        workflow.add(tupleToWRS);
        workflow.add(deliver);
View Full Code Here


            ServerProxy server,
            DataRequestExecutionResource drer)
    throws Exception
    {    
        CreateDataCache createCache = new CreateDataCache();
        DeliverToRequestStatus deliver = new DeliverToRequestStatus();
        deliver.connectInput(createCache.getResultOutput());
       
        PipelineWorkflow workflow = new PipelineWorkflow();
        workflow.add(createCache);
        workflow.add(deliver);
        executeWorkflow(drer, workflow);
        ResourceID cacheID = createCache.nextResult();
       
        String sql = "SELECT name, address FROM littleblackbook WHERE id<100";
        SQLQuery query = new SQLQuery();
        query.addExpression(sql);
        query.setResourceID("MySQLResource");
        WriteToDataCache write = new WriteToDataCache();
        write.setResourceID(cacheID);
        write.connectDataInput(query.getDataOutput());
        TupleToWebRowSetCharArrays tupleToWRS = new TupleToWebRowSetCharArrays();
        tupleToWRS.connectDataInput(query.getDataOutput());
        deliver = new DeliverToRequestStatus();
        deliver.connectInput(tupleToWRS.getResultOutput());
       
        workflow = new PipelineWorkflow();
        workflow.add(query);
        workflow.add(write);
        workflow.add(tupleToWRS);
        workflow.add(deliver);

        long start = System.currentTimeMillis();
        executeWorkflow(drer, workflow);
        long stop = System.currentTimeMillis();
       
        server.getDataResource(cacheID).destroy();
       
        resultCache.add(new Long(stop-start));
       
        query = new SQLQuery();
        query.addExpression(sql);
        query.setResourceID("MySQLResource");
        tupleToWRS = new TupleToWebRowSetCharArrays();
        tupleToWRS.connectDataInput(query.getDataOutput());
        deliver = new DeliverToRequestStatus();
        deliver.connectInput(tupleToWRS.getResultOutput());

        workflow = new PipelineWorkflow();
        workflow.add(query);
        workflow.add(tupleToWRS);
        workflow.add(deliver);
View Full Code Here

        String peInfo = inputPE.toString();

        RDFUpdate rdfActivity = new RDFUpdate(peInfo);

        DeliverToRequestStatus deliverToRequestStatus = new DeliverToRequestStatus();

        TupleToWebRowSetCharArrays tupleToWebRowSet = new TupleToWebRowSetCharArrays();
        tupleToWebRowSet.connectDataInput(rdfActivity.getDataOutput());

        // Connect the output of RDFResource to DeliverToRequestStatus
        deliverToRequestStatus.connectInput(tupleToWebRowSet.getResultOutput());

        // Create the workflow
        PipelineWorkflow pipeline = new PipelineWorkflow();
        pipeline.add(rdfActivity);
        pipeline.add(tupleToWebRowSet);
View Full Code Here

                + "WHERE {     ?x ?p ?y .  "
                + "} LIMIT 1000";

        QueryRDFDB rdfActivity = new QueryRDFDB(SPARQLquery);

        DeliverToRequestStatus deliverToRequestStatus = new DeliverToRequestStatus();

        TupleToWebRowSetCharArrays tupleToWebRowSet = new TupleToWebRowSetCharArrays();
        tupleToWebRowSet.connectDataInput(rdfActivity.getDataOutput());

        // Connect the output of RDFResource to DeliverToRequestStatus
        deliverToRequestStatus.connectInput(tupleToWebRowSet.getResultOutput());

        // Create the workflow
        PipelineWorkflow pipeline = new PipelineWorkflow();
        pipeline.add(rdfActivity);
        pipeline.add(tupleToWebRowSet);
View Full Code Here

        String SPARQLquery = "PREFIX dc: <purl.org/dc/elements/1.1/> PREFIX swrc: <http://swrc.ontoware.org/ontology#> PREFIX conf: <http://dblp.l3s.de/d2r/resource/conferences/> PREFIX : <http://dblp.l3s.de/d2r/resource/authors/> SELECT DISTINCT ?Author  WHERE {  ?Paper1 swrc:series conf:pods .  ?Paper1 dc:creator ?Author .  ?Paper2 dc:creator ?Author .  ?Paper2 swrc:series conf:stoc .  ?Paper3 dc:creator ?Author .  ?Paper3 swrc:series conf:podc .  ?Paper4 dc:creator ?Author .  ?Paper4 swrc:series conf:lics . }";

        QueryEPR rdfActivity = new QueryEPR(SPARQLquery);
        rdfActivity.setResourceID("jorge");

        DeliverToRequestStatus deliverToRequestStatus = new DeliverToRequestStatus();

        TupleToWebRowSetCharArrays tupleToWebRowSet = new TupleToWebRowSetCharArrays();
        tupleToWebRowSet.connectDataInput(rdfActivity.getDataOutput());

        // Connect the output of RDFResource to DeliverToRequestStatus
        deliverToRequestStatus.connectInput(tupleToWebRowSet.getResultOutput());

        // Create the workflow
        PipelineWorkflow pipeline = new PipelineWorkflow();
        pipeline.add(rdfActivity);
        pipeline.add(tupleToWebRowSet);
View Full Code Here

       
        String SPARQLquery = "select * where { ?s ?p ?o . } LIMIT 1000 ";

        RDFActivity rdfActivity = new RDFActivity(SPARQLquery);

        DeliverToRequestStatus deliverToRequestStatus = new DeliverToRequestStatus();

        TupleToWebRowSetCharArrays tupleToWebRowSet = new TupleToWebRowSetCharArrays();
        tupleToWebRowSet.connectDataInput(rdfActivity.getDataOutput());

        // Connect the output of RDFResource to DeliverToRequestStatus
        deliverToRequestStatus.connectInput(tupleToWebRowSet.getResultOutput());

        // Create the workflow
        PipelineWorkflow pipeline = new PipelineWorkflow();
        pipeline.add(rdfActivity);
        pipeline.add(tupleToWebRowSet);
View Full Code Here

             UnexpectedDataValueException,
             DataSourceUsageException,
             WebRowSetResultSetParseException
  {
    RDFActivity rdfActivity = new RDFActivity(SPARQLquery);
        DeliverToRequestStatus deliverToRequestStatus =
            new DeliverToRequestStatus();
       
        TupleToWebRowSetCharArrays tupleToWebRowSet =
            new TupleToWebRowSetCharArrays();
        tupleToWebRowSet.connectDataInput(rdfActivity.getDataOutput());

        // Connect the output of RDFResource to DeliverToRequestStatus
        deliverToRequestStatus.connectInput(tupleToWebRowSet.getResultOutput());
       
        // Create the workflow
        PipelineWorkflow pipeline = new PipelineWorkflow();
        pipeline.add(rdfActivity);
        pipeline.add(tupleToWebRowSet);
View Full Code Here

     */
    public List<List<String>> query(String SPARQLquery) throws Exception
    {
        // Create the activities
        RDFActivity rdfActivity = new RDFActivity(SPARQLquery);
        DeliverToRequestStatus deliverToRequestStatus =
            new DeliverToRequestStatus();
       
        TupleToWebRowSetCharArrays tupleToWebRowSet =
            new TupleToWebRowSetCharArrays();
        tupleToWebRowSet.connectDataInput(rdfActivity.getDataOutput());

        // Connect the output of RDFResource to DeliverToRequestStatus
        deliverToRequestStatus.connectInput(tupleToWebRowSet.getResultOutput());
       
        // Create the workflow
        PipelineWorkflow pipeline = new PipelineWorkflow();
        pipeline.add(rdfActivity);
        pipeline.add(tupleToWebRowSet);
View Full Code Here

            // Create the activities
            RDFActivity rdfActivity = new RDFActivity(expressions[i]);
            tupleToWebRowSet[i] = new TupleToWebRowSetCharArrays();
            tupleToWebRowSet[i].connectDataInput(rdfActivity.getDataOutput());
   
            DeliverToRequestStatus deliverToRequestStatus =
                new DeliverToRequestStatus();
            deliverToRequestStatus.connectInput(tupleToWebRowSet[i].getResultOutput());
           
            // Create the workflow
            pipeline.add(rdfActivity);
            pipeline.add(tupleToWebRowSet[i]);
            pipeline.add(deliverToRequestStatus);
View Full Code Here

    }
   
    public boolean updateRegistry(String peData)
    {
      RDFUpdate rdfUpdateActivity = new RDFUpdate(peData);
      DeliverToRequestStatus deliverToRequestStatus = new DeliverToRequestStatus();

        TupleToWebRowSetCharArrays tupleToWebRowSet = new TupleToWebRowSetCharArrays();
        tupleToWebRowSet.connectDataInput(rdfUpdateActivity.getDataOutput());

        // Connect the output of RDFResource to DeliverToRequestStatus
        deliverToRequestStatus.connectInput(tupleToWebRowSet.getResultOutput());

        // Create the workflow
        PipelineWorkflow pipeline = new PipelineWorkflow();
        pipeline.add(rdfUpdateActivity);
        pipeline.add(tupleToWebRowSet);
View Full Code Here

TOP

Related Classes of uk.org.ogsadai.client.toolkit.activities.delivery.DeliverToRequestStatus

Copyright © 2018 www.massapicom. 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.