Renames Rudf to Oxigraph

pull/21/head
Tpt 5 years ago
parent f50589d8f2
commit 85bc596cc0
  1. 22
      README.md
  2. 8
      bench/bsbm_oxigraph.sh
  3. 4
      lib/Cargo.toml
  4. 10
      lib/src/lib.rs
  5. 4
      lib/src/model/graph.rs
  6. 4
      lib/src/model/literal.rs
  7. 2
      lib/src/model/named_node.rs
  8. 30
      lib/src/repository.rs
  9. 8
      lib/src/store/memory.rs
  10. 2
      lib/src/store/mod.rs
  11. 8
      lib/src/store/rocksdb.rs
  12. 2
      lib/src/syntax.rs
  13. 6
      lib/tests/service_test_cases.rs
  14. 16
      lib/tests/sparql_test_cases.rs
  15. 8
      server/Cargo.toml
  16. 16
      server/src/main.rs
  17. 2
      server/templates/query.html
  18. 8
      wikibase/Cargo.toml
  19. 4
      wikibase/src/loader.rs
  20. 12
      wikibase/src/main.rs

@ -1,11 +1,11 @@
Rudf Oxigraph
==== ========
[![actions status](https://github.com/Tpt/rudf/workflows/build/badge.svg)](https://github.com/Tpt/rudf/actions) [![actions status](https://github.com/Tpt/oxigraph/workflows/build/badge.svg)](https://github.com/Tpt/oxigraph/actions)
[![dependency status](https://deps.rs/repo/github/Tpt/rudf/status.svg)](https://deps.rs/repo/github/Tpt/rudf) [![dependency status](https://deps.rs/repo/github/Tpt/oxigraph/status.svg)](https://deps.rs/repo/github/Tpt/oxigraph)
Rudf is a work in progress graph database implementing the [SPARQL](https://www.w3.org/TR/sparql11-overview/) standard. Oxigraph is a work in progress graph database implementing the [SPARQL](https://www.w3.org/TR/sparql11-overview/) standard.
There is no released version yet. There is no released version yet.
@ -28,11 +28,11 @@ Are currently implemented:
You need to have [a recent stable version of Rust and Cargo installed](https://www.rust-lang.org/tools/install). You need to have [a recent stable version of Rust and Cargo installed](https://www.rust-lang.org/tools/install).
If it's done, executing `cargo build --release` in the root directory of this repository should compile the full server after having downloaded its dependencies. If it's done, executing `cargo build --release` in the root directory of this repository should compile the full server after having downloaded its dependencies.
It will create a fat binary in `target/release/rudf_server`. It will create a fat binary in `target/release/oxigraph_server`.
### Usage ### Usage
Run `./rudf_server` to start the server. It listen by default on `localhost:7878`. Run `./oxigraph_server` to start the server. It listen by default on `localhost:7878`.
The server provides an HTML UI with a form to execute SPARQL requests. The server provides an HTML UI with a form to execute SPARQL requests.
@ -45,7 +45,7 @@ It provides the following routes:
This route supports content negotiation and could return [Turtle](https://www.w3.org/TR/turtle/), [N-Triples](https://www.w3.org/TR/n-triples/), [RDF XML](https://www.w3.org/TR/rdf-syntax-grammar/), [SPARQL Query Results XML Format](http://www.w3.org/TR/rdf-sparql-XMLres/) and [SPARQL Query Results JSON Format](https://www.w3.org/TR/sparql11-results-json/). This route supports content negotiation and could return [Turtle](https://www.w3.org/TR/turtle/), [N-Triples](https://www.w3.org/TR/n-triples/), [RDF XML](https://www.w3.org/TR/rdf-syntax-grammar/), [SPARQL Query Results XML Format](http://www.w3.org/TR/rdf-sparql-XMLres/) and [SPARQL Query Results JSON Format](https://www.w3.org/TR/sparql11-results-json/).
Use `rudf_server --help` to see the possible options when starting the server. Use `oxigraph_server --help` to see the possible options when starting the server.
## Run the web server for Wikibase ## Run the web server for Wikibase
@ -54,13 +54,13 @@ Use `rudf_server --help` to see the possible options when starting the server.
You need to have [a recent stable version of Rust and Cargo installed](https://www.rust-lang.org/tools/install). You need to have [a recent stable version of Rust and Cargo installed](https://www.rust-lang.org/tools/install).
If it's done, executing `cargo build --release` in the root directory of this repository should compile the full server after having downloaded its dependencies. If it's done, executing `cargo build --release` in the root directory of this repository should compile the full server after having downloaded its dependencies.
It will create a fat binary in `target/release/rudf_wikibase`. It will create a fat binary in `target/release/oxigraph_wikibase`.
### Usage ### Usage
To start a server that is synchronized with [test.wikidata.org](https://test.wikidata.org) you should run: To start a server that is synchronized with [test.wikidata.org](https://test.wikidata.org) you should run:
```bash ```bash
./rudf_wikibase --mediawiki_api=https://test.wikidata.org/w/api.php --mediawiki_base_url=https://test.wikidata.org/wiki/ --namespaces=0,120 --file=test.wikidata ./oxigraph_wikibase --mediawiki_api=https://test.wikidata.org/w/api.php --mediawiki_base_url=https://test.wikidata.org/wiki/ --namespaces=0,120 --file=test.wikidata
``` ```
It creates a SPARQL endpoint listening to `localhost:7878/query` that could be queried just like Blazegraph. It creates a SPARQL endpoint listening to `localhost:7878/query` that could be queried just like Blazegraph.
@ -69,7 +69,7 @@ The configuration parameters are:
* `mediawiki_api` URL of the MediaWiki API to use * `mediawiki_api` URL of the MediaWiki API to use
* `mediawiki_base_url` Base URL of MediaWiki pages like `https://test.wikidata.org/wiki/` for test.wikidata.org or `http://localhost/w/index.php?title=` for "vanilla" installations. * `mediawiki_base_url` Base URL of MediaWiki pages like `https://test.wikidata.org/wiki/` for test.wikidata.org or `http://localhost/w/index.php?title=` for "vanilla" installations.
* `namespaces` The ids of the Wikibase namespaces to synchronize with, separated by `,`. * `namespaces` The ids of the Wikibase namespaces to synchronize with, separated by `,`.
* `file` Path of where Rudf should store its data. * `file` Path of where Oxigraph should store its data.
## License ## License

@ -7,13 +7,13 @@ cd bsbm-tools
cargo build --release --manifest-path="../../server/Cargo.toml" cargo build --release --manifest-path="../../server/Cargo.toml"
( (
ulimit -d ${MEMORY_SIZE} ulimit -d ${MEMORY_SIZE}
./../../target/release/rudf_server --file rudf_data ./../../target/release/oxigraph_server --file oxigraph_data
) & ) &
sleep 5 sleep 5
curl -f -X POST -H 'Content-Type:application/n-triples' --data-binary "@explore-${DATASET_SIZE}.nt" http://localhost:7878/ curl -f -X POST -H 'Content-Type:application/n-triples' --data-binary "@explore-${DATASET_SIZE}.nt" http://localhost:7878/
./testdriver -ucf usecases/explore/sparql.txt -o "../bsbm.explore.rudf.${DATASET_SIZE}.${MEMORY_SIZE}.$(date +'%Y-%m-%d').xml" http://localhost:7878/query ./testdriver -ucf usecases/explore/sparql.txt -o "../bsbm.explore.oxigraph.${DATASET_SIZE}.${MEMORY_SIZE}.$(date +'%Y-%m-%d').xml" http://localhost:7878/query
./testdriver -ucf usecases/businessIntelligence/sparql.txt -o "../bsbm.businessIntelligence.rudf.${DATASET_SIZE}.${MEMORY_SIZE}.$(date +'%Y-%m-%d').xml" http://localhost:7878/query ./testdriver -ucf usecases/businessIntelligence/sparql.txt -o "../bsbm.businessIntelligence.oxigraph.${DATASET_SIZE}.${MEMORY_SIZE}.$(date +'%Y-%m-%d').xml" http://localhost:7878/query
kill $! kill $!
rm -r rudf_data rm -r oxigraph_data
rm "explore-${DATASET_SIZE}.nt" rm "explore-${DATASET_SIZE}.nt"
rm -r td_data rm -r td_data

@ -1,11 +1,11 @@
[package] [package]
name = "rudf" name = "oxigraph"
version = "0.1.0" version = "0.1.0"
authors = ["Tpt <thomas@pellissier-tanon.fr>"] authors = ["Tpt <thomas@pellissier-tanon.fr>"]
license = "MIT/Apache-2.0" license = "MIT/Apache-2.0"
readme = "../README.md" readme = "../README.md"
keywords = ["RDF", "N-Triples", "Turtle", "RDF/XML", "SPARQL"] keywords = ["RDF", "N-Triples", "Turtle", "RDF/XML", "SPARQL"]
repository = "https://github.com/Tpt/rudf" repository = "https://github.com/Tpt/oxigraph"
description = """ description = """
An RDF and SPARQL library in Rust An RDF and SPARQL library in Rust
""" """

@ -1,4 +1,4 @@
//! Rudf is a work in progress graph database implementing the [SPARQL](https://www.w3.org/TR/sparql11-overview/) standard. //! Oxigraph is a work in progress graph database implementing the [SPARQL](https://www.w3.org/TR/sparql11-overview/) standard.
//! //!
//! Its goal is to provide a compliant, safe and fast graph database. //! Its goal is to provide a compliant, safe and fast graph database.
//! //!
@ -9,10 +9,10 @@
//! Usage example with the `MemoryRepository`: //! Usage example with the `MemoryRepository`:
//! //!
//! ``` //! ```
//! use rudf::model::*; //! use oxigraph::model::*;
//! use rudf::{Repository, RepositoryConnection, MemoryRepository, Result}; //! use oxigraph::{Repository, RepositoryConnection, MemoryRepository, Result};
//! use crate::rudf::sparql::{PreparedQuery, QueryOptions}; //! use crate::oxigraph::sparql::{PreparedQuery, QueryOptions};
//! use rudf::sparql::QueryResult; //! use oxigraph::sparql::QueryResult;
//! //!
//! let repository = MemoryRepository::default(); //! let repository = MemoryRepository::default();
//! let mut connection = repository.connection().unwrap(); //! let mut connection = repository.connection().unwrap();

@ -10,8 +10,8 @@ use std::iter::FromIterator;
/// ///
/// Usage example: /// Usage example:
/// ``` /// ```
/// use rudf::model::*; /// use oxigraph::model::*;
/// use rudf::model::SimpleGraph; /// use oxigraph::model::SimpleGraph;
/// ///
/// let mut graph = SimpleGraph::default(); /// let mut graph = SimpleGraph::default();
/// let ex = NamedNode::parse("http://example.com").unwrap(); /// let ex = NamedNode::parse("http://example.com").unwrap();

@ -12,8 +12,8 @@ use std::option::Option;
/// ///
/// The default string formatter is returning a N-Triples, Turtle and SPARQL compatible representation: /// The default string formatter is returning a N-Triples, Turtle and SPARQL compatible representation:
/// ``` /// ```
/// use rudf::model::Literal; /// use oxigraph::model::Literal;
/// use rudf::model::vocab::xsd; /// use oxigraph::model::vocab::xsd;
/// ///
/// assert_eq!( /// assert_eq!(
/// "\"foo\\nbar\"", /// "\"foo\\nbar\"",

@ -7,7 +7,7 @@ use std::fmt;
/// ///
/// The default string formatter is returning a N-Triples, Turtle and SPARQL compatible representation: /// The default string formatter is returning a N-Triples, Turtle and SPARQL compatible representation:
/// ``` /// ```
/// use rudf::model::NamedNode; /// use oxigraph::model::NamedNode;
/// ///
/// assert_eq!( /// assert_eq!(
/// "<http://example.com/foo>", /// "<http://example.com/foo>",

@ -12,10 +12,10 @@ use std::io::BufRead;
/// ///
/// Usage example with `MemoryRepository`: /// Usage example with `MemoryRepository`:
/// ``` /// ```
/// use rudf::model::*; /// use oxigraph::model::*;
/// use rudf::{Repository, RepositoryConnection, MemoryRepository, Result}; /// use oxigraph::{Repository, RepositoryConnection, MemoryRepository, Result};
/// use crate::rudf::sparql::{PreparedQuery, QueryOptions}; /// use crate::oxigraph::sparql::{PreparedQuery, QueryOptions};
/// use rudf::sparql::QueryResult; /// use oxigraph::sparql::QueryResult;
/// ///
/// let repository = MemoryRepository::default(); /// let repository = MemoryRepository::default();
/// let mut connection = repository.connection().unwrap(); /// let mut connection = repository.connection().unwrap();
@ -40,7 +40,7 @@ use std::io::BufRead;
/// The implementation based on RocksDB if disabled by default and requires the `"rocksdb"` feature to be activated. /// The implementation based on RocksDB if disabled by default and requires the `"rocksdb"` feature to be activated.
/// A `RocksDbRepository` could be built using `RocksDbRepository::open` and works just like its in-memory equivalent: /// A `RocksDbRepository` could be built using `RocksDbRepository::open` and works just like its in-memory equivalent:
/// ```ignore /// ```ignore
/// use rudf::RocksDbRepository; /// use oxigraph::RocksDbRepository;
/// let dataset = RocksDbRepository::open("example.db").unwrap(); /// let dataset = RocksDbRepository::open("example.db").unwrap();
/// ``` /// ```
/// ///
@ -62,10 +62,10 @@ pub trait RepositoryConnection: Clone {
/// ///
/// Usage example: /// Usage example:
/// ``` /// ```
/// use rudf::model::*; /// use oxigraph::model::*;
/// use rudf::{Repository, RepositoryConnection, MemoryRepository}; /// use oxigraph::{Repository, RepositoryConnection, MemoryRepository};
/// use rudf::sparql::{PreparedQuery, QueryOptions}; /// use oxigraph::sparql::{PreparedQuery, QueryOptions};
/// use rudf::sparql::QueryResult; /// use oxigraph::sparql::QueryResult;
/// ///
/// let repository = MemoryRepository::default(); /// let repository = MemoryRepository::default();
/// let mut connection = repository.connection().unwrap(); /// let mut connection = repository.connection().unwrap();
@ -94,8 +94,8 @@ pub trait RepositoryConnection: Clone {
/// ///
/// Usage example: /// Usage example:
/// ``` /// ```
/// use rudf::model::*; /// use oxigraph::model::*;
/// use rudf::{Repository, RepositoryConnection, MemoryRepository, Result}; /// use oxigraph::{Repository, RepositoryConnection, MemoryRepository, Result};
/// ///
/// let repository = MemoryRepository::default(); /// let repository = MemoryRepository::default();
/// let mut connection = repository.connection().unwrap(); /// let mut connection = repository.connection().unwrap();
@ -123,8 +123,8 @@ pub trait RepositoryConnection: Clone {
/// ///
/// Usage example: /// Usage example:
/// ``` /// ```
/// use rudf::model::*; /// use oxigraph::model::*;
/// use rudf::{Repository, RepositoryConnection, MemoryRepository, Result, GraphSyntax}; /// use oxigraph::{Repository, RepositoryConnection, MemoryRepository, Result, GraphSyntax};
/// ///
/// let repository = MemoryRepository::default(); /// let repository = MemoryRepository::default();
/// let mut connection = repository.connection().unwrap(); /// let mut connection = repository.connection().unwrap();
@ -150,8 +150,8 @@ pub trait RepositoryConnection: Clone {
/// ///
/// Usage example: /// Usage example:
/// ``` /// ```
/// use rudf::model::*; /// use oxigraph::model::*;
/// use rudf::{Repository, RepositoryConnection, MemoryRepository, Result, DatasetSyntax}; /// use oxigraph::{Repository, RepositoryConnection, MemoryRepository, Result, DatasetSyntax};
/// ///
/// let repository = MemoryRepository::default(); /// let repository = MemoryRepository::default();
/// let mut connection = repository.connection().unwrap(); /// let mut connection = repository.connection().unwrap();

@ -11,10 +11,10 @@ use std::sync::{PoisonError, RwLock, RwLockReadGuard, RwLockWriteGuard};
/// ///
/// Usage example: /// Usage example:
/// ``` /// ```
/// use rudf::model::*; /// use oxigraph::model::*;
/// use rudf::{Repository, RepositoryConnection, MemoryRepository, Result}; /// use oxigraph::{Repository, RepositoryConnection, MemoryRepository, Result};
/// use crate::rudf::sparql::PreparedQuery; /// use crate::oxigraph::sparql::PreparedQuery;
/// use rudf::sparql::{QueryResult, QueryOptions}; /// use oxigraph::sparql::{QueryResult, QueryOptions};
/// ///
/// let repository = MemoryRepository::default(); /// let repository = MemoryRepository::default();
/// let mut connection = repository.connection().unwrap(); /// let mut connection = repository.connection().unwrap();

@ -1,4 +1,4 @@
//! Provides implementations of the `rudf::Repository` trait. //! Provides implementations of the `oxigraph::Repository` trait.
mod memory; mod memory;
pub(crate) mod numeric_encoder; pub(crate) mod numeric_encoder;

@ -22,10 +22,10 @@ use std::str;
/// ///
/// Usage example: /// Usage example:
/// ```ignored /// ```ignored
/// use rudf::model::*; /// use oxigraph::model::*;
/// use rudf::{Repository, RepositoryConnection, RocksDbRepository, Result}; /// use oxigraph::{Repository, RepositoryConnection, RocksDbRepository, Result};
/// use crate::rudf::sparql::{PreparedQuery, QueryOptions}; /// use crate::oxigraph::sparql::{PreparedQuery, QueryOptions};
/// use rudf::sparql::QueryResult; /// use oxigraph::sparql::QueryResult;
/// ///
/// let repository = RocksDbRepository::open("example.db").unwrap(); /// let repository = RocksDbRepository::open("example.db").unwrap();
/// let mut connection = repository.connection().unwrap(); /// let mut connection = repository.connection().unwrap();

@ -15,7 +15,7 @@ pub trait FileSyntax: Sized {
/// ///
/// Example: /// Example:
/// ``` /// ```
/// use rudf::{GraphSyntax, FileSyntax}; /// use oxigraph::{GraphSyntax, FileSyntax};
/// assert_eq!(GraphSyntax::from_mime_type("text/turtle; charset=utf-8"), Some(GraphSyntax::Turtle)) /// assert_eq!(GraphSyntax::from_mime_type("text/turtle; charset=utf-8"), Some(GraphSyntax::Turtle))
/// ``` /// ```
fn from_mime_type(media_type: &str) -> Option<Self>; fn from_mime_type(media_type: &str) -> Option<Self>;

@ -1,9 +1,9 @@
use failure::format_err; use failure::format_err;
use rudf::model::*; use oxigraph::model::*;
use rudf::sparql::{ use oxigraph::sparql::{
BindingsIterator, GraphPattern, PreparedQuery, QueryOptions, QueryResult, ServiceHandler, BindingsIterator, GraphPattern, PreparedQuery, QueryOptions, QueryResult, ServiceHandler,
}; };
use rudf::{GraphSyntax, MemoryRepository, Repository, RepositoryConnection, Result}; use oxigraph::{GraphSyntax, MemoryRepository, Repository, RepositoryConnection, Result};
use std::io::BufRead; use std::io::BufRead;
#[test] #[test]

@ -1,11 +1,11 @@
///! Integration tests based on [SPARQL 1.1 Test Cases](https://www.w3.org/2009/sparql/docs/tests/README.html) ///! Integration tests based on [SPARQL 1.1 Test Cases](https://www.w3.org/2009/sparql/docs/tests/README.html)
use failure::format_err; use failure::format_err;
use oxigraph::model::vocab::rdf;
use oxigraph::model::vocab::rdfs;
use oxigraph::model::*;
use oxigraph::sparql::*;
use oxigraph::*;
use rayon::prelude::*; use rayon::prelude::*;
use rudf::model::vocab::rdf;
use rudf::model::vocab::rdfs;
use rudf::model::*;
use rudf::sparql::*;
use rudf::*;
use std::collections::HashMap; use std::collections::HashMap;
use std::fmt; use std::fmt;
use std::fs::File; use std::fs::File;
@ -301,7 +301,7 @@ fn read_file_to_string(url: &str) -> Result<String> {
mod rs { mod rs {
use lazy_static::lazy_static; use lazy_static::lazy_static;
use rudf::model::NamedNode; use oxigraph::model::NamedNode;
lazy_static! { lazy_static! {
pub static ref RESULT_SET: NamedNode = pub static ref RESULT_SET: NamedNode =
@ -460,7 +460,7 @@ impl TestManifest {
pub mod mf { pub mod mf {
use lazy_static::lazy_static; use lazy_static::lazy_static;
use rudf::model::NamedNode; use oxigraph::model::NamedNode;
lazy_static! { lazy_static! {
pub static ref INCLUDE: NamedNode = pub static ref INCLUDE: NamedNode =
@ -483,7 +483,7 @@ pub mod mf {
pub mod qt { pub mod qt {
use lazy_static::lazy_static; use lazy_static::lazy_static;
use rudf::model::NamedNode; use oxigraph::model::NamedNode;
lazy_static! { lazy_static! {
pub static ref QUERY: NamedNode = pub static ref QUERY: NamedNode =

@ -1,16 +1,16 @@
[package] [package]
name = "rudf_server" name = "oxigraph_server"
version = "0.1.0" version = "0.1.0"
authors = ["Tpt <thomas@pellissier-tanon.fr>"] authors = ["Tpt <thomas@pellissier-tanon.fr>"]
license = "MIT/Apache-2.0" license = "MIT/Apache-2.0"
readme = "../README.md" readme = "../README.md"
repository = "https://github.com/Tpt/rudf" repository = "https://github.com/Tpt/oxigraph"
description = """ description = """
Rudf based SPARQL server SPARQL server based on Oxigraph
""" """
edition = "2018" edition = "2018"
[dependencies] [dependencies]
rudf = {path = "../lib", features = ["rocksdb"] } oxigraph = {path = "../lib", features = ["rocksdb"] }
clap = "2" clap = "2"
rouille = "3" rouille = "3"

@ -1,23 +1,23 @@
use clap::App; use clap::App;
use clap::Arg; use clap::Arg;
use clap::ArgMatches; use clap::ArgMatches;
use rouille::input::priority_header_preferred; use oxigraph::sparql::{PreparedQuery, QueryOptions, QueryResult, QueryResultSyntax};
use rouille::url::form_urlencoded; use oxigraph::{
use rouille::{content_encoding, start_server, Request, Response};
use rudf::sparql::{PreparedQuery, QueryOptions, QueryResult, QueryResultSyntax};
use rudf::{
DatasetSyntax, FileSyntax, GraphSyntax, MemoryRepository, Repository, RepositoryConnection, DatasetSyntax, FileSyntax, GraphSyntax, MemoryRepository, Repository, RepositoryConnection,
RocksDbRepository, RocksDbRepository,
}; };
use rouille::input::priority_header_preferred;
use rouille::url::form_urlencoded;
use rouille::{content_encoding, start_server, Request, Response};
use std::io::{BufReader, Read}; use std::io::{BufReader, Read};
use std::sync::Arc; use std::sync::Arc;
const MAX_SPARQL_BODY_SIZE: u64 = 1_048_576; const MAX_SPARQL_BODY_SIZE: u64 = 1_048_576;
const HTML_ROOT_PAGE: &str = include_str!("../templates/query.html"); const HTML_ROOT_PAGE: &str = include_str!("../templates/query.html");
const SERVER: &str = concat!("Rudf/", env!("CARGO_PKG_VERSION")); const SERVER: &str = concat!("Oxigraph/", env!("CARGO_PKG_VERSION"));
pub fn main() { pub fn main() {
let matches = App::new("Rudf SPARQL server") let matches = App::new("Oxigraph SPARQL server")
.arg( .arg(
Arg::with_name("bind") Arg::with_name("bind")
.short("b") .short("b")
@ -213,8 +213,8 @@ fn evaluate_sparql_query<R: RepositoryConnection>(
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use crate::handle_request; use crate::handle_request;
use oxigraph::{MemoryRepository, Repository};
use rouille::Request; use rouille::Request;
use rudf::{MemoryRepository, Repository};
use std::io::Read; use std::io::Read;
#[test] #[test]

@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Rudf server</title> <title>Oxigraph server</title>
<link rel="stylesheet" href="//tools-static.wmflabs.org/cdnjs/ajax/libs/yasqe/2.11.22/yasqe.min.css"/> <link rel="stylesheet" href="//tools-static.wmflabs.org/cdnjs/ajax/libs/yasqe/2.11.22/yasqe.min.css"/>
<link rel="stylesheet" href="//tools-static.wmflabs.org/cdnjs/ajax/libs/yasr/2.12.19/yasr.min.css"/> <link rel="stylesheet" href="//tools-static.wmflabs.org/cdnjs/ajax/libs/yasr/2.12.19/yasr.min.css"/>
</head> </head>

@ -1,17 +1,17 @@
[package] [package]
name = "rudf_wikibase" name = "oxigraph_wikibase"
version = "0.1.0" version = "0.1.0"
authors = ["Tpt <thomas@pellissier-tanon.fr>"] authors = ["Tpt <thomas@pellissier-tanon.fr>"]
license = "MIT/Apache-2.0" license = "MIT/Apache-2.0"
readme = "../README.md" readme = "../README.md"
repository = "https://github.com/Tpt/rudf" repository = "https://github.com/Tpt/oxigraph"
description = """ description = """
Rudf based SPARQL server for Wikibase instances SPARQL server based on Oxigraph for Wikibase instances
""" """
edition = "2018" edition = "2018"
[dependencies] [dependencies]
rudf = {path = "../lib", features = ["rocksdb"] } oxigraph = {path = "../lib", features = ["rocksdb"] }
clap = "2" clap = "2"
rouille = "3" rouille = "3"
reqwest = "0.9" reqwest = "0.9"

@ -1,9 +1,9 @@
use crate::SERVER; use crate::SERVER;
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use oxigraph::model::NamedNode;
use oxigraph::{GraphSyntax, Repository, RepositoryConnection, Result};
use reqwest::header::USER_AGENT; use reqwest::header::USER_AGENT;
use reqwest::{Client, Url}; use reqwest::{Client, Url};
use rudf::model::NamedNode;
use rudf::{GraphSyntax, Repository, RepositoryConnection, Result};
use serde_json::Value; use serde_json::Value;
use std::collections::{HashMap, HashSet}; use std::collections::{HashMap, HashSet};
use std::io::{BufReader, Read}; use std::io::{BufReader, Read};

@ -2,13 +2,13 @@ use crate::loader::WikibaseLoader;
use clap::App; use clap::App;
use clap::Arg; use clap::Arg;
use clap::ArgMatches; use clap::ArgMatches;
use oxigraph::sparql::{PreparedQuery, QueryOptions, QueryResult, QueryResultSyntax};
use oxigraph::{
FileSyntax, GraphSyntax, MemoryRepository, Repository, RepositoryConnection, RocksDbRepository,
};
use rouille::input::priority_header_preferred; use rouille::input::priority_header_preferred;
use rouille::url::form_urlencoded; use rouille::url::form_urlencoded;
use rouille::{content_encoding, start_server, Request, Response}; use rouille::{content_encoding, start_server, Request, Response};
use rudf::sparql::{PreparedQuery, QueryOptions, QueryResult, QueryResultSyntax};
use rudf::{
FileSyntax, GraphSyntax, MemoryRepository, Repository, RepositoryConnection, RocksDbRepository,
};
use std::io::Read; use std::io::Read;
use std::str::FromStr; use std::str::FromStr;
use std::sync::Arc; use std::sync::Arc;
@ -18,10 +18,10 @@ use std::time::Duration;
mod loader; mod loader;
const MAX_SPARQL_BODY_SIZE: u64 = 1_048_576; const MAX_SPARQL_BODY_SIZE: u64 = 1_048_576;
const SERVER: &str = concat!("Rudf/", env!("CARGO_PKG_VERSION")); const SERVER: &str = concat!("Oxigraph/", env!("CARGO_PKG_VERSION"));
pub fn main() { pub fn main() {
let matches = App::new("Rudf SPARQL server") let matches = App::new("Oxigraph SPARQL server")
.arg( .arg(
Arg::with_name("bind") Arg::with_name("bind")
.long("bind") .long("bind")

Loading…
Cancel
Save