@oslo-flanders/core 1.1.1 → 1.3.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.
@@ -37,6 +37,7 @@ exports.DataTypes = new Map([
37
37
  ['unsignedshort', `${xsd}#unsignedLong`],
38
38
  ['unsignedshort', `${xsd}#unsignedShort`],
39
39
  ['unsignedbyte', `${xsd}#unsignedByte`],
40
+ ['language', `${xsd}#language`],
40
41
  ]);
41
42
  const getDataType = (key) => exports.DataTypes.get(key.toLowerCase());
42
43
  exports.getDataType = getDataType;
@@ -2,6 +2,7 @@ export declare enum OutputFormat {
2
2
  JsonLd = "application/ld+json",
3
3
  JsonProblem = "application/problem+json",
4
4
  Json = "application/json",
5
+ Yaml = "application/yaml",
5
6
  trig = "application/trig",
6
7
  turtle = "text/turtle",
7
8
  nquads = "application/n-quads",
@@ -6,6 +6,7 @@ var OutputFormat;
6
6
  OutputFormat["JsonLd"] = "application/ld+json";
7
7
  OutputFormat["JsonProblem"] = "application/problem+json";
8
8
  OutputFormat["Json"] = "application/json";
9
+ OutputFormat["Yaml"] = "application/yaml";
9
10
  OutputFormat["trig"] = "application/trig";
10
11
  OutputFormat["turtle"] = "text/turtle";
11
12
  OutputFormat["nquads"] = "application/n-quads";
@@ -13,3 +13,4 @@ export declare function getMaxCount(subject: RDF.Term, store: QuadStore): string
13
13
  export declare function createList(items: RDF.Term[], store: QuadStore, df: DataFactory): RDF.BlankNode | RDF.NamedNode;
14
14
  export declare function findAllAttributes(subject: RDF.Term, attributeIds: RDF.Term[], store: QuadStore, logger: Logger, visited?: Set<string>): RDF.Term[];
15
15
  export declare function areStoresEqual(store1: QuadStore, store2: QuadStore): boolean;
16
+ export declare function isEnumeration(store: QuadStore, element: RDF.Term): boolean;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.areStoresEqual = exports.findAllAttributes = exports.createList = exports.getMaxCount = exports.getMinCount = exports.getVocabularyUsageNote = exports.getApplicationProfileUsageNote = exports.getVocabularyDefinition = exports.getApplicationProfileDefinition = exports.getVocabularyLabel = exports.getApplicationProfileLabel = void 0;
3
+ exports.isEnumeration = exports.areStoresEqual = exports.findAllAttributes = exports.createList = exports.getMaxCount = exports.getMinCount = exports.getVocabularyUsageNote = exports.getApplicationProfileUsageNote = exports.getVocabularyDefinition = exports.getApplicationProfileDefinition = exports.getVocabularyLabel = exports.getApplicationProfileLabel = void 0;
4
4
  const namespaces_1 = require("./namespaces");
5
5
  function getApplicationProfileLabel(subject, store, language = null) {
6
6
  var _a, _b, _c;
@@ -172,4 +172,10 @@ function areStoresEqual(store1, store2) {
172
172
  return true;
173
173
  }
174
174
  exports.areStoresEqual = areStoresEqual;
175
+ function isEnumeration(store, element) {
176
+ // Check if the element is in the enumerations list
177
+ const enumerations = store.getEnumerations();
178
+ return enumerations.some((enumeration) => enumeration.equals(element));
179
+ }
180
+ exports.isEnumeration = isEnumeration;
175
181
  //# sourceMappingURL=storeUtils.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslo-flanders/core",
3
- "version": "1.1.1",
3
+ "version": "1.3.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",