Re: Property stored in Annotaion Section

2017-01-14 Thread neha gupta
I wonder why this gives me error when I use it as string -> (?x http://www.semanticweb.org/soccer#FavotiteLeague "FACup" ) I sit Domain of FavoriteLeague as Team and Range as Literal, but still it does not work. Error is semicolon expected, On Sat, Jan 14, 2017 at 3:22 P

Re: Property stored in Annotaion Section

2017-01-14 Thread neha gupta
it gives error. > > > > The string value in rule I found on web from link below: he used rules > like > > > > [rule: (?S rdf:type data:serveur), (?S data:identifiant-reseau > > "POLO")-> (?S data:newproperty "TEST")] > > > > >

Re: Property stored in Annotaion Section

2017-01-13 Thread neha gupta
Cup> "FACup" On Fri, Jan 13, 2017 at 5:25 PM, Andy Seaborne <a...@apache.org> wrote: > > > On 13/01/17 13:36, neha gupta wrote: > >> Hello Lorenz, I am sorry. >> >> Can we use FACup as string rather than a resource. >> > > Have you tr

Re: Property stored in Annotaion Section

2017-01-12 Thread neha gupta
> >>> Rule: > >>> > >>> (?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type http:// > >>> www.semanticweb.org/soccer#Team) " > >>> > >>> + "( ?x http://www.semanticweb.org/soccer#FACupGoals ?goals )" +

Re: Property stored in Annotaion Section

2017-01-12 Thread neha gupta
In simple words, do we need: inf.getResource(URI of FACup) ? I did not use it so far. On Thu, Jan 12, 2017 at 5:57 PM, neha gupta <neha.bang...@gmail.com> wrote: > I want to ask Lorenz, about the Then part of the rule: > > THEN-> team FavoriteLeague is FACup > &g

Re: Property stored in Annotaion Section

2017-01-12 Thread neha gupta
ot;greaterThan(?goals,30) > > + " -> (?x http://www.semanticweb.org/soccer#FavioriteLeague > > http://www.semanticweb.org/soccer#FACup )] > > > > > > On Thu, Jan 12, 2017 at 1:03 AM, Lorenz Buehmann < > > buehm...@informatik.uni-leipzig.de

Re: Property stored in Annotaion Section

2017-01-11 Thread neha gupta
uot;greaterThan(?goals,30) + " -> (?x http://www.semanticweb.org/soccer#FavioriteLeague http://www.semanticweb.org/soccer#FACup )] On Thu, Jan 12, 2017 at 1:03 AM, Lorenz Buehmann < buehm...@informatik.uni-leipzig.de> wrote: > > > On 11.01.2017 22:10, neha gupt

Re: Property stored in Annotaion Section

2017-01-11 Thread neha gupta
typo because I run similar rule for another data property FavioriteStadium and it also saves in Annotation area. On Wed, Jan 11, 2017 at 6:31 PM, Chris Dollin <chris.dol...@epimorphics.com> wrote: > > > On 11/01/17 15:15, neha gupta wrote: > >> Even this not works &

Re: Property stored in Annotaion Section

2017-01-11 Thread neha gupta
} > >>>>> > >>>>> I think the problem is here in the code. > >>>> I don't know how often we told you that RDF resources are identified > by > >>>> URIs... > >>>> Your class is > >>>> > >&g

Re: Property stored in Annotaion Section

2017-01-11 Thread neha gupta
ioriteLeague"); > >> > >> Please please read an RDF tutorial for the beginning. Please make sure > >> that you understand the difference between literals and resources in > RDF. > >>> On Wed, Jan 11, 2017 at 1:12 PM, Lorenz B. < > >&

Re: Property stored in Annotaion Section

2017-01-11 Thread neha gupta
esources in RDF. > > > > On Wed, Jan 11, 2017 at 1:12 PM, Lorenz B. < > > buehm...@informatik.uni-leipzig.de> wrote: > > > >> Can you please share the whole ontology with us? > >> And the snippet of code that loads + executes the rule. >

Re: Property stored in Annotaion Section

2017-01-11 Thread neha gupta
> > > > On Tue, Jan 10, 2017 at 11:40 PM, neha gupta <neha.bang...@gmail.com> > wrote: > > > >> Lorenz, what actually I did is created a data property in Protege : > >> "FavioriteLeague". > >> > >> Then I wrote this rule: >

Re: Property stored in Annotaion Section

2017-01-10 Thread neha gupta
*FACup* here is the resource in my ontology On Tue, Jan 10, 2017 at 11:40 PM, neha gupta <neha.bang...@gmail.com> wrote: > Lorenz, what actually I did is created a data property in Protege : > "FavioriteLeague". > > Then I wrote this rule: > > (?x http://www.w3

Re: Property stored in Annotaion Section

2017-01-10 Thread neha gupta
arations, and > later on you write the same model to disk. Nothing will be converted > into an annotation property then. > > > > On 09.01.2017 22:17, neha gupta wrote: > > Hi > > I have a rule like this > > > > If a team Goal>30 in a League (PremLea

Property stored in Annotaion Section

2017-01-09 Thread neha gupta
Hi I have a rule like this If a team Goal>30 in a League (PremLeague, ChampLeague etc) then it is the team FavioriteLeague. FavioriteLeague is a data property to which teams will be assigned through rules. But the problem here in my case is when I run the program, the FavioriteLeague property is

Add(Sum) operation about individuals not working

2016-12-31 Thread neha gupta
Hello I have team ontology in which we need to store information about teams like team wins, goals etc. I need to calculate the team goals in three categories: PremiurLeague, ChampionsLeague and FA cup.(From combo box each category should be selected) if (Category=="PremiurLeague"){ //get goals

Re: listresourceswithproperty()

2016-12-29 Thread neha gupta
gt; --- > A. Soroka > The University of Virginia Library > > > On Dec 29, 2016, at 8:57 AM, neha gupta <neha.bang...@gmail.com> wrote: > > > > Hi Soroka, it will lists both the subjects and objects of the Property p, > > right? > > > > > > > &

Re: listresourceswithproperty()

2016-12-29 Thread neha gupta
f/model/Model.html#listResourcesWithProperty-org. > apache.jena.rdf.model.Property- > > "Answer an iterator [with no duplicates] over all the resources in this > model that have property p. remove() is not implemented on this iterator." > > --- > A. Soroka > The University of Virg

listresourceswithproperty()

2016-12-29 Thread neha gupta
Hello, I want to ask what is the function of this method: listresourceswithproperty() And is it the same as when we query SPARQL like: Select ?x where { ?x rdf:type ?someclass } A simple example is highly appreciated as I did not find any solid examples on web about it. Thank you

Re: Correct syntax of rules

2016-12-01 Thread neha gupta
Thanks Dave, its really new knowledge for me as I thought ^ is used as AND(conjunction). On Thu, Dec 1, 2016 at 2:03 AM, Dave Reynolds <dave.e.reyno...@gmail.com> wrote: > On 30/11/16 17:55, neha gupta wrote: > >> (1) greaterThan(?score1,?score2)^(?score1, ?score3) >> >

Correct syntax of rules

2016-11-30 Thread neha gupta
(1) greaterThan(?score1,?score2)^(?score1, ?score3) (2) greaterThan(?score1,?score2)^ greaterThan(?score1, ?score3) In Jena rules, the ist statement is correct or the second?

Re: "Resource as Object" in Rules

2016-11-24 Thread neha gupta
Hello Lorenz, I have tried but did not work. It means the problem will be somewhere else. I am working on it. On Thu, Nov 24, 2016 at 11:23 AM, Lorenz B. < buehm...@informatik.uni-leipzig.de> wrote: > I don't see why this should not be possible. > > And I don't understand why you cannot try it

"Resource as Object" in Rules

2016-11-23 Thread neha gupta
I have a rule like if a team "wins" in Etihad stadium is greater than some threshold, Then ?team lg:FavioriteStadium lg:Etihad. lg:Etihad is an instance/resource in my owl file, so can I use this as object in Then part of the rule? Some one told me you can only use a Class as object in Then part

Re: Infer data property values

2016-11-16 Thread neha gupta
Hello Lorenz Thanks again. My variable is like OntClass favVariable = model.getOntClass(ns + "FavioriteStadium"); //then Jena rule Since I will login to the system as team1, all information saved will be for team1. Similarly for other teams. In my owl file, I have instances (Resources) like

Infer data property values

2016-11-16 Thread neha gupta
Hello I have a data property in my owl file: "FavoriteStadium" for a team. Triples will be like team1 FavoriteStadium ?stadium. I will infer the instances using a Jena rule like if a team win % is more in a particular stadium, it will be her favorite stadium. I have two questions here: 1)

Re: property values

2016-11-08 Thread neha gupta
When I use team1.addLiteral() before team1.getPropertyValue(), it does not give me Null error. On Tue, Nov 8, 2016 at 3:11 PM, Lorenz B. < buehm...@informatik.uni-leipzig.de> wrote: > "Good" is very subjective and depends on your design decisions...it > would work, sure. > But, what is the

Re: property values

2016-11-06 Thread neha gupta
I want to ask why data property value "win" does not have default zero value? If it was zero, team1.getPropertyValue() would not flush exception error message? On Sun, Nov 6, 2016 at 4:44 PM, Lorenz B. < buehm...@informatik.uni-leipzig.de> wrote: > Comments inline: > > Hi > > I want to get the

property values

2016-11-05 Thread neha gupta
Hi I want to get the property value and then add add/sum 2 for each team with it. team1(win value +2) // value is 2 here team1(win value +2) // value is 4 here team.getPropertyValue(Win); //then next operation to get value and sum 2 But the issue is I get error as I have not set the value first.

Re: resultset as string

2016-11-03 Thread neha gupta
It gives me error: NoSuchElementException: QueryIteratorCloseable t com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:93) On Thu, Nov 3, 2016 at 3:35 PM, neha gupta <neha.bang...@gmail.com> wrote: > Thanks Lorenz, I did not know about th

Re: resultset as string

2016-11-03 Thread neha gupta
Thanks Lorenz, I did not know about this method. On Thu, Nov 3, 2016 at 3:00 PM, Lorenz B. < buehm...@informatik.uni-leipzig.de> wrote: > If you know that there is exactly 1 result why does it not work to call > just once rs.next() ? E.g. > > rs.next().getLiteral(THE_VAR_NAME).getLexicalForm();

Re: Two Models handling

2016-10-29 Thread neha gupta
I mean my main issue and question is how to write few methods like team.addLiteral() to the second model.? On Sat, Oct 29, 2016 at 1:49 PM, neha gupta <neha.bang...@gmail.com> wrote: > I have ontology in which I want to add Team wins and goals. In this > ontology I uses only the

Two Models handling

2016-10-29 Thread neha gupta
I have ontology in which I want to add Team wins and goals. In this ontology I uses only the current wins using: team.setPropertyValue() as it over write old data. I also need to keep track of previous team wins, goals etc so I want to store it in another owl file and will use team.addLiteral().

Re: Statistic of Data in owl file

2016-10-19 Thread neha gupta
t; > >> neha, > >> > >> Your question is too open ended. Sounds like the whole exercise you > have > >> been asked to do. > >> > >> What have you tried? > >> > >> Try something and show what you have tried and your thought

Re: Statistic of Data in owl file

2016-10-18 Thread neha gupta
at have you tried? > > > > Try something and show what you have tried and your thoughts about it. (a > > complete, minimal example - emphasis on "complete" and "minimal"). > > > > Andy > > > > > > On 18/10/16 18:41, neha gu

Re: Statistic of Data in owl file

2016-10-18 Thread neha gupta
tried and your thoughts about it. (a > complete, minimal example - emphasis on "complete" and "minimal"). > > Andy > > On 18/10/16 18:41, neha gupta wrote: > >> Good evening, >> I have some team information in my ontology i-e team1 wins, goals, Euro &g

Statistic of Data in owl file

2016-10-18 Thread neha gupta
Good evening, I have some team information in my ontology i-e team1 wins, goals, Euro goals, Worldcup goals. team1 information will be stored like this in owl file. After one month, again team1 information will be entered, which of course, will over write the previous one. Can I maintain the

Re: sum property values

2016-10-12 Thread neha gupta
u want. What is the problem now? Did you try the query? > > > I am still waiting for any response about how to add/sum values of > > different data property values in SPARQL? > > > > > > > > On Sun, Oct 9, 2016 at 8:19 AM, neha gupta <neha.bang...@gmail.com&g

Re: sum property values

2016-10-11 Thread neha gupta
I am still waiting for any response about how to add/sum values of different data property values in SPARQL? On Sun, Oct 9, 2016 at 8:19 AM, neha gupta <neha.bang...@gmail.com> wrote: > yes because what I studied about SUM is it sum the values of single > variable. > > SELE

Re: sum property values

2016-10-09 Thread neha gupta
> > > On Sat, Oct 8, 2016 at 12:43 PM, Martynas Jusevičius < > marty...@graphity.org> > > wrote: > > > >> https://www.w3.org/TR/2013/REC-sparql11-query-20130321/# > aggregateExample > >> > >> On Sat, Oct 8, 2016 at 9:35 PM, neha gupta <

Re: sum property values

2016-10-08 Thread neha gupta
wrote: > https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#aggregateExample > > On Sat, Oct 8, 2016 at 9:35 PM, neha gupta <neha.bang...@gmail.com> wrote: > > I am sorry but need some details? I really have no idea how to sum > multiple > > values (data properties) us

Re: sum property values

2016-10-08 Thread neha gupta
I am sorry but need some details? I really have no idea how to sum multiple values (data properties) using SPARQL, despite searched the web. On Sat, Oct 8, 2016 at 11:21 AM, Andy Seaborne <a...@apache.org> wrote: > SUM and GROUP BY > > Andy > > > On 08/10/16

sum property values

2016-10-08 Thread neha gupta
team1 WorldCup_Goals 20 team1 EuroCup_Goals 25 team1 Other_Goals50 WorldCup_Goals, EuroCup_Goals and Other_Goals are my properties. How to calculate total goals of team1 using SPARQL?

Re: Fetch value from data property

2016-10-02 Thread neha gupta
Thanks a lot sir Lorenz. On Sun, Oct 2, 2016 at 5:30 AM, Lorenz B. < buehm...@informatik.uni-leipzig.de> wrote: > Yes, but according to Javadoc only if there is at most one value, > otherwise you get one of the values randomly. For multiple values you > would have to use listPropertyValues > >

Re: Fetch value from data property

2016-10-02 Thread neha gupta
Is it the right way to get int value from a property? RDFNode intValue =team1.getPropertyValue(wins); On Sun, Oct 2, 2016 at 4:27 AM, Lorenz B. < buehm...@informatik.uni-leipzig.de> wrote: > > > > "You have to get the "wins" value for "team1" first" > > This is the basic problem I do not know

Re: Fetch value from data property

2016-10-01 Thread neha gupta
"You have to get the "wins" value for "team1" first" This is the basic problem I do not know how to get the int value from "wins"? "you first have to get the "team1" individual/resource." I have individual like this: Individual team1 = team.createIndividual(ns + name); //name java variable. On

Re: Fetch value from data property

2016-10-01 Thread neha gupta
I am sorry Lorenz sir, Basically what I want to sum a team wins. When value is entered in text field, it is saved as data property "Wins" value in the file i-e team1 Wins 3. Since this value 3 is stored in owl file, when another entry is made for Wins property, say 2, I want to sum this new value

Fetch value from data property

2016-10-01 Thread neha gupta
Is this a proper way to fetch the int value from data property? OntProperty value=model.getOntProperty(ns+ "Wins"); Literal myliteral = model.createTypedLiteral(value); int sum=myliteral.getInt(); sum=sum+1;

Re: Construct query

2016-10-01 Thread neha gupta
Actually I have the same query like Tina, but can you explain it in term of a Student ontology because I understand the Student ontology more. Like Student hasCourse ?course. Teacher teaches ?course On Sat, Oct 1, 2016 at 3:10 AM, neha gupta <neha.bang...@gmail.com> wrote: > Paul,

Re: Construct query

2016-10-01 Thread neha gupta
Paul, thank you. If I have Student/University ontology and the ontology does not have "hasResearch" property can we create like this: CONSTRUCT {?s ex:hasResearch ?research} WHERE {?s rdf:type ex:Student;ex:hasResearch "C-SPARQL"} to create the property and assign instance to it? On Fri, Sep

Re: New entered value does not sum with previous value in owl file

2016-09-30 Thread neha gupta
Hello Lorenz, I have assigned the value to team1 but mistakenly typed only team. The Chris Dollin comment about "*setPropertyValue is /documented/ as deleting any previous value **for that property" * *makes sense but if I write * team1.addLiteral(goals, p), in place of

Re: New entered value does not sum with previous value in owl file

2016-09-30 Thread neha gupta
/09/16 12:08, neha gupta wrote: > >> Hello this does not sum the newly entered goals with the one already saved >> in my owl file. Every time I enter new goal (integer value), new data is >> saved and does not added(sum) with previously entered values. >> > > You

New entered value does not sum with previous value in owl file

2016-09-30 Thread neha gupta
Hello this does not sum the newly entered goals with the one already saved in my owl file. Every time I enter new goal (integer value), new data is saved and does not added(sum) with previously entered values. * int goalsss = soln.getLiteral("goal").getInt() ; //return integer value* *int

Re: filter error in query

2016-09-29 Thread neha gupta
Buehmann < buehm...@informatik.uni-leipzig.de> wrote: > Ok, happy to hear that it works now. Although it would be interesting to > know what "random changes" you did. Nevertheless, have fun in using Jena. > > > On 29.09.2016 12:34, neha gupta wrote: > > I am sor

Re: filter error in query

2016-09-29 Thread neha gupta
I am sorry Lorenz for late reply. It gives me the now the integer number. I do not know even now how, but I made some random changes to the code and it shows me the result now. Kind regards On Thu, Sep 29, 2016 at 12:33 AM, Lorenz B. < buehm...@informatik.uni-leipzig.de> wrote: > Obviously not,

Re: Typed value Exception

2016-09-28 Thread neha gupta
zig.de> wrote: > This is weird. If the query is wrong like you showed here, how can you > get a parse exception?! And as Chris said, > > PRINT THE VALUE OF soln.getLiteral("goals") by Java and show us the output. > > > On 28.09.2016 13:58, neha gupta wrote: >

Re: Typed value Exception

2016-09-28 Thread neha gupta
{ ?x rdf:type ont:Team . ?x ont:Goals ?goal . ?x ont:Wins ?wins} filter(?goal>10 && ?wins wrote: > On 28/09/16 12:15, neha gupta wrote: > >> I just want to get the integer value from data property "Goals". >> > > I know. You said that. But you have igno

Re: Typed value Exception

2016-09-28 Thread neha gupta
28, 2016 at 12:11 AM, Chris Dollin <chris.dol...@epimorphics.com > wrote: > On 27/09/16 21:59, neha gupta wrote: > >> int l = soln.getLiteral("goals").getInt() ; >> >> "goals" contain integer value but it gives me exception: >> >>

filter error in query

2016-09-28 Thread neha gupta
SELECT *" + " WHERE { ?x rdf:type ont:Team . ?x ont:team_goal ?goal . ?x ont:team_wins ?wins} filter(?goal>10 && ?wins

Typed value Exception

2016-09-27 Thread neha gupta
int l = soln.getLiteral("goals").getInt() ; "goals" contain integer value but it gives me exception: Error converting typed value to a number.

adding data values

2016-09-25 Thread neha gupta
I want to store team goals after each match. Team(Manchester for ex) Goals 2. Goals is data property in Protege.. After another match , another entry of goals is entered and stored. Each time it is saved as 2, 1, 3 but I need to add the new value with previous ones like 2+1+3=6. So how can we

Re: Ontclass vs OntResource

2016-09-22 Thread neha gupta
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. <

Ontclass vs OntResource

2016-09-22 Thread neha gupta
What is the basic difference between model.createResource() and model.createOntClass()?

Re: Calculating numeric values of Data property in Ontology

2016-09-12 Thread neha gupta
, Andy Seaborne <a...@apache.org> wrote: > 1/ SPARQL > > 2/ Literal.getInt > > Andy > > > On 12/09/16 09:04, neha gupta wrote: > >> Yes I want the arithmetic calculation of these literals. If students have >> these individual scor

Re: Calculating numeric values of Data property in Ontology

2016-09-12 Thread neha gupta
8:01, Lorenz Buehmann wrote: > > You already showed us code that add literals values (the scores) to > > resources, so what's the question now? > > > > > > On 11.09.2016 21:14, neha gupta wrote: > >> I have data properties in my ontology as: Java score=55, another d

Calculating numeric values of Data property in Ontology

2016-09-11 Thread neha gupta
I have data properties in my ontology as: Java score=55, another data property C++ score=60, and lets suppose Semantic web score=80. Can we add these three scores in Jena and if yes how? But we have to do it for each instance of Student like student1, student2 etc Property prop1=

Re: Creating individuals if not already exists

2016-09-06 Thread neha gupta
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: Tuesday, September 6, 2016 3:13 AM > To: users@jena.apache.org > Subject: Creating individuals if not

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

Re: Derefrencing URI

2016-08-20 Thread neha gupta
ou should begin with the > tutorials provided exactly for that purpose: > > https://jena.apache.org/getting_started/index.html > > --- > A. Soroka > The University of Virginia Library > > > On Aug 19, 2016, at 2:49 PM, neha gupta <neha.bang...@gmail.com> wrote:

Re: Derefrencing URI

2016-08-19 Thread neha gupta
lude an excerpt. Also please include the > code you have written so far. > > --- > A. Soroka > The University of Virginia Library > > > On Aug 19, 2016, at 10:34 AM, neha gupta <neha.bang...@gmail.com> wrote: > > > > I am working on undergrad project. The det

Re: Derefrencing URI

2016-08-19 Thread neha gupta
ncing": > > https://www.w3.org/wiki/DereferenceURI > > --- > A. Soroka > The University of Virginia Library > > > On Aug 19, 2016, at 4:36 AM, neha gupta <neha.bang...@gmail.com> wrote: > > > > I want the rdfs:comment of European capital cities in on

Derefrencing URI

2016-08-19 Thread neha gupta
I want the rdfs:comment of European capital cities in one file using Jena. While studied a lot about it, I still have no idea how to do this. I can do it of individual resource using Virtuoso but combining these into one file using Jena is currently beyond my knowledge. Also what is Dereference

Re: query not working

2016-08-11 Thread neha gupta
the string value here entered by user. Thanks for understanding. On Thu, Aug 11, 2016 at 7:30 AM, Jean-Marc Vanel <jeanmarc.va...@gmail.com> wrote: > "taught" and "research" are just strings , you need the real URI's between > <> . > > > > 2016-08-11

query not working

2016-08-11 Thread neha gupta
I have query select ?student where {?student my:hasClass ?class FILTER (?class =''"+string+"} hasClass has two individuals: taught and research. I will take this from user as: String string=box1.getSelectedItem().toString(); (user will enter either taught or research).

Re: Querysoloution return same individual

2016-08-03 Thread neha gupta
ehm...@informatik.uni-leipzig.de> wrote: > If you loop over a set of individuals, why do you assign in each iteration > three times the same value to all radio buttons? In one iteration you have > only one individual, thus, you can assign this value only to one > radiobutton. > > >

Querysoloution return same individual

2016-08-03 Thread neha gupta
Select * + where { ?Employee rdf:type emp:Employee }";This return three individuals. I use then it to assign to three radiobuttons but it assign one (same) individual to all three radiobuttons. Where is the mistake in code. while(result.hasNext()) { QuerySolution sol =

Adding multiple individuals

2016-07-21 Thread neha gupta
Thank you Admin for adding me. I am Neha and in the final semester of my Bachelor degree. My project is in Semantic web and Jena, unfortunately. I have read a lot about Jena and knows how to create classes and individuals. I know how to create single individual and assign it to a variable like