Hi Campbell,
Assuming you have just set this up why are you running a 5.0.9 build
when 5.0.11 is the latest version on source forge (soon to be updated
to 5.0.12) or have you had this running for sometime now ?
The Virtuoso RDF QUAD store is enabled by default an even with an
empty database their should be triples in the store that get created
by default:
$ /usr/local/virtuoso-opensource/bin/isql
OpenLink Interactive SQL (Virtuoso), version 0.9849b.
Type HELP; for help and EXIT; to exit.
SQL> SPARQL SELECT count(*) WHERE {?s ?p ?o};
Connected to OpenLink Virtuoso
Driver: 05.11.3039 OpenLink Virtuoso ODBC Driver
callret-0
INTEGER
________________________________________________________________________
_______
3861
1 Rows. -- 3 msec.
SQL>
Thus as a basic test can you run the same count query using isql
against your Virtuoso database to see what triple count it gives ?
I am not sure what "conn size" means in your statement "all others
report as loaded but conn size doesn’t change" ?
Note you can enable tracing in the Virtuoso Server to see what SPARQL
queries are being run against the server as detailed at :
http://docs.openlinksw.com/virtuoso/fn_trace_on.html#(NULL)
The output being written to the virtuoso.log file in the database
directory.
Have you been able to run the Virtuoso Sesame provider test programs
as detailed at:
http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/
VirtSesame2Provider#Setup
As this provide examples with source code as to how you can insert
and retrieve data from the Virtuoso RDF QUAD store into Sesame ?
Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support
On 30 Jul 2009, at 06:41, Campbell Allen wrote:
Hi,
I have installed Virtuoso OpenSource 5.0.9 on my Mac Powerbook. I
have used the default installation (which is running) and am trying
to create an RDF store using the Sesame2 framework as per http://
virtuoso.openlinksw.com/dataspace/dav/wiki/Main/
VirtSesame2Provider. I am testing various RDF stores and my use
case needs them to be accessible using the connection API interface
in java (hence why I chose the sesame API). Is this possible using
virtuoso with sesame libs? I notice that most of the doco mentions
using the isql / webdav interfaces.
In my case, I can create a repository object and get a connection
and load data..however I can only load 1 file successfully (all
others report as loaded but conn size doesn’t change) but then my
query ("SELECT * WHERE {?s ?p ?o}";) doesn’t return any results.
Do I have to manually create the RDF_Quad store or is this a
default db in the install? This could be the first port of call.
These instructions I referred to above state that the store is a
memory based store and ideally I would like a persistent native
store, are there any instructions / demos / tutorials that I could
use to create native stores?
Any help in getting Virtuoso (esp as a native store) running would
be greatly appreciated.
Kindly,
Campbell.
Please see the code snippet below:
//Setup the Sesame Repo to use the Virtuoso db
this.myRepository = new VirtuosoRepository("jdbc:virtuoso://
localhost:1111","dba","dba"); //get a context factory
this.vf = this.myRepository.getValueFactory();
System.out.println("Connecting to the virtuoso repository.....
\n"); try { //setup the repo
myRepository.initialize(); //get a connection to
it. conn = myRepository.getConnection(); } catch
(RepositoryException re) { re.printStackTrace(); }
//LOAD SOME DATA IN RDF/XML format
//get a context for the load --> File list is undeclared
here.. URL url = new URL(baseURI+fileList[i]); URI
context = vf.createURI(baseURI+fileList[i]); // Load a server-
side file in RDF/XML format into the store's default graph. (IS
THIS THE DEFAULT GRAPH????) this.conn.add(url, url.toString(),
RDFFormat.RDFXML, context);
//QUERY THE DATA
//test if the file exists -> use the cached version (hashCode
should be unique). File xmlResultFile = new File
("QueryOutput.xml"); try { FileOutputStream fout =
new FileOutputStream(xmlResultFile);
SPARQLResultsXMLWriter sparqlWriter = new SPARQLResultsXMLWriter
(fout); try { System.out.println
("\nQuery : " + queryString); TupleQuery tupleQuery
= conn.prepareTupleQuery(QueryLanguage.SPARQL,
queryString); tupleQuery.evaluate(sparqlWriter); //
RETURNS NO DATA } catch (Exception e)
{ throw new Exception(e.getMessage
()); } } catch (Exception e)
{ e.printStackTrace(); }
--
Campbell Allen, M.Phil Candidate
Centre for Marine Studies
University of Queensland
St Lucia, Brisbane 4072
----------------------------------------------------------------------
--------
Let Crystal Reports handle the reporting - Free Crystal Reports
2008 30-Day
trial. Simplify your report design, integration and deployment -
and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-
july_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users