On 18/09/14 09:26, Deyan Chen wrote:
在 2014年09月18日 15:32, Dave Reynolds 写道:
On 18/09/14 01:31, Deyan Chen wrote:
Hi Dave,
Thank you for your reply.
I know the means of the error, but I want to know why the second
case(model created by Model.union()) doesn't report the error.
Presumably because in that case you are using TDB instead of an
in-memory data structure.
The model in my first test cast was created from TDB store and an
in-memory data structure individually, it reported the same error.
Since you didn't show us that code it is hard to say but it looks like
you are running over an in-memory copy.
In the second case your updates are going straight to TDB.
As it happens you are also using different models for the read and
writes. The updates are going into the default graph of TDB and the
reads are coming from a union of the named graphs in the TDB. However,
for TDB models are really just projections out of a quad store so that's
not particularly relevant.
If you are going to do this sort of thing with TDB then use transactions.
And about the way to associate a triple with a weight value, have you a
better one or any other suggestions?
Apart from reification at the RDF level the alternative is to consider
explicit n-ary relations. The implementation of n-ary relations boils
down to something much the same as reification - create resources,
typically b-nodes, to represent each instance of the relation with
separate properties to link that instance to the relation components
(such as subject, object, weight).
It depends on whether you really are trying to annotate every RDF
statement or whether you want to build on top of RDF some way of
representing certain weighted property values.
I want to represent weighted property values on some RDF triples, such
as, disease and symptom relations.
Personally I would represent those with n-ary relations rather than
RDF-level reification but either could be made to work.
---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any
accompanying attachment(s) is intended only for the use of the intended
recipient and may be confidential and/or privileged of Neusoft
Corporation, its subsidiaries and/or its affiliates. If any reader of
this communication is not the intended recipient, unauthorized use,
forwarding, printing, storing, disclosure or copying is strictly
prohibited, and may be unlawful.If you have received this communication
in error,please immediately notify the sender by return e-mail, and
delete the original message and all copies from your system. Thank you.
---------------------------------------------------------------------------------------------------
This is a public forum :)
Dave