Fixes some typos

pull/51/head
Tpt 4 years ago
parent 44c216c348
commit 9b202efc27
  1. 4
      lib/src/model/blank_node.rs
  2. 4
      lib/src/model/literal.rs
  3. 4
      lib/src/model/named_node.rs
  4. 4
      lib/src/model/triple.rs
  5. 5
      lib/src/model/xsd/date_time.rs
  6. 2
      lib/src/model/xsd/parser.rs
  7. 2
      lib/src/sparql/mod.rs
  8. 6
      lib/src/sparql/xml_results.rs
  9. 4
      lib/src/store/memory.rs
  10. 2
      lib/src/store/rocksdb.rs
  11. 2
      lib/src/store/sled.rs
  12. 2
      python/src/sparql.rs

@ -12,7 +12,7 @@ use std::str;
/// It is also possible to create a blank node from a blank node identifier using the [`BlankNode::new`](#method.new) function. /// It is also possible to create a blank node from a blank node identifier using the [`BlankNode::new`](#method.new) function.
/// The blank node identifier must be valid according to N-Triples, Turtle and SPARQL grammars. /// The blank node identifier must be valid according to N-Triples, Turtle and SPARQL grammars.
/// ///
/// The default string formatter is returning a N-Triples, Turtle and SPARQL compatible representation: /// The default string formatter is returning an N-Triples, Turtle and SPARQL compatible representation:
/// ``` /// ```
/// use oxigraph::model::BlankNode; /// use oxigraph::model::BlankNode;
/// ///
@ -122,7 +122,7 @@ impl Default for BlankNode {
/// It is also possible to create a blank node from a blank node identifier using the [`BlankNodeRef::new`](#method.new) function. /// It is also possible to create a blank node from a blank node identifier using the [`BlankNodeRef::new`](#method.new) function.
/// The blank node identifier must be valid according to N-Triples, Turtle and SPARQL grammars. /// The blank node identifier must be valid according to N-Triples, Turtle and SPARQL grammars.
/// ///
/// The default string formatter is returning a N-Triples, Turtle and SPARQL compatible representation: /// The default string formatter is returning an N-Triples, Turtle and SPARQL compatible representation:
/// ``` /// ```
/// use oxigraph::model::BlankNodeRef; /// use oxigraph::model::BlankNodeRef;
/// ///

@ -11,7 +11,7 @@ use std::option::Option;
/// An owned RDF [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal) /// An owned RDF [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal)
/// ///
/// The default string formatter is returning a N-Triples, Turtle and SPARQL compatible representation: /// The default string formatter is returning an N-Triples, Turtle and SPARQL compatible representation:
/// ``` /// ```
/// # use oxilangtag::LanguageTagParseError; /// # use oxilangtag::LanguageTagParseError;
/// use oxigraph::model::Literal; /// use oxigraph::model::Literal;
@ -404,7 +404,7 @@ impl From<DayTimeDuration> for Literal {
/// A borrowed RDF [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal) /// A borrowed RDF [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal)
/// ///
/// The default string formatter is returning a N-Triples, Turtle and SPARQL compatible representation: /// The default string formatter is returning an N-Triples, Turtle and SPARQL compatible representation:
/// ``` /// ```
/// # use oxilangtag::LanguageTagParseError; /// # use oxilangtag::LanguageTagParseError;
/// use oxigraph::model::LiteralRef; /// use oxigraph::model::LiteralRef;

@ -4,7 +4,7 @@ use std::fmt;
/// An owned RDF [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri) /// An owned RDF [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri)
/// ///
/// The default string formatter is returning a N-Triples, Turtle and SPARQL compatible representation: /// The default string formatter is returning an N-Triples, Turtle and SPARQL compatible representation:
/// ``` /// ```
/// use oxigraph::model::NamedNode; /// use oxigraph::model::NamedNode;
/// ///
@ -93,7 +93,7 @@ impl PartialEq<NamedNode> for &str {
/// A borrowed RDF [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri) /// A borrowed RDF [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri)
/// ///
/// The default string formatter is returning a N-Triples, Turtle and SPARQL compatible representation: /// The default string formatter is returning an N-Triples, Turtle and SPARQL compatible representation:
/// ``` /// ```
/// use oxigraph::model::NamedNodeRef; /// use oxigraph::model::NamedNodeRef;
/// ///

@ -540,7 +540,7 @@ impl<'a> From<TripleRef<'a>> for rio::Triple<'a> {
} }
/// A possible owned graph name. /// A possible owned graph name.
/// It is the union of [IRIs](https://www.w3.org/TR/rdf11-concepts/#dfn-iri), [blank nodes](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node) and the [default graph name](https://www.w3.org/TR/rdf11-concepts/#dfn-default-graph). /// It is the union of [IRIs](https://www.w3.org/TR/rdf11-concepts/#dfn-iri), [blank nodes](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node), and the [default graph name](https://www.w3.org/TR/rdf11-concepts/#dfn-default-graph).
#[derive(Eq, PartialEq, Debug, Clone, Hash)] #[derive(Eq, PartialEq, Debug, Clone, Hash)]
pub enum GraphName { pub enum GraphName {
NamedNode(NamedNode), NamedNode(NamedNode),
@ -649,7 +649,7 @@ impl From<GraphName> for Option<NamedOrBlankNode> {
} }
/// A possible borrowed graph name. /// A possible borrowed graph name.
/// It is the union of [IRIs](https://www.w3.org/TR/rdf11-concepts/#dfn-iri), [blank nodes](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node) and the [default graph name](https://www.w3.org/TR/rdf11-concepts/#dfn-default-graph). /// It is the union of [IRIs](https://www.w3.org/TR/rdf11-concepts/#dfn-iri), [blank nodes](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node), and the [default graph name](https://www.w3.org/TR/rdf11-concepts/#dfn-default-graph).
#[derive(Eq, PartialEq, Debug, Clone, Copy, Hash)] #[derive(Eq, PartialEq, Debug, Clone, Copy, Hash)]
pub enum GraphNameRef<'a> { pub enum GraphNameRef<'a> {
NamedNode(NamedNodeRef<'a>), NamedNode(NamedNodeRef<'a>),

@ -1894,7 +1894,10 @@ mod tests {
); );
assert!(GDay::from_str("---15").unwrap() < GDay::from_str("---16").unwrap()); assert!(GDay::from_str("---15").unwrap() < GDay::from_str("---16").unwrap());
assert!(GDay::from_str("---15-13:00").unwrap() > GDay::from_str("---16+13:00").unwrap()); assert!(GDay::from_str("---15-13:00").unwrap() > GDay::from_str("---16+13:00").unwrap());
assert!(GDay::from_str("---15-11:00").unwrap() == GDay::from_str("---16+13:00").unwrap()); assert_eq!(
GDay::from_str("---15-11:00").unwrap(),
GDay::from_str("---16+13:00").unwrap()
);
assert!(GDay::from_str("---15-13:00") assert!(GDay::from_str("---15-13:00")
.unwrap() .unwrap()
.partial_cmp(&GDay::from_str("---16").unwrap()) .partial_cmp(&GDay::from_str("---16").unwrap())

@ -54,7 +54,7 @@ impl fmt::Display for XsdParseError {
XsdParseErrorKind::TooMuchData { count } => { XsdParseErrorKind::TooMuchData { count } => {
write!(f, "Too long XML Schema value: {} extra chars", count) write!(f, "Too long XML Schema value: {} extra chars", count)
} }
XsdParseErrorKind::Overflow => write!(f, "Computation overflow or undeflow"), XsdParseErrorKind::Overflow => write!(f, "Computation overflow or underflow"),
XsdParseErrorKind::ParseInt(error) => { XsdParseErrorKind::ParseInt(error) => {
write!(f, "Error while parsing integer: {}", error) write!(f, "Error while parsing integer: {}", error)
} }

@ -1,6 +1,6 @@
//! [SPARQL](https://www.w3.org/TR/sparql11-overview/) implementation. //! [SPARQL](https://www.w3.org/TR/sparql11-overview/) implementation.
//! //!
//! SPARQL evaluation is done from a store. See [`MemoryStore`](../store/memory/struct.MemoryStore.html#method.query) for an example. //! Stores execute SPARQL. See [`MemoryStore`](../store/memory/struct.MemoryStore.html#method.query) for an example.
mod algebra; mod algebra;
mod dataset; mod dataset;

@ -253,13 +253,13 @@ pub fn read_xml_results(source: impl BufRead + 'static) -> Result<QueryResults,
} }
}, },
State::AfterHead => { State::AfterHead => {
if event.name() == b"results" { return if event.name() == b"results" {
return Ok(QueryResults::Solutions(QuerySolutionIter::new( Ok(QueryResults::Solutions(QuerySolutionIter::new(
Rc::new(variables.into_iter().map(Variable::new).collect()), Rc::new(variables.into_iter().map(Variable::new).collect()),
Box::new(empty()), Box::new(empty()),
))) )))
} else { } else {
return Err(invalid_data_error(format!("Unexpected autoclosing tag <{}>", reader.decode(event.name()).map_err(map_xml_error)?))) Err(invalid_data_error(format!("Unexpected autoclosing tag <{}>", reader.decode(event.name()).map_err(map_xml_error)?)))
} }
} }
_ => return Err(invalid_data_error(format!("Unexpected autoclosing tag <{}>", reader.decode(event.name()).map_err(map_xml_error)?))) _ => return Err(invalid_data_error(format!("Unexpected autoclosing tag <{}>", reader.decode(event.name()).map_err(map_xml_error)?)))

@ -377,7 +377,7 @@ impl MemoryStore {
/// It is implemented using the canonicalization approach presented in /// It is implemented using the canonicalization approach presented in
/// [Canonical Forms for Isomorphic and Equivalent RDF Graphs: Algorithms for Leaning and Labelling Blank Nodes, Aidan Hogan, 2017](http://aidanhogan.com/docs/rdf-canonicalisation.pdf) /// [Canonical Forms for Isomorphic and Equivalent RDF Graphs: Algorithms for Leaning and Labelling Blank Nodes, Aidan Hogan, 2017](http://aidanhogan.com/docs/rdf-canonicalisation.pdf)
/// ///
/// Warning: This implementation worst-case complexity is in O(b!) with b the number of blank node node in the input graphs. /// Warning: This implementation worst-case complexity is in O(b!) with b the number of blank nodes in the input graphs.
pub fn is_isomorphic(&self, other: &Self) -> bool { pub fn is_isomorphic(&self, other: &Self) -> bool {
iso_canonicalize(self) == iso_canonicalize(other) iso_canonicalize(self) == iso_canonicalize(other)
} }
@ -1086,7 +1086,7 @@ impl MemoryPreparedQuery {
} }
} }
/// Allows to insert and delete quads during an ACID transaction with the [`MemoryStore`](struct.MemoryStore.html). /// Allows inserting and deleting quads during an ACID transaction with the [`MemoryStore`](struct.MemoryStore.html).
pub struct MemoryTransaction { pub struct MemoryTransaction {
ops: Vec<TransactionOp>, ops: Vec<TransactionOp>,
} }

@ -1080,7 +1080,7 @@ struct StaticDBRowIterator {
impl StaticDBRowIterator { impl StaticDBRowIterator {
/// Creates a static iterator from a non static one by keeping a ARC reference to the database /// Creates a static iterator from a non static one by keeping a ARC reference to the database
/// Caller must unsure that the iterator belongs to the same database /// Caller must ensure that the iterator belongs to the same database
/// ///
/// This unsafe method is required to get static iterators and ease the usage of the library /// This unsafe method is required to get static iterators and ease the usage of the library
/// and make streaming Python bindings possible /// and make streaming Python bindings possible

@ -1010,7 +1010,7 @@ impl<'a> WritableEncodedStore for &'a SledTransaction<'a> {
/// Error returned by a Sled transaction /// Error returned by a Sled transaction
#[derive(Debug)] #[derive(Debug)]
pub enum SledTransactionError<T> { pub enum SledTransactionError<T> {
/// An failure returned by the API user that have aborted the transaction /// A failure returned by the API user that have aborted the transaction
Abort(T), Abort(T),
/// A storage related error /// A storage related error
Storage(io::Error), Storage(io::Error),

@ -50,7 +50,7 @@ pub fn build_query_options(
if let Some(named_graphs) = named_graphs.or(named_graph_uris) { if let Some(named_graphs) = named_graphs.or(named_graph_uris) {
if named_graphs.is_empty()? { if named_graphs.is_empty()? {
return Err(ValueError::py_err( return Err(ValueError::py_err(
"The query() method nammed_graphs argument cannot be empty", "The query() method named_graphs argument cannot be empty",
)); ));
} }
for named_graph in named_graphs.iter()? { for named_graph in named_graphs.iter()? {

Loading…
Cancel
Save