Name: sparqlight
Owner: Stanford University Digital Library
Description: A blacklight application using SPARQL to replace Solr
Created: 2015-11-19 19:42:01.0
Updated: 2018-03-22 13:57:26.0
Pushed: 2017-04-26 23:42:49.0
Size: 5725
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
catalog_controller
is reduced, and creates configurations such as the following:
ig.repository_class = Blacklight::Sparql::Repository
ig.search_builder_class = ::SearchBuilder
ig.document_model = ::SparqlDocument
ig.response_model = Blacklight::Sparql::Response
SparqlRepository
is based on Blacklight::AbstractRepository
Returns a Concise Bounded Description of the document denoted by an IRI
Executes a SPARQL query against the endpoint, returning a result set
SparqlBuilder
On a Mac, install Homebrew.
Using Homebrew, install MongoDB:
brew install mongodb
Follow steps to have MongoDB start on login and run lanuchctl
to start immediately (details may vary):
ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
Subsequently, perform rails initialization:
Tests can be run using:
S_ENV=test bundle exec rake db:test:prepare
S_ENV=test bundle exec rake db:seed
S_ENV=test bundle exec rake
Service can be run locally using bundle exec rails server
brew install blazegraph
Follow steps to have MongoDB start on login and run lanuchctl
to start immediately (details may vary):
sudo cp -fv /usr/local/opt/blazegraph/*.plist /Library/LaunchDaemons
sudo chown root /Library/LaunchDaemons/homebrew.mxcl.blazegraph.plist
Then to load blazegraph now:
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.blazegraph.plist
Or, if you don't want/need launchctl, you can just run:
blazegraph start
Blazegraph installation instructions are at
sudo service blazegraph start
MongoDB installation instructions are at
sudo service mongodb start
sparqlite
, using the defaults for a triples
KB, and select 'use' it.db/nomisma-full.ttl
and select Update
.Once the data is loaded into blazegraph, return to the sparqlite console to perform rails initialization:
le install
S_ENV=production bundle exec rake db:migrate
S_ENV=production bundle exec rake db:seed # this is done manually above
S_ENV=production bundle exec rake secrets
d that value to `config/secrets.yml`
Run the server in production mode pointing to this BlazeGraph SPARQL endpoint:
rt SPARQL_URL=http://localhost:9999/blazegraph/namespace/sparqlite/sparql
S_ENV=production bundle exec rails server
sparqlite-development
, using the defaults for a triples
KB, and select 'use' it.db/nomisma_full.ttl
and select Update
. Once the data is loaded into blazegraph, return to the sparqlite console to prepare and run specs:rt SPARQL_URL=http://localhost:9999/blazegraph/namespace/sparqlite-development/sparql
ILS_ENV=development is the default
le exec rails s
sparqlite-test
, using the defaults for a triples
KB, and select 'use' it.db/nomisma.ttl
and select Update
. Once the data is loaded into blazegraph, return to the sparqlite console to prepare and run specs:rt SPARQL_URL=http://localhost:9999/blazegraph/namespace/sparqlite-test/sparql
S_ENV=test bundle exec rake db:test:prepare
S_ENV=test bundle exec rake db:seed # may not work as expected, but manual loading is done as above
S_ENV=test bundle exec rake
view the test data in the application:
S_ENV=development bundle exec rails s