Changeset 471

Show
Ignore:
Timestamp:
06/02/10 18:33:08 (8 years ago)
Author:
samuraraujo
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Explorator/trunk/app/controllers/application_controller.rb

    r432 r471  
    88  #global attribute use for all explorator controllers 
    99  @resourceset 
    10  
    11   def session_init 
    12      if session[:application] == nil        
    13       session[:disablerepositories]=Array.new 
    14       session[:disablerepositories] << 'INTERNAL' 
    15       session[:disablerepositories] << 'EXPLORATOR(Local)'      
     10   
     11  def session_init     
     12       puts request.session_options[:id] 
     13    puts session[:application]  
     14    if session[:application] == nil        
     15       
     16      session[:enablerepositories]=Array.new 
     17  
     18      session[:enablerepositories] << 'INTERNAL' 
     19   
    1620      session[:addrepositories] = Array.new 
    1721      session[:triples]=Hash.new 
     22    
    1823      session[:application] =  Application.new(request.session_options[:id]) 
    1924      session[:query_retrieve_label_and_type]=$QUERY_RETRIEVE_LABEL_AND_TYPE 
    2025      session[:label_properties]=$LABEL_PROPERTIES 
    2126    end 
     27        
    2228    Thread.current[:triples]=session[:triples] 
    2329    Thread.current[:addrepositories]=session[:addrepositories] 
    24     Thread.current[:disablerepositories]=session[:disablerepositories]     
     30    Thread.current[:enablerepositories]=session[:enablerepositories]     
    2531    Thread.current[:application]=session[:application] 
    2632    Thread.current[:autodiscovery]=session[:autodiscovery]   
     
    5056    session[:application].delete(params[:uri])   
    5157  end 
    52   
     58   
     59  def get_adapter(name)     
     60    adapter = ConnectionPool.adapters.select {|adapter|  
     61      adapter.title == name 
     62    } 
     63    adapter.first() 
     64  end 
    5365end