Re: Jena rules to assign individuals to subclasses

2016-09-06 Thread A. Soroka
[ exstu: (?stu rdf:type Student), (?stu marks ?m), greaterThan(?m, 60) -> (?stu rdf:type ExcellentStudents) ] is one way to do this. Please look at the examples on that same page. --- A. Soroka The University of Virginia Library > On Sep 6, 2016, at 3:30 PM, javed khan wrote: > > Thanks Sorok

Re: Jena rules to assign individuals to subclasses

2016-09-06 Thread javed khan
Thanks Soroka. I do not know how to use* greaterThan(?x, ?y) here in my case? How can I compare the marks data property with this?* On Tue, Sep 6, 2016 at 12:09 PM, A. Soroka wrote: > https://jena.apache.org/documentation/inference/index.html#RULEbuiltins > > --- > A. Soroka > The University of

Re: Jena rules to assign individuals to subclasses

2016-09-06 Thread A. Soroka
https://jena.apache.org/documentation/inference/index.html#RULEbuiltins --- A. Soroka The University of Virginia Library > On Sep 6, 2016, at 3:05 PM, javed khan wrote: > > I have *Student* class, having *ExcellentStudents* and *PoorStudents* as > subclasses. > My ontology contains Student *mar

Jena rules to assign individuals to subclasses

2016-09-06 Thread javed khan
I have *Student* class, having *ExcellentStudents* and *PoorStudents* as subclasses. My ontology contains Student *marks* (*marks is data property*) and based on marks students can be assigned to ExcellentStudents and PoorStudents. My requirements is to achieve it using Jena rules. I need some hel

Re: Fuseki REST API document?

2016-09-06 Thread Jason Koh
Dear all and Andy, Thanks for the answer. The HTTP encoding should have been considered as you said! Thanks a lot. I ended up with using SPARQLWrapper ( https://rdflib.github.io/sparqlwrapper/) in Python as rdflib.prepareQuery seems to be fixed to rdflib only (not Jena.) Thanks again. With rega

Re: Creating individuals if not already exists

2016-09-06 Thread Chris Dollin
On 06/09/16 14:45, neha gupta wrote: So it means there is no method which check if an individual exists or not? No, it does not mean that. An Individual with URI u "exists" if a Resource with that URI has a property rdf:type of some (Ont)Class. So if you really wanted to know, you can use crea

Re: Creating individuals if not already exists

2016-09-06 Thread John A. Fereira
It would be difficult to do as the criteria for “an individual exists” could vary. For example, you can’t simply check if the rdfs:label for a Student already exist as it’s possible that there are two students with the same name. You might need to check for a unique studentID, or a combinatio

Re: Ontology rdfs:range owl:Thing

2016-09-06 Thread Nikolaos Beredimas
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

Re: Creating individuals if not already exists

2016-09-06 Thread neha gupta
So it means there is no method which check if an individual exists or not? On Tue, Sep 6, 2016 at 4:55 AM, John A. Fereira wrote: > You could run a query to get a resource with specific criteria (e.g. it > has an rdfs:label which has the users name). If you get a result, replace > the triple wh

Re: Ontology rdfs:range owl:Thing

2016-09-06 Thread Jérémy Coulon
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 t

Re: rdfs:comment

2016-09-06 Thread Sidra shah
I have a question class in my ontolgy which have instance: What is capital city of Spain? I have then Answer class having instance Madrid along with two other options London, Berlin. This is my owl file. Now in Jena/Java code, I want if user selects wrong option (not Madrid), it means user does no

Re: Ontology rdfs:range owl:Thing

2016-09-06 Thread A. Soroka
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

RE: Creating individuals if not already exists

2016-09-06 Thread John A. Fereira
You could run a query to get a resource with specific criteria (e.g. it has an rdfs:label which has the users name). If you get a result, replace the triple which has their GPS, otherwise create a new Student. -Original Message- From: neha gupta [mailto:neha.bang...@gmail.com] Sent: Tu

Re: rdfs:comment

2016-09-06 Thread Lorenz Buehmann
I don't understand what you are after. 1) This is not a Protege mailing list 2) http://dbpedia.org/Madrid is not a valid DBpedia URI 3) rdfs:comment could be retrieved by 3)a) SPARQL query 3)b) Load all triples about a particular resource, load those triples into Jena, use Jena RDF layer interfac

rdfs:comment

2016-09-06 Thread Sidra shah
Hi How can we get the rdfs:comment of certain resource in dbpedia? I give the address of resource in protege, but when I close it and open again, the address changes again to my ontology address and under comment Annotation only the address appears like http://dbpedia.org/Madrid instead of the com

Re: @base and @prefix in riot's Turtle output

2016-09-06 Thread Andy Seaborne
Hi Frans, See "riot --help" for your version. https://jena.apache.org/documentation/io/#command-line-tools Currently: --output=FMT Output in the given format, streaming if possible. --formatted=FMT Output, using pretty printing (consumes memory) --stream=FMT Output

Re: Ontology rdfs:range owl:Thing

2016-09-06 Thread Nikolaos Beredimas
I think you are misunderstanding the meaning of rdfs:range (a very common mistake) Per definition, rdfs:range is an instance of rdf:Property that is used to state that the values of a property are instances of one or more classes. So, rdfs:range is n

@base and @prefix in riot's Turtle output

2016-09-06 Thread Frans Knibbe
Hello, I use riot to convert RDF files to different formats on the command line. It works well, but I wonder if there is an option to have @base and @prefix definitions in the output in turtle format. In many cases that would result in more compact files that are easier to read for humans. I can

Ontology rdfs:range owl:Thing

2016-09-06 Thread Jérémy Coulon
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

Re: FOAF vocab missing/outdated

2016-09-06 Thread Andy Seaborne
On 06/09/16 00:34, Martynas Jusevičius wrote: Hey, FOAF seems not to be part of the vocabulary package anymore? https://github.com/apache/jena/tree/master/jena-core/src/main/java/org/apache/jena/vocabulary > Is there are reason for this? Was it ever there? A copy is present in the SPARQL

Re: Fuseki REST API document?

2016-09-06 Thread Andy Seaborne
On 06/09/16 00:51, Jason Koh wrote: Hi there, I am Jason Koh, a PhD student at UCSD studying semantic web. I am trying to use Jena+Fuseki as it supports REST API directly, but I cannot find API documents for it. I was trying to do reverse-engineering, but it is too much. *Is there any REST AP

Creating individuals if not already exists

2016-09-06 Thread neha gupta
I have created Students individuals in Jena and stored them in a file. Every time students login, updates their information like GPA and updates stored in the file. Student.createIndividual(ns, stdName); With this statement, suppose a student Neha is created with her information in the file. Next