This library provides the definitions and reference implementation for the fundamental

ValOS Resources
ValOS Events

This document is part of the library workspace @valos/raem (of domain @valos/kernel) which has the description: `ValOS Resources And Events Model (ValOS-RAEM) API, Schema`

This library provides the definitions and reference implementations for the fundamental

ValOS Resources
ValOS Events

A ValOS Resource

represents a well-defined part of the world. It has a well-defined state at each particular moment in time.

A ValOS Event

represents a dynamic change to a resource by describing the change from previous to subsequent resource states at a particular time.

The interplay of these distinct yet interwoven systems forms the foundation of the Valaa Open System.

§ @valos/raem provides ValOS Resources And Events Model `ValOS-RaEM` (/væləsˌɹɛem/)

This library provides:

§ ValOS URLs, urn:valos and raw id's

ValOS URL is used to specify a parameterized location reference to a ValOS Resource. It has two major parts separated by the URI fragment separator `#`: *chronicle URI* part and a *local reference* part.

*Chronicle URI* identifies the target authority and chronicle of the reference. It corresponds to scheme, hierarchical and query parts of an URI; everything but the fragment. Its precise structure and interpretation is specified by the scheme but typically the scheme and hierarchical part identify an authority and query part identifies a chronicle.

*Local reference* identifies a particular resource inside a chronicle but also contains optional *coupling*, *ghost path*, *lens* (and other) parts which further parameterize the reference itself. It corresponds to the URI fragment part but has sub-structure which is specified in this document.

valos-url ┌────────────────────────────────────────────────┴─────────────────────────────────────────────────┐ chronicle-uri resource-ref ┌───────────────────────┴────────────────────────┐ ┌──────────────────────┴────────────────────────┐ resource-url ref-params ┌──────────────────────────────┴────────────────────────────────┐ ┌───────────────┴───────────────┐ authority-uri chronicle-id resource-id coupling lens ┌──────────────┴───────────────┐ ┌─────┴──────┐ ┌─────┴──────┐ ┌───────┴────────┐ ┌─────┴──────┐


└─────┬──────┘ └──────────────┬────────────────┘ nss q-component └───┬────┘ └──────┬──────┘ └┬┘ └───────┬───────┘ └──────────────────────┬────────────────────────┘ scheme authority path query fragment └────────┬────────┘ hier-part

§ Curious dualisms of *chronicle URI* and *local reference*

The division between chronicle URI and local reference has many curious dualistic qualities: backend vs. frontend, hierarchical vs. flat, routing vs. computation, extensible vs. fixed, absolute vs. contextual, coarse vs. granular, self-contained vs. part-of-a-whole.

Chronicle URI domain is backend, local reference domain is front-end

ValOS backends deal with the indivisible chronicles and thus don't care about the particularities of local references to individual resources. This corresponds to how in web architecture URI fragments are not sent to backend with resource requests. Conversely, ValOS frontends don't care where a resource comes from once it has been loaded, but about its identity, relationships and the parameters of those relationships. This is reflected in how frontend code regularily drops the chronicle URI.

Chronicle URI structure is specified by the scheme, local reference structure is specified by ValOS

By the nature of its distributed event sourcing architecture ValOS focuses heavily on the frontend. The cross-compatibility between components is driven by how new backends can integrate and talk with existing front-end clients. This is facilitated by front-end spindle systems which enables new ValOS URI schemes to specify new routing solutions and fundamentally new backend infrastructures, as long as said infrastructures can route ValOS event streams to clients. This corresponds to how ValOS doesn't specify how a *chronicle URI* identifies and locates chronicles and authorities but leaves it to the scheme specifications and their reference implementations of frontend spindles.

Chronicles URI's identify self-contained wholes, resource references need their context

Web architecture specifies that all or none of the document is retrieved. This corresponds to the behaviour of ValOS chronicles which are always retrieved as a whole. Chronicle URI's contain all and nothing but the components which identify web resources, that is everything but the fragment.


§ resource-id


Javascript class which implements ValOS reference URI and associated operations.

§ library @valos/raem ontology, prefix valos_raem

@valos/raem ontology specifies the Valospace core types and properties directly to the @valos/kernel namespace.

§ @valos/raem IRI prefixes

Prefix IRI

§ valos_raem valos_kernel:Class vocabulary

rdfs:label rdfs:subClassOf
rdfs:commentThe class of all valospace types. Instances of valospace types are called valospace resources. Only valospace resources can appear as a subject in valospace resource and event triple graphs.
rdfs:commentThe class of all resources which can appear as a predicate in valospace triple graphs or which can are accessible inside valospace from valospace resources. The instances of this class are called 'valospace fields'. All valospace fields have valos_raem:Type or one of its sub-classes as their rdf:domain.
rdfs:commentThe class of valospace fields which have a full triple expression in all regular query and graph contexts (as opposed to fields with non-triple semantics or triple expression only in limited contexts).
rdfs:commentThe class of valospace fields which have both a triple state expression inside valospace and a change impression in event logs; these are the primary, persisted sources of truth.
rdfs:commentThe class of valospace fields which have triple expression inside valospace via coupled fields but no event log impression.
rdfs:commentThe class of inferred fields where a field is not associated with raw valospace triples but the triples are fully generated by the expressor, with scope values: - valos_raem:0 as the field owner, - valos_raem:1 as the field id, and - valos_raem:2 as undefined.
rdfs:commentThe class of valospace fields with no general triple expression but with custom semantics for specific queries.
rdfs:commentThe class of inferred fields called alias fields where each such field has an 'aliasOf' RDF property or valos Field. Alias fields are mutation-inference symmetric so that triples with an alias field as predicate are inferred from triples with aliasOf as predicate and mutations with an alias field as predicate are translated to use the aliasOf as predicate.
VPathRulerdfs:Literal rdfs:List
rdfs:commentThe class of all resources representing some VPath rule or pseudo-rule. 'vrid'. If this class is used as literal datatype URI the literal contains the flat string VPath rule representation. Otherwise when this class is the range of a property which is used as a predicate in a triple, and the object of the triple is not a literal, then the object contains the segmented representation of the VPath rule value as an rdf List.
rdfs:commentThe class of all resources representing the VPath rule 'vpath' (always begins with '@')
rdfs:commentThe class of all resources representing the VPath pseudo-rule 'vrid', ie. a resource identifier with VGRID as the first step (always begins with '@')
rdfs:commentThe class of all resources representing the VPath pseudo-rule 'verbs', ie. a path between other resources without a VGRID as the first step (always begins with '@').
rdfs:commentThe class of all resources representing the VPath rule 'vgrid' (always begins with '$').
rdfs:commentThe class of all resources representing the VPath pseudo-rule 'vparam' (always begins with '$' or ':').
rdfs:commentThe class of all verb names. Each context which performs VPath computation valks provides native implementations for the resolvers it supports in its VPath valks.
rdfs:commentThe class of all resolver names. Resolvers are verbs which are used for resolving generated properties.

§ valos_raem valos_kernel:Property vocabulary

rdfs:label rdfs:subPropertyOf rdfs:domain rdfs:range
rdfs:commentThe custom expressor of an ExpressedField as a VPath. If defined and whenever a triple expression for this field is required the expressor VPath is valked with scope values: - valos_raem:0 being the field owner, - valos_raem:1 being the field id, and - valos_raem:2 being the possible field raw triple object value if it exists, otherwise undefined. The resulting valk value is used as the object of a new triple, with field owner and field id used as the subject and predicate.
rdfs:commentThe custom impressor of an EventLoggedField as a VPath. Whenever an event log entry is required for an update that targets this field the impressor VPath is valked with scope values: - valos_raem:0 as the field owner, - valos_raem:1 as the field id, - valos_raem:2 as the possible current field raw triple object value or undefined otherwise, and - valos_raem:3 the new value being updated to this field.
rdfs:commentThe alias target property specifies the inference source and mutation target of an alias field.
rdfs:commentThis field refers to a resource which is owned by the field subject resource. If the subject resource is is destroyed or if this field is removed then the owned resource is cascade destroyed.
rdfs:commentThis field refers to a resource which owns the field subject resource. If the owner is destroyed or if the coupled field (which is marked with isOwnerOf) is removed from the owner then the subject resource will be cascade destroyed. Removing the isOwnedBy field itself will only orphan the subject resource.
rdfs:commentField with this property prevent destruction of their subject resource if the field has active couplings inside the same chronicle.
rdfs:commentIf set to false this field not be visible for DUPLICATED class of events.
rdfs:commentThe implicit initial value of the resource field when the resource is created.
rdfs:commentThe value of a resource field which doesn't have an own value defined (ie. is evaluated before prototype field lookup).
rdfs:commentThe value of a resource field which doesn't have a value defined by any resource in its prototype chain.
rdfs:commentBypass the default behavior which forces transient fields to be plural to allow for singular fields.

§ valos_raem valos_raem:Type vocabulary

rdfs:label revdoc:brief rdfs:subClassOf

§ valos_raem valos_raem:Field vocabulary

rdfs:label rdfs:domain rdfs:range rdf:type rdfs:subPropertyOf valos_raem:coupledField

§ valos_raem valos_raem:Resolver vocabulary

rdfs:label rdf:type Comment
rdfs:commentresolve VPath
rdfs:commentassign via VPath
rdfs:commentresolve context term against the event log of the given resource
rdfs:commentresolve resource id of the given resource
rdfs:commentresolve resource VRID object of the given resource
rdfs:commentresolve dominant type name of the given resource
rdfs:commentresolve only owns-fields-only transient of this resource
rdfs:commentresolve the ghost prototype of this ghost
rdfs:commentresolve the ghost host of this ghost
rdfs:commentresolve octet count of the octet-stream associated with the Bvob

§ valos_raem remaining vocabulary

rdfs:label rdf:type rdfs:subClassOf
rdfs:commentpositional argument 0
rdfs:commentpositional argument 1
rdfs:commentpositional argument 2
rdfs:commentpositional argument 3
rdfs:commentpositional argument 4

§ valos_raem JSON-LD context term definitions

Term Definition @id @type @container