attr claims are the only claims which can be indexed by the evr-attr-index server. So this section describes how to come from your custom claimst to attr claims.
First you should provide a XSLT stylesheet to the evr-attr-index server which converts your custom claims into attr claims. Such a stylesheet might look like the following example:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:evr="https://evr.ma300k.de/claims/"
xmlns:dc="http://purl.org/dc/terms/"
xmlns:myns="https://my.claim.ns"
>
<xsl:output encoding="UTF-8"/>
<xsl:template match="/evr:claim-set">
<evr:claim-set dc:created="{@dc:created}">
<xsl:apply-templates/>
</evr:claim-set>
</xsl:template>
<xsl:template match="myns:some-claim">
<evr:attr index-seed="{count(preceding-sibling::*)}">
<evr:a op="=" k="class" v="some-claim"/>
</evr:attr>
</xsl:template>
</xsl:stylesheet>
The evr-attr-index server needs a attr-spec claim to find the stylesheet. The stylesheet and attr-spec claim are also located within the evr-glacier-storage server as blobs. That way they are stored and backed up just like any other data in everarch.
An example attr-spec might look like this:
<?xml version="1.0" encoding="UTF-8"?>
<claim-set
xmlns="https://evr.ma300k.de/claims/"
xmlns:dc="http://purl.org/dc/terms/"
dc:created="2022-04-23T16:32:07.000000Z"
>
<attr-spec>
<attr-def k="tag" type="str"/>
<transformation type="xslt" blob="sha3-224-00000000000000000000000000000000000000000000000000000000"/>
</attr-spec>
</claim-set>
The evr-attr-index server searches for attr-spec claims and will automatically start indexing the evr-glacier-storage in the way defined in the attr-spec.
Claims, just like any other data in everarch, can’t be deleted. So what do you do if you like to store your contacts in everarch and also want to delete them one day? You need one claim type to define a contact. For example:
<contact
xmlns="https://whatever.my.domain/is">
<name>Heribert Huber</name>
</contact>
And if you wish another claim for archiving it:
<archive-contact
xmlns="https://whatever.my.domain/is"
seed="sha3-224-00000000000000000000000000000000000000000000000000000000-0000">
<archive-contact>
The seed attribute on the archive-contact claim points to the contact claim which initially created the contact. The seed attribute can also be used to update existing claims:
<contact
xmlns="https://whatever.my.domain/is"
seed="sha3-224-00000000000000000000000000000000000000000000000000000000-0000">
<name>Heribert Meier</name>
</contact>