Hi Hugh,

the error occurs when i create a model with:
    Model m = VirtModel.createDatabaseModel("foaf:test", 
"jdbc:virtuoso://localhost:1111", "dba", "dba");
    m.setNsPrefix("foaf", "http://xmlns.com/foaf/0.1/";);
    Resource me = m.createResource("foaf:" + "testPerson");
    me.addProperty(RDF.type, FOAF.Person);
    me.addProperty(FOAF.name, "Test User");
    me.addProperty(FOAF.firstName, "Test");
    me.addProperty(FOAF.family_name, "User");

immediately after this, i call the Jena method m.write(System.out, 
"RDF/XML-ABBREV"); 
and the output is as expected:
 <rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    xmlns:foaf="http://xmlns.com/foaf/0.1/";
    xmlns:dawgt="http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#";
    xmlns:xsd="http://www.w3.org/2000/10/XMLSchema#";
    xmlns:owl="http://www.w3.org/2002/07/owl#";
    xmlns:bif="bif:"
    xmlns:dc="http://purl.org/dc/elements/1.1/";
    xmlns:sql="sql:"
    xmlns:mf="http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#";
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";
    xmlns:rdfdf="http://www.openlinksw.com/virtrdf-data-formats#";
    xmlns:virtrdf="http://www.openlinksw.com/schemas/virtrdf#";>
  <foaf:Person rdf:about="foaf:testPerson">
    <foaf:name>Test User</foaf:name>
    <foaf:family_name>User</foaf:family_name>
    <foaf:firstName>Test</foaf:firstName>
  </foaf:Person>
</rdf:RDF>

Next, i'm trying to load the model from the store, i'm doing this with the same 
method as before:
VirtModel.createDatabaseModel("foaf:test", "jdbc:virtuoso://localhost:1111", 
"dba", "dba");
Is this right, i found no other way to load a model from the store?

if i'm calling m.write(System.out, "RDF/XML-ABBREV")now the output is:

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    xmlns:j.0="http://xmlns.com/foaf/0.1/";
    xmlns:dawgt="http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#";
    xmlns:xsd="http://www.w3.org/2000/10/XMLSchema#";
    xmlns:owl="http://www.w3.org/2002/07/owl#";
    xmlns:bif="bif:"
    xmlns:dc="http://purl.org/dc/elements/1.1/";
    xmlns:sql="sql:"
    xmlns:mf="http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#";
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";
    xmlns:virtrdf="http://www.openlinksw.com/schemas/virtrdf#";
    xmlns:rdfdf="http://www.openlinksw.com/virtrdf-data-formats#";>
  <j.0:Person rdf:about="foaf:testPerson">
    <j.0:name>Test User</j.0:name>
    <j.0:family_name>User</j.0:family_name>
    <j.0:firstName>Test</j.0:firstName>
  </j.0:Person>
</rdf:RDF>

The FOAF NS Prefix is missing.

Regards

Till



----- Original Nachricht ----
Von:     Hugh Williams <hwilli...@openlinksw.com>
An:      t...@arcor.de
Datum:   05.11.2008 10:27
Betreff: Re: [Virtuoso-users] Jena Model without NS Prefix

> HI Till,
> 
> Can you provide some sample code to demonstrate this issue, as we  
> have test in-house and method is supported ?
> 
> 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 31 Oct 2008, at 16:30, t...@arcor.de wrote:
> 
> > Hi
> >
> > i'm trying to add an additional NS Prefix to a Jena Model:  
> > model.setNsPrefix("foaf", FOAF.NS) but it seems it's not working.  
> > When i'm checking the Prefix Map of the model the added prefix is  
> > not in there. The Model is created via VirtModel.createDatabaseModel 
> > (_modelName, this.v_url, this.v_user, this.v_pwd). Am i missing  
> > something? Is this a bug in the Virtuoso Jena API?
> >
> > Cheers,
> > Till
> >
> >
> > ---------------------------------------------------------------------- 
> > ---
> > This SF.Net email is sponsored by the Moblin Your Move Developer's  
> > challenge
> > Build the coolest Linux based applications with Moblin SDK & win  
> > great prizes
> > Grand prize is a trip for two to an Open Source event anywhere in  
> > the world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > Virtuoso-users mailing list
> > Virtuoso-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/virtuoso-users
> 
> 

Reply via email to