Module: Tripod

Defined in:
lib/tripod/criteria/execution.rb,
lib/tripod.rb,
lib/tripod/version.rb,
lib/tripod/criteria.rb,
lib/tripod/streaming.rb,
lib/tripod/sparql_query.rb,
lib/tripod/resource_collection.rb,
lib/tripod/cache_stores/memcached_cache_store.rb,
lib/tripod/errors/sparql_query_missing_variables.rb

Overview

This module defines behaviour for criteria

Defined Under Namespace

Modules: Attributes, CacheStores, Callbacks, Components, CriteriaExecution, Dirty, EagerLoading, EmbeddedResource, Embeds, Errors, Extensions, Fields, Finders, Graphs, Links, Persistence, Predicates, RdfType, Repository, Resource, Serialization, SparqlClient, State, Streaming, Validations Classes: Criteria, ResourceCollection, SparqlQuery, SparqlQueryError, SparqlQueryMissingVariables

Constant Summary collapse

VERSION =
"0.15.1"
@@update_endpoint =
'http://127.0.0.1:3030/tripod/update'
@@query_endpoint =
'http://127.0.0.1:3030/tripod/sparql'
@@data_endpoint =
'http://127.0.0.1:3030/tripod/data'
@@extra_endpoint_params =
{}
@@extra_endpoint_headers =
{}
@@timeout_seconds =
30
@@response_limit_bytes =
5.megabytes
@@ntriples_header_str =
"application/n-triples, text/plain"
@@logger =
Logger.new(STDOUT)

Class Method Summary collapse

Class Method Details

.configure {|_self| ... } ⇒ Object

Use configure to override configuration in an app, (defaults shown)

Tripod.configure do |config|
  config.update_endpoint = 'http://127.0.0.1:3030/tripod/update'
  config.query_endpoint = 'http://127.0.0.1:3030/tripod/sparql'
  config.timeout_seconds = 30#
  config.response_limit_bytes = 4.megabytes # omit for no limit
  config.cache_store = nil #e.g Tripod::CacheStores::MemcachedCacheStore.new('localhost:11211')
    # note: if using memcached, make sure you set the -I (slab size) to big enough to store each result
    # and set the -m (total size) to something quite big (or the cache will recycle too often).
    # also note that the connection pool size can be passed in as an optional second parameter.

  config.logger = Logger.new(STDOUT) # you can set this to the Rails.logger in a rails app.

end

Yields:

  • (_self)

Yield Parameters:

  • _self (Tripod)

    the object that the method was called on



89
90
91
# File 'lib/tripod.rb', line 89

def self.configure
  yield self
end