You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Stephen Suffian <st...@gmail.com> on 2015/08/27 18:18:23 UTC

Duplicate JENA statements

I'm not sure if this is based on my implementation, or if this is a feature
of JENA.

I have a subject: person, and predicate: hasChildWithGender. If the person
has two children who are both females, I would store two seperate
statements for that person.

However, when I try to add 2 duplicate statements into the JENA model
(person hasChildWithGender female), (person hasChildWithGender female), and
then do a listStatements, ti only shows one instance of this statement. Is
there a way to have two duplicate statements in the JENA model, or should I
create another data property that will help me encode how many children of
each gender a person has?

Thanks!
Stephen Suffian

Re: Duplicate JENA statements

Posted by Stephen Suffian <st...@gmail.com>.
Fair enough.  Makes sense. Thanks!

On Thu, Aug 27, 2015 at 12:42 PM, Jean-Marc Vanel <je...@gmail.com>
wrote:

> This is not how RDF modeling works.
>
> You are telling twice the same thing to the model,
> only once is kept.
> And this is a good thing.
>
> I your perticular case,
> you could say:
>
> person hasDaughter Mary .
> person hasDaughter Susan .
>
>
>
> 2015-08-27 18:18 GMT+02:00 Stephen Suffian <st...@gmail.com>:
>
> > I'm not sure if this is based on my implementation, or if this is a
> feature
> > of JENA.
> >
> > I have a subject: person, and predicate: hasChildWithGender. If the
> person
> > has two children who are both females, I would store two seperate
> > statements for that person.
> >
> > However, when I try to add 2 duplicate statements into the JENA model
> > (person hasChildWithGender female), (person hasChildWithGender female),
> and
> > then do a listStatements, ti only shows one instance of this statement.
> Is
> > there a way to have two duplicate statements in the JENA model, or
> should I
> > create another data property that will help me encode how many children
> of
> > each gender a person has?
> >
> > Thanks!
> > Stephen Suffian
> >
>
>
>
> --
> Jean-Marc Vanel
> Déductions SARL - Consulting, services, training,
> Rule-based programming, Semantic Web
> http://deductions-software.com/
> +33 (0)6 89 16 29 52
> Twitter: @jmvanel , @jmvanel_fr ; chat: irc://irc.freenode.net#eulergui
>

Re: Duplicate JENA statements

Posted by Jean-Marc Vanel <je...@gmail.com>.
This is not how RDF modeling works.

You are telling twice the same thing to the model,
only once is kept.
And this is a good thing.

I your perticular case,
you could say:

person hasDaughter Mary .
person hasDaughter Susan .



2015-08-27 18:18 GMT+02:00 Stephen Suffian <st...@gmail.com>:

> I'm not sure if this is based on my implementation, or if this is a feature
> of JENA.
>
> I have a subject: person, and predicate: hasChildWithGender. If the person
> has two children who are both females, I would store two seperate
> statements for that person.
>
> However, when I try to add 2 duplicate statements into the JENA model
> (person hasChildWithGender female), (person hasChildWithGender female), and
> then do a listStatements, ti only shows one instance of this statement. Is
> there a way to have two duplicate statements in the JENA model, or should I
> create another data property that will help me encode how many children of
> each gender a person has?
>
> Thanks!
> Stephen Suffian
>



-- 
Jean-Marc Vanel
Déductions SARL - Consulting, services, training,
Rule-based programming, Semantic Web
http://deductions-software.com/
+33 (0)6 89 16 29 52
Twitter: @jmvanel , @jmvanel_fr ; chat: irc://irc.freenode.net#eulergui