A library providing PHP bindings for the ACDH repository solution.
composer require acdh-oeaw/arche-lib
https://acdh-oeaw.github.io/arche-docs/devdocs/namespaces/acdhoeaw-arche-lib.html
https://github.com/acdh-oeaw/arche-lib/blob/master/MIGRATE.md
A library providing PHP bindings for the ACDH repository solution.
License: MIT License
A library providing PHP bindings for the ACDH repository solution.
composer require acdh-oeaw/arche-lib
https://acdh-oeaw.github.io/arche-docs/devdocs/namespaces/acdhoeaw-arche-lib.html
https://github.com/acdh-oeaw/arche-lib/blob/master/MIGRATE.md
For the proper paging implementation on the client side a straightforward way for fetching a total matched resources count is required.
This can be done either as a separate type of query returning a single number/technical triple or by adding a special technical triple to each search results. The second approach sounds more appealing as it allows to avoid API changes.
There is currently no way to skip tombstone resources while using the Repo/RepoDb search API. This option should be added or tombstone resources should be skipped at all.
If there are many resources matched by the search, using get_relatives_metadata()
doesn't result in an optimal execution plan. The better plan could be probably achieved with executing get_relatives()
first and then joining the result separately with metadata
, relations
and identifiers
(and taking a union of all of that).
Currently we are always materializing full search results as arrays but it sounds like a waste of memory.
It's worth trying to rewrite methods searching for resources to return Generators instead.
This has to be tested carefully as it may break other libraries code depending on ability to access a given element within the returned set.
This is a serious API change and should definitely bump a major version number.
This would allow for including simple OR clauses in the search.
What should be decided is how to serialize the list of values (JSON? coma with some coma escaping?)
if i want to get all the resources for a given property then i always get 0 resources, for example:
RepoResource::deleteRecursively()
removes root-to-leaf which causes errors on removing childrens' parent property (which presence is required by their class).
There are two options:
UPDATE: 24.01.2022:
so as we agreed, please modify the order to make it work as the "normal" ordering should be :)
count problem solved, i had an outdated arche-lib version.
And this is not a typo -> $config->orderBy = array('^https://vocabs.acdh.oeaw.ac.at/schema#hasAvailableDate'); this is the DESC ordering from the documentation, which is also working.
Original ticket was:
on hephaistos i have the following code:
`
$config = new \acdhOeaw\arche\lib\SearchConfig();
$config->limit = 10;
$config->offset = 0;
$config->orderBy = array('^https://vocabs.acdh.oeaw.ac.at/schema#hasAvailableDate');
$config->orderByLang = 'en';
$term1 = new \acdhOeaw\arche\lib\SearchTerm('http://www.w3.org/1999/02/22-rdf-syntax-ns#type', 'https://vocabs.acdh.oeaw.ac.at/schema#TopCollection', '=');
$results = $this->repo->getResourcesBySearchTerms([$term1], $config);
echo '<pre>';
var_dump($config->count);
echo '</pre>';
`
But the ordering is not working as i expected. Doesn't matter if i use the available date or the hasTitle, both are fetching random results.
Also after the query, the $config->count value is still null.
The main use case are large binary uploads which would benefit from no proxying.
Currently the RepoResource::delete()
returns nothing but when recursive deletion is used it would be nice to be able to check which resources have been actually deleted.
Similarly it would be nice to know which references have been removed if $references
option was set.
The SearchTerm
class should allow to define results sorting by a given (set of?) metadata property.
Only properties with literal values can be used for sorting. Resources without a given property should be put at the end.
It would be nice to honor datatype but it might be difficult in practice because there is no guarantee a given property is stored only with a single datatype.
As on the API level returning EasyRdf\Graph
there is no natural way to express the sorting order, additional technical property should be introduced for storing it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.