I just want to get the integer value from data property "Goals".

//Goals is already a data property in my owl file and it has integer value.
OntProperty goals=model.getOntProperty(ns+ "Goals");

How can I get this integer value for future arithmetic operations.

On Wed, Sep 28, 2016 at 12:11 AM, Chris Dollin <[email protected]
> 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:
>>
>> Error converting typed value to a number.
>>
>
> Print soln.getLiteral("goals") so that we can see the lexical
> form and type of the literal. Note that spaces are not permitted
> in integer lexical forms -- make sure there's no extra spaces
> in your print.
>
>
> Chris
>
> --
> "Always a BOM tomorrow."                                     Unsaid
> /Babylon 5/
>
> Epimorphics Ltd, http://www.epimorphics.com
> Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20
> 6PT
> Epimorphics Ltd. is a limited company registered in England (number
> 7016688)
>

Reply via email to