Skip to content

Releases: sweetrdf/rdfInterface

Important changes in Literal, Dataset and QuadTemplate

23 Mar 15:52
Compare
Choose a tag to compare
  • QuadIterator::current() and Dataset::current() allowed to return null making it possible to use constructs like $dataset->copy(filterMatchingUnknownNumberOfQuads)->current() ?? $defaultValue to get any quad in the dataset (coupled with the ?? for handling an empty dataset scenario when needed). Specification now explicitely requires Dataset::current() to return null for empty dataset and a quad on non-empty dataset which hasn't been traversed with the \Iterable interface yet.
  • TermCompare and QuadCompare extends TermCompare interfaces replaced the QuadTemplate interface. This allows flexible implementation of "term template" (especially "quad template") classes as the only thing the rdfInterface enforces on them is to implement equals() and __toString() for term template classes and subject/predicate/object/graph getters for quad template classes. Constructor is no longer enforced (as it was with the QuadTemplate). As a consequence of this change:
    • DataFactory::quadTemplate() method has been dropped.
    • All Dataset methods used to accept QuadTemplate now accept QuadCompare.
    • NamedNode, BlankNode and DefaultGraph interfaces extend TermCompare now.
    • Quad interface extends QuadCompare now.
  • In-code documentation describing expected implementations behavior greatly extended for Literal and Dataset.
    • The Literal constructor is now required to automatically assign a datatype if a value is bool/int/float and the datatype hasn't been specified. This allows to keep the original PHP type of the value by Literal::getValue() (if an implementation supports such a behavior) while avoiding the problem of having many instances of literals which are equal to each other according to the RDF specification.
  • Compliance tests extracted to a separate repository (and composer package).

Minor tests extensions

21 Mar 17:07
Compare
Choose a tag to compare
0.7.1

Minor tests extensions

Interopetability tests for Dataset added

21 Mar 08:55
Compare
Choose a tag to compare
0.7.0

Interoperability tests for Dataset added

Literal interface tuning

19 Mar 17:19
Compare
Choose a tag to compare

Yet another approach to the \rdfInterface\Literal. Still shouldn't be considered stable.

Minor fixes

16 Mar 22:24
Compare
Choose a tag to compare
0.5.1

@param removed from QuadInterface not to confuse phpstan

DefaultGraph made in line with RDF Dataset specification

16 Mar 21:40
Compare
Choose a tag to compare

This affects rdfInterface\DefaultGraph, rdfInterface\Quad, rdfInterface\QuadInterface and rdfInterface\DataFactory APIs.

RdfNamespace tests added

16 Mar 16:38
Compare
Choose a tag to compare
0.4.5

RdfNamespace tests added

Tests extension and small fixes

16 Mar 15:33
Compare
Choose a tag to compare
  • Tests for terms added.
  • rdfInterface\RdfNamespace documentation provided.
  • Default values of rdfInterface\DataFactory::literal and rdfInterface\Literal constructor made in line.
  • Comments on rdfInterface\Literal::getDatatype() and rdfInterface\Literal::getLang() return type design decisions added.
  • DataFactory tests split into separate methods to allow easier overriding (e.g. if a given library doesn't implement a given kind of term).
  • README updated with an example of test class reuse.

Internal tests code structure improvements

16 Mar 08:20
Compare
Choose a tag to compare
0.4.3

Common tests code extracted to the TestBaseTrait

Test classes added

16 Mar 07:34
Compare
Choose a tag to compare

A set of test classes to be used by implementations added.