Customer1.setPropertyValue(price, pricevalue);
Customer1.setPropertyValue(quantity, value);

Next time after login as Customer1, previous data has not overwritten and
the owl file shows me old data also..

On Sun, Sep 25, 2016 at 4:16 AM, Lorenz B. <
buehm...@informatik.uni-leipzig.de> wrote:

> Please learn to read the Javadoc [1] if you're programming in Java...
>
> And using an IDE would also help, usually this is able to show you the
> arguments and it's expected types.
>
>
> [1]
> https://jena.apache.org/documentation/javadoc/jena/
> org/apache/jena/ontology/OntResource.html
>
> > I used this:  customer.setPropertyValue(property, pricevariable);
> >
> > property here is property name:Item price and pricevariable is int value
> > but it gives me error of :
> >
> > *int can not be converted to RDF Node*
> >
> > On Sat, Sep 24, 2016 at 8:29 AM, Dave Reynolds <
> dave.e.reyno...@gmail.com>
> > wrote:
> >
> >> On 24/09/16 15:37, kumar rohit wrote:
> >>
> >>> Thanks Soroka and Dave, but how I can do it dynamically? I used this
> >>>
> >>>  Property property=model.getProperty(name space+ "Item price");
> >>> and then customer_1.addLiteral(property, Text Field value);
> >>> Now how to remove previously entered values? Any built-in methods?
> >>>
> >> Read my message again, I gave you the name of a method that does the
> >> replacement (= remove + add) in one go.
> >>
> >> The javadoc and documentation tutorials will help you find the many
> remove
> >> methods that are available.
> >>
> >> Dave
> >>
> >>
> >> On Sat, Sep 24, 2016 at 6:48 AM, A. Soroka <aj...@virginia.edu> wrote:
> >>> Remove the old triple and add a new one with the new value.
> >>>> ---
> >>>> A. Soroka
> >>>> The University of Virginia Library
> >>>>
> >>>> On Sep 24, 2016, at 9:33 AM, kumar rohit <kumar.en...@gmail.com>
> wrote:
> >>>>> I want to save item price entered by users in file. Samsung Galaxy
> >>>>>
> >>>> hasPrice
> >>>>
> >>>>> ?value.
> >>>>> User enter some value and it is stored in the file. After some time,
> >>>>> another price for same Samsung Galaxy is entered and it is stored.
> But
> >>>>>
> >>>> the
> >>>>
> >>>>> problem is that the old price is also there.
> >>>>> How can I overwrite the previous values with recently entered value
> so
> >>>>>
> >>>> that
> >>>>
> >>>>> my ontology save and shows one value at a time.
> >>>>>
> >>>>
> >>>>
> --
> Lorenz Bühmann
> AKSW group, University of Leipzig
> Group: http://aksw.org - semantic web research center
>
>

Reply via email to