Skip to content

Releases: ediarum/ediarum.WEB

ediarum.WEB Version 2.4.3

04 Jan 13:39
Compare
Choose a tag to compare

January 2024

Welcome to the new minor release of ediarum.WEB. To facilitate the use of external data a JSON file support is added. Some search functions were changed to improve the performances. Also, this version contains some bugfixes and minor changes for the objects and parts endpoints, and the frontend library.

JSON file support

A json file API support is added. Instead of a xml collection a JSON file can be used to define an object
in the appconf.xml. For this the cache routine now supports also these json files. A routine to read the JSON tree with the definitions in the
appconf.xml is added.

For more information see APPCONF.md and also the property definitions and JSON property.

Search

The performance of the search was improved.

  • Update edwebapi:get-object-list-with-search for better performance
    • With kwic-width=0 no individual search results are shown.
  • Add kwic results after filtering for better performance
  • Improve performance of object-list-search
    • The use of util:eval has far better performance than util:eval-inline.
    • A tested bugfix ("Fix double matches of search hits due to multiple indexes") switched to util:eval-inline to avoid double search-results. That change also moved from one [ft:query(.//$search-xpath or .//$seach-xpath ..., $query)] to multiple [ft:query(...) or ft:query() ...]. This was revised for better performance.

Also some bugfixes and minor improvements were made.

  • The search results and XSLT views of objects can be combined.
    • GET request with search and view parameters.
  • Some minor bugfixes in the search were made.

Objects and parts endpoints

  • Add filter type string
    • The values of properties of the type string aren't listed as complete value list, but are shown for the single objects and can be used for filtering.
  • Remove duplicate code from edwebapi:get-object-list
  • Add optional xml to json output
    • With the parameter show=full the object will be added to the JSON output Warning: due to large JSON-output, this can lead to memory problems.
  • Fix part recognition parts without prefix weren't recognised.

Minor improvements

  • Remove relation filters from index
  • Update included jquery to version 3.7.0.
  • Allow page-size ps as frontend parameter to change the number of shown results per page
  • Add search and search-type to frontend parameters for navigation. So, they are preserved during filter navigation.
  • Add parsing of html labels for add-detail-link in the frontend
  • Use local:load() instead of edwebcontroller:api-get ("/api") to reduce api calls
  • Avoid to load all objects in load-relations functions for better memory use
  • Improve API calls from frontend
  • Add new function edwebapi:get-by-id to find a object by id
  • Avoid loading of all object in edweb:add-detail-link

ediarum.WEB Version 2.1.1

08 May 16:41
Compare
Choose a tag to compare

May 2023

Welcome to the new major release of ediarum.WEB. Now, ediarum.WEB makes use of the native eXist-db indices which improves the backend performance. Due to this major change some code is rewritten and also the API endpoints and the manifest file appconf.xml must adapted to work with this new version. For more details see the release notes below.

Add index support for objects

Now the eXist-db index fields are used to retrieve objects information. For each object-type all filters and properties are added as index
fields. To see check the right usage of the index, please use the exist-db app Monex.

Attention: All object filters are now of type array of strings. If no value exists the is returned an empty array. Please update your usage of the API endpoints.
Attention: Label filter property is now an map of arrays. The values corresponding to an label are packed in a map entry. Please update your usage of the API endpoints.

The following index fields are defined:

  • object-type (e.g. objecttype---persons) as field has boolean value: Not every node of root must be an object. With an boolean xpath condition the valid nodes can be selected. Attention: In the appconf.xml the root element now only must contain a name. For selection a optional condition element can be added: e.g. <condition>./@type='my-object'</condition>
  • object-id (e.g. persons---id)
  • label (e.g. persons---label)
  • absolute-resource-id (e.g. persons---absolute-resource-id)
  • filter properties (e.g. persons---birthplace).
  • label filter properties (e.g. persons---label---alphabet) contains
    the properties values combined with the corresponding label (e.g. Mein Name---N)

Other changes:

  • Add parameter $with-filters option to edwebapi:get-object-list()
  • Remove unnecessary function edwebapi:get-object-list-without-filter
  • Remove limit parameter from edwebapi:get-object-list
  • Improve relations filter by moving api call outside from loop

Use index for relations

Also, the relations performance is improved with the usage of indices:

  • Remove $limit parameter
  • Add indices
  • Refactor function
  • Attention: Add condition tag to relation item in appconf
  • Use of @id-type with @filter added and documented
  • The suject-condition and object-condition must have the @type 'resource', 'id' or 'id-type' (the last on in combination with @filter) and contain X-Path-Expressions; for resource the expression remains empty. Attentation: conditions without @type with an XQuery-function (like function($this as map(*), $subject as map(*)) { $this?xml/@key = $subject?id }) are deprecated and aren't supported.

Update api cache mechanism

Some changes to the API cache mechanism are made:

  • Changes to the GET parameter cache
    • Set cache=no as default
    • With cache=off no ediarum-cache is used, results are directly generated from database evaluations
    • cache is now an optional parameter
  • Integrate caching into functions and delete function load-cache-from-map
    • Improve cache performance
    • A unspecified error was caused by apply. At the first
      apply everything went fine, but a following apply caused an
      unspecified error.
  • Cache files are now saved as .json and not as .xml
    • Change map values to json compatible Attention: At windows hosts there may be an encoding error if the file.encoding java parameter isn't set to UTF-8
    • Only use parse-json if used
  • Add error message if cache is locked
  • Remove blocking cache for 1 minute

Minor changes

  • Integrate cache, refactor and bugfix edwebapi:get-all function
  • Add distance search: with type distance only first match is shown; with distance-all-matches perfomance is slower but all matches are shown.
  • Add order-modifier to object-list

Update documentation

  • Update appconf documentation
  • Add CITATION.cff
  • Change zenodo badge to link to latest release

ediarum.WEB Version 1.18.3

07 Jun 12:57
Compare
Choose a tag to compare

June 2022

Welcome to the new release of ediarum.WEB. It contains some new features and performances improvements. Also, several bugs are fixed and the code was cleaned up.

Performance improvements

  • New controller function load-media loads media without api check and shortens media load durations.
  • Better cache handling.
  • Add cache locking to avoid parallel re-caching processes.
  • Filter mechanism avoids multiple loading of filters for facetted search.
  • Avoid multiple api calls with new function local:load in edweb module.
  • Reduce api calls in load-objects: API call for filter should only be made if filter parameters are set.
    For shown objects (pages) no api call is required.

New Features

  • Add show="full" option to relation api: With this option the full subject and object items are added to the relation list result.
  • Add order by filter for object list
  • Add id for all object as filter property
  • A relative project path can be used in appconf.xml
  • New function edwebcontroller:base-url can be used to insert base-url in xquery scripts
  • Add features for id-type (filter property with type id):
    • id-type can be used in relation conditions
    • link replacement works with $id-type(VARIABLE)
    • Referer / highlighting works with id-type

ediarum.WEB Version 1.13.4

01 Feb 16:33
Compare
Choose a tag to compare

February 2022

Welcome to the new release of ediarum.WEB. It contains only a patch to work also with the latest eXist-db version.

Update for eXist 5.3.1

Some library dependencies had to updated to work properly with eXist-db 5.3.1.

ediarum.WEB Version 1.13.3

21 Dec 15:15
Compare
Choose a tag to compare

December 2021

Welcome to the new release of ediarum.WEB. We are glad to announce the following features and changes:

New API documentation with openAPI

The API documentation now is documented in the openapi
format (see https://github.com/OAI/OpenAPI-Specification).
Some API documentation can be still found in API.md

See openapi.yml

  • Move API documentation from API.md to OpenAPI

Add CTS API: GetPassage request

If defined parts of an object can be retrieved with a cts urn
and part id via the new CTS API - GetPassage request. For
more information about CTS see the CTS specification.

See ediarum.WEB CTS API

Update Object Part API

  • Bugfix in part detection
    Part detection didn't work right if '.' was separator of
    parts and second part number longer than 1.
    Example: '1.12'.
  • Add recursive list-part-ids to find all ids
    Only part-ids in a two level hierarchy were found.
    With a recursive solution IDs in all levels should
    be found.
    Related API call: /api/<object-type>/<object-id>?part=<part-id>

Add search features

  • Add search in object parts
    The search within one object also retrieves the parts where
    the hits belong. Also the hits are marked within the xml of
    the object and the object parts.

  • Add search for single objects
    A search is added to the single objects API. The results are
    marked in the XML output and listed in the JSON output.

Update code

  • Prettify edweb-controller.xql

ediarum.WEB Version 1.11.0

09 Aug 09:00
Compare
Choose a tag to compare

August 2021

Welcome to the new release of ediarum.WEB. We are glad to announce the following features and changes:

Move Data-Cache from ediarum.WEB to Project App

A new collection cache is added to the project app where the cache is
stored independently of ediarum.web ($app-target/cache). The cache file
names now don't contain the app title (app-target) because it is the same
for a project.

IMPORTANT: Now the app-target must be the first parameter for all functions
using edwebapi:load-map-from-cache.

  • Remove unused variable $edweb:cache-collection

Highlighting Feature for Links

If the website user follows a link build with $id/ the links to the first item are highlighted. If a link to an item is add with $id/ (in @href or @src) a referer is added to the link and the link is highlighted if the URL contains the referer.

  • Update ediarum.less
  • Update edweb.xql - local:view-expand-links
  • Added highlighting feature to next, prev, and detail links

More:

  • Bugfix: edweb:expand-links didn't work if links contained an anchor #

Relation Handling

For all loaded relation items the key is is added. It describes if the item is
subject or object of the relation.

  • Update for all edweb:load-relations-*

Now, it is possible to load relations not only for the current item but
also for an item with a defined ID.

  • Added edweb:load-relations-for-subject-with-id
  • Added edweb:load-relations-for-object-with-id
  • Added edweb:load-relations-for-subject-with-id-path
  • Added edweb:load-relations-for-object-with-id-path
  • Added edweb:load-relations-with-id

Relations of second degree (friend-of-a-friend) can now be loaded. They are
handled like other relations. The predicate contains the relation item of the
first degree:

  • Added edweb:load-second-degree-relations

More:

  • Bugfix: edweb:load-relations due to sequence / array mix up
  • Bugfix: edweb:load-relations didn't work if there were no subject or object relations

Frontend Library

  • Added edweb:insert-count-of-groups. Count objects after grouping, with parameters from and group-by
  • Added edweb:template-detail-link. Add a link with default label of the linked object (with paraneter from).
  • Added edweb:template-do-if-not-empty. Processes nodes only if xpath in current xml is not empty (with parameter ``xpath`)
  • Added edweb:template-for-each-group equivalent to template:each but including grouping with parameter group-by

Backend Library

  • Bugfix: relations didn't work if no object/subject was found
  • Bugfix: problem with relation condition. The object and subject conditions for relations with type=id didn't work.
  • Add test for IDs containing :
  • Add $internal-node-id to relations. With $absolute-resource-id and $internal-node-id the relation xml within the tree can be accessed.

Other Changes

  • Rename main.less to ediarum.less minimizing confusion of it's use in a app

ediarum.WEB Version 1.9.6

16 Oct 09:29
Compare
Choose a tag to compare

October 2020 (version 1.9.6)

Welcome to the new release of ediarum.WEB. There are a number of new features and other improvements. Every new version is also published at zenodo.org as shown on the new badge DOI.

Search Endpoints

Now it is possible to search within the backend. For this the search
indexes and optional search routines must be defined in the appconf.xml.
With a new search parameter searches within the object list are possible.
A new API call is defined to search with the search routine.

See Searching

API for Views Output

For every object type different views can be declared in the appconf.xml.
The related XSLT transformation can now be triggered within the backend
by new API calls.

The listing of views in the JSON output are now ordered by id instead of
randomly.

See Get Object - GET-Parameters

More:

  • Add order view output by position
  • Add order by pos for object views

Endpoint of all IDs

API call "/api?id=all" can be used now with "/api?id-type=all". Because
there were sideeffects with the request-attribute "id" to some frontend
detail pages (with functions like edweb:load-current-object).

See List of all IDs

Updated cache mechanism

See Caching

Updates in Object and Object-Type Endpoints

See List of Objects and Relations and Get Object

  • Add object/subject filter to relation-list and improve performance
  • Allow xpath for filter labels, add fallback label
  • Restrict using normalize-space to non node filters
  • Add default limit of 10000 objects to object list because of performance
  • Allow xpath functions for filter labels
  • Add warning for empty labels
  • Normalize space at filter values by default
  • Allow all literals as ID
  • Make single resources as source for objects available
  • Add object id as id property

Fontend Library

See edweb.xql

  • Add edweb:insert-xml-string for parsing xml text
  • edweb:insert-xml-string can return a string or a node
  • The processed node in edweb:template-switch uses now normalize-spaces()
    to avoid malfunctioning due to xml whitespace formatting causes.

Changes in the Backend and Controller Libraries

See edweb-api.xql and edweb-controller.xql

  • Bugfix clear attributes for edwebcontroller:api-get
  • Bugfix in function call edwebapi:get-relation-list
  • Separating eval-base/filter-object functions from get-list and add filter to get-object
  • Add console log for edwebcontroller:api-get calls

ediarum.WEB 1.1.1

24 Jul 08:09
Compare
Choose a tag to compare
v1.1.1

Update documentation

ediarum.WEB 1.0.0

01 Jul 13:44
f4afe5c
Compare
Choose a tag to compare
v1.0.0

Update README.md