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 combination of first name, 
last name, and email address, or any other set of properties which will unique 
identify a Student.

If you’re storing Students in a file, why not just check if the student is in 
the file?





On 9/6/16, 9:45 AM, "neha gupta" <[email protected]> wrote:

>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 <[email protected]> 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 which has their GPS, otherwise create a new Student.
>>
>> -----Original Message-----
>> From: neha gupta [mailto:[email protected]]
>> Sent: Tuesday, September 6, 2016 3:13 AM
>> To: [email protected]
>> Subject: Creating individuals if not already exists
>>
>> 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 time, she login, again a new instance will be
>> created when the application executes *Student.createIndividual(ns,
>> stdName);?*
>>
>> *Is there any condition which states if the individual not already exists,
>> create it otherwise skip createIndividual statement?*
>>

Reply via email to