Changeset 208

Show
Ignore:
Timestamp:
12/12/08 14:47:28 (10 years ago)
Author:
samuraraujo
Message:
 
Location:
activerdf_sparql-1.3.6/lib/activerdf_sparql
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • activerdf_sparql-1.3.6/lib/activerdf_sparql/init.rb

    r27 r208  
    77end 
    88$: << File.dirname(File.expand_path(file)) 
     9  
    910 
    1011require 'sparql' 
     12require 'sparql_sesame_api' 
  • activerdf_sparql-1.3.6/lib/activerdf_sparql/sparql.rb

    r200 r208  
    5353  # query datastore with query string (SPARQL), returns array with query results 
    5454  # may be called with a block 
    55   def query(query, &block) 
    56      
     55  def query(query, &block)     
    5756    qs = Query2SPARQL.translate(query) 
    5857     puts qs.to_s 
     
    191190   
    192191  # parse xml stream result into array 
    193   def parse_xml(s) 
    194      
     192  def parse_xml(s)     
    195193    parser = SparqlResultParser.new 
    196194    REXML::Document.parse_stream(s, parser)  
    197195    parser.result 
    198   end 
    199    
     196  end   
    200197  # create ruby objects for each RDF node 
    201198  def create_node(type, value) 
     
    208205      value.to_s 
    209206    end 
    210   end 
    211     
     207  end    
    212208end