Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement backward-compatibility between 4store and AllegroGraph #100

Closed
mdorf opened this issue Apr 2, 2020 · 2 comments
Closed

Implement backward-compatibility between 4store and AllegroGraph #100

mdorf opened this issue Apr 2, 2020 · 2 comments

Comments

@mdorf
Copy link
Member

mdorf commented Apr 2, 2020

We should be able to swap 4store with AllegroGraph (and vice-versa) via a simple configuration parameter.

@mdorf mdorf self-assigned this Apr 2, 2020
@mdorf
Copy link
Member Author

mdorf commented Apr 2, 2020

Implemented the backend configurable parameters:

config.goo_path_query =   "/repositories/bioportal"
config.goo_path_data =   "/repositories/bioportal/statements/query"
config.goo_path_update =   "/repositories/bioportal/statements"

conf.add_sparql_backend(:main,   query:  "http://#{host}:#{port}#{path_query}",
data: "http://#{host}:#{port}#{path_data}",
update: "http://#{host}:#{port}#{path_update}",
options: { rules: :NONE })

@mdorf
Copy link
Member Author

mdorf commented Apr 2, 2020

Added a new parameter "backend_name":

conf.add_sparql_backend(:main, backend_name: backend_name, ...

def self.add_sparql_backend(name, *opts)
  opts = opts[0]
  @@sparql_backends = @@sparql_backends.dup
  @@sparql_backends[name] = opts
  @@sparql_backends[name][:query]=Goo::SPARQL::Client.new(opts[:query],
                 {protocol: "1.1", "Content-Type" => "application/x-www-form-urlencoded",
                   read_timeout: 10000,

@mdorf mdorf closed this as completed Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant