Module: utils/ShapeDecorators
Interfaces
- LiteralPropertyShapeConfig
- NodeShapeConfig
- ObjectPropertyShapeConfig
- ParameterConfig
- PropertyShapeConfig
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
Name | Type | Description |
---|---|---|
config | PropertyShapeConfig | configures the property shape with a plain javascript object that follows the PropertyShapeConfig interface. |
Returns
fn
▸ (target
, propertyKey
, descriptor
): void
Parameters
Name | Type |
---|---|
target | any |
propertyKey | string |
descriptor | PropertyDescriptor |
Returns
void
Defined in
lincd/src/utils/ShapeDecorators.ts:188
literalProperty
▸ literalProperty(config
): (target
: any
, propertyKey
: string
, descriptor
: PropertyDescriptor
) => void
Parameters
Name | Type |
---|---|
config | LiteralPropertyShapeConfig |
Returns
fn
▸ (target
, propertyKey
, descriptor
): void
Parameters
Name | Type |
---|---|
target | any |
propertyKey | string |
descriptor | PropertyDescriptor |
Returns
void
Defined in
lincd/src/utils/ShapeDecorators.ts:163
objectProperty
▸ objectProperty(config
): (target
: any
, propertyKey
: string
, descriptor
: PropertyDescriptor
) => void
Parameters
Name | Type |
---|---|
config | ObjectPropertyShapeConfig |
Returns
fn
▸ (target
, propertyKey
, descriptor
): void
Parameters
Name | Type |
---|---|
target | any |
propertyKey | string |
descriptor | PropertyDescriptor |
Returns
void