Hi Andra,

You cannnot call the TTLP_MT function directly in Jena, but can if a  JDBC 
connection is made to Virtuoso and you do say is there anyway this can be done 
in "Java" , so would that suffice ? Note you can also use the Virtuoso 
RDFBulkloader [1] functions for managing the bulk loading of data (and invoke 
the functions via JDBC connection).

Also, the Jena getBulkUpdateHandler [2] method can be use for bulk loading of 
data in Jena and does call the Virtuoso TTLP_MT() under the covers to speed 
load times, exmaple7 in the sample programs [3] show how this method can be 
used. Although not you have to be using the latest v6 or v7 release as this was 
added sometime last year, but I believe from previous email you did upgrade 
from the old 6.1.4 build to the latest 6.1.8 ?

Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc.      //              http://www.openlinksw.com/
Weblog   -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter  -- http://twitter.com/OpenLink
Google+  -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers

[1] http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtBulkRDFLoader
[2] 
http://docs.openlinksw.com/jena/virtuoso/jena/driver/VirtGraph.html#getBulkUpdateHandler()
[3] 
http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtJenaProvider#The%20Tests

On 15 Jan 2014, at 20:00, Andra Waagmeester <an...@waagmeester.net> wrote:

> Hi,
> 
>     I am looking into a solution to automatically load triples into our 
> triples store. We use jena to convert our data into triples. Our current 
> workflow is that we dump the triples in a file (e.g. content.ttl) after which 
> this file is loaded through the isql command line:
> 
>     "DB.DBA.TTLP_MT (file_to_string_output 
> ('wpContent_v0.0.73237_20140115.ttl'), '', 'http://rdf.wikipathways.org'); “
> 
> Loading the file takes minutes, but it still requires some manual steps. I 
> would very much like to make both the authoring and the subsequent loading in 
> the triple store a automatic process. 
> 
>  I have tried the following in java:
> 
> InputStream in = new FileInputStream(args[1]);
>               InputStream in = new 
> FileInputStream("wpContent_v0.0.73237_20140115.ttl");
>               String url ="jdbc:virtuoso://localhost:4444";
> 
>               /*                      STEP 1                  */
>               VirtGraph wpGraph = new VirtGraph 
> ("http://rdf.wikipathways.org/";, url, “dba", “<dba-pw>");
> 
>               wpGraph.clear();
>               VirtuosoUpdateRequest vur = 
> VirtuosoUpdateFactory.read(in,wpGraph);
>                 vur.exec();
> 
> 
> 
> or loading them triple by triple:
> 
>               VirtGraph wpGraph = new VirtGraph 
> ("http://rdf.wikipathways.org/";, url,  “dba", “<dba-pw>");
>               
>               //wpGraph.getTransactionHandler().begin();
>               wpGraph.clear();
>               StmtIterator iter = model.listStatements();
>               while (iter.hasNext()) {
>                       Statement stmt      = iter.nextStatement();  // get 
> next statement
>                       wpGraph.add(new Triple(stmt.getSubject().asNode(), 
> stmt.getPredicate().asNode(), stmt.getObject().asNode()));
>                       System.out.println( stmt.getSubject()+" - 
> "+stmt.getPredicate()+" - "+stmt.getObject());
>               }
> 
> Both of these approached work, they only take hours to proceed. 
> 
> Can I get the minutes needed for loading through the isql  command line in an 
> automated pipeline process? Can I trigger the DB.DBA.TTLP_MT through java or 
> a shell script? 
> 
> Any guidance is much appreciated
> 
> 
> Kind regards,
> 
> 
> Andra Waagmeester 
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today. 
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk_______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to