Skip to content

Release 3.1.2

Choose a tag to compare

@gkellogg gkellogg released this 30 May 21:48
· 312 commits to develop since this release

Important new features include provisional support for RDF* and updates to query optimization.

  • Cleanup etc/doap and references for developers.
  • RDF::Vocabulary
    • Update Vocabulary writer to output vocabulary classes that better document the vocabulary and reduce Yardoc errors.
    • Don't try to document vocabulary terms which aren't valid as Ruby attribute names.
    • Optimize Vocabulary.expand_pname to use Vocabulary.vocab_map, to look up terms by their standard prefix.
      • Vocabulary.vocap_map uses re-wored RDF::VOCABS, and is overrided by rdf-vocab, if it is included.
      • Also added Vocabulary.from_sym, which will return the vocabulary associated with the class_name symbol (e.g., RDF::Vocabulary.from_sym(:OWL) => RDF::OWL.
      • Adds RDF::Vocabulary.limit_vocabs which is used to limit the vocabularies returned by RDF::Vocabulary.each and can substantially reduce load time when the rdf-vocabs gem is used.
  • Core Model
    • Make RDF::Statement an RDF::Resource, which allows a statement to appear as either the subject or object of another statement.
    • Update N-Triples and N-Quads readers and writers to accept and emit such statements; for the reader this requires using the rdfstar option, with value of either :PR or :SA.
    • An RDF::Enumerable may express support for by responding with true to #supports?(:rdfstar). The memory-based RDF::Repository supports RDF*.
    • Add Statement#embedded? to discriminate statements including statements.
    • Check for support for rdfstar before inserting embedded statements.
  • RDF::Query
    • Support query patterns with recursive sub-patterns for subject or object.
      • Variables include those from sub-patterns.
      • Added Pattern#eql? which does recursive checks on sub-patterns.
      • Solution binding also binds to sub-patterns.
      • In Repository#query_pattern, consider recursive patterns for subject or object to match against recursive statements for subject or object.
      • Merging solutions also adds solutions found by binding recursive patterns to statements.
        ( This supports the SPARQL BIND(<<?a ?b ?c>> AS ?t) pattern).
    • Order Query::Solutions#variable_names based on Query::Solutions#project.
    • Binding to a variable now requires a solution (term is deprecated). This makes binding consistent with other uses.
    • In Solution#merge! don't merge a pattern over a statement. (BIND embedded triple use case).
    • Add :optimize option to Query.execute.
    • Remember graph_name when dupping a Query.
    • Invert costs in Pattern, as it ends up that favoring objects before subjects is much more expensive.