@oslo-flanders/core 0.0.15-alpha.0 → 0.0.16-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -167,4 +167,11 @@ export declare class QuadStore {
167
167
  */
168
168
  getParentOfProperty(subject: RDF.Term, graph?: RDF.Term | null): RDF.NamedNode | undefined;
169
169
  getCodelist(subject: RDF.Term, graph?: RDF.Term | null): RDF.NamedNode | undefined;
170
+ /**
171
+ * Finds the status of a given RDF.Term
172
+ * @param subject The RDF.Term to find the parent of
173
+ * @param store A N3 quad store
174
+ * @returns An RDF.Term or undefined if not found
175
+ */
176
+ getStatus(subject: RDF.Term, graph?: RDF.Term | null): RDF.NamedNode | undefined;
170
177
  }
@@ -145,8 +145,8 @@ let QuadStore = class QuadStore {
145
145
  */
146
146
  getVocLabel(subject, language, graph = null) {
147
147
  var _a;
148
- return (_a = this.getLabels(subject, graph).find((x) => x.predicate.equals(namespaces_1.ns.oslo('vocLabel')) &&
149
- x.object.language === (language || ''))) === null || _a === void 0 ? void 0 : _a.object;
148
+ return ((_a = this.getLabels(subject, graph).find((x) => x.predicate.equals(namespaces_1.ns.oslo('vocLabel')) &&
149
+ x.object.language === (language || ''))) === null || _a === void 0 ? void 0 : _a.object);
150
150
  }
151
151
  /**
152
152
  * Finds the oslo:apLabel whose language tag matches the given language
@@ -157,8 +157,8 @@ let QuadStore = class QuadStore {
157
157
  */
158
158
  getApLabel(subject, language, graph = null) {
159
159
  var _a;
160
- return (_a = this.getLabels(subject, graph).find((x) => x.predicate.equals(namespaces_1.ns.oslo('apLabel')) &&
161
- x.object.language === (language || ''))) === null || _a === void 0 ? void 0 : _a.object;
160
+ return ((_a = this.getLabels(subject, graph).find((x) => x.predicate.equals(namespaces_1.ns.oslo('apLabel')) &&
161
+ x.object.language === (language || ''))) === null || _a === void 0 ? void 0 : _a.object);
162
162
  }
163
163
  /**
164
164
  * Finds the oslo:diagramLabel for a given subject
@@ -169,7 +169,7 @@ let QuadStore = class QuadStore {
169
169
  */
170
170
  getDiagramLabel(subject, graph = null) {
171
171
  var _a;
172
- return (_a = this.getLabels(subject, graph).find((x) => x.predicate.equals(namespaces_1.ns.oslo('diagramLabel')))) === null || _a === void 0 ? void 0 : _a.object;
172
+ return ((_a = this.getLabels(subject, graph).find((x) => x.predicate.equals(namespaces_1.ns.oslo('diagramLabel')))) === null || _a === void 0 ? void 0 : _a.object);
173
173
  }
174
174
  /**
175
175
  * Find all definitions for a given subject
@@ -191,8 +191,8 @@ let QuadStore = class QuadStore {
191
191
  */
192
192
  getVocDefinition(subject, language, graph = null) {
193
193
  var _a;
194
- return (_a = this.getDefinitions(subject, graph).find((x) => x.predicate.equals(namespaces_1.ns.oslo('vocDefinition')) &&
195
- x.object.language === (language || ''))) === null || _a === void 0 ? void 0 : _a.object;
194
+ return ((_a = this.getDefinitions(subject, graph).find((x) => x.predicate.equals(namespaces_1.ns.oslo('vocDefinition')) &&
195
+ x.object.language === (language || ''))) === null || _a === void 0 ? void 0 : _a.object);
196
196
  }
197
197
  /**
198
198
  * Finds the oslo:apDefinition whose language tag matches the given language
@@ -203,8 +203,8 @@ let QuadStore = class QuadStore {
203
203
  */
204
204
  getApDefinition(subject, language, graph = null) {
205
205
  var _a;
206
- return (_a = this.getDefinitions(subject, graph).find((x) => x.predicate.equals(namespaces_1.ns.oslo('apDefinition')) &&
207
- x.object.language === (language || ''))) === null || _a === void 0 ? void 0 : _a.object;
206
+ return ((_a = this.getDefinitions(subject, graph).find((x) => x.predicate.equals(namespaces_1.ns.oslo('apDefinition')) &&
207
+ x.object.language === (language || ''))) === null || _a === void 0 ? void 0 : _a.object);
208
208
  }
209
209
  /**
210
210
  * Finds the rdfs:range of a given RDF.Term
@@ -244,8 +244,8 @@ let QuadStore = class QuadStore {
244
244
  */
245
245
  getVocUsageNote(subject, language, graph = null) {
246
246
  var _a;
247
- return (_a = this.getUsageNotes(subject, graph).find((x) => x.predicate.equals(namespaces_1.ns.oslo('vocUsageNote')) &&
248
- x.object.language === (language || ''))) === null || _a === void 0 ? void 0 : _a.object;
247
+ return ((_a = this.getUsageNotes(subject, graph).find((x) => x.predicate.equals(namespaces_1.ns.oslo('vocUsageNote')) &&
248
+ x.object.language === (language || ''))) === null || _a === void 0 ? void 0 : _a.object);
249
249
  }
250
250
  /**
251
251
  * Finds the oslo:apUsageNote of which the language tag matches the given language
@@ -256,8 +256,8 @@ let QuadStore = class QuadStore {
256
256
  */
257
257
  getApUsageNote(subject, language, graph = null) {
258
258
  var _a;
259
- return (_a = this.getUsageNotes(subject, graph).find((x) => x.predicate.equals(namespaces_1.ns.oslo('apUsageNote')) &&
260
- x.object.language === (language || ''))) === null || _a === void 0 ? void 0 : _a.object;
259
+ return ((_a = this.getUsageNotes(subject, graph).find((x) => x.predicate.equals(namespaces_1.ns.oslo('apUsageNote')) &&
260
+ x.object.language === (language || ''))) === null || _a === void 0 ? void 0 : _a.object);
261
261
  }
262
262
  /**
263
263
  * Finds the example:scope of a given subject
@@ -304,6 +304,15 @@ let QuadStore = class QuadStore {
304
304
  getCodelist(subject, graph = null) {
305
305
  return (this.store.getObjects(subject, namespaces_1.ns.oslo('codelist'), graph).shift());
306
306
  }
307
+ /**
308
+ * Finds the status of a given RDF.Term
309
+ * @param subject The RDF.Term to find the parent of
310
+ * @param store A N3 quad store
311
+ * @returns An RDF.Term or undefined if not found
312
+ */
313
+ getStatus(subject, graph = null) {
314
+ return (this.store.getObjects(subject, namespaces_1.ns.oslo('status'), graph).shift());
315
+ }
307
316
  };
308
317
  QuadStore = __decorate([
309
318
  (0, inversify_1.injectable)(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslo-flanders/core",
3
- "version": "0.0.15-alpha.0",
3
+ "version": "0.0.16-alpha.0",
4
4
  "description": "Core interfaces and utilities",
5
5
  "author": "Digitaal Vlaanderen <https://data.vlaanderen.be/id/organisatie/OVO002949>",
6
6
  "homepage": "https://github.com/informatievlaanderen/OSLO-UML-Transformer/tree/main/packages/oslo-core#readme",
@@ -49,5 +49,5 @@
49
49
  "@types/streamify-string": "^1.0.0",
50
50
  "@types/tmp": "^0.2.3"
51
51
  },
52
- "gitHead": "b8a15c4c91863a99770fcd716ca0ba1ead9bd85c"
52
+ "gitHead": "beaa3821b72a7df104ff61af49fed6c1140fadd8"
53
53
  }