Releases: acdh-oeaw/arche-lib
Bugfixes
Adjusted to arche-core 1.11.0
1.7.0 Adjusted to arche-core 1.11.0
API enhancement
acdhOeaw\acdhRepoLib\RepoResourceDb::getMetadataQuery() method extracted from acdhOeaw\acdhRepoLib\RepoResourceDb::loadMetadata. This change allows to access resource metadata on a raw PDOStatement level.
"ids" metadata read mode introduced
"ids" metadata read mode returns minimal set of data - only triples having matching resource repo URL as subject, label property and all label property values. It allows to avoid an overhead of fetching large metadata amounts when a client is only interested in a resource URL and label.
Minor improvements
Include binaries in full text search even when language filter is provided (binaries never have language).
Zero-config Repo and RepoResourceResolver enhancements
- Repo::factoryFromUrl() takes optional $metaReadModeHeader parameter
- RepoResourceResolver::resolveUrl() makes use of metadataReadMode header name when it's known
Both changes allow faster resource resolution in the zero-config mode when the metadataReadMode HTTP header name is known (which is not entirely zero-config any more...)
Zero-config Repo and RepoResource added
acdhOeaw\acdhRepoLib\Repo::factoryFromUrl()
method added allowing to instantiate aRepo
object having just a repository resource URL. All the required repository configuration is being read from repository's REST API/describe
endpoint.acdhOeaw\acdhRepoLib\RepoResourceResolver
can now be instantiated without any configuration. A mixed mode has been also added allowing to fall back to the zero-configuration mode (which can resolve against any repository) if a resource isn't found in the configuration-based mode (which imposes coupling with a single repository instance).
The only disadvantage of zero-config modes is they resolve resources a few times slower than configuration-based modes.
API enhancement
acdhOeaw\acdhRepoLib\RepoResourceInterface::META_PARENTS
metadata read mode added. It works likeMETA_RELATIVES
but returns only parents metadata. In contrary toMETA_RELATIVES
which can return enormous amounts of data for resources having enormous children countMETA_PARENTS
is safe (until the repository has enormously deep resource hierarchy).acdhOeaw\acdhRepoLib\RepoResourceResolver
class added saving quite some boiler plate code needed to check what kind of repository connection should be established (REST API one or direct database access one) and how to nicely handle errors for HTTP services. This class is meant to be used e.g. in dissemination services.