@@ -2,32 +2,13 @@ import { ActionContext, Actor } from "@comunica/core";
22import * as RDF from "@rdfjs/types" ;
33import { Readable , PassThrough } from "readable-stream" ;
44import { MediatorRdfParseHandle , MediatorRdfParseMediaTypes } from '@comunica/bus-rdf-parse' ;
5+ import mediaMappings from "./mediaMappings" ;
56
67/**
78 * An RdfParser can parse any RDF serialization, based on a given content type.
89 */
910export class RdfParser < Q extends RDF . BaseQuad = RDF . Quad > {
10-
11- // tslint:disable:object-literal-sort-keys
12- public static readonly CONTENT_MAPPINGS : { [ id : string ] : string } = {
13- ttl : "text/turtle" ,
14- turtle : "text/turtle" ,
15- nt : "application/n-triples" ,
16- ntriples : "application/n-triples" ,
17- nq : "application/n-quads" ,
18- nquads : "application/n-quads" ,
19- rdf : "application/rdf+xml" ,
20- rdfxml : "application/rdf+xml" ,
21- owl : "application/rdf+xml" ,
22- n3 : "text/n3" ,
23- shc : "text/shaclc" ,
24- shaclc : "text/shaclc" ,
25- shce : "text/shaclc-ext" ,
26- shaclce : "text/shaclc-ext" ,
27- trig : "application/trig" ,
28- jsonld : "application/ld+json" ,
29- json : "application/ld+json" ,
30- } ;
11+ public static readonly CONTENT_MAPPINGS : Record < string , string > = mediaMappings ;
3112
3213 public readonly mediatorRdfParseMediatypes : MediatorRdfParseMediaTypes ;
3314 public readonly mediatorRdfParseHandle : MediatorRdfParseHandle ;
0 commit comments