Hi Hugh,

According to the error I sent you (Cannot convert 0-46-04-06 to datetime :
Incorrect year value)
it should be xsd:date:  "-0046-04-06"^^<
http://www.w3.org/2001/XMLSchema#date>

I use the jdbc4 version copied at the time of VOS7.0.0 release
http://maven.aksw.org/archiva/browse/com.openlink.virtuoso/virtjdbc4/7.0.0
and use VOS 7.0.0. (stable release)

the sparql code I use for insert/delete is
"INSERT DATA INTO" / "DELETE DATA FROM") + " <" + graph + "> {\n"
 ... data in triples i.e.
<http://dbpedia.org/resource/Battle_of_Actium> <
http://dbpedia.org/ontology/date> "-0031-09-02"^^<
http://www.w3.org/2001/XMLSchema#date> .
 " } "

The code I use to run the update is here
https://github.com/dbpedia/extraction-framework/blob/master/live/src/main/java/org/dbpedia/extraction/live/storage/JDBCUtil.java#L23

and the JDBC url is here
https://github.com/dbpedia/extraction-framework/blob/master/live/live.default.ini#L77

Here are a few examples from DBpedia 3.9
<http://dbpedia.org/resource/Battle_of_Actium> <
http://dbpedia.org/ontology/date> "-0031-09-02"^^<
http://www.w3.org/2001/XMLSchema#date> .
<http://dbpedia.org/resource/Peloponnesian_War> <
http://dbpedia.org/ontology/date> "-0404-04-25"^^<
http://www.w3.org/2001/XMLSchema#date> .
<http://dbpedia.org/resource/Roman_Republic> <
http://dbpedia.org/ontology/dissolutionDate> "-0027-01-16"^^<
http://www.w3.org/2001/XMLSchema#date> .
<http://dbpedia.org/resource/Battle_of_Leuctra> <
http://dbpedia.org/ontology/date> "-0371-07-06"^^<
http://www.w3.org/2001/XMLSchema#date> .
<http://dbpedia.org/resource/Battle_of_Pydna> <
http://dbpedia.org/ontology/date> "-0168-06-22"^^<
http://www.w3.org/2001/XMLSchema#date> .
<http://dbpedia.org/resource/Battle_of_Cunaxa> <
http://dbpedia.org/ontology/date> "-0401-09-03"^^<
http://www.w3.org/2001/XMLSchema#date> .

Thanks,
Dimitris


On Thu, Oct 3, 2013 at 5:57 PM, Hugh Williams <hwilli...@openlinksw.com>wrote:

> Hi Dimitris,
>
> We have tested the following scenarios for testing insertion and querying
> of data, which work:
>
> 1) via conductor interface:
> sparql insert into graph <testyear> { <a> <b> "-80"^^
> <http://www.w3.org/2001/XMLSchema#gYear><http://www.w3.org/2001/XMLSchema#gYear>
>  };
> sparql insert into graph <testyear> { <a> <b> "-120"^^
> <http://www.w3.org/2001/XMLSchema#gYear><http://www.w3.org/2001/XMLSchema#gYear>
>  };
> sparql select * from <testyear> {?s ?p ?o}
>
> 2) via java code:
>     ps = conn.prepareStatement("sparql insert into graph <testyear> { <a1>
> <b> `bif:__rdf_long_from_batch_params($?,$?,$?)` }");
>     ps.setInt(1, 4);  //value with dateType
>     ps.setString(2, "-150");
>     ps.setString(3, 
> "http://www.w3.org/2001/XMLSchema#gYear";<http://www.w3.org/2001/XMLSchema#gYear>
> );
>     boolean rc = ps.execute();
>
> Thus we need to know:
>
> 1) what kind of datatype was used, http://www.w3.org/2001/XMLSchema#gYear or
> other ?
> 2) example of triple/triples that exhibit the problem
> 3) the java code example that is used for insert data
> 4) The version of the JDBC Driver being used  ( java -jar virtjdbcX.jar ,
> where X is the numeric value 3 or 4 )
> 5) The version of Virtuoso being used (virtuoso-t -?)
>
>   Best Regards
> Hugh Williams
> Professional Services
> OpenLink Software, Inc.      //              http://www.openlinksw.com/
> Weblog   -- http://www.openlinksw.com/blogs/
> LinkedIn -- http://www.linkedin.com/company/openlink-software/
> Twitter  -- http://twitter.com/OpenLink
> Google+  -- http://plus.google.com/100570109519069333827/
> Facebook -- http://www.facebook.com/OpenLinkSoftware
> Universal Data Access, Integration, and Management Technology Providers
>
> On 3 Oct 2013, at 11:20, Hugh Williams <hwilli...@openlinksw.com> wrote:
>
> Hi Dimitris,
>
> We are checking this and will report back ...
>
>   Best Regards
> Hugh Williams
> Professional Services
> OpenLink Software, Inc.      //              http://www.openlinksw.com/
> Weblog   -- http://www.openlinksw.com/blogs/
> LinkedIn -- http://www.linkedin.com/company/openlink-software/
> Twitter  -- http://twitter.com/OpenLink
> Google+  -- http://plus.google.com/100570109519069333827/
> Facebook -- http://www.facebook.com/OpenLinkSoftware
> Universal Data Access, Integration, and Management Technology Providers
>
> On 2 Oct 2013, at 08:08, Dimitris Kontokostas <jimk...@gmail.com> wrote:
>
> Hi,
>
> I get errors when I try to insert triples with negative year above -100
> e.g.: "Cannot convert 0-46-04-06 to datetime : Incorrect year value"
>
> I am working with data streams (DBpedia Live) and it's hard to debug this
> kind of errors on the server or reproduce them locally.
> I checked through all the date related code and I didn't find anything
> that could produce this error, and we are formatting all the dates with
> Java XMLGregorianCalendar.toXMLFormat().
> Could this be a VirtJDBC4 bug?
>
> Best,
> Dimitris
>
> --
> Kontokostas Dimitris
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
>
> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk_______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
>
> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk_______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>
>
>


-- 
Kontokostas Dimitris
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to