Changeset 403

Show
Ignore:
Timestamp:
04/22/09 14:31:40 (9 years ago)
Author:
samuraraujo
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Explorator/trunk/lib/dataload.rb

    r386 r403  
    2525$sesamedir = Dir.new(dbdir + File::SEPARATOR + 'Sesame' + File::SEPARATOR + "repositories") 
    2626$sesamedir.each  do |x|  
    27    
    28   if x.rindex('.') == nil && x!= ('SYSTEM') && x!= ('INTERNAL')      
    29     adapter = ConnectionPool.add_data_source :type => :sparql_sesame_api, :title => x + '(Local)'  ,  :caching =>true, :repository => x, :dir => $sesamedir.path    
    30   
     27  begin  
     28    if x.rindex('.') == nil && x!= ('SYSTEM') && x!= ('INTERNAL')      
     29      adapter = ConnectionPool.add_data_source :type => :sparql_sesame_api, :title => x + '(Local)'  ,  :caching =>true, :repository => x, :dir => $sesamedir.path    
     30       
     31    end 
     32  rescue 
    3133  end 
    3234end 
    33   
     35 
    3436#adapter =ConnectionPool.add_data_source :type => :sparql,:engine => :sesame2, :url => "http://localhost:8080/openrdf-sesame/repositories/PRESIDENT", :results => :sparql_xml, :caching =>true 
    3537#adapter.title='PRESIDENT_PARALLAX_DEFAULT' 
     
    4244# 
    4345#adapter =ConnectionPool.add_data_source :type => :sparql,:engine => :sesame2, :url => "http://localhost:8080/openrdf-sesame/repositories/CIA", :results => :sparql_xml, :caching =>true 
    44 #adapter.title='CIA_DEFAULT' 
     46#adapter.title='CIA_DEFAULT'  
    4547# 
    4648#adapter =ConnectionPool.add_data_source :type => :sparql,:engine => :sesame2, :url => "http://localhost:8080/openrdf-sesame/repositories/METAMODEL", :results => :sparql_xml, :caching =>true 
     
    5254#adapter.title='IMDB_SPARQL' 
    5355 
    54  
     56begin 
    5557adapter =ConnectionPool.add_data_source :type => :sparql,:engine => :virtuoso,:title=>'DBPEDIA(Local)', :url => "http://139.82.71.60:8890/sparql", :results => :sparql_xml, :caching =>true 
    56  
    57  
     58adapter =ConnectionPool.add_data_source :type => :sparql,:engine => :virtuoso,:title=>'MEDICAL(Local)', :url => "http://139.82.71.60:8890/sparql?default-graph-uri=http://medical.org", :results => :sparql_xml, :caching =>true 
     59rescue 
     60end  
    5861 
    5962#adapter =ConnectionPool.add_data_source :type => :sparql,:engine => :sesame2, :url => "http://dbtune.org:2105/sparql/", :results => :sparql_xml 
     
    6366#adapter.title='Spade' 
    6467 
    65   
     68 
    6669#You should insert here a line for each namespace that you want to use in your application. 
    6770#The namespace must be unique. If you have doubt please see the ActiveRDF documentation. 
     
    9699Namespace.register(:mondial,"http://www.semwebtech.org/mondial/10/meta#") 
    97100 
    98   
     101 
    99102RDFS::Resource.find_all_predicates 
    100103