rdflib 2.3.1-c71dde13 → 2.3.2-075b5109
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.
- package/dist/515.rdflib.min.js +1 -1
- package/dist/515.rdflib.min.js.map +1 -1
- package/dist/rdflib.min.js +1 -1
- package/dist/rdflib.min.js.LICENSE.txt +0 -7
- package/dist/rdflib.min.js.map +1 -1
- package/esm/fetcher.js +11 -2
- package/esm/n3parser.js +1 -2
- package/lib/collection.d.ts +1 -1
- package/lib/fetcher.js +11 -2
- package/lib/index.d.ts +1 -1
- package/lib/n3parser.js +1 -2
- package/lib/rdfaparser.d.ts +9 -9
- package/lib/rdfxmlparser.d.ts +1 -1
- package/lib/serializer.d.ts +3 -3
- package/lib/xsd-internal.d.ts +7 -7
- package/lib/xsd.d.ts +7 -7
- package/package.json +21 -18
- package/src/fetcher.ts +11 -2
- package/src/jsonldparser.js +2 -2
- package/src/n3parser.js +669 -670
- package/src/serializer.js +6 -6
- package/src/xsd-internal.js +1 -1
- package/src/xsd.js +4 -4
package/src/serializer.js
CHANGED
|
@@ -14,7 +14,7 @@ import { createXSD } from './xsd'
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
export default function createSerializer(store) {
|
|
17
|
-
return new Serializer(store)
|
|
17
|
+
return new Serializer(store)
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export class Serializer {
|
|
@@ -46,7 +46,7 @@ export class Serializer {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
setBase(base) {
|
|
49
|
-
this.base = base
|
|
49
|
+
this.base = base
|
|
50
50
|
return this
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -57,7 +57,7 @@ export class Serializer {
|
|
|
57
57
|
* - 'o': do not abbreviate to a prefixed name when the local part contains a dot
|
|
58
58
|
*/
|
|
59
59
|
setFlags(flags) {
|
|
60
|
-
this.flags = flags || ''
|
|
60
|
+
this.flags = flags || ''
|
|
61
61
|
return this
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -110,7 +110,7 @@ export class Serializer {
|
|
|
110
110
|
// remove any existing mapping for this prefix
|
|
111
111
|
for (let existingNs in this.prefixes) {
|
|
112
112
|
if (this.prefixes[existingNs] == prefix)
|
|
113
|
-
delete this.prefixes[existingNs]
|
|
113
|
+
delete this.prefixes[existingNs]
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
this.prefixes[uri] = prefix
|
|
@@ -570,7 +570,7 @@ export class Serializer {
|
|
|
570
570
|
|
|
571
571
|
case 'http://www.w3.org/2001/XMLSchema#double': {
|
|
572
572
|
// Must force use of 'e'
|
|
573
|
-
const eNotation = val.toLowerCase().indexOf('e') > 0
|
|
573
|
+
const eNotation = val.toLowerCase().indexOf('e') > 0
|
|
574
574
|
if (val.indexOf('.') < 0 && !eNotation) val += '.0'
|
|
575
575
|
if (!eNotation) val += 'e0'
|
|
576
576
|
return val
|
|
@@ -590,7 +590,7 @@ export class Serializer {
|
|
|
590
590
|
case 'NamedNode':
|
|
591
591
|
return this.symbolToN3(expr)
|
|
592
592
|
case 'DefaultGraph':
|
|
593
|
-
return ''
|
|
593
|
+
return ''
|
|
594
594
|
default:
|
|
595
595
|
throw new Error('Internal: atomicTermToN3 cannot handle ' + expr + ' of termType: ' + expr.termType)
|
|
596
596
|
}
|
package/src/xsd-internal.js
CHANGED
package/src/xsd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import CanonicalDataFactory from "./factories/canonical-data-factory"
|
|
1
|
+
import CanonicalDataFactory from "./factories/canonical-data-factory"
|
|
2
2
|
|
|
3
3
|
export function createXSD(localFactory = CanonicalDataFactory) {
|
|
4
4
|
return {
|
|
@@ -13,9 +13,9 @@ export function createXSD(localFactory = CanonicalDataFactory) {
|
|
|
13
13
|
"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
|
|
14
14
|
),
|
|
15
15
|
string: localFactory.namedNode("http://www.w3.org/2001/XMLSchema#string"),
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
const defaultXSD = createXSD(CanonicalDataFactory)
|
|
19
|
+
const defaultXSD = createXSD(CanonicalDataFactory)
|
|
20
20
|
|
|
21
|
-
export default defaultXSD
|
|
21
|
+
export default defaultXSD
|