Releases: ruby-rdf/rdf
Releases · ruby-rdf/rdf
Release 3.1.3.
add RDF::Vocabulary.register and make appropriate changes.
This is necessary, as simply defining a vocabulary is no longer sufficient to have it register a prefix for the vocabulary.
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.
Release 3.1.1
Updates RDF::Changeset to not depend on RDF::Mutable or RDF::Writable (from @doriantaylor).
- Creates
RDF::Util::Coercionsmodule with#coerce_statementsmethod, used withinRDF::ChangesetandRDF::Mutableto iterate over things that can be statements. - Allows
RDf::Changesetdeletes to use a query pattern.
Release 3.1.0
- Removes support for Ruby < 2.4.
- Update calling sequences for options and keyword arguments (Ruby 2.7 compatibility)
- Calls to
Queryable#queryand similar, along withRDF::Querywhere the first argument is of the form of a hash will typically need to explicitly enclose those members within{}, so they're not confused with keyword arguments. - Fixes to URI stuff, due to confusion between arguments and options.
- Fix arguments for Reader.for and Writer.for.
- Fix URI.intern arguments.
- Calls to
- Add RDF namespace entries for string direction.
- Adds
URI.encodeandURI.decodeas these are deprecated in Ruby core.
Release 3.0.13
- Improve documentation for validate CLI command.
- Add default
User-Agentheader, and improve documentation on header defaults. - Issue deprecation notice on versions of Ruby < 2.4.
- Update language tag validation to what BCP47 requires, not RDF, which is too liberal.
- Fix
URI#joinforpath-rootless, which goes away when merged with a relative path. - A Time should be typed as XMLSchema#dateTime
Ruby does not have a class which represents a time without date. A Tod::TimeOfDay provided by thetodgem would justify XMLSchema#time, but the default Time class always includes a Date.
Release 3.0.12
- Make documentation link explicit in gemspec.
- Change most external URLs to HTTPS.
Release 3.0.11
- Don't define vocabulary method for 'term', in addition to 'proeprty' and 'hash'.
Release 3.0.10
-
N-Triples/N-Quads:
- Single quote (') was missing from N-Triples/Quads escaped characters.
- Change N-Triples literal output encoding to limit the number of
ECHARescapes used based on Canonical form of N-Triples:- Within
STRING_LITERAL_QUOTE, only the charactersU+0022,U+005C,U+000A,U+000Dare encoded usingECHAR.ECHAR **must not** be used for characters that are allowed directly inSTRING_LITERAL_QUOTE`.
- Within
- Fix bug in
NTriples::Reader.unescapewhere it was overeager; now uses a string scanner to iterate through the string buffer.
-
Query:
- Make query validation optional. (Notation-3 patterns will appear to be invalid).
- Better support for non-distinguished variables.
- Calculate pattern cost based on position of variables.
- Add
Solutions#dup. - Add
existentialmodifier to variables. Note that this is not preserved from queries, which record the binding using the variable name, without other qualities. - Have solution iterators also return enumerators.
- Guard against nil bindings in solutions.
- Add
Solutions#mergebased on JOIN semantics.
-
Miscellaneous:
- Update Repository to remember statement options along with object, and not simply the object itself. This allows inferred statements to be added to the repo, and come back as having been inferred.
- Implement URI marshaling methods to avoid issue with serializing mutex.
- Dup components of a URI to avoid freeze issues.
- Support milliseconds in dateTime and time datatyped literals.
Release 3.0.9
- Add :parameters to RemoteDocument processing all Content-Type parameters.
- Add Writer.accept? to allow writer to examine media-type and parameters before accepting.
- Add 2.6 to rvm build matrix.
Release 3.0.6
- Create a mutex instance variable in URI and synchronize when freezing.
- Guard against nil
content_typewhen checking formats.