Search the web
Sign In
New User? Sign Up
jena-dev · Jena Developers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 37222 - 37251 of 42508   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#37251 From: "Seaborne, Andy" <andy_seaborne@...>
Date: Mon Dec 8, 2008 2:47 pm
Subject: RE: ANN: Jena 2.5.7 and ARQ 2.6.0
andyseaborne
Offline Offline
Send Email Send Email
 
The way SF downloads work has changed a bit and this time we seem to have ended
up with non-lowercase named for files:

http://prdownloads.sourceforge.net/jena/Jena-2.5.7.zip
http://prdownloads.sourceforge.net/jena/ARQ-2.6.0.zip

         Andy

> -----Original Message-----
> From: jena-dev@yahoogroups.com [mailto:jena-dev@yahoogroups.com] On
> Behalf Of Seaborne, Andy
> Sent: 8 December 2008 14:10
> To: jena-dev@yahoogroups.com
> Subject: [jena-dev] ANN: Jena 2.5.7 and ARQ 2.6.0
>
> We are pleased to announce new releases of Jena and ARQ:
>
> Jena: http://prdownloads.sourceforge.net/jena/jena-2.5.7.zip
>
> ARQ: http://prdownloads.sourceforge.net/jena/arq-2.6.0.zip
>
> The version of ARQ in the Jena download and version of Jena in the ARQ
> download
> are sync'ed to these releases. You only need download one of them to get
> all
> the jar files.
>
> The difference is that the Jena download has the documentation and
> source for
> Jena, and the ARQ download has the documentation and source for ARQ.
>
>         Andy
>
>
> Changes (see downloads for details):
>
> ==== Jena 2.5.7
>
> Ontology API:
>    o Make OntModel.read(string) respect content negotiation
>
> Database layer:
>    o Compatibility fixes for PostgreSQL 8.3 (no schema changes)
>    o Compatibility fixes for MS SQL Server 2008 (no schema changes)
>
> ReasonerFactoryAssembler
>     o Now takes note of ja:schema properties & binds such a schema
>       to the reasoners that the factory produces.
>
> Reasoners:
>     o Modified @include processing and Rule.rulesFromURL to support
>       FileManager redirects.
>     o Fixed problem withLPTopGoalIterator which caused one extra level
>       of lookahead in some circumstances.
>
>
> ==== ARQ 2.6.0
> (changes since the version shipped with Jena 2.5.6)
>
> + Added .close() to Dataset and GraphStore for those implementations
> that
>   need to make changes permanent or release system resources.
>
> + Fix bug in SPARQL grammar (!) : expressions like "1+2*3" did not
> parse.
>   This is a fix to the grammar as published by the working group.
>    It does not invalidate or change any query that works - it makes some
>    illegal syntax work that should work.
>
> + Redesign of quad support.
>   AlgebraGeneratorQuad retired
>   Use Algebra.toQuadForm(Op) to turn an algebra expression into quads.
>
> + fn:string-join was misnamed - was actually renamed as fn:concat
>   And now takes arbitrary number of arguments
>
> + Bug fix: path parsing when "a" (for rdf:type)
>            is used in a property list (using ;)
>
> + Bug fix: LET expressions did not eliminate solutions when
>     assigned a new, different value.
>
> + Signal start/end of updates using the graph-level events mechanism.
>
> + Change to interface for query compilation : Algebra.compile and
> Algebra.optimize
>
> + Property paths added.  See documentation.
> http://jena.sourceforge.net/ARQ/property_paths.html
>
> == Maven
>
> Jena and ARQ are available as artifacts for Maven and Apache Ivy.
>
> The Jena repository is http://jena.hpl.hp.com/repo.
> This is mirrored to repo1.maven.org (mirroring may take 24 hours to
> happen).
>
>
>
>
>
>
> --------------------------------------------
>   Hewlett-Packard Limited
>   Registered Office: Cain Road, Bracknell, Berks RG12 1HN
>   Registered No: 690597 England
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

#37250 From: Chris Dollin <kers@...>
Date: Mon Dec 8, 2008 2:34 pm
Subject: Re: Model to RDB?
kers_ihy
Offline Offline
Send Email Send Email
 
On Monday 08 December 2008 14:04:22 Chris Dollin wrote:

> As a statup tactic, write the data out in Turtle (which you can do
> using the command-line jena.rdfcat tool, you don't have to write any
> Java code) and query it using SPARQL.

That was probably confusing. What I meant was:

(a) Write the data out in Turtle (etc), so that you can look at it
     and get the idea of what it's about.

(b) When you want to query the data, you can query it using SPARQL.
     The query syntax of SPARQL is similar to the notation of Turtle
     (not by accident), so that it's easier to see how a query matches
     up with the data.

Also, if what you're looking at is an ontology rather than instance
data, you should read Jena's ontology documentation, since some of
the queries you'd want to make on an ontology are part of the ontology
API.

--
"We did not have time to find out everything               /A Clash of Cymbals/
  we wanted to know."                                              - James Blish

Hewlett-Packard Limited registered office:                Cain Road, Bracknell,
registered no: 690597 England                                    Berks RG12 1HN

#37249 From: "Seaborne, Andy" <andy_seaborne@...>
Date: Mon Dec 8, 2008 2:09 pm
Subject: ANN: Jena 2.5.7 and ARQ 2.6.0
andyseaborne
Offline Offline
Send Email Send Email
 
We are pleased to announce new releases of Jena and ARQ:

Jena: http://prdownloads.sourceforge.net/jena/jena-2.5.7.zip

ARQ: http://prdownloads.sourceforge.net/jena/arq-2.6.0.zip

The version of ARQ in the Jena download and version of Jena in the ARQ download
are sync'ed to these releases. You only need download one of them to get all
the jar files.

The difference is that the Jena download has the documentation and source for
Jena, and the ARQ download has the documentation and source for ARQ.

         Andy


Changes (see downloads for details):

==== Jena 2.5.7

Ontology API:
    o Make OntModel.read(string) respect content negotiation

Database layer:
    o Compatibility fixes for PostgreSQL 8.3 (no schema changes)
    o Compatibility fixes for MS SQL Server 2008 (no schema changes)

ReasonerFactoryAssembler
     o Now takes note of ja:schema properties & binds such a schema
       to the reasoners that the factory produces.

Reasoners:
     o Modified @include processing and Rule.rulesFromURL to support
       FileManager redirects.
     o Fixed problem withLPTopGoalIterator which caused one extra level
       of lookahead in some circumstances.


==== ARQ 2.6.0
(changes since the version shipped with Jena 2.5.6)

+ Added .close() to Dataset and GraphStore for those implementations that
   need to make changes permanent or release system resources.

+ Fix bug in SPARQL grammar (!) : expressions like "1+2*3" did not parse.
   This is a fix to the grammar as published by the working group.
    It does not invalidate or change any query that works - it makes some
    illegal syntax work that should work.

+ Redesign of quad support.
   AlgebraGeneratorQuad retired
   Use Algebra.toQuadForm(Op) to turn an algebra expression into quads.

+ fn:string-join was misnamed - was actually renamed as fn:concat
   And now takes arbitrary number of arguments

+ Bug fix: path parsing when "a" (for rdf:type)
            is used in a property list (using ;)

+ Bug fix: LET expressions did not eliminate solutions when
     assigned a new, different value.

+ Signal start/end of updates using the graph-level events mechanism.

+ Change to interface for query compilation : Algebra.compile and
Algebra.optimize

+ Property paths added.  See documentation.
http://jena.sourceforge.net/ARQ/property_paths.html

== Maven

Jena and ARQ are available as artifacts for Maven and Apache Ivy.

The Jena repository is http://jena.hpl.hp.com/repo.
This is mirrored to repo1.maven.org (mirroring may take 24 hours to happen).






--------------------------------------------
   Hewlett-Packard Limited
   Registered Office: Cain Road, Bracknell, Berks RG12 1HN
   Registered No: 690597 England

#37248 From: Chris Dollin <kers@...>
Date: Mon Dec 8, 2008 2:04 pm
Subject: Re: Model to RDB?
kers_ihy
Offline Offline
Send Email Send Email
 
On Monday 08 December 2008 13:04:44 Alex Genadinik wrote:

> Is there a way for me to take an ontology using JENA and write it into
> a relational DB?

Yes. But it may not be what you want.

You can put a Jena model into an RDB using either the Jena built-in
ModelRDB or the newer additional library, SDB. In either case, the
RDB is being used to store RDF triples.

> I would like to be able to try to browse the data with a DB tool like
> TOAD or the MySQL tool for viewing data so that I can better make sense
> of what I need to query for and the nature of the data. 

As a statup tactic, write the data out in Turtle (which you can do
using the command-line jena.rdfcat tool, you don't have to write any
Java code) and query it using SPARQL.

> Also, if I can query using just the JENA API, what is the reason for having
> JOSEKI?

Joseki lets you publish RDF data by providing a SPARQL endpoint.

--
"We are on the brink of a new era, if only --"          /The Beiderbeck Affair/

Hewlett-Packard Limited                                          registered no:
registered office: Cain Road, Bracknell, Berks RG12 1HN          690597 England

#37247 From: "Seaborne, Andy" <andy_seaborne@...>
Date: Mon Dec 8, 2008 1:28 pm
Subject: RE: Re: TDB for begginers
andyseaborne
Offline Offline
Send Email Send Email
 
> -----Original Message-----
> From: jena-dev@yahoogroups.com [mailto:jena-dev@yahoogroups.com] On
> Behalf Of y_mazar
> Sent: 8 December 2008 12:45
> To: jena-dev@yahoogroups.com
> Subject: [jena-dev] Re: TDB for begginers
>
> First of all, Thanks for the prompt reply.
>
> One of the things that I could not understand (And I guess that my
> question regaeding MS-SQL shows it) is the basic architecture of TDB.
> Where does it store the data? Memory? File System? What is the role of
> Joseki?

TDB stores its persistent data on disk.  It's a library and is used via the Jena
API.

Joseki provides the SPARQL Protocol (i.e the use of HTTP to make SPARQL
queries).

> Another question rise here: TDB/SDB - what are the differences?

TDB is non-transactional, high performance.

SDB uses SQL databases and provides a transactional store.

> which
> one is better? What are the pros and cons of each module? Is the fact
> that TDB is an proprietary (optimized) rdf data store makes it the best
> option?

Which is best depends on what your requirements are.  TDB is not transactional.
For publishing essentially read-only data (on the web) that is fine and a good
tradeoff because all the overhead of transaction support has been avoided.  But
if you are building something more OLTP-like, then SDB is better for you.

Scale also matters - you said "millions of individuals".  If that's a few 10's
of triples per individual then a tuned (on a server with some RAM) database
installation will work for either system.

The nature of queries also matters.

>
> Some things that I missed in the Wiki (as a plain user/java developer)
> 1) A general explenation of TDB - its purpose, basic architecture, the
> difference between TDB and former modules (RDB/SDB)
>
> 2) Examples (code) - Java API - creating a model, loading data into
> model, execute SPARQL queries on the model

See the Jena (and ARQ) documentation for most of that.  TDB is a subsystem of
Jena and so the application will see the Jena API (except for
creating/connecting the TDB store in the first place - and even that can be
abstracted with Jena's assemblers).

>
> 3) Adding a link to TDB benchmark results would be useful

Which benchmarks had you in mind?  If you mean the Berlin SPARQL Benchmarks,
then they comes from a different group.  They also happen to be quite specific
in what they are testing (comparing direct mapped SQL to RDF stores).  It's a
side-effect they happen to test different RDF stores.  The range of queries only
fits they use case.

         Andy

>
> Thanks,
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

#37246 From: Alex Genadinik <genadinik@...>
Date: Mon Dec 8, 2008 1:04 pm
Subject: Model to RDB?
genadinik
Offline Offline
Send Email Send Email
 
Hi,

Is there a way for me to take an ontology using JENA and write it into
a relational DB?

I would like to be able to try to browse the data with a DB tool like
TOAD or the MySQL tool for viewing data so that I can better make sense
of what I need to query for and the nature of the data.  Protege is helpful
with it, but I would like another resource.

Also, if I can query using just the JENA API, what is the reason for having
JOSEKI?

Thanks,
Alex


#37245 From: "y_mazar" <yehonatanm@...>
Date: Mon Dec 8, 2008 12:44 pm
Subject: Re: TDB for begginers
y_mazar
Offline Offline
Send Email Send Email
 
First of all, Thanks for the prompt reply.

One of the things that I could not understand (And I guess that my
question regaeding MS-SQL shows it) is the basic architecture of TDB.
Where does it store the data? Memory? File System? What is the role of
Joseki?

Another question rise here: TDB/SDB - what are the differences? which
one is better? What are the pros and cons of each module? Is the fact
that TDB is an proprietary (optimized) rdf data store makes it the best
option?

Some things that I missed in the Wiki (as a plain user/java developer)
1) A general explenation of TDB - its purpose, basic architecture, the
difference between TDB and former modules (RDB/SDB)

2) Examples (code) - Java API - creating a model, loading data into
model, execute SPARQL queries on the model

3) Adding a link to TDB benchmark results would be useful

Thanks,

#37244 From: "Seaborne, Andy" <andy_seaborne@...>
Date: Mon Dec 8, 2008 9:57 am
Subject: RE: TDB for begginers
andyseaborne
Offline Offline
Send Email Send Email
 
> -----Original Message-----
> From: jena-dev@yahoogroups.com [mailto:jena-dev@yahoogroups.com] On
> Behalf Of y_mazar
> Sent: 8 December 2008 08:45
> To: jena-dev@yahoogroups.com
> Subject: [jena-dev] TDB for begginers
>
> Hi,
>
> I am working on a pilot project - building large ontology (millions of
> individuals).
>
> I did some reading on TDB (from the little I could find) and it seems
> like a good direction to choose since it offers best performance for
> queries (my main use-case).
>
> I have few questions to get me started:
>
> 1) What is the status of TDB? how stable is it? Is it intended for use
> (in other appllications) or it is still an experimental project?

TDB is still evolving but it is useable - other people are using it for their
systems.

> 2) Can I use TDB with (MS) SQL server?

No - TDB does not use SQL.  It runs it's own custom database.
If you want to run over an SQL database, try SDB.

> 3) Is there a tutorial which explains how to configure/use TDB? I could
> not understand how to use TDB from the wiki and some basic concepts are
> not explained - I will appreciate any refernces to more material.

Could you be more specific?  The wiki assumes you know Jena usage so the
external API is little more than

    Model model = TDBFactory.createModel(directory) ;

As a first step.

         Andy


>
> Thanks
>
> Yoni
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

#37243 From: "y_mazar" <yehonatanm@...>
Date: Mon Dec 8, 2008 8:45 am
Subject: TDB for begginers
y_mazar
Offline Offline
Send Email Send Email
 
Hi,

I am working on a pilot project - building large ontology (millions of
individuals).

I did some reading on TDB (from the little I could find) and it seems
like a good direction to choose since it offers best performance for
queries (my main use-case).

I have few questions to get me started:

1) What is the status of TDB? how stable is it? Is it intended for use
(in other appllications) or it is still an experimental project?
2) Can I use TDB with (MS) SQL server?
3) Is there a tutorial which explains how to configure/use TDB? I could
not understand how to use TDB from the wiki and some basic concepts are
not explained - I will appreciate any refernces to more material.

Thanks

Yoni

#37242 From: "momoiwa" <samdols@...>
Date: Sat Dec 6, 2008 5:35 am
Subject: Re: How to use binding variables with SPARQL
momoiwa
Offline Offline
Send Email Send Email
 
--- In jena-dev@yahoogroups.com, "max.gorbunov" <mgorbunov@...>
wrote:
>
> --- In jena-dev@yahoogroups.com, "momoiwa" <samdols@> wrote:
> >
> >
> > hi ~
> >
> > I've been developing FOAF ontology.
> > Firstly, I successfully created jena RDB Model with my FOAF rdf
> file.
> > and i wanted to add , delete or update FOAF resources by using
> SPARQL.
> >
> > I tried it as following
> >
> >
> >  INSERT { test:3 foaf:name "Michael" .}
> >
> > it was successfully executed and finally the triple was added to
the
> > model.
> >
> > But when i tried to add several triples which had linked(?)
objects
> > like "Bv::-42a16873:11e05ed64a8:-7fcf" , I could not find how to
use
> > binding variables in an insert SPARQL.
> >
> > I tried it as following.
> >
> >
> > INSERT { test:3 foaf:name "Michael" .
> >          test:3 foaf:holdsAccount ?account.
> >  ?account rdf:type foaf:OnlineAccount .
> >  ?account rdf:type foaf:OnlineChatAccount .
> >  ?account foaf:accountName "momoiwa"}
> >
> > When I ran this query, only one triple (test:3, foaf:name,
> "Michael")
> > was added to RDB Model.
> >
> >
> > could you tell me how to insert several triples which has non-
> > determined resources???
>
> I think you want to add anonymous resource. Try this:
>
> INSERT {
>   test:3 foaf:name "Michael" ;
>          foaf:holdsAccount [
>              a   foaf:OnlineAccount ,
>                  foaf:OnlineChatAccount ;
>              foaf:accountName "momoiwa" .
>          ] .
> }
>

Thank you Max  It works!

#37241 From: James Howison <james@...>
Date: Fri Dec 5, 2008 6:16 pm
Subject: Fwd: [protege-owl] a new OWL reasoner: HermiT
jameshowison
Offline Offline
Send Email Send Email
 
Anyone have a way to use this reasoner with Jena?  I see OWL-API, but
not Jena on their site.  Looks interesting.

--J

Begin forwarded message:

> From: Samson Tu <swt@...>
> Date: 4 December 2008 1:50:39 PM EST
> To: protege-owl@...
> Subject: [protege-owl] a new OWL reasoner: HermiT
> Reply-To: User support for the Protege-OWL editor
<protege-owl@...
> >
>
> Hi,
>
> It just came to my attention that there is a new OWL reasoner,
> http://www.hermit-reasoner.com/ developed at Oxford University
> Computing
> Laboratory.
>
> It is based on an algorithm supposedly to be much more efficient than
> previously known algorithms.
>
> Samson
>
> _______________________________________________
> protege-owl mailing list
> protege-owl@...
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing:
http://protege.stanford.edu/doc/faq.html#01a.03
>

#37240 From: James Howison <james@...>
Date: Fri Dec 5, 2008 6:09 pm
Subject: Re: Question about SPARQL query!!!
jameshowison
Offline Offline
Send Email Send Email
 
Let that be a lesson to all with SPARQL questions ;)

On 4 Dec 2008, at 12:32 PM, Chu Lam Thai wrote:

> Thank Andy, I solved it after seeing the model in N-Triples.
>
> Thai
>  ----- Original Message -----
>  From: Seaborne, Andy
>  To: jena-dev@yahoogroups.com
>  Sent: Thursday, December 04, 2008 3:54 PM
>  Subject: Re: [jena-dev] Question about SPARQL query!!!
>
>
>
>
>  Chu Lam Thai wrote:
>> Hello all,
>>
>> I have 2 FOAF profiles using different structures to describe
>> interests
>> as follows
>>
>> 1. the first foaf profile (using rdf:Bag)
>>
>> <foaf:interest>
>> <rdf:Bag>
>> <rdf:li>Swimming</rdf:li>
>> <rdf:li>Football</rdf:li>
>> <rdf:li>Table tennis</rdf:li>
>> </rdf:Bag>
>> </foaf:interest>
>>
>> 2. The second one: using rdf:resource and rdfs:label
>>
>> <foaf:interest rdf:resource="http://www.abc.com/interest.htm"
>> rdfs:label="Online Games"/>
>> <foaf:interest rdf:resource="http://www.abc.com/interest.htm"
>> rdfs:label="Football"/>
>> <foaf:interest rdf:resource="http://www.abc.com/interest.htm"
>> rdfs:label="Chatting"/>
>>
>>
>> String queryString =
>>
>> "PREFIX foaf: <http://xmlns.com/foaf/0.1/> " +
>>
>> "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> "+
>>
>> "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> " +
>>
>> "SELECT ?interest ?strInterest " +
>>
>> "WHERE { " +
>>
>> "{?x foaf:interest ?interest . ?interest rdfs:label ?
>> strInterest. }" +
>>
>> "UNION " +
>>
>> "{?x foaf:interest ?interest . ?interest rdf:Bag ?bag . ?bag rdf:li
>> ?strInterest. }" +
>
>  This is not the graph shape that the RDF/XML above encodes. Try
> writing
>  out your data in Turtle or N-Triples to see the real triples.
>
>  It's RDF striped syntax so rdf:Bag is a type (of a blank node).
>
>  Second, rdf:li is not the real property - it's rdf:_1, rdf:_2 etc.
>
>  The godo news is that ARQ support rdfs:member:
>
>  http://jena.sourceforge.net/ARQ/library-propfunc.html
>
>  so:
>  {
>  ?x foaf:interest ?interest .
>  ?interest rdfs:member ?strInterest
>  }
>
>  might be what you are looking for.
>
>  ?interest will be a bNode.
>
>  Andy
>
>>
>> "}";
>>
>> When I execute the query on the first model, it produce a proper
>> result,
>> but nothing on the second model.
>>
>> Can anyone help me solve this SPARQL query ?
>>
>>
>> Many thanks.
>>
>> Thai
>>
>
>

#37239 From: Reto Bachmann-Gmür <reto@...>
Date: Fri Dec 5, 2008 4:52 pm
Subject: Re: TripleMatch od RDF/XMl serializer
reto@...
Send Email Send Email
 
Hi Chris

The problem only occurs when serializing "RDF/XML-ABBREV", the attached
class outputs:


FOUND: Empty subject URI
  null null
<rdf:RDF
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:dc="http://purl.org/dc/elements/1.1/">
   <rdf:Description rdf:about="http://sub/fgfg">
     <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
     >bla</dc:title>
   </rdf:Description>
</rdf:RDF>

Cheers,
reto

Chris Dollin said the following on 12/04/2008 03:40 PM:
>
>
> On Thursday 04 December 2008 02:23:16 pm Reto Bachmann-Gmür wrote:
>> When I serialize a model as RDF/XML the find method of the underlying
>> graph gets called with a TripleMatch that returns a non-null
>> matchSubject of type com.hp.hpl.jena.graph.Node_URI where the
>> getURI()-method returns an empty-string. Does this have a particular
>> meaning in a TripleMatch?
>
> No.
>
> I assume you know that the model doesn't have any (broken) Resource
> with a URI of ""? Otherwise I have no idea where that could come
> from. What happens if you serialise to Turtle or NTRIPLES?
>
> --
> "Possibly you're not recalling some of his previous plans." Zoe, /Firefly/
>
> Hewlett-Packard Limited Cain Road, Bracknell, registered no:
> registered office: Berks RG12 1HN 690597 England
>
>

#37238 From: Chris Dollin <kers@...>
Date: Fri Dec 5, 2008 3:09 pm
Subject: Re: Re: Eyeball 2.1 RC 1
kers_ihy
Offline Offline
Send Email Send Email
 
On Wednesday 03 December 2008 14:44:58 Chris Dollin wrote:

> OK; I'll arrange a configuration option for that. For the moment you'll
> just have to `-exclude uri` and forgo the URI tests. ("For the moment"
> means "expect a new release candidate by the end of the week".)

(fx:argh)

s/end of the week/end of next Monday/

--
"Who do you serve, and who do you trust?"                             /Crusade/

Hewlett-Packard Limited     Cain Road, Bracknell,                registered no:
registered office:          Berks RG12 1HN                       690597 England

#37237 From: Anand Raj <srmaria_anand@...>
Date: Fri Dec 5, 2008 1:24 pm
Subject: Owl2java
srmaria_anand
Offline Offline
Send Email Send Email
 
hi,

can anyone help me with some of the samples how to use Owl2java.



thanks in advance,

with regards
Anandan P


       Add more friends to your messenger and enjoy! Go to
http://messenger.yahoo.com/invite/

#37236 From: "max.gorbunov" <mgorbunov@...>
Date: Fri Dec 5, 2008 9:14 am
Subject: Re: How to use binding variables with SPARQL
max.gorbunov
Offline Offline
Send Email Send Email
 
--- In jena-dev@yahoogroups.com, "momoiwa" <samdols@...> wrote:
>
>
> hi ~
>
> I've been developing FOAF ontology.
> Firstly, I successfully created jena RDB Model with my FOAF rdf
file.
> and i wanted to add , delete or update FOAF resources by using
SPARQL.
>
> I tried it as following
>
>
>  INSERT { test:3 foaf:name "Michael" .}
>
> it was successfully executed and finally the triple was added to the
> model.
>
> But when i tried to add several triples which had linked(?) objects
> like "Bv::-42a16873:11e05ed64a8:-7fcf" , I could not find how to use
> binding variables in an insert SPARQL.
>
> I tried it as following.
>
>
> INSERT { test:3 foaf:name "Michael" .
>          test:3 foaf:holdsAccount ?account.
>  ?account rdf:type foaf:OnlineAccount .
>  ?account rdf:type foaf:OnlineChatAccount .
>  ?account foaf:accountName "momoiwa"}
>
> When I ran this query, only one triple (test:3, foaf:name,
"Michael")
> was added to RDB Model.
>
>
> could you tell me how to insert several triples which has non-
> determined resources???

I think you want to add anonymous resource. Try this:

INSERT {
   test:3 foaf:name "Michael" ;
          foaf:holdsAccount [
              a   foaf:OnlineAccount ,
                  foaf:OnlineChatAccount ;
              foaf:accountName "momoiwa" .
          ] .
}

#37235 From: Dave Reynolds <der@...>
Date: Fri Dec 5, 2008 8:32 am
Subject: Re: owl reasoner with jena
derihy
Offline Offline
Send Email Send Email
 
Felipe Frechiani wrote:

>> The third: do you need /all/ the power that DL_MEM_RULE gives you,
>> or could you use one of the simpler reasoners? Or perhaps use Pellet
>> instead of the built-in reasoners?
>
> I need to subproperites taxonomy, list individuals, and also reclassification.
> Should i use MEM_RDFS_INF instead for this DL_MEM_RULE?

Depends what you mean by "reclassification", assuming means
classification then the answer will depend on what specific restrictions
   are in your ontology.

I would start with MICRO and if that doesn't work out for you, try Pellet.

Dave
--
Hewlett-Packard Limited
Registered Office: Cain Road, Bracknell, Berks RG12 1HN
Registered No: 690597 England

#37234 From: "momoiwa" <samdols@...>
Date: Fri Dec 5, 2008 8:23 am
Subject: How to use binding variables with SPARQL
momoiwa
Offline Offline
Send Email Send Email
 
hi ~

I've been developing FOAF ontology.
Firstly, I successfully created jena RDB Model with my FOAF rdf file.
and i wanted to add , delete or update FOAF resources by using SPARQL.

I tried it as following


  INSERT { test:3 foaf:name "Michael" .}

it was successfully executed and finally the triple was added to the
model.

But when i tried to add several triples which had linked(?) objects
like "Bv::-42a16873:11e05ed64a8:-7fcf" , I could not find how to use
binding variables in an insert SPARQL.

I tried it as following.


INSERT { test:3 foaf:name "Michael" .
          test:3 foaf:holdsAccount ?account.
	 ?account rdf:type foaf:OnlineAccount .
	 ?account rdf:type foaf:OnlineChatAccount .
	 ?account foaf:accountName "momoiwa"}

When I ran this query, only one triple (test:3, foaf:name, "Michael")
was added to RDB Model.


could you tell me how to insert several triples which has non-
determined resources???

Thanks

Michael

#37233 From: "Chu Lam Thai" <thaichu@...>
Date: Thu Dec 4, 2008 5:32 pm
Subject: Re: Question about SPARQL query!!!
thaicl
Offline Offline
Send Email Send Email
 
Thank Andy, I solved it after seeing the model in N-Triples.
 
Thai
----- Original Message -----
Sent: Thursday, December 04, 2008 3:54 PM
Subject: Re: [jena-dev] Question about SPARQL query!!!



Chu Lam Thai wrote:
> Hello all,
>
> I have 2 FOAF profiles using different structures to describe interests
> as follows
>
> 1. the first foaf profile (using rdf:Bag)
>
> <foaf:interest>
> <rdf:Bag>
> <rdf:li>Swimming</rdf:li>
> <rdf:li>Football</rdf:li>
> <rdf:li>Table tennis</rdf:li>
> </rdf:Bag>
> </foaf:interest>
>
> 2. The second one: using rdf:resource and rdfs:label
>
> <foaf:interest rdf:resource="http://www.abc.com/interest.htm"
> rdfs:label="Online Games"/>
> <foaf:interest rdf:resource="http://www.abc.com/interest.htm"
> rdfs:label="Football"/>
> <foaf:interest rdf:resource="http://www.abc.com/interest.htm"
> rdfs:label="Chatting"/>
>
>
> String queryString =
>
> "PREFIX foaf: <http://xmlns.com/foaf/0.1/> " +
>
> "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> "+
>
> "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> " +
>
> "SELECT ?interest ?strInterest " +
>
> "WHERE { " +
>
> "{?x foaf:interest ?interest . ?interest rdfs:label ?strInterest. }" +
>
> "UNION " +
>
> "{?x foaf:interest ?interest . ?interest rdf:Bag ?bag . ?bag rdf:li
> ?strInterest. }" +

This is not the graph shape that the RDF/XML above encodes. Try writing
out your data in Turtle or N-Triples to see the real triples.

It's RDF striped syntax so rdf:Bag is a type (of a blank node).

Second, rdf:li is not the real property - it's rdf:_1, rdf:_2 etc.

The godo news is that ARQ support rdfs:member:

http://jena.sourceforge.net/ARQ/library-propfunc.html

so:
{
?x foaf:interest ?interest .
?interest rdfs:member ?strInterest
}

might be what you are looking for.

?interest will be a bNode.

Andy

>
> "}";
>
> When I execute the query on the first model, it produce a proper result,
> but nothing on the second model.
>
> Can anyone help me solve this SPARQL query ?
>
>
> Many thanks.
>
> Thai
>


#37232 From: Alistair Miles <alistair.miles@...>
Date: Thu Dec 4, 2008 5:12 pm
Subject: Re: TDB named graphs
alistair.miles
Offline Offline
Send Email Send Email
 
Thanks Andy, that's fixed it.

On Wed, Dec 03, 2008 at 08:08:43PM +0000, Seaborne, Andy wrote:
>
>
> > -----Original Message-----
> > From: jena-dev@yahoogroups.com [mailto:jena-dev@yahoogroups.com] On Behalf
> > Of Chris Dollin
> > Sent: 03 December 2008 13:15
> > To: jena-dev@yahoogroups.com
> > Subject: Re: [jena-dev] TDB named graphs
> >
> > On Wednesday 03 December 2008 12:57:43 pm Alistair Miles wrote:
> > > Funny, we were just wondering about TDB support for named graphs,
> > > cosmic coincidence :)
> > >
> > > Using TDB 0.6 I just tried to do
> > >
> > > ---
> > > Dataset dataset = DatasetFactory.assemble("test/tdb/books.ttl");
> > > ---
> > >
> > > where books.ttl looks like
> > >
> > > ---
> > > @prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
> > > @prefix rdfs:   <http://www.w3.org/2000/01/rdf-schema#> .
> > > @prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> > > @prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
> > >
> > > [] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
> > >
> > > <#dataset> rdf:type         tdb:DatasetTDB ;
> > >     ja:defaultGraph <#graph> ;
> > >     .
> > >
> > > <#graph> rdf:type tdb:GraphTDB ;
> > >     tdb:location "test/tdb/books" ;
> > >     .
> > > ---
> > >
> > > and got an exception
> > >
> > > Caused by: java.lang.NullPointerException
> > >        at
> > com.hp.hpl.jena.assembler.AssemblerHelp.withFullModel(AssemblerHelp.java:39)
> > >        at
> > com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.
> > open(AssemblerGroup.java:67)
> > >        at
> > com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:4
> > 1)
> > >        at
> > com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:3
> > 8)
> > >        at
> > com.hp.hpl.jena.query.DatasetFactory.assemble(DatasetFactory.java:214)
> > >        at
> > com.hp.hpl.jena.query.DatasetFactory.assemble(DatasetFactory.java:203)
> > >        at
> > com.hp.hpl.jena.query.DatasetFactory.assemble(DatasetFactory.java:192)
> > >
> > > Am I right to think that there is no way to assemble a Dataset from
> > > a TDB store description file using TDB 0.6?
> >
> > I can't answer your question, but I can observe that it's falling over
> > in withFullModel, which is part of the Assembler code; looks like the
> > root object is null.
>
> The dataset assemble in TDB 0.6 is the dataset assemble for any dataset and is
the same as ARQ and Joseki use.  Use ja:defaultGraph/ja:namedGraph and make sure
that multiple TDB graph are in different directories - TDB 0.6.0 only supports
graphs, not datasets, natively.
>
> You have changed ja:RDFDataset to tdb:DatasetTDB which is why it is not
working for you.  tdb:DatasetTDB is not associated with any assembler in that
version.
>
>         Andy
>
> >
> > --
> > "Anything can happen in the next half-hour."
> > /Stingray/
> >
> > Hewlett-Packard Limited     Cain Road, Bracknell,                registered
> > no:
> > registered office:          Berks RG12 1HN                       690597
> > England
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

--
Alistair Miles
Senior Computing Officer
Image Bioinformatics Research Group
Department of Zoology
The Tinbergen Building
University of Oxford
South Parks Road
Oxford
OX1 3PS
United Kingdom
Web: http://purl.org/net/aliman
Email: alistair.miles@...
Tel: +44 (0)1865 281993

#37231 From: John Edward <jeedward@...>
Date: Thu Dec 4, 2008 4:12 pm
Subject: BCBGC-09 call for papers
jeedward
Offline Offline
Send Email Send Email
 

BCBGC-09 call for papers

 

The 2009 International Conference on Bioinformatics, Computational Biology, Genomics and Chemoinformatics (BCBGC-09) (website: http://www.PromoteResearch.org ) will be held during July 13-16 2009 in Orlando, FL, USA. We invite draft paper submissions. The conference will take place at the same time and venue where several other international conferences are taking place. The other conferences include:

·         International Conference on Artificial Intelligence and Pattern Recognition (AIPR-09)

·         International Conference on Automation, Robotics and Control Systems (ARCS-09)

·         International Conference on Enterprise Information Systems and Web Technologies (EISWT-09)

·         International Conference on High Performance Computing, Networking and Communication Systems (HPCNCS-09)

·         International Conference on Information Security and Privacy (ISP-09)

·         International Conference on Recent Advances in Information Technology and Applications (RAITA-09)

·         International Conference on Software Engineering Theory and Practice (SETP-09)

·         International Conference on Theory and Applications of Computational Science (TACS-09)

·         International Conference on Theoretical and Mathematical Foundations of Computer Science (TMFCS-09)

 

The website http://www.PromoteResearch.org contains more details.

 

Sincerely

John Edward

Publicity committee

 

 

 



#37230 From: Taylor Cowan <taylor_cowan@...>
Date: Thu Dec 4, 2008 4:05 pm
Subject: RDF builder pattern
taylor_cowan
Offline Offline
Send Email Send Email
 
I've been experimenting in jenabean with a new programming
model that's interface driven.  It
differs from the bean approach in that it's connected to the model, set/gets go
directly to a live model, as opposed to marshaling and un-marshaling java
beans.  Both have their advantages.  The new style allows your java code to
easily
morph the subject into new vocabularies, and it's no secret that I learned that
from Jena's polymorphic "as()" method.  Here's an example that asserts terms
from
three vocabularies against one subject:

// m is a jena model
//very simple example taken
fromhttp://www.w3.org/TR/2008/WD-skos-primer-20080221/
new Thing("http://www.w3.org/People/Berners-Lee/card#i";, m).

    as(Foaf.class).isa(Foaf.Person.class). //foaf land
       name("Timothy Berners-Lee").
    as(Skos.class). //skos land
       prefLabel("Tim Berners-Lee", "en").
    as(Rdfs.class). //rdfs land
       label("Tim Berners-Lee");


It's one line of code, formatted for readability.  When used with a good IDE,
code complete
makes it very easy to assert properties from well known vocabs this way.  Notice
that via java's generics you can avoid
the type cast on as().  There are more
examples, and example vocabulary interfaces here:

http://jenabean.googlecode.com/svn/trunk/src/main/java/example/thing/
http://jenabean.googlecode.com/svn/trunk/src/main/java/thewebsemantic/vocabulary\
/


And some more documentation on the technique:

http://docs.google.com/Doc?id=dds32ctp_1g5srf8cv

Taylor

#37229 From: "Felipe Frechiani" <felipefo@...>
Date: Thu Dec 4, 2008 3:30 pm
Subject: Re: owl reasoner with jena
frekiani
Offline Offline
Send Email Send Email
 
Hi,

Thanks for the reply.

On Thu, Dec 4, 2008 at 1:12 PM, Chris Dollin <kers@...> wrote:
>
> On Thursday 04 December 2008 03:03:46 pm Felipe Frechiani wrote:
> > Hi there,
> >
> > I'm trying to use jena builtin reasoner
> >
> > ontModel =
> > ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RULE_INF,
> > model);
>
> The most powerful of Jena's built-in OWL reasoners, hence the one that
> has to do the most work.
>
> > My ontology is in OWL_DL, but when i try to use my whole ontology it gives
> > me an out of memory.
>
> The first rule for handling an out-of-memory error:
> give Java more memory.

I already gave more memory to that, using about 1.5 gigas.


>
> The second: ask yourself how complex your ontology is and how much
> instance data you have. Is it reasonable that it would all fit in
> memory?

My first test there is no instances. Can it be an issue? i has about
200 concetps and about 700 restrictions

>
> The third: do you need /all/ the power that DL_MEM_RULE gives you,
> or could you use one of the simpler reasoners? Or perhaps use Pellet
> instead of the built-in reasoners?

I need to subproperites taxonomy, list individuals, and also reclassification.
Should i use MEM_RDFS_INF instead for this DL_MEM_RULE?

>
> --
> "We are on the brink of a new era, if only --" /The Beiderbeck Affair/
>
> Hewlett-Packard Limited Cain Road, Bracknell, registered no:
> registered office: Berks RG12 1HN 690597 England
>

--
Felipe Frechiani de Oliveira
Vitória - ES

#37228 From: Dave Reynolds <der@...>
Date: Thu Dec 4, 2008 3:28 pm
Subject: Re: owl reasoner with jena
derihy
Offline Offline
Send Email Send Email
 
Felipe Frechiani wrote:
  >
  > Hi there,
  >
  > I'm trying to use jena builtin reasoner
  >
  >  ontModel =
ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RULE_INF,  model);
  > My ontology is in OWL_DL, but when i try to use my whole ontology it
gives me an out of memory.

Try giving it more memory, use a weaker rule reasoner like MICRO or
switch to Pellet. If you are within DL then the latter is probably your
best bet.

  > Is this reasoner infer disjoint properties for the subclasses?

Humm. It should but checking the current rule set I don't think it does.

In terms of consistency checking this makes no difference because the
checking is done by looking at prototypical instances and prototypical
instances of the subclasses will be instances of the superclasses and
just can be inferred to be differentFrom each other.

  > Should i explicity all this in the subclasses?

No.

  > Is there an way to optimize that?

Other than pick reasoner (Micro, Mini, Full) no.

  > How much concepts and properties this reasoner can deal with?

See http://jena.sourceforge.net/inference/index.html#OWLcoverage

Dave

#37227 From: Chris Dollin <kers@...>
Date: Thu Dec 4, 2008 3:12 pm
Subject: Re: owl reasoner with jena
kers_ihy
Offline Offline
Send Email Send Email
 
On Thursday 04 December 2008 03:03:46 pm Felipe Frechiani wrote:
> Hi there,
>
> I'm trying to use jena builtin reasoner
>
>  ontModel =
> ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RULE_INF,
> model);

The most powerful of Jena's built-in OWL reasoners, hence the one that
has to do the most work.

> My ontology is in OWL_DL, but when i try to use my whole ontology it gives
> me an out of memory.

The first rule for handling an out-of-memory error:
give Java more memory.

The second: ask yourself how complex your ontology is and how much
instance data you have. Is it reasonable that it would all fit in
memory?

The third: do you need /all/ the power that DL_MEM_RULE gives you,
or could you use one of the simpler reasoners? Or perhaps use Pellet
instead of the built-in reasoners?

--
"We are on the brink of a new era, if only --"          /The Beiderbeck Affair/

Hewlett-Packard Limited     Cain Road, Bracknell,                registered no:
registered office:          Berks RG12 1HN                       690597 England

#37226 From: "Seaborne, Andy" <andy_seaborne@...>
Date: Thu Dec 4, 2008 3:04 pm
Subject: RE: Re: LARQ ResultSet iterator
andyseaborne
Offline Offline
Send Email Send Email
 
> -----Original Message-----
> From: jena-dev@yahoogroups.com [mailto:jena-dev@yahoogroups.com] On
> Behalf Of joawermter
> Sent: 3 December 2008 11:06
> To: jena-dev@yahoogroups.com
> Subject: [jena-dev] Re: LARQ ResultSet iterator
>
> I guess I'm not quite sure what you mean by the "likely number of
> results" from Lucene. Of course Lucene allows you to count the number
> of hits, such as:
>
> Searcher searcher = new Searcher();
> Hits hits = searcher.search(query);
> int numOfHits = hits.length();
>
> But I guess this is not what you're looking for...

Not really ... what an optimizer needs is estimate without doing the full
operation.

Suppose the query is

{ ?x :p ?v . ?v pf:textMatch '+foo' }

There are two choices:
1/ This order: good if "+foo" has lots of hits and :p is quite selective.  It
effectively turns into testing (one at a time) each result from ?x :p ?v.

2/ The other order, pf:textMatch first.  Good if this is the most selective
form, with ?x :p ?v for some ground term ?v (ground from the pf:textMatch) being
more of a simple retrieval of data.

3/ The third (of the two choices) is to do both separately and join the results.
The first two are forms of index join and require some constant memory use. 
This would need as much memory as the two matches need.  Unlikely to be a good
idea, unless ?v can some back in sorted order from each (then it's a merge join
which mightbe good if parallelism can be invoked)

         Andy

>
> Joachim
>
> --- In jena-dev@yahoogroups.com, "Seaborne, Andy" <andy_seaborne@...>
> wrote:
> >
> > I would reorder the query based on stats inside ARQ if I could but
> Lucene does not expose the likely number of results, as far as I know
> but I may have missed something.  If anyone knows how to get a quick
> estimate of the number of results, do let me know.
> >
> >         Andy
> >
> > > -----Original Message-----
> > > From: jena-dev@yahoogroups.com [mailto:jena-dev@yahoogroups.com] On
> > > Behalf Of joawermter
> > > Sent: 2 December 2008 16:30
> > > To: jena-dev@yahoogroups.com
> > > Subject: [jena-dev] Re: LARQ ResultSet iterator
> > >
> > > Thanks for the response. Indeed, it helped to use Lucene as an
> > > implicit filter. Now it runs really fast!
> > >
> > >
> > > >
> > > > What is the query?  How much data is there?
> > > >
> > > > It depends whether Lucene is being used as an index or as a test
> > > (implicit filter).  That depends if the subject is bound at point of
> > > use.
> > > >
> > > > ?s :p ?o .
> > > > ?o pf:textMatch 'foo'
> > > >
> > > > is slow while
> > > >
> > > > ?o pf:textMatch 'foo'
> > > > ?s :p ?o .
> > > >
> > > > is fast.
> > > >
> > > > Also, when using LARQ, the query engine has to go to Lucene so (1)
> > > lots of classloading may happen first time and (2) if it's not using
> > > Lucene efficiently.  For a small amount of data, this can be
> > > noticeable.  It only happens once (then JITting happens then it's
> > > really fast ... :-)
> > > >
> > > >         Andy
> > > >
> > >
> > >
> > >
> > > ------------------------------------
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> >
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

#37225 From: "Felipe Frechiani" <felipefo@...>
Date: Thu Dec 4, 2008 3:03 pm
Subject: owl reasoner with jena
frekiani
Offline Offline
Send Email Send Email
 

Hi there,

I'm trying to use jena builtin reasoner

 ontModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RULE_INF,  model);  

My ontology is in OWL_DL, but when i try to use my whole ontology it gives me an out of memory.
Is this reasoner infer disjoint properties for the subclasses? Should i explicity all this in the subclasses?
Is there an way to optimize that?
How much concepts and properties this reasoner can deal with?

--
Felipe Frechiani de Oliveira
Vitória - ES

#37224 From: "Seaborne, Andy" <andy_seaborne@...>
Date: Thu Dec 4, 2008 2:54 pm
Subject: Re: Question about SPARQL query!!!
andyseaborne
Offline Offline
Send Email Send Email
 
Chu Lam Thai wrote:
> Hello all,
>
> I have 2 FOAF profiles using different structures to describe interests
> as follows
>
> 1. the first foaf profile (using rdf:Bag)
>
> <foaf:interest>
>     <rdf:Bag>
>          <rdf:li>Swimming</rdf:li>
>          <rdf:li>Football</rdf:li>
>          <rdf:li>Table tennis</rdf:li>
>     </rdf:Bag>
> </foaf:interest>
>
> 2. The second one: using rdf:resource and rdfs:label
>
> <foaf:interest rdf:resource="http://www.abc.com/interest.htm"
> rdfs:label="Online Games"/>
> <foaf:interest rdf:resource="http://www.abc.com/interest.htm"
> rdfs:label="Football"/>
> <foaf:interest rdf:resource="http://www.abc.com/interest.htm"
> rdfs:label="Chatting"/>
>
>
> String queryString =
>
> "PREFIX foaf: <http://xmlns.com/foaf/0.1/> " +
>
> "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> "+
>
> "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> " +
>
> "SELECT ?interest ?strInterest " +
>
> "WHERE { " +
>
>     "{?x foaf:interest ?interest . ?interest rdfs:label ?strInterest. }" +
>
>     "UNION " +
>
>     "{?x foaf:interest ?interest . ?interest rdf:Bag ?bag . ?bag rdf:li
> ?strInterest. }" +

This is not the graph shape that the RDF/XML above encodes.  Try writing
out your data in Turtle or N-Triples to see the real triples.

It's RDF striped syntax so rdf:Bag is a type (of a blank node).

Second, rdf:li is not the real property - it's rdf:_1, rdf:_2 etc.

The godo news is that ARQ support rdfs:member:

http://jena.sourceforge.net/ARQ/library-propfunc.html

so:
{
?x foaf:interest ?interest .
?interest rdfs:member ?strInterest
}

might be what you are looking for.

?interest will be a bNode.

	 Andy

>
> "}";
>
> When I execute the query on the first model, it produce a proper result,
> but nothing on the second model.
>
> Can anyone help me solve this SPARQL query ?
>
>
> Many thanks.
>
> Thai
>

#37223 From: Chris Dollin <kers@...>
Date: Thu Dec 4, 2008 2:40 pm
Subject: Re: TripleMatch od RDF/XMl serializer
kers_ihy
Offline Offline
Send Email Send Email
 
On Thursday 04 December 2008 02:23:16 pm Reto Bachmann-Gmür wrote:
> When I serialize a model as RDF/XML the find method of the underlying
> graph gets called with a TripleMatch that returns a non-null
> matchSubject of type com.hp.hpl.jena.graph.Node_URI where the
> getURI()-method returns an empty-string. Does this have a particular
> meaning in a TripleMatch?

No.

I assume you know that the model doesn't have any (broken) Resource
with a URI of ""? Otherwise I have no idea where that could come
from. What happens if you serialise to Turtle or NTRIPLES?

--
"Possibly you're not recalling some of his previous plans."      Zoe, /Firefly/

Hewlett-Packard Limited     Cain Road, Bracknell,                registered no:
registered office:          Berks RG12 1HN                       690597 England

#37222 From: "Earnest_T_Bass" <jeffrey.a.schmitz@...>
Date: Thu Dec 4, 2008 2:36 pm
Subject: Re: model locks for concurrency
Earnest_T_Bass
Offline Offline
Send Email Send Email
 
--- In jena-dev@yahoogroups.com, "Seaborne, Andy" <andy_seaborne@...>
wrote:
>
> Jeff,
>
> So is the QueryExecution a normal ARQ one?  Pellet has it's own
SPARQL engine which should work on Pellet.
>

Here's the fully qualified setup that I use:

selQuery = com.hp.hpl.jena.query.QueryFactory.create(selQueryString,
Syntax.syntaxARQ);
this.qe = com.hp.hpl.jena.query.QueryExecutionFactory.create(selQuery,
this.ontModel,
					 queryMap);
results = this.qe.execSelect();

> There is nothing concurrent on an ARQ query engine but when it's
going to an inf graph it devolves to the graph's (lower level) query
handling but that dives into Pellet's graph impl at
findWithContinuation.  No concurrency possibilities I can see from
Jena here.

Ok, thanks.  Perhaps if/when it happens again I can provide a fuller
stack trace and more exact details of the circumstances both here and
on the Pellet list.

Jeff
>
>         Andy
>
> > -----Original Message-----
> > From: jena-dev@yahoogroups.com [mailto:jena-dev@yahoogroups.com] On
> > Behalf Of Earnest_T_Bass
> > Sent: 3 December 2008 21:12
> > To: jena-dev@yahoogroups.com
> > Subject: [jena-dev] Re: model locks for concurrency
> >
> > I've pasted a couple of the stack traces below.  I didn't grab the
> > entire traces, but I think (I honestly don't remember for sure now,
> > and it's not repeatable) the call my code made was:
> >
> >                 results = this.qe.execSelect();
> >
> > (there's that 'this' again ;-))
> >
> > 'qe' being a QueryExecution.
> >
> >
> > java.lang.UnsupportedOperationException: Cannot stop timer
> > 'rule-nominal' which is not started!
> >        at org.mindswap.pellet.utils.Timer.stop(Timer.java:139)
> >        at
> > org.mindswap.pellet.SROIQStrategy.complete(SROIQStrategy.java:151)
> >        at org.mindswap.pellet.ABox.isConsistent(ABox.java:1605)
> >        at org.mindswap.pellet.ABox.isType(ABox.java:1063)
> >        at
> > org.mindswap.pellet.KnowledgeBase.isType(KnowledgeBase.java:2324)
> >        at
> >
org.mindswap.pellet.jena.PelletInfGraph.findInABox(PelletInfGraph.java:4
> > 03)
> >        at
> >
org.mindswap.pellet.jena.PelletInfGraph.findWithContinuation(PelletInfGr
> > aph.java:212)
> >        at
> >
com.hp.hpl.jena.reasoner.BaseInfGraph.graphBaseFind(BaseInfGraph.java:34
> > 5)
> >        at
com.hp.hpl.jena.graph.impl.GraphBase.find(GraphBase.java:257)
> >
> >
> > java.lang.UnsupportedOperationException: Cannot stop timer
'rule-guess'
> > which is not started!
> >        at org.mindswap.pellet.utils.Timer.stop(Timer.java:139)
> >        at
> > org.mindswap.pellet.SROIQStrategy.complete(SROIQStrategy.java:166)
> >        at org.mindswap.pellet.ABox.isConsistent(ABox.java:1605)
> >        at org.mindswap.pellet.ABox.isType(ABox.java:1063)
> >        at
> > org.mindswap.pellet.KnowledgeBase.isType(KnowledgeBase.java:2324)
> >        at
> >
org.mindswap.pellet.jena.PelletInfGraph.findInABox(PelletInfGraph.java:4
> > 03)
> >        at
> >
org.mindswap.pellet.jena.PelletInfGraph.findWithContinuation(PelletInfGr
> > aph.java:212)
> >        at
> >
com.hp.hpl.jena.reasoner.BaseInfGraph.graphBaseFind(BaseInfGraph.java:34
> > 5)
> >
> >
> >
> > --- In jena-dev@yahoogroups.com, "Seaborne, Andy" <andy_seaborne@>
> > wrote:
> > >
> > > Jeff,
> > >
> > > Just a note: Jena's locking is external to the model and advisory.
> > >
> > > That is, we provide some locking helper code but the internals of
> > Jena itself do not do any lock management or react differently as to
> > whether a lock on a model is active or not. (If it were internal the
> > costs would be prohibitive as the locking would have to be worse-case
> > always.) Advisory: The application is expected to manage concurrency
> > so if it bypasses a lock, then that's wrong.  Pellet does not as far
> > as I know, make any use of Jena's locking and I don't immediately see
> > how it could.
> > >
> > > That text from the Pellet effectively means the contract is
> > single-reader at a time unless otherwise stated.
> > >
> > > Which specific Jena API call trigger the occasional timer exceptions
> > in Pellet?  And is that only with dynamic imports?
> > >
> > >         Andy
> > >
> > >
> > > > -----Original Message-----
> > > > From: jena-dev@yahoogroups.com [mailto:jena-dev@yahoogroups.com]
> > On Behalf
> > > > Of Earnest_T_Bass
> > > > Sent: 03 December 2008 17:49
> > > > To: jena-dev@yahoogroups.com
> > > > Subject: [jena-dev] Re: model locks for concurrency
> > > >
> > > > > How do "user requests" arrive? Are you perhaps using a framework
> > that
> > > > > spawns threads for you?
> > > > It's a tomcat webapp, but it's running on my development
machine and
> > I
> > > > am the only user, and it's setup to be single threaded.
> > > >
> > > > I suspect it has something to do with the below info from the
Pellet
> > > > website:
> > > >
> > > > Without explicit calls, the knowledge base will perform processing
> > > > operations as needed, which may lead to concurrent modification of
> > > > internal data structures and incorrect query results. To insure
> > thread
> > > > safety, modifications should be followed by a call to classify
> > method
> > > > on the @PelletInfGraph@ underlying the @InfModel@ The
following code
> > > > example illustrates this pattern.
> > > >
> > > >
> > > > Model model = ModelFactory.createOntologyModel(
> > > > PelletReasonerFactory.THE_SPEC, model );
> > > > model.read( "http://example.org/ontology" );
> > > >
> > > > /* ... any additional model modification ... */
> > > >
> > > > ((PelletInfGraph) model.getGraph()).classify();
> > > > model.query( ... );
> > > >
> > > > Note that because the classify method performs many operations,
> > > > including loading the knowledge base, classification, and
individual
> > > > realization, it may be a costly operation. @classify@ does not
need
> > to
> > > > be called after each modification, but it must be called
between any
> > > > modification and query operations. h3.
> > > >
> > > > >
> > > > > Or are you using the graph query SPI (as opposed to SPARQL) --
> > that
> > > > > will generate threads.
> > > > I'm not sure what the graph query SPI is.  I'm only using things
> > > > provided by the jena and arq api's though.
> > > >
> > > >
> > > > > (A method so long that it's hard to track local declarations is
> > anyways
> > > > > a method that's too long. IMAO.)
> > > > We'll just have to disagree on that one :-P  IMHO (btw, what's
the A
> > > > in IMAO stand for?) splitting up a method for no other reason than
> > to
> > > > make it smaller is not enough reason.  Also, knowing me, losing
> > track
> > > > of variables, even color coded ones (honestly, color coding is
> > > > something that doesn't even register with me when I'm looking at
> > > > code), is very much a possibility for any method over 5 lines
long.
> > > >
> > > > Thanks,
> > > > Jeff
> > > >
> > > >
> > > > --- In jena-dev@yahoogroups.com, Chris Dollin <kers@> wrote:
> > > > >
> > > > > On Wednesday 03 December 2008 03:42:12 pm Earnest_T_Bass wrote:
> > > > > > > That depends. Who else might be messing around with this
> > model at
> > > > > > > the same time? What about components of the model?
> > > > > > That's a good question.  I don't knowingly have any other
> > threads
> > > > > > messing around with the models, just one.  However, I'm
> > occasionally
> > > > > > getting Pellet startTimer and stopTimer exceptions that the
> > Pellet
> > > > > > folks claim is caused by improperly managed concurrency.  As
> > my code
> > > > > > never explicitly starts any  new threads and only handles one
> > user
> > > > > > request at a time, I'm not sure where the concurrency is
> > coming from.
> > > > >
> > > > > How do "user requests" arrive? Are you perhaps using a framework
> > that
> > > > > spawns threads for you?
> > > > >
> > > > > Or are you using the graph query SPI (as opposed to SPARQL) --
> > that
> > > > > will generate threads.
> > > > >
> > > > > You may need to push on the Pellet folks a little harder.
> > > > >
> > > > > > > (You use `this.` a lot. Is there a reason?)
> > > > > > This denotes that the value I'm changing is an object variable
> > and not
> > > > > > just a local method variable that disappears after the method
> > returns.
> > > > > >  It also makes sure there's no mixup when a method parameter
> > is given
> > > > > > the same name as an object variable.  Back in the 'old' days
> > when I
> > > > > > was programming Ada, I think that was pretty common practice.
> > > > >
> > > > > I ask because I've never found it useful; Eclipse colours the
> > > > identifiers
> > > > > differently and unit tests (with TDD) catch the "wrong variable"
> > issue.
> > > > > (A method so long that it's hard to track local declarations is
> > anyways
> > > > > a method that's too long. IMAO.)
> > > > >
> > > > > --
> > > > > "We are on the brink of a new era, if only --"          /The
> > > > Beiderbeck Affair/
> > > > >
> > > > > Hewlett-Packard Limited registered office:                Cain
> > Road,
> > > > Bracknell,
> > > > > registered no: 690597 England
> > > > Berks RG12 1HN
> > > > >
> > > >
> > > >
> > > >
> > > > ------------------------------------
> > > >
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > >
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
>

Messages 37222 - 37251 of 42508   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help