Actually their are many call from other classes thats why it is useless to copy all the code and paste here. I tried to type the code so that you understand it. I am sorry for any inconvenience.
On Fri, Sep 30, 2016 at 5:06 AM, Chris Dollin <[email protected]> wrote: > On 30/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 are not showing us the code you are using. > > Really, you're not. > > > > > * int goalsss = soln.getLiteral("goal").getInt() ; //return integer > value* > > *int totalgoals=goalsss+totalgoals; // total goals initial value is 0* > > > > *Literal p = model.createTypedLiteral(totalgoals);* > > * team.setPropertyValue(goals, p);// here goals is property name* > > > > There are these asterisks, which you probably meant as > highlighting. Don't do that. We want to be able to paste > the code you wrote, which should be the same as the code you > sent, into our local editors/IDEs, and tinker with it. > The line > > *int totalgoals=goalsss+totalgoals; // total goals initial value > is 0* > > isn't legal even if you drop the * and pretend it's in the middle > of a function, and > > team.setPropertyValue(goals, p);// here goals is property name* > > isn't legal because `team` isn't declared yet. > > So if we can't see the code you wrote, we can't tell > whether it's right or not. > > team.setPropertyValue(goals, p);// here goals is property name > > setPropertyValue is /documented/ as deleting any previous value > for that property and, if it didn't do that, all sorts of other > things wouldn't work. I think it's more likely that you're > not applying it to the right object -- but since you /don't > show your code/ and /don't show your data/, how are we to tell? > > Chris > > > >
