@faubulous/mentor-rdf 0.1.4 → 0.1.6

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.
@@ -4,3 +4,4 @@ export * from './rdfa';
4
4
  export * from './rdfs';
5
5
  export * from './shacl';
6
6
  export * from './skos';
7
+ export * from './xsd';
@@ -7,4 +7,5 @@ tslib_1.__exportStar(require("./rdfa"), exports);
7
7
  tslib_1.__exportStar(require("./rdfs"), exports);
8
8
  tslib_1.__exportStar(require("./shacl"), exports);
9
9
  tslib_1.__exportStar(require("./skos"), exports);
10
+ tslib_1.__exportStar(require("./xsd"), exports);
10
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ontologies/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB;AACtB,gDAAsB;AACtB,iDAAuB;AACvB,iDAAuB;AACvB,kDAAwB;AACxB,iDAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ontologies/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB;AACtB,gDAAsB;AACtB,iDAAuB;AACvB,iDAAuB;AACvB,kDAAwB;AACxB,iDAAuB;AACvB,gDAAsB"}
@@ -0,0 +1,99 @@
1
+ import * as n3 from "n3";
2
+ export declare const XSD: {
3
+ /** anyURI represents an Internationalized Resource Identifier Reference (IRI). An anyURI value can be absolute or relative, and may have an optional fragment identifier (i.e., it may be an IRI Reference). This type should be used when the value fulfills the role of an IRI, as defined in [RFC 3987] or its successor(s) in the IETF Standards Track. */
4
+ anyURI: string;
5
+ /** base64Binary represents arbitrary Base64-encoded binary data. For base64Binary data the entire binary stream is encoded using the Base64 Encoding defined in [RFC 3548], which is derived from the encoding described in [RFC 2045]. */
6
+ base64Binary: string;
7
+ /** boolean represents the values of two-valued logic. */
8
+ boolean: string;
9
+ /** byte is ·derived· from short by setting the value of ·maxInclusive· to be 127 and ·minInclusive· to be -128. The ·base type· of byte is short. */
10
+ byte: string;
11
+ /** date represents top-open intervals of exactly one day in length on the timelines of dateTime, beginning on the beginning moment of each day, up to but not including the beginning moment of the next day). For non-timezoned values, the top-open intervals disjointly cover the non-timezoned timeline, one per day. For timezoned values, the intervals begin at every minute and therefore overlap. */
12
+ date: string;
13
+ /** dateTime represents instants of time, optionally marked with a particular time zone offset. Values representing the same instant but having different time zone offsets are equal but not identical. */
14
+ dateTime: string;
15
+ /** decimal represents a subset of the real numbers, which can be represented by decimal numerals. The ·value space· of decimal is the set of numbers that can be obtained by dividing an integer by a non-negative power of ten, i.e., expressible as i / 10n where i and n are integers and n ≥ 0. Precision is not reflected in this value space; the number 2.0 is not distinct from the number 2.00. The order relation on decimal is the order relation on real numbers, restricted to this subset. */
16
+ decimal: string;
17
+ /** The double datatype is patterned after the IEEE double-precision 64-bit floating point datatype [IEEE 754-2008]. Each floating point datatype has a value space that is a subset of the rational numbers. Floating point numbers are often used to approximate arbitrary real numbers. */
18
+ double: string;
19
+ /** duration is a datatype that represents durations of time. The concept of duration being captured is drawn from those of [ISO 8601], specifically durations without fixed endpoints. */
20
+ duration: string;
21
+ /** The float datatype is patterned after the IEEE single-precision 32-bit floating point datatype [IEEE 754-2008]. Its value space is a subset of the rational numbers. Floating point numbers are often used to approximate arbitrary real numbers. */
22
+ float: string;
23
+ /** int is ·derived· from long by setting the value of ·maxInclusive· to be 2147483647 and ·minInclusive· to be -2147483648. The ·base type· of int is long. */
24
+ int: string;
25
+ /** integer is ·derived· from decimal by fixing the value of ·fractionDigits· to be 0 and disallowing the trailing decimal point. This results in the standard mathematical concept of the integer numbers. The ·value space· of integer is the infinite set {...,-2,-1,0,1,2,...}. The ·base type· of integer is decimal. */
26
+ integer: string;
27
+ /** long is ·derived· from integer by setting the value of ·maxInclusive· to be 9223372036854775807 and ·minInclusive· to be -9223372036854775808. The ·base type· of long is integer. */
28
+ long: string;
29
+ /** negativeInteger is ·derived· from nonPositiveInteger by setting the value of ·maxInclusive· to be -1. This results in the standard mathematical concept of the negative integers. The ·value space· of negativeInteger is the infinite set {...,-2,-1}. The ·base type· of negativeInteger is nonPositiveInteger. */
30
+ negativeInteger: string;
31
+ nonNegativeInteger: string;
32
+ /** nonPositiveInteger is ·derived· from integer by setting the value of ·maxInclusive· to be 0. This results in the standard mathematical concept of the non-positive integers. The ·value space· of nonPositiveInteger is the infinite set {...,-2,-1,0}. The ·base type· of nonPositiveInteger is integer. */
33
+ nonPositiveInteger: string;
34
+ /** nonNegativeInteger is ·derived· from integer by setting the value of ·minInclusive· to be 0. This results in the standard mathematical concept of the non-negative integers. The ·value space· of nonNegativeInteger is the infinite set {0,1,2,...}. The ·base type· of nonNegativeInteger is integer. */
35
+ positiveInteger: string;
36
+ /** short is ·derived· from int by setting the value of ·maxInclusive· to be 32767 and ·minInclusive· to be -32768. The ·base type· of short is int. */
37
+ short: string;
38
+ /** The string datatype represents character strings in XML. */
39
+ string: string;
40
+ /** time represents instants of time that recur at the same point in each calendar day, or that occur in some arbitrary calendar day. */
41
+ time: string;
42
+ /** unsignedInt is ·derived· from unsignedLong by setting the value of ·maxInclusive· to be 4294967295. The ·base type· of unsignedInt is unsignedLong. */
43
+ unsignedInt: string;
44
+ /** unsignedShort is ·derived· from unsignedInt by setting the value of ·maxInclusive· to be 65535. The ·base type· of unsignedShort is unsignedInt. */
45
+ unsignedShort: string;
46
+ /** unsignedLong is ·derived· from nonNegativeInteger by setting the value of ·maxInclusive· to be 18446744073709551615. The ·base type· of unsignedLong is nonNegativeInteger. */
47
+ unsingedLong: string;
48
+ /** unsignedByte is ·derived· from unsignedShort by setting the value of ·maxInclusive· to be 255. The ·base type· of unsignedByte is unsignedShort. */
49
+ usignedByte: string;
50
+ };
51
+ export declare const xsd: {
52
+ /** anyURI represents an Internationalized Resource Identifier Reference (IRI). An anyURI value can be absolute or relative, and may have an optional fragment identifier (i.e., it may be an IRI Reference). This type should be used when the value fulfills the role of an IRI, as defined in [RFC 3987] or its successor(s) in the IETF Standards Track. */
53
+ anyURI: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#anyURI">;
54
+ /** base64Binary represents arbitrary Base64-encoded binary data. For base64Binary data the entire binary stream is encoded using the Base64 Encoding defined in [RFC 3548], which is derived from the encoding described in [RFC 2045]. */
55
+ base64Binary: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#base64Binary">;
56
+ /** boolean represents the values of two-valued logic. */
57
+ boolean: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#boolean">;
58
+ /** byte is ·derived· from short by setting the value of ·maxInclusive· to be 127 and ·minInclusive· to be -128. The ·base type· of byte is short. */
59
+ byte: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#byte">;
60
+ /** date represents top-open intervals of exactly one day in length on the timelines of dateTime, beginning on the beginning moment of each day, up to but not including the beginning moment of the next day). For non-timezoned values, the top-open intervals disjointly cover the non-timezoned timeline, one per day. For timezoned values, the intervals begin at every minute and therefore overlap. */
61
+ date: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#date">;
62
+ /** dateTime represents instants of time, optionally marked with a particular time zone offset. Values representing the same instant but having different time zone offsets are equal but not identical. */
63
+ dateTime: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#dateTime">;
64
+ /** decimal represents a subset of the real numbers, which can be represented by decimal numerals. The ·value space· of decimal is the set of numbers that can be obtained by dividing an integer by a non-negative power of ten, i.e., expressible as i / 10n where i and n are integers and n ≥ 0. Precision is not reflected in this value space; the number 2.0 is not distinct from the number 2.00. The order relation on decimal is the order relation on real numbers, restricted to this subset. */
65
+ decimal: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#decimal">;
66
+ /** The double datatype is patterned after the IEEE double-precision 64-bit floating point datatype [IEEE 754-2008]. Each floating point datatype has a value space that is a subset of the rational numbers. Floating point numbers are often used to approximate arbitrary real numbers. */
67
+ double: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#double">;
68
+ /** duration is a datatype that represents durations of time. The concept of duration being captured is drawn from those of [ISO 8601], specifically durations without fixed endpoints. */
69
+ duration: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#duration">;
70
+ /** The float datatype is patterned after the IEEE single-precision 32-bit floating point datatype [IEEE 754-2008]. Its value space is a subset of the rational numbers. Floating point numbers are often used to approximate arbitrary real numbers. */
71
+ float: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#float">;
72
+ /** int is ·derived· from long by setting the value of ·maxInclusive· to be 2147483647 and ·minInclusive· to be -2147483648. The ·base type· of int is long. */
73
+ int: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#int">;
74
+ /** integer is ·derived· from decimal by fixing the value of ·fractionDigits· to be 0 and disallowing the trailing decimal point. This results in the standard mathematical concept of the integer numbers. The ·value space· of integer is the infinite set {...,-2,-1,0,1,2,...}. The ·base type· of integer is decimal. */
75
+ integer: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#integer">;
76
+ /** long is ·derived· from integer by setting the value of ·maxInclusive· to be 9223372036854775807 and ·minInclusive· to be -9223372036854775808. The ·base type· of long is integer. */
77
+ long: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#long">;
78
+ /** negativeInteger is ·derived· from nonPositiveInteger by setting the value of ·maxInclusive· to be -1. This results in the standard mathematical concept of the negative integers. The ·value space· of negativeInteger is the infinite set {...,-2,-1}. The ·base type· of negativeInteger is nonPositiveInteger. */
79
+ negativeInteger: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#negativeInteger">;
80
+ nonNegativeInteger: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#nonNegativeInteger">;
81
+ /** nonPositiveInteger is ·derived· from integer by setting the value of ·maxInclusive· to be 0. This results in the standard mathematical concept of the non-positive integers. The ·value space· of nonPositiveInteger is the infinite set {...,-2,-1,0}. The ·base type· of nonPositiveInteger is integer. */
82
+ nonPositiveInteger: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#nonPositiveInteger">;
83
+ /** nonNegativeInteger is ·derived· from integer by setting the value of ·minInclusive· to be 0. This results in the standard mathematical concept of the non-negative integers. The ·value space· of nonNegativeInteger is the infinite set {0,1,2,...}. The ·base type· of nonNegativeInteger is integer. */
84
+ positiveInteger: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#positiveInteger">;
85
+ /** short is ·derived· from int by setting the value of ·maxInclusive· to be 32767 and ·minInclusive· to be -32768. The ·base type· of short is int. */
86
+ short: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#short">;
87
+ /** The string datatype represents character strings in XML. */
88
+ string: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#string">;
89
+ /** time represents instants of time that recur at the same point in each calendar day, or that occur in some arbitrary calendar day. */
90
+ time: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#time">;
91
+ /** unsignedInt is ·derived· from unsignedLong by setting the value of ·maxInclusive· to be 4294967295. The ·base type· of unsignedInt is unsignedLong. */
92
+ unsignedInt: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#unsignedInt">;
93
+ /** unsignedShort is ·derived· from unsignedInt by setting the value of ·maxInclusive· to be 65535. The ·base type· of unsignedShort is unsignedInt. */
94
+ unsignedShort: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#unsignedShort">;
95
+ /** unsignedLong is ·derived· from nonNegativeInteger by setting the value of ·maxInclusive· to be 18446744073709551615. The ·base type· of unsignedLong is nonNegativeInteger. */
96
+ unsingedLong: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#unsingedLong">;
97
+ /** unsignedByte is ·derived· from unsignedShort by setting the value of ·maxInclusive· to be 255. The ·base type· of unsignedByte is unsignedShort. */
98
+ usignedByte: n3.NamedNode<"http://www.w3.org/2001/XMLSchema#usignedByte">;
99
+ };
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.xsd = exports.XSD = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const n3 = tslib_1.__importStar(require("n3"));
6
+ exports.XSD = {
7
+ /** anyURI represents an Internationalized Resource Identifier Reference (IRI). An anyURI value can be absolute or relative, and may have an optional fragment identifier (i.e., it may be an IRI Reference). This type should be used when the value fulfills the role of an IRI, as defined in [RFC 3987] or its successor(s) in the IETF Standards Track. */
8
+ 'anyURI': 'http://www.w3.org/2001/XMLSchema#anyURI',
9
+ /** base64Binary represents arbitrary Base64-encoded binary data. For base64Binary data the entire binary stream is encoded using the Base64 Encoding defined in [RFC 3548], which is derived from the encoding described in [RFC 2045]. */
10
+ 'base64Binary': 'http://www.w3.org/2001/XMLSchema#base64Binary',
11
+ /** boolean represents the values of two-valued logic. */
12
+ 'boolean': 'http://www.w3.org/2001/XMLSchema#boolean',
13
+ /** byte is ·derived· from short by setting the value of ·maxInclusive· to be 127 and ·minInclusive· to be -128. The ·base type· of byte is short. */
14
+ 'byte': 'http://www.w3.org/2001/XMLSchema#byte',
15
+ /** date represents top-open intervals of exactly one day in length on the timelines of dateTime, beginning on the beginning moment of each day, up to but not including the beginning moment of the next day). For non-timezoned values, the top-open intervals disjointly cover the non-timezoned timeline, one per day. For timezoned values, the intervals begin at every minute and therefore overlap. */
16
+ 'date': 'http://www.w3.org/2001/XMLSchema#date',
17
+ /** dateTime represents instants of time, optionally marked with a particular time zone offset. Values representing the same instant but having different time zone offsets are equal but not identical. */
18
+ 'dateTime': 'http://www.w3.org/2001/XMLSchema#dateTime',
19
+ /** decimal represents a subset of the real numbers, which can be represented by decimal numerals. The ·value space· of decimal is the set of numbers that can be obtained by dividing an integer by a non-negative power of ten, i.e., expressible as i / 10n where i and n are integers and n ≥ 0. Precision is not reflected in this value space; the number 2.0 is not distinct from the number 2.00. The order relation on decimal is the order relation on real numbers, restricted to this subset. */
20
+ 'decimal': 'http://www.w3.org/2001/XMLSchema#decimal',
21
+ /** The double datatype is patterned after the IEEE double-precision 64-bit floating point datatype [IEEE 754-2008]. Each floating point datatype has a value space that is a subset of the rational numbers. Floating point numbers are often used to approximate arbitrary real numbers. */
22
+ 'double': 'http://www.w3.org/2001/XMLSchema#double',
23
+ /** duration is a datatype that represents durations of time. The concept of duration being captured is drawn from those of [ISO 8601], specifically durations without fixed endpoints. */
24
+ 'duration': 'http://www.w3.org/2001/XMLSchema#duration',
25
+ /** The float datatype is patterned after the IEEE single-precision 32-bit floating point datatype [IEEE 754-2008]. Its value space is a subset of the rational numbers. Floating point numbers are often used to approximate arbitrary real numbers. */
26
+ 'float': 'http://www.w3.org/2001/XMLSchema#float',
27
+ /** int is ·derived· from long by setting the value of ·maxInclusive· to be 2147483647 and ·minInclusive· to be -2147483648. The ·base type· of int is long. */
28
+ 'int': 'http://www.w3.org/2001/XMLSchema#int',
29
+ /** integer is ·derived· from decimal by fixing the value of ·fractionDigits· to be 0 and disallowing the trailing decimal point. This results in the standard mathematical concept of the integer numbers. The ·value space· of integer is the infinite set {...,-2,-1,0,1,2,...}. The ·base type· of integer is decimal. */
30
+ 'integer': 'http://www.w3.org/2001/XMLSchema#integer',
31
+ /** long is ·derived· from integer by setting the value of ·maxInclusive· to be 9223372036854775807 and ·minInclusive· to be -9223372036854775808. The ·base type· of long is integer. */
32
+ 'long': 'http://www.w3.org/2001/XMLSchema#long',
33
+ /** negativeInteger is ·derived· from nonPositiveInteger by setting the value of ·maxInclusive· to be -1. This results in the standard mathematical concept of the negative integers. The ·value space· of negativeInteger is the infinite set {...,-2,-1}. The ·base type· of negativeInteger is nonPositiveInteger. */
34
+ 'negativeInteger': 'http://www.w3.org/2001/XMLSchema#negativeInteger',
35
+ 'nonNegativeInteger': 'http://www.w3.org/2001/XMLSchema#nonNegativeInteger',
36
+ /** nonPositiveInteger is ·derived· from integer by setting the value of ·maxInclusive· to be 0. This results in the standard mathematical concept of the non-positive integers. The ·value space· of nonPositiveInteger is the infinite set {...,-2,-1,0}. The ·base type· of nonPositiveInteger is integer. */
37
+ 'nonPositiveInteger': 'http://www.w3.org/2001/XMLSchema#nonPositiveInteger',
38
+ /** nonNegativeInteger is ·derived· from integer by setting the value of ·minInclusive· to be 0. This results in the standard mathematical concept of the non-negative integers. The ·value space· of nonNegativeInteger is the infinite set {0,1,2,...}. The ·base type· of nonNegativeInteger is integer. */
39
+ 'positiveInteger': 'http://www.w3.org/2001/XMLSchema#positiveInteger',
40
+ /** short is ·derived· from int by setting the value of ·maxInclusive· to be 32767 and ·minInclusive· to be -32768. The ·base type· of short is int. */
41
+ 'short': 'http://www.w3.org/2001/XMLSchema#short',
42
+ /** The string datatype represents character strings in XML. */
43
+ 'string': 'http://www.w3.org/2001/XMLSchema#string',
44
+ /** time represents instants of time that recur at the same point in each calendar day, or that occur in some arbitrary calendar day. */
45
+ 'time': 'http://www.w3.org/2001/XMLSchema#time',
46
+ /** unsignedInt is ·derived· from unsignedLong by setting the value of ·maxInclusive· to be 4294967295. The ·base type· of unsignedInt is unsignedLong. */
47
+ 'unsignedInt': 'http://www.w3.org/2001/XMLSchema#unsignedInt',
48
+ /** unsignedShort is ·derived· from unsignedInt by setting the value of ·maxInclusive· to be 65535. The ·base type· of unsignedShort is unsignedInt. */
49
+ 'unsignedShort': 'http://www.w3.org/2001/XMLSchema#unsignedShort',
50
+ /** unsignedLong is ·derived· from nonNegativeInteger by setting the value of ·maxInclusive· to be 18446744073709551615. The ·base type· of unsignedLong is nonNegativeInteger. */
51
+ 'unsingedLong': 'http://www.w3.org/2001/XMLSchema#unsingedLong',
52
+ /** unsignedByte is ·derived· from unsignedShort by setting the value of ·maxInclusive· to be 255. The ·base type· of unsignedByte is unsignedShort. */
53
+ 'usignedByte': 'http://www.w3.org/2001/XMLSchema#usignedByte',
54
+ };
55
+ exports.xsd = {
56
+ /** anyURI represents an Internationalized Resource Identifier Reference (IRI). An anyURI value can be absolute or relative, and may have an optional fragment identifier (i.e., it may be an IRI Reference). This type should be used when the value fulfills the role of an IRI, as defined in [RFC 3987] or its successor(s) in the IETF Standards Track. */
57
+ 'anyURI': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#anyURI'),
58
+ /** base64Binary represents arbitrary Base64-encoded binary data. For base64Binary data the entire binary stream is encoded using the Base64 Encoding defined in [RFC 3548], which is derived from the encoding described in [RFC 2045]. */
59
+ 'base64Binary': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#base64Binary'),
60
+ /** boolean represents the values of two-valued logic. */
61
+ 'boolean': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#boolean'),
62
+ /** byte is ·derived· from short by setting the value of ·maxInclusive· to be 127 and ·minInclusive· to be -128. The ·base type· of byte is short. */
63
+ 'byte': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#byte'),
64
+ /** date represents top-open intervals of exactly one day in length on the timelines of dateTime, beginning on the beginning moment of each day, up to but not including the beginning moment of the next day). For non-timezoned values, the top-open intervals disjointly cover the non-timezoned timeline, one per day. For timezoned values, the intervals begin at every minute and therefore overlap. */
65
+ 'date': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#date'),
66
+ /** dateTime represents instants of time, optionally marked with a particular time zone offset. Values representing the same instant but having different time zone offsets are equal but not identical. */
67
+ 'dateTime': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#dateTime'),
68
+ /** decimal represents a subset of the real numbers, which can be represented by decimal numerals. The ·value space· of decimal is the set of numbers that can be obtained by dividing an integer by a non-negative power of ten, i.e., expressible as i / 10n where i and n are integers and n ≥ 0. Precision is not reflected in this value space; the number 2.0 is not distinct from the number 2.00. The order relation on decimal is the order relation on real numbers, restricted to this subset. */
69
+ 'decimal': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#decimal'),
70
+ /** The double datatype is patterned after the IEEE double-precision 64-bit floating point datatype [IEEE 754-2008]. Each floating point datatype has a value space that is a subset of the rational numbers. Floating point numbers are often used to approximate arbitrary real numbers. */
71
+ 'double': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#double'),
72
+ /** duration is a datatype that represents durations of time. The concept of duration being captured is drawn from those of [ISO 8601], specifically durations without fixed endpoints. */
73
+ 'duration': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#duration'),
74
+ /** The float datatype is patterned after the IEEE single-precision 32-bit floating point datatype [IEEE 754-2008]. Its value space is a subset of the rational numbers. Floating point numbers are often used to approximate arbitrary real numbers. */
75
+ 'float': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#float'),
76
+ /** int is ·derived· from long by setting the value of ·maxInclusive· to be 2147483647 and ·minInclusive· to be -2147483648. The ·base type· of int is long. */
77
+ 'int': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#int'),
78
+ /** integer is ·derived· from decimal by fixing the value of ·fractionDigits· to be 0 and disallowing the trailing decimal point. This results in the standard mathematical concept of the integer numbers. The ·value space· of integer is the infinite set {...,-2,-1,0,1,2,...}. The ·base type· of integer is decimal. */
79
+ 'integer': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#integer'),
80
+ /** long is ·derived· from integer by setting the value of ·maxInclusive· to be 9223372036854775807 and ·minInclusive· to be -9223372036854775808. The ·base type· of long is integer. */
81
+ 'long': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#long'),
82
+ /** negativeInteger is ·derived· from nonPositiveInteger by setting the value of ·maxInclusive· to be -1. This results in the standard mathematical concept of the negative integers. The ·value space· of negativeInteger is the infinite set {...,-2,-1}. The ·base type· of negativeInteger is nonPositiveInteger. */
83
+ 'negativeInteger': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#negativeInteger'),
84
+ 'nonNegativeInteger': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#nonNegativeInteger'),
85
+ /** nonPositiveInteger is ·derived· from integer by setting the value of ·maxInclusive· to be 0. This results in the standard mathematical concept of the non-positive integers. The ·value space· of nonPositiveInteger is the infinite set {...,-2,-1,0}. The ·base type· of nonPositiveInteger is integer. */
86
+ 'nonPositiveInteger': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#nonPositiveInteger'),
87
+ /** nonNegativeInteger is ·derived· from integer by setting the value of ·minInclusive· to be 0. This results in the standard mathematical concept of the non-negative integers. The ·value space· of nonNegativeInteger is the infinite set {0,1,2,...}. The ·base type· of nonNegativeInteger is integer. */
88
+ 'positiveInteger': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#positiveInteger'),
89
+ /** short is ·derived· from int by setting the value of ·maxInclusive· to be 32767 and ·minInclusive· to be -32768. The ·base type· of short is int. */
90
+ 'short': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#short'),
91
+ /** The string datatype represents character strings in XML. */
92
+ 'string': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#string'),
93
+ /** time represents instants of time that recur at the same point in each calendar day, or that occur in some arbitrary calendar day. */
94
+ 'time': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#time'),
95
+ /** unsignedInt is ·derived· from unsignedLong by setting the value of ·maxInclusive· to be 4294967295. The ·base type· of unsignedInt is unsignedLong. */
96
+ 'unsignedInt': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#unsignedInt'),
97
+ /** unsignedShort is ·derived· from unsignedInt by setting the value of ·maxInclusive· to be 65535. The ·base type· of unsignedShort is unsignedInt. */
98
+ 'unsignedShort': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#unsignedShort'),
99
+ /** unsignedLong is ·derived· from nonNegativeInteger by setting the value of ·maxInclusive· to be 18446744073709551615. The ·base type· of unsignedLong is nonNegativeInteger. */
100
+ 'unsingedLong': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#unsingedLong'),
101
+ /** unsignedByte is ·derived· from unsignedShort by setting the value of ·maxInclusive· to be 255. The ·base type· of unsignedByte is unsignedShort. */
102
+ 'usignedByte': new n3.NamedNode('http://www.w3.org/2001/XMLSchema#usignedByte'),
103
+ };
104
+ //# sourceMappingURL=xsd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xsd.js","sourceRoot":"","sources":["../../src/ontologies/xsd.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AAEZ,QAAA,GAAG,GAAG;IAClB,iWAAiW;IACjW,QAAQ,EAAE,yCAAyC;IACnD,4OAA4O;IAC5O,cAAc,EAAE,+CAA+C;IAC/D,yDAAyD;IACzD,SAAS,EAAE,0CAA0C;IACrD,qJAAqJ;IACrJ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;IACjE,2JAA2J;IAC3J,aAAa,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,8CAA8C,CAAC;IAC/E,wJAAwJ;IACxJ,eAAe,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,gDAAgD,CAAC;IACnF,mLAAmL;IACnL,cAAc,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,+CAA+C,CAAC;IACjF,wJAAwJ;IACxJ,aAAa,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,8CAA8C,CAAC;CAC/E,CAAA"}
@@ -1,4 +1,5 @@
1
1
  export * from "./class-repository";
2
+ export * from "./property-repository";
2
3
  export * from "./owl-reasoner";
3
4
  export * from "./rdfs-reasoner";
4
5
  export * from "./store-factory";
package/dist/rdf/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./class-repository"), exports);
5
+ tslib_1.__exportStar(require("./property-repository"), exports);
5
6
  tslib_1.__exportStar(require("./owl-reasoner"), exports);
6
7
  tslib_1.__exportStar(require("./rdfs-reasoner"), exports);
7
8
  tslib_1.__exportStar(require("./store-factory"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rdf/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC;AACnC,yDAA+B;AAC/B,0DAAgC;AAChC,0DAAgC;AAChC,iEAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rdf/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC;AACnC,gEAAsC;AACtC,yDAA+B;AAC/B,0DAAgC;AAChC,0DAAgC;AAChC,iEAAuC"}
@@ -0,0 +1,13 @@
1
+ import * as n3 from "n3";
2
+ import { ResourceRepository } from "./resource-repository";
3
+ /**
4
+ * A repository for retrieving classes from graphs.
5
+ */
6
+ export declare class IndividualRepository extends ResourceRepository {
7
+ constructor(store: n3.Store);
8
+ /**
9
+ * Get all individuals in the repository.
10
+ * @returns A list of all individuals in the repository.
11
+ */
12
+ getIndividuals(): string[];
13
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IndividualRepository = void 0;
4
+ const ontologies_1 = require("../ontologies");
5
+ const resource_repository_1 = require("./resource-repository");
6
+ /**
7
+ * A repository for retrieving classes from graphs.
8
+ */
9
+ class IndividualRepository extends resource_repository_1.ResourceRepository {
10
+ constructor(store) { super(store); }
11
+ /**
12
+ * Get all individuals in the repository.
13
+ * @returns A list of all individuals in the repository.
14
+ */
15
+ getIndividuals() {
16
+ const result = new Set();
17
+ for (let q of this.store.match(null, ontologies_1.rdf.type, ontologies_1.owl.NamedIndividual)) {
18
+ const s = q.subject;
19
+ if (s.termType != "NamedNode") {
20
+ continue;
21
+ }
22
+ result.add(s.value);
23
+ }
24
+ return Array.from(result);
25
+ }
26
+ }
27
+ exports.IndividualRepository = IndividualRepository;
28
+ //# sourceMappingURL=individual-repository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"individual-repository.js","sourceRoot":"","sources":["../../src/rdf/individual-repository.ts"],"names":[],"mappings":";;;AACA,8CAAyC;AACzC,+DAA2D;AAE3D;;GAEG;AACH,MAAa,oBAAqB,SAAQ,wCAAkB;IACxD,YAAY,KAAe,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA,CAAC;IAE7C;;;OAGG;IACH,cAAc;QACV,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;QAEjC,KAAK,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,gBAAG,CAAC,IAAI,EAAE,gBAAG,CAAC,eAAe,CAAC,EAAE;YACjE,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC;YAEpB,IAAI,CAAC,CAAC,QAAQ,IAAI,WAAW,EAAE;gBAC3B,SAAS;aACZ;YAED,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SACvB;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;CACJ;AAtBD,oDAsBC"}
@@ -5,4 +5,5 @@ import { RdfsReasoner } from "./rdfs-reasoner";
5
5
  */
6
6
  export declare class OwlReasoner extends RdfsReasoner {
7
7
  protected inferClassAxioms(store: n3.Store, targetGraph: n3.Quad_Graph, lists: Record<string, n3.Term[]>, quad: n3.Quad): void;
8
+ protected inferPropertyAxioms(store: n3.Store, targetGraph: n3.Quad_Graph, lists: Record<string, n3.Term[]>, quad: n3.Quad): void;
8
9
  }
@@ -64,6 +64,46 @@ class OwlReasoner extends rdfs_reasoner_1.RdfsReasoner {
64
64
  }
65
65
  }
66
66
  }
67
+ inferPropertyAxioms(store, targetGraph, lists, quad) {
68
+ super.inferPropertyAxioms(store, targetGraph, lists, quad);
69
+ let s = quad.subject;
70
+ let p = quad.predicate;
71
+ let o = quad.object.termType != "Literal" ? quad.object : undefined;
72
+ if (!o) {
73
+ return;
74
+ }
75
+ switch (p.id) {
76
+ case ontologies_1.owl.equivalentProperty.id: {
77
+ store.addQuad(s, ontologies_1.rdf.type, ontologies_1.rdf.Property, targetGraph);
78
+ store.addQuad(o, ontologies_1.rdf.type, ontologies_1.rdf.Property, targetGraph);
79
+ // The opposite is also true.
80
+ if (o.termType == "NamedNode") {
81
+ store.addQuad(o, ontologies_1.owl.equivalentProperty, s, targetGraph);
82
+ }
83
+ break;
84
+ }
85
+ case ontologies_1.rdf.type.id: {
86
+ switch (o.id) {
87
+ case ontologies_1.owl.AnnotationProperty.id:
88
+ case ontologies_1.owl.AsymmetricProperty.id:
89
+ case ontologies_1.owl.DatatypeProperty.id:
90
+ case ontologies_1.owl.DeprecatedProperty.id:
91
+ case ontologies_1.owl.FunctionalProperty.id:
92
+ case ontologies_1.owl.InverseFunctionalProperty.id:
93
+ case ontologies_1.owl.IrreflexiveProperty.id:
94
+ case ontologies_1.owl.ObjectProperty.id:
95
+ case ontologies_1.owl.OntologyProperty.id:
96
+ case ontologies_1.owl.ReflexiveProperty.id:
97
+ case ontologies_1.owl.SymmetricProperty.id:
98
+ case ontologies_1.owl.TransitiveProperty.id: {
99
+ store.addQuad(s, ontologies_1.rdf.type, ontologies_1.rdf.Property, targetGraph);
100
+ break;
101
+ }
102
+ }
103
+ break;
104
+ }
105
+ }
106
+ }
67
107
  }
68
108
  exports.OwlReasoner = OwlReasoner;
69
109
  //# sourceMappingURL=owl-reasoner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"owl-reasoner.js","sourceRoot":"","sources":["../../src/rdf/owl-reasoner.ts"],"names":[],"mappings":";;;AACA,8CAA+C;AAC/C,mDAA+C;AAE/C;;GAEG;AACH,MAAa,WAAY,SAAQ,4BAAY;IAC/B,gBAAgB,CAAC,KAAe,EAAE,WAA0B,EAAE,KAAgC,EAAE,IAAa;QACnH,KAAK,CAAC,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAExD,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;QACrB,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;QACvB,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;QAEpE,IAAI,CAAC,CAAC,EAAE;YACJ,OAAO;SACV;QAED,6FAA6F;QAC7F,QAAQ,CAAC,CAAC,EAAE,EAAE;YACV,KAAK,gBAAG,CAAC,eAAe,CAAC,EAAE,CAAC;YAC5B,KAAK,gBAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YACzB,KAAK,gBAAG,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;gBACtB,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,gBAAG,CAAC,IAAI,EAAE,iBAAI,CAAC,KAAK,EAAE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gBAAG,CAAC,yBAAyB,CAAC,EAAE,CAAC;oBACtC,KAAK,gBAAG,CAAC,mBAAmB,CAAC,EAAE,CAAC;oBAChC,KAAK,gBAAG,CAAC,cAAc,CAAC,EAAE,CAAC;oBAC3B,KAAK,gBAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC;oBAC7B,KAAK,gBAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC;oBAC9B,KAAK,gBAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC;oBAC9B,KAAK,gBAAG,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;wBAC5B,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,gBAAG,CAAC,IAAI,EAAE,gBAAG,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;wBAC1D,MAAM;qBACT;iBACJ;gBACD,MAAM;aACT;SACJ;IACL,CAAC;CACJ;AAnHD,kCAmHC"}
@@ -0,0 +1,76 @@
1
+ import * as n3 from "n3";
2
+ import { ResourceRepository } from "./resource-repository";
3
+ /**
4
+ * A repository for retrieving properties from graphs.
5
+ */
6
+ export declare class PropertyRepository extends ResourceRepository {
7
+ /**
8
+ * The predicate used to indicate the domain of a property.
9
+ */
10
+ domainPredicate: n3.NamedNode<"http://www.w3.org/2000/01/rdf-schema#domain">;
11
+ /**
12
+ * The predicate used to indicate the range of a property.
13
+ */
14
+ rangePredicate: n3.NamedNode<"http://www.w3.org/2000/01/rdf-schema#range">;
15
+ constructor(store: n3.Store);
16
+ /**
17
+ * Get all properties in the repository.
18
+ * @returns A list of all properties in the repository.
19
+ */
20
+ getProperties(): string[];
21
+ /**
22
+ * Get the super properties of a given property.
23
+ * @param subject URI of a property.
24
+ * @returns An array of super properties of the given property, an empty array if the property has no super properties.
25
+ */
26
+ getSuperProperties(subject: string): string[];
27
+ /**
28
+ * Recursively find the first path from a given property to a root property.
29
+ * @param subject URI of a property.
30
+ * @param path The current property path.
31
+ * @param backtrack Set of URIs that have already been visited.
32
+ * @returns The first path that is found from the given property to a root class.
33
+ */
34
+ private _getRootPropertyPath;
35
+ /**
36
+ * Get the first discovered path from a given property to a root property.
37
+ * @param subject URI of a property.
38
+ * @returns A string array containing the first path that is found from the given property to a root property.
39
+ */
40
+ getRootPropertiesPath(subject: string): string[];
41
+ /**
42
+ * Indicate if there are sub properties of a given property.
43
+ * @param subject URI of a property.
44
+ * @returns true if the property has sub properties, false otherwise.
45
+ */
46
+ hasSubProperties(subject: string): boolean;
47
+ /**
48
+ * Get the sub properties of a given property or all root properties.
49
+ * @param subject URI of a property or undefined to get all root properties.
50
+ * @returns An array of sub properties of the given property, an empty array if the property has no sub properties.
51
+ */
52
+ getSubProperties(subject?: string): string[];
53
+ /**
54
+ * Get all properties from the repository that have no super properties.
55
+ * @returns An array of root properties in the repository.
56
+ */
57
+ getRootProperties(): string[];
58
+ /**
59
+ * Indicate if there is an equivalent property of a given property.
60
+ * @param subject URI of a property.
61
+ * @returns true if the property has an equivalent property, false otherwise.
62
+ */
63
+ hasEquivalentProperty(uri: string): boolean;
64
+ /**
65
+ * Get the domain of a given property.
66
+ * @param uri URI of a property.
67
+ * @returns The URI of the domain of the given property. If no domain is specified, rdfs:Resource is returned.
68
+ */
69
+ getDomain(uri: string): string;
70
+ /**
71
+ * Get the range of a given property.
72
+ * @param uri URI of a property.
73
+ * @returns The URI of the range of the given property. If no range is specified, rdfs:Resource is returned.
74
+ */
75
+ getRange(uri: string): string;
76
+ }