You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by neha gupta <ne...@gmail.com> on 2016/09/22 07:41:57 UTC

Ontclass vs OntResource

What is the basic difference between model.createResource() and
model.createOntClass()?

Re: Ontclass vs OntResource

Posted by Dave Reynolds <da...@gmail.com>.
On 22/09/16 08:41, neha gupta wrote:
> What is the basic difference between model.createResource() and
> model.createOntClass()?
>

Just to add to what Lorenz has already explained ...

In programming terms then model.createResource() does not change the 
contents of the model, it just gives you a java object which could use 
to lookup property values or add them.

OntModel.createOntClass() will change the model, it will add a statement 
of the form:

    [] a owl:Class

or

    [] a rdfs:Class

depending on which language profile your OntModel is.

Dave

Re: Ontclass vs OntResource

Posted by "Lorenz B." <bu...@informatik.uni-leipzig.de>.
It is plain RDF, please have a look at the RDF data model.
It's just an RDF resource, neither an RDF property nor an RDFS class.
This will be inferred once you use it in specific triples, see the
RDF/RDFS entailment rules

> I am confuse about RDF Resource, with createResource() I do not know a
> class is created, an individual or a property is created?
>
> Man drives Car.
> Man and Car are classes here, drives predicates, so in this case what will
> be the Resource?
>
> On Thu, Sep 22, 2016 at 1:02 AM, Lorenz B. <
> buehmann@informatik.uni-leipzig.de> wrote:
>
>> Resource: RDF resource
>> OntClass: OWL class
>>
>>> What is the basic difference between model.createResource() and
>>> model.createOntClass()?
>>>
>> --
>> Lorenz B�hmann
>> AKSW group, University of Leipzig
>> Group: http://aksw.org - semantic web research center
>>
>>
-- 
Lorenz B�hmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center


Re: Ontclass vs OntResource

Posted by neha gupta <ne...@gmail.com>.
I am confuse about RDF Resource, with createResource() I do not know a
class is created, an individual or a property is created?

Man drives Car.
Man and Car are classes here, drives predicates, so in this case what will
be the Resource?

On Thu, Sep 22, 2016 at 1:02 AM, Lorenz B. <
buehmann@informatik.uni-leipzig.de> wrote:

> Resource: RDF resource
> OntClass: OWL class
>
> > What is the basic difference between model.createResource() and
> > model.createOntClass()?
> >
> --
> Lorenz Bühmann
> AKSW group, University of Leipzig
> Group: http://aksw.org - semantic web research center
>
>

Re: Ontclass vs OntResource

Posted by "Lorenz B." <bu...@informatik.uni-leipzig.de>.
Resource: RDF resource
OntClass: OWL class

> What is the basic difference between model.createResource() and
> model.createOntClass()?
>
-- 
Lorenz B�hmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center