Changeset 464

Show
Ignore:
Timestamp:
08/02/09 10:22:14 (8 years ago)
Author:
samuraraujo
Message:
 
Location:
Explorator/trunk/lib
Files:
2 modified

Legend:

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

    r461 r464  
    5555# 
    5656begin 
    57 adapter =ConnectionPool.add_data_source :type => :sparql,:engine => :virtuoso,:title=>'DBPEDIA(Local)', :url => "http://139.82.71.60:8890/sparql", :results => :sparql_xml, :caching =>true 
    58 adapter =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 
     57  adapter =ConnectionPool.add_data_source :type => :sparql,:engine => :virtuoso,:title=>'DBPEDIA(Local)', :url => "http://139.82.71.60:8890/sparql", :results => :sparql_xml, :caching =>true  
     58rescue Exception => e 
     59  puts 'Removing datasource: '  
     60  #puts e.backtrace  
     61  ConnectionPool.remove_last_data_source_added() 
     62  puts 'Datasource removed' 
     63end  
    5964 
    60 rescue 
     65begin 
     66  adapter =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  
     67rescue Exception => e 
     68  puts 'Removing datasource: '  
     69 # puts e.backtrace   
     70  ConnectionPool.remove_last_data_source_added() 
     71  puts 'Datasource removed' 
    6172end  
     73 
     74 
    6275 
    6376#begin  
     
    106119Namespace.register(:mondial,"http://www.semwebtech.org/mondial/10/meta#") 
    107120 
    108   
     121 
    109122# construct the necessary Ruby Modules and Classes to use the Namespace 
    110123begin 
    111 ObjectManager.construct_classes 
     124  ObjectManager.construct_classes 
    112125rescue Exception => e 
    113  puts e.backtrace 
     126  puts e.backtrace 
    114127end 
  • Explorator/trunk/lib/query_builder.rb

    r448 r464  
    9595    self 
    9696  end 
     97   
    9798  def keyword(k)         
    9899    @result = @result | Query.new.distinct(:s,:p,:o).where(:s,:p,:o).keyword_where(:s,k).execute | Query.new.distinct(:s,:p,:o).where(:s,:p,:o).keyword_where(:p,k).execute | Query.new.distinct(:s,:p,:o).where(:s,:p,:o).keyword_where(:o,k).execute