Since I still don't have a clear answer on my particular situation, I guess
I am asking the wrong questions.
Here are further questions.
1) What does "individual" mean ?
2) Does the following ontology make any sense ? Why ? (I have the feeling
it doesn't)
:p1 a owl:ObjectProperty ;
rdfs:range xsd:integer .
:p2 a owl:DatatypeProperty ;
rdfs:range owl:Thing .
On Tue, Sep 6, 2016 at 3:53 PM, Nikolaos Beredimas <[email protected]>
wrote:
> Briefly,
> owl:Thing --> The class of OWL individuals
> *Object properties* connect pairs of individuals.
> *Data properties* connect individuals with literals
>
> In Jena, now, let's say you have a Statement instance
>
> getSubject
> <https://jena.apache.org/documentation/javadoc/jena/
> org/apache/jena/rdf/model/Statement.html#getSubject-->
> ()
> will give you Statement's subject as an instance of Resource.
> getURI
> <https://jena.apache.org/documentation/javadoc/jena/
> org/apache/jena/rdf/model/Resource.html#getURI-->
> ()
> on that Resource will get you a String with the URI of the subject, or null
> if it is a blank node
>
> getObject()
>
> will give you Statement's subject as an instance of RDFNode
>
> on this RDFNode you can use isLiteral() and isResource() to determine
> what it is.
>
> Of course there are other methods, you can use to get the same results.
>
> .
>
>
> On Tue, Sep 6, 2016 at 4:32 PM, Jérémy Coulon <
> [email protected]>
> wrote:
>
> > Thank you for your answers.
> > I think I am in the case you described by "There is also the possibility
> to
> > use simple SPARQL to determine whether a graph meets some conditions of
> > interest and then take action in application code accordingly."
> > I would like to retrieve the rdfs:range of a property and take actions
> > accordingly.
> > This is the reason why I would like to make a distinction between ranges
> > that could be rdfs:Literal (or a subclass of Literal) and ranges that are
> > "URIs or BlankNodes".
> >
> > What is the meaning of owl:Thing exactly ?
> > What is the meaning of owl:ObjectProperty vs. owl:DatatypeProperty ?
> >
> >
> > On Tue, Sep 6, 2016 at 2:02 PM, A. Soroka <[email protected]> wrote:
> >
> > > This is a very common misunderstanding, and we can correct it even more
> > > generally: _nothing_ in RDFS _or_ OWL can be used to restrict the
> triples
> > > in a graph, ever, under their specified semantics [1]. They can only be
> > > used to create new triples, not to disallow triples. SPIN (or
> > > implementations of the forthcoming SHACL specification) are indeed a
> more
> > > reasonable approach. There is also the possibility to use simple SPARQL
> > to
> > > determine whether a graph meets some conditions of interest and then
> take
> > > action in application code accordingly.
> > >
> > > ---
> > > A. Soroka
> > > The University of Virginia Library
> > >
> > > [1] There is an alternative closed-world semantics for OWL called ICV,
> > but
> > > I am not sure how easy it would be to use with Jena. It is implemented
> in
> > > Pellet, but this documentation for Pellet (https://github.com/
> > > Complexible/pellet/wiki/FAQ#jena-interface) refers to DIG, so it seems
> > > rather out of date.
> > >
> > > > On Sep 6, 2016, at 5:41 AM, Nikolaos Beredimas <[email protected]>
> > > wrote:
> > > >
> > > > I think you are misunderstanding the meaning of rdfs:range (a very
> > common
> > > > mistake)
> > > > Per definition,
> > > > rdfs:range is an instance of rdf:Property
> > > > <https://www.w3.org/TR/rdf-schema/#ch_property> that is used to
> state
> > > that
> > > > the values of a property are instances of one or more classes.
> > > >
> > > > So, rdfs:range is not supposed to be used to restrict the "kind" of
> an
> > > > object, but to infer it.
> > > >
> > > > If you want restrictions, try something like SPIN.
> > > >
> > > > Regards,
> > > > Nikos
> > > >
> > > > On Tue, Sep 6, 2016 at 12:34 PM, Jérémy Coulon <
> > > [email protected]
> > > >> wrote:
> > > >
> > > >> Hello,
> > > >>
> > > >> I would like to write my own ontology.
> > > >> For some properties I would like to restrict their range to URIs or
> > > >> BlankNodes but to forbid literals.
> > > >> For example:
> > > >> myprop a rdf:Property ;
> > > >> rdfs:range ***URIs or BlankNodes*** .
> > > >>
> > > >> I have difficulties to understand some semantics of RDFS and OWL.
> > > >> I don't see a way to do what I want with pure RDFS.
> > > >> I have read about owl:Thing but I don't understand what it is
> supposed
> > > to
> > > >> mean.
> > > >> Is owl:Thing the range I am looking for ?
> > > >> Is it possible to do what I need after all ?
> > > >>
> > > >> Thanks for your help.
> > > >>
> > > >> Jeremy
> > > >>
> > >
> > >
> >
>