Hi Jens,

Frederick Gaisson pointed me to the following Virtuoso procedure he wrote sometime ago for loading the Geonames RDF dump, thus providing the dump is still in the same format it should work for you:

======================================================================== ===============

create procedure DB.DBA.import_geonames_dataset(in rdfdump_path varchar, in graph_uri varchar)
{
declare rdfdump_str, line, nb_processed, process_records, msg_str any;
     declare exit handler for sqlstate '2200*'
   {
       goto znext;
   };        rdfdump_str := file_to_string_output(rdfdump_path);
     nb_processed := 0;
     line := ses_read_line(rdfdump_str); -- URL line

   while(isstring(line))
   {
       nb_processed := nb_processed + 1;

       if(mod(nb_processed, 1000) = 0)
       {
           result_names(line);
           result(line);
       }
             if(mod(nb_processed, 50000) = 0)
       {
           result_names(msg_str);
           msg_str := 'Checkpoint in progress...';
           result(msg_str);
                     exec('checkpoint');
                     msg_str := 'Checkpoint in finished';
           result_names(msg_str);
           result(msg_str);
       }
             line := ses_read_line(rdfdump_str); -- RDF document line
             DB.DBA.RDF_LOAD_RDFXML(line, graph_uri, graph_uri);
             znext:;
             line := ses_read_line(rdfdump_str); -- skip: URL line
   }
};

DB.DBA.import_geonames_dataset('/dbs/rdfdata/rdfdumps/geonames/all- geonames-rdf.txt', 'http://geonames.org');

======================================================================== ======================

Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support



On 22 Oct 2008, at 22:02, Jens Lehmann wrote:


Hello Hugh and Zdravko,

Hugh Williams wrote:
Hi Brian,

Virtuoso is currently being used for hosting the following Semantic Web
based projects on the strength of its performance and scalability:

DBpedia - http://dbpedia.org/About
BIO2RDF - http://bio2rdf.org/
NEUROCOMMONS - http://neurocommons.org/page/Main_Page
and others ...

Today, I obtained the Geonames RDF dump from Marc Wick, which I'm trying
to load into Virtuoso. It has a format, where you have a line with the
URI of a resource followed by an XML document describing the resource:

http://sws.geonames.org/5/
<?xml version="1.0" encoding="UTF-8" standalone="no"?><rdf:RDF
xmlns="http://www.geonames.org/ontology#";
xmlns:foaf="http://xmlns.com/foaf/0.1/";
xmlns:owl="http://www.w3.org/2002/07/owl#";
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
xmlns:wgs84_pos="http://www.w3.org/2003/01/geo/wgs84_pos#";><Feature
rdf:about="http://sws.geonames.org/5/";><name>Yeka-hi-</ name><featureClass
rdf:resource="http://www.geonames.org/ontology#P"/><featureCode
rdf:resource="http://www.geonames.org/ontology#P.PPL"/><inCountry
rdf:resource="http://www.geonames.org/countries/#IR"/ ><wgs84_pos:lat>32.5</wgs84_pos:lat><wgs84_pos:long>48.9</ wgs84_pos:long><parentFeature
rdf:resource="http://sws.geonames.org/127082/"/><nearbyFeatures
rdf:resource="http://sws.geonames.org/5/nearby.rdf"/ ><locationMap>http://www.geonames.org/5/yekahi.html</locationMap></ Feature></rdf:RDF>

Do you know whether anyone in the Virtuoso team has already loaded the
Geonames dump (don't know who to contact) i.e. has a script for handling
the format of the dump?

Kind regards,

Jens

--
Dipl. Inf. Jens Lehmann
Department of Computer Science, University of Leipzig
Homepage: http://www.jens-lehmann.org
GPG Key: http://jens-lehmann.org/jens_lehmann.asc

Reply via email to