On Wednesday, October 02, 2013 10:47:45 AM Ralph Perniciaro wrote:
> I believe that I have the same issue.  If I create an ontology in protege
> and define an entity to have a property called title and specify that it
> should have exactly 1 title.  If I load the model into Jena and then create
> an individual of my entity type, I can add more than 1 title to the
> individual.  I was going to add my own checks to prevent this, unless
> someone can explain how Jena can enforce cardinality rules.

Jena doesn't enforce cardinality rules, except in the sense that you
can run validation checks to make sure the model is consistent.
But note that if C is some class with a restriction that P has exactly
one value, and you assert 

    c rdf:type C
    c P a
    c P b

then you haven't violated a cardinality rule; you've asserted that

    a owl:sameAs b

which may or may not be generated by the inference you're using.

(Since `title` is probably string-valued, it's a little trickier, "of
course".)

If you want on-the-fly cardinality checks in Jena you can always
write them youself. That way you can be as pragmatic as you please.

Chris




Reply via email to