@coasys/ad4m / Exports / PropertyMetadataEntry
Interface: PropertyMetadataEntry
Metadata stored for each property via
Property
/
Optional
/
Read Only
/
Flag
Hierarchy
-
↳
PropertyMetadataEntry
Table of contents
Properties
- datatype
- flag
- getter
- identity
- initial
- interpretationHint
- local
- options
- prologGetter
- prologSetter
- readOnly
- required
- resolveLanguage
- through
- transform
- writable
Properties
datatype
• Optional datatype: string
Explicit SHACL sh:datatype for the property value. When set, this
overrides auto-inference and — importantly — lets custom getter
properties opt into typed-literal decoding. Auto-inference is disabled
for properties with a getter (see shacl-gen.ts) because such
getters typically return URIs; setting datatype explicitly declares
that this getter returns literal values of the given XSD type
(e.g. "xsd://string") and enables the hydration decode gate.
Inherited from
Defined in
core/src/model/decorators.ts:403 (opens in a new tab)
flag
• Optional flag: boolean
Defined in
core/src/model/decorators.ts:19 (opens in a new tab)
getter
• Optional getter: string
Custom getter to resolve the property value. Use this for custom graph traversals.
The expression can reference 'Base' which will be replaced with the instance's base expression.
Example: "SELECT ?target WHERE {
Inherited from
Defined in
core/src/model/decorators.ts:337 (opens in a new tab)
identity
• Optional identity: boolean
Marks this property as the class's identity (dedup key) for the
generic LLM interpreter: on re-runs, two proposed instances of the same
class with an equal (normalized/semantic) value on the identity property
are treated as the same instance rather than duplicated. Emitted as an
ad4m://identity link on the property shape and read back by the Rust
model query (ShapeProperty.identity). At most one property per class
should set this.
Inherited from
Defined in
core/src/model/decorators.ts:392 (opens in a new tab)
initial
• Optional initial: string
The initial value of the property. Required if the property is marked as required.
Inherited from
Defined in
core/src/model/decorators.ts:295 (opens in a new tab)
interpretationHint
• Optional interpretationHint: string
Natural-language hint that steers the generic LLM extractor when
turning a transcript into typed subject-class instances. Emitted as
an ad4m://interpretation_hint link on the property shape and surfaced
on ShapeProperty.interpretation_hint by the Rust model query so the
extractor prompt can quote it verbatim.
Inherited from
PropertyOptions.interpretationHint
Defined in
core/src/model/decorators.ts:381 (opens in a new tab)
local
• Optional local: boolean
Indicates whether the property is stored locally in the perspective and not in the network. Useful for properties that are not meant to be shared with the network.
Inherited from
Defined in
core/src/model/decorators.ts:342 (opens in a new tab)
options
• Optional options: { label?: string ; value: string }[]
Allowed values for this property (enum constraint).
Maps to SHACL sh:in. Each entry has a value (the stored RDF term)
and an optional label (human-readable display name).
Example
@Property({
through: "task://status",
options: [
{ value: "task://todo", label: "To Do" },
{ value: "task://doing", label: "Doing" },
{ value: "task://done", label: "Done" },
]
})
status: string = "task://todo";Inherited from
Defined in
core/src/model/decorators.ts:372 (opens in a new tab)
prologGetter
• Optional prologGetter: string
Custom Prolog getter to get the value of the property. If not provided, the default getter will be used.
Inherited from
Defined in
core/src/model/decorators.ts:325 (opens in a new tab)
prologSetter
• Optional prologSetter: string
Custom Prolog setter to set the value of the property. Only available if the property is writable.
Inherited from
Defined in
core/src/model/decorators.ts:330 (opens in a new tab)
readOnly
• Optional readOnly: boolean
Indicates whether the property is read-only. If true, no setter will be generated. Defaults to false (property is writable).
Inherited from
Defined in
core/src/model/decorators.ts:306 (opens in a new tab)
required
• Optional required: boolean
Indicates whether the property is required. If true, an initial value must be provided.
Inherited from
Defined in
core/src/model/decorators.ts:300 (opens in a new tab)
resolveLanguage
• Optional resolveLanguage: string
The language used to resolve/store the property value — and the sole selector of storage mode. Not defaulted:
- unset (the default for a plain
@Property()) → deterministic typed literal storage (literal:string:/:number:/:boolean:/:json:IRIs stored as XSD-typed RDF literals; POS-index friendly). "literal"→ the built-in literal language: values go throughexpression_create, producing a signed-envelope URI with author/timestamp/proof (per-value provenance, e.g. Flux message bodies).- a custom language address →
expression_createon that language.
Inherited from
PropertyOptions.resolveLanguage
Defined in
core/src/model/decorators.ts:320 (opens in a new tab)
through
• Optional through: string
The predicate of the property. All properties must have this option.
Inherited from
Defined in
core/src/model/decorators.ts:290 (opens in a new tab)
transform
• Optional transform: NodeExpression
Optional transform expression to modify the property value.
This is a SHACL-AF Node Expression that runs in the Rust model query engine.
Examples: fileToDataUri, concat(literal('prefix_'), focus()), etc.
Builders (focus, literal, path, exists, ifExpr, concat,
coalesce, fn) and the fileToDataUri built-in are exported from
the package root: import { concat, literal, focus } from '@coasys/ad4m'.
Inherited from
Defined in
core/src/model/decorators.ts:352 (opens in a new tab)
writable
• Optional writable: boolean
Internal computed writable flag (inverse of readOnly) for SDNA/SHACL compatibility