Releases: ruby-rdf/rdf
Releases · ruby-rdf/rdf
Release 3.1.11
- Favor absolute URIs for term attributes and properties, but allow pnames transitionally.
- Update local vocabularies to use absolute URIs in property values and keys.
- Change
Term#properties
to use an empty hash with a default_proc which does the magical lookup from attributes. - Add
noDoc
option to Vocabulary writer to eliminate the Yard documentation.
Release 3.1.10
- Add
Term#terms
andStatement#terms
which returns an array including itself, and array including the non-nil non-statement terms, respectively. - Rename
#has_foo?
methods as simply#foo?
to go with Ruby style. Old accessors remain as aliases. In some cases (statement?
,term?
) these were already in use, so now are overloaded.
Release 3.1.9
- Use an RDF::OrderedRepo in CLI if the ordered option is provided and the gem is loaded; otherwise, use an extended Array.
- Include shacl and shex gems in CLI formats tried.
Release 3.1.8
- Update RDF* mode:
- Eliminate PG mode,
rdfstar
is not boolean valued. - Change CLI from
--rdf-star
to--rdfstar
. - Update RDF* spec reference.
- Eliminate PG mode,
- Allow the CLI repository to be set per command. (Required for N3 reasoning).
- Skip some exponentiation tests in JRuby.
- Enable CI on all ruby versions on GitHub Actions.
- Create
RDF.config
for configuring cache sizes. Allows a general size, URI and Node specific cache sizes to be configured at startup time. Fixes #256. - Add
wrap_transaction
keyword parameter toRDF::List#initialize
. For #417. - Update faraday and faraday_middleware to ~>1.x.
Release 3.1.7
- Fix decimal and double #round method to round towards positive for negative numbers, as called for in XPath function.
- Update the public domain dedication information to indicate that it applies to all repositories in the organization, and requested on a PR.
- Update
URI#relativize
based on JSON-LDContext#remove_base
. This covers more cases where the base URI can be used. - Fix the graph passed to new terms
- It always passed the
RDF::Vocabulary
class instead of the actual vocab
- It always passed the
3.1.6
For RDF::List
:
- fix graph used to insert values into a list when not provided.
- use self.class, rather than
RDF::List
to allow it to be more easily subclassed. (for N3)
For RDF::Query
:
- In
Query#optimize!
partition required from optional patterns so that optional patterns always come last. - Add
Variable#to_base
as an alias of#to_s
. - Deprecate
Query::Pattern#variable_names
. - Add
#var_values
andQuery::Pattern#var_values
to return the appropriate value from a statement (including embedding) associated with that value.
This abstracts pattern matching to allow for embedded statements, and other things that can be used in a pattern (e.g., lists).
For RDF::Literal:
- Update
RDF::Literal::Decimal#round
,#floor
,#ceil
to return integers along withRDF::Literal::Double
variations. Previously, they returned the same type. - Add
RDF::Literal::Numberic#**
andRDF::Literal::Numeric#%
based on XPath definitions. - Add native support for Rational to xsd:double. Update
Literal::Numeric#**
to use the type of the native result, rather than always double.
Other:
- Fix bug in vocabulary writer with
%()
strings.
Release 3.1.5
- Without linkeddata loading, attempt to manually load all other serialization gems.
- Require 'rdf/cli' when used, rather than depend on autoload.
- Set the result encoding of CGI.encode to UTF-8.
- Add --ordered option to CGI to use an extended array instead of a repository to preserve order of triples.
- Use RDF::URI.parse instead of ::URI.parse when using NetHttpAdapter.
Release 3.1.4
- Explicitly require 'strscan' in ntriples/reader.
- Set log_statistics after level has been assigned.
- Use CGI.unescape instead of the deprecated URI.decode. Fixes #416.
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_pname
to useVocabulary.vocab_map
, to look up terms by their standard prefix.Vocabulary.vocap_map
uses 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_name
symbol (e.g.,RDF::Vocabulary.from_sym(:OWL)
=>RDF::OWL
. - Adds
RDF::Vocabulary.limit_vocabs
which is used to limit the vocabularies returned byRDF::Vocabulary.each
and can substantially reduce load time when the rdf-vocabs gem is used.
- Core Model
- Make
RDF::Statement
anRDF::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 withtrue
to#supports?(:rdfstar)
. The memory-basedRDF::Repository
supports RDF*. - Add
Statement#embedded?
to discriminate statements including statements. - Check for support for
rdfstar
before 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_names
based 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
:optimize
option 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.