This library provides the definitions and reference implementation for the fundamental

ValOS Resources
and
ValOS Events
systems.

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
and
ValOS Events
systems.

A ValOS Resource

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

A ValOS Event

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 ┌──────────────┴───────────────┐ ┌─────┴──────┐ ┌─────┴──────┐ ┌───────┴────────┐ ┌─────┴──────┐

valaa-test://example.com:123/dev?id=@$~raw.a...2@@#987b-72...8263?=coupling=relations&lens=ROOT_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.

Etc.

§ resource-id

§ VRL

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
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfshttp://www.w3.org/2000/01/rdf-schema#
xsdhttp://www.w3.org/2001/XMLSchema#
owlhttp://www.w3.org/2002/07/owl#
dchttp://purl.org/dc/elements/1.1/
valos_kernelhttps://valospace.org/kernel#
valos_raemhttps://valospace.org/raem#

§ valos_raem valos_kernel:Class vocabulary

rdfs:label rdfs:subClassOf
Typerdfs:Class
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.
Fieldrdf:Property
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.
ExpressedFieldvalos_raem:Field
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).
EventLoggedFieldvalos_raem:ExpressedField
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.
CoupledFieldvalos_raem:ExpressedField
rdfs:commentThe class of valospace fields which have triple expression inside valospace via coupled fields but no event log impression.
GeneratedFieldvalos_raem:ExpressedField
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.
TransientFieldvalos_raem:Field
rdfs:commentThe class of valospace fields with no general triple expression but with custom semantics for specific queries.
AliasFieldvalos_raem:Field
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.
VPathvalos_raem:VPathRule
rdfs:commentThe class of all resources representing the VPath rule 'vpath' (always begins with '@')
VRIDvalos_raem:VPathRule
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 '@')
Verbsvalos_raem:VPathRule
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 '@').
VGRIDvalos_raem:VPathRule
rdfs:commentThe class of all resources representing the VPath rule 'vgrid' (always begins with '$').
VParamvalos_raem:VPathRule
rdfs:commentThe class of all resources representing the VPath pseudo-rule 'vparam' (always begins with '$' or ':').
Verbvalos_kernel:Property
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.
Resolvervalos_raem:Verb
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
expressorvalos_raem:ExpressedFieldrdfs:List
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.
impressorvalos_raem:EventLoggedFieldrdfs:List
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.
aliasOfvalos_raem:AliasFieldvalos_raem:Field
rdfs:commentThe alias target property specifies the inference source and mutation target of an alias field.
isOwnerOfvalos_raem:Fieldxsd:boolean
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.
isOwnedByvalos_raem:Fieldxsd:boolean
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.
coupledFieldvalos_raem:FieldvalosField
rdfs:comment
defaultCoupledFieldvalos_raem:Fieldxsd:string
rdfs:comment
preventsDestroyvalos_raem:Fieldxsd:boolean
rdfs:commentField with this property prevent destruction of their subject resource if the field has active couplings inside the same chronicle.
isDuplicateablevalos_raem:Fieldxsd:boolean
rdfs:commentIf set to false this field not be visible for DUPLICATED class of events.
initialValuevalos_raem:Fieldrdfs:Resource
rdfs:commentThe implicit initial value of the resource field when the resource is created.
ownDefaultValuevalos_raem:Fieldrdfs:Resource
rdfs:commentThe value of a resource field which doesn't have an own value defined (ie. is evaluated before prototype field lookup).
finalDefaultValuevalos_raem:Fieldrdfs:Resource
rdfs:commentThe value of a resource field which doesn't have a value defined by any resource in its prototype chain.
allowTransientFieldToBeSingularvalos_raem:Fieldxsd:boolean
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
resolveVPathvalos_raem:Resolver
rdfs:commentresolve VPath
impressViaVPathvalos_raem:Resolver
rdfs:commentassign via VPath
resolveContextTermvalos_raem:Resolver
rdfs:commentresolve context term against the event log of the given resource
resolveIdvalos_raem:Resolver
rdfs:commentresolve resource id of the given resource
resolveVRIDTransientvalos_raem:Resolver
rdfs:commentresolve resource VRID object of the given resource
resolveDominantTypeNamevalos_raem:Resolver
rdfs:commentresolve dominant type name of the given resource
resolveOwnFieldsTransientvalos_raem:Resolver
rdfs:commentresolve only owns-fields-only transient of this resource
resolveGhostPrototypevalos_raem:Resolver
rdfs:commentresolve the ghost prototype of this ghost
resolveGhostHostvalos_raem:Resolver
rdfs:commentresolve the ghost host of this ghost
resolveContentLengthvalos_raem:Resolver
rdfs:commentresolve octet count of the octet-stream associated with the Bvob

§ valos_raem remaining vocabulary

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

§ valos_raem JSON-LD context term definitions

Term Definition @id @type @container
valos_raem:expressorhttps://valospace.org/raem#expressor@id@list
valos_raem:impressorhttps://valospace.org/raem#impressor@id@list
valos_raem:aliasOfhttps://valospace.org/raem#aliasOf@id
valos_raem:coupledFieldhttps://valospace.org/raem#coupledField@id