Skip to main content

Module: utils/ShapeDecorators

Interfaces​

Functions​

linkedProperty​

▸ linkedProperty(config): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void

The most general decorator to indicate a get/set method requires & provides a certain linked data property. Using this generator generates a SHACL Property Shape

Example

\@linkedProperty({
path:foaf.name,
required:true,
nodeKind:Literal,
maxLength:1,
defaultValue:"John"
})
get name(){
return this.getValue(foaf.name) || "John"
}

Parameters​

NameTypeDescription
configPropertyShapeConfigconfigures the property shape with a plain javascript object that follows the PropertyShapeConfig interface.

Returns​

fn

▸ (target, propertyKey, descriptor): void

Parameters​
NameType
targetany
propertyKeystring
descriptorPropertyDescriptor
Returns​

void

Defined in​

lincd/src/utils/ShapeDecorators.ts:188


literalProperty​

▸ literalProperty(config): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void

Parameters​

NameType
configLiteralPropertyShapeConfig

Returns​

fn

▸ (target, propertyKey, descriptor): void

Parameters​
NameType
targetany
propertyKeystring
descriptorPropertyDescriptor
Returns​

void

Defined in​

lincd/src/utils/ShapeDecorators.ts:163


objectProperty​

▸ objectProperty(config): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void

Parameters​

NameType
configObjectPropertyShapeConfig

Returns​

fn

▸ (target, propertyKey, descriptor): void

Parameters​
NameType
targetany
propertyKeystring
descriptorPropertyDescriptor
Returns​

void

Defined in​

lincd/src/utils/ShapeDecorators.ts:166