/
FeatureOfInterest.ts
34 lines (30 loc) · 1.01 KB
/
FeatureOfInterest.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { DataObject, SerializableArrayMember, SerializableMember, SerializableObject } from '@openhps/core';
import { ActuableProperty } from './ActuableProperty';
import { dcterms, rdfs, ssn } from '../vocab';
import { ObservableProperty } from './ObservableProperty';
import { Property } from './Property';
@SerializableObject()
export class FeatureOfInterest extends DataObject {
@SerializableArrayMember(ActuableProperty, {
rdf: {
predicate: ssn.hasProperty,
},
})
actuableProperties?: ActuableProperty[];
@SerializableArrayMember(ObservableProperty, {
rdf: {
predicate: ssn.hasProperty,
},
})
observableProperties?: ObservableProperty[];
get properties(): Property[] {
return [...(this.actuableProperties ?? []), ...(this.observableProperties ?? [])];
}
@SerializableMember({
rdf: {
predicate: [rdfs.comment, dcterms.description],
language: 'en',
},
})
description: string;
}