Release 3.1.2
Important new features include provisional support for RDF* and updates to query optimization.
- Cleanup etc/doap and references for developers.
- Now uses https://unlicense.org/1.0/ for dap:license.
- 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_pnameto useVocabulary.vocab_map, to look up terms by their standard prefix.Vocabulary.vocap_mapuses re-woredRDF::VOCABS, and is overrided by rdf-vocab, if it is included.- Also added
Vocabulary.from_sym, which will return the vocabulary associated with theclass_namesymbol (e.g.,RDF::Vocabulary.from_sym(:OWL)=>RDF::OWL. - Adds
RDF::Vocabulary.limit_vocabswhich is used to limit the vocabularies returned byRDF::Vocabulary.eachand can substantially reduce load time when the rdf-vocabs gem is used.
- Core Model
- Make
RDF::StatementanRDF::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
rdfstaroption, with value of either:PRor:SA. - An
RDF::Enumerablemay express support for by responding withtrueto#supports?(:rdfstar). The memory-basedRDF::Repositorysupports RDF*. - Add
Statement#embedded?to discriminate statements including statements. - Check for support for
rdfstarbefore inserting embedded statements.
- Make
- 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_namesbased onQuery::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
:optimizeoption toQuery.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.
- Support query patterns with recursive sub-patterns for subject or object.