I am working on a project that involves fetching data from Dbpedia and I was wondering whether there is anyway to convert the the object returned from a dbpedia query i.e a XMLSchema#double into a java int so that I can perform operations on it and modify the data for my use. I am using jena to fetch the data from the sparql endpoints jena provide. I tried using the toString method to change the RDFnode into a string and than converting into an int/double, but that doesnt seem to work and gives me the exception that is listed below:
Exception in thread "main" java.lang.NumberFormatException: For input string: "147181000000^^http://www.w3.org/2001/XMLSchema#double"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
Does anyone here have a work around this problem??