Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 864 Bytes

README.rdoc

File metadata and controls

44 lines (27 loc) · 864 Bytes

SemanticEntities

Experimental ruby gem to abstract sparql queries

Example of use

Getting the uri:

tv_show = ActiveSemantic.find(@uri)
puts tv_show.uri

Getting the an attribute:

puts tv_show.name.first

Getting all attributes the same name:

tv_show.site.each do |site|
  puts site
end

Getting attributes of related entities:

tv_show.season.each do |season|
  puts season.description.first
end

Features

Lazy loading on related entities

All data of a related entity are requested only when some its attribute is accessed.

TODO

  • Register prefix ontologies

  • When iterate on a list of related entities, request on server all data of them

  • Prepare to use rake spec

  • Access entities where the actual entity is some attribute

Contributors

Tiago Albineli Motta programandosemcafeina.blogspot.comn