Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@comunica/actor-rdf-parse-n3

Package Overview
Dependencies
Maintainers
4
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@comunica/actor-rdf-parse-n3 - npm Package Compare versions

Comparing version 1.22.0 to 2.0.1-alpha.5.0

components/ActorRdfParseN3.jsonld

21

lib/ActorRdfParseN3.d.ts
import type { IActionRdfParse, IActorRdfParseFixedMediaTypesArgs, IActorRdfParseOutput } from '@comunica/bus-rdf-parse';
import { ActorRdfParseFixedMediaTypes } from '@comunica/bus-rdf-parse';
import type { ActionContext } from '@comunica/core';
import type { IActionContext } from '@comunica/types';
/**

@@ -10,4 +10,21 @@ * An N3 RDF Parse actor that listens on the 'rdf-parse' bus.

export declare class ActorRdfParseN3 extends ActorRdfParseFixedMediaTypes {
/**
* @param args -
* \ @defaultNested {{
* "application/n-quads": 1.0,
* "application/trig": 0.95,
* "application/n-triples": 0.8,
* "text/turtle": 0.6,
* "text/n3": 0.35
* }} mediaTypePriorities
* \ @defaultNested {{
* "application/n-quads": "http://www.w3.org/ns/formats/N-Quads",
* "application/trig": "http://www.w3.org/ns/formats/TriG",
* "application/n-triples": "http://www.w3.org/ns/formats/N-Triples",
* "text/turtle": "http://www.w3.org/ns/formats/Turtle",
* "text/n3": "http://www.w3.org/ns/formats/N3"
* }} mediaTypeFormats
*/
constructor(args: IActorRdfParseFixedMediaTypesArgs);
runHandle(action: IActionRdfParse, mediaType: string, context: ActionContext): Promise<IActorRdfParseOutput>;
runHandle(action: IActionRdfParse, mediaType: string, context: IActionContext): Promise<IActorRdfParseOutput>;
}

@@ -12,2 +12,19 @@ "use strict";

class ActorRdfParseN3 extends bus_rdf_parse_1.ActorRdfParseFixedMediaTypes {
/**
* @param args -
* \ @defaultNested {{
* "application/n-quads": 1.0,
* "application/trig": 0.95,
* "application/n-triples": 0.8,
* "text/turtle": 0.6,
* "text/n3": 0.35
* }} mediaTypePriorities
* \ @defaultNested {{
* "application/n-quads": "http://www.w3.org/ns/formats/N-Quads",
* "application/trig": "http://www.w3.org/ns/formats/TriG",
* "application/n-triples": "http://www.w3.org/ns/formats/N-Triples",
* "text/turtle": "http://www.w3.org/ns/formats/Turtle",
* "text/n3": "http://www.w3.org/ns/formats/N3"
* }} mediaTypeFormats
*/
constructor(args) {

@@ -17,9 +34,11 @@ super(args);

async runHandle(action, mediaType, context) {
action.input.on('error', error => quads.emit('error', error));
const quads = action.input.pipe(new n3_1.StreamParser({ baseIRI: action.baseIRI }));
action.data.on('error', error => data.emit('error', error));
const data = action.data.pipe(new n3_1.StreamParser({ baseIRI: action.metadata?.baseIRI }));
return {
quads,
triples: mediaType === 'text/turtle' ||
mediaType === 'application/n-triples' ||
mediaType === 'text/n3',
data,
metadata: {
triples: mediaType === 'text/turtle' ||
mediaType === 'application/n-triples' ||
mediaType === 'text/n3',
},
};

@@ -26,0 +45,0 @@ }

4

LICENSE.txt
The MIT License (MIT)
Copyright © 2017–2018 Ruben Taelman, Joachim Van Herwegen
Ghent University – imec, Belgium
Copyright © 2017–now Ruben Taelman, Joachim Van Herwegen
Comunica Association and Ghent University – imec, Belgium

@@ -6,0 +6,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "@comunica/actor-rdf-parse-n3",
"version": "1.22.0",
"version": "2.0.1-alpha.5.0",
"description": "A N3 RDF Parse actor",
"lsd:module": true,
"main": "index.js",
"typings": "index",
"main": "lib/index.js",
"typings": "lib/index",
"repository": {

@@ -28,41 +28,16 @@ "type": "git",

"lib/**/*.d.ts",
"lib/**/*.js",
"index.d.ts",
"index.js"
"lib/**/*.js"
],
"peerDependencies": {
"@comunica/bus-rdf-parse": "^1.0.0",
"@comunica/core": "^1.0.0"
},
"devDependencies": {
"@comunica/bus-rdf-parse": "^1.22.0",
"@comunica/core": "^1.22.0"
},
"dependencies": {
"@comunica/bus-rdf-parse": "2.0.1-alpha.5.0",
"@comunica/core": "2.0.1-alpha.5.0",
"@types/n3": "^1.4.4",
"n3": "^1.6.3"
},
"jest": {
"globals": {
"ts-jest": {
"tsConfig": "../../tsconfig.json"
}
},
"transform": {
"^.+\\.ts$": "ts-jest"
},
"testRegex": "(/test/.*|(\\.|/)(test|spec))\\.ts$",
"moduleFileExtensions": [
"ts",
"js"
],
"collectCoverage": true
},
"scripts": {
"test": "node \"../../node_modules/jest/bin/jest.js\" ${1}",
"test-watch": "node \"../../node_modules/jest/bin/jest.js\" ${1} --watch",
"build": "node \"../../node_modules/typescript/bin/tsc\"",
"validate": "npm ls"
"build": "npm run build:ts && npm run build:components",
"build:ts": "node \"../../node_modules/typescript/bin/tsc\"",
"build:components": "componentsjs-generator"
},
"gitHead": "0a249ba341022eb2f1b9922fcf549a9564671d9f"
"gitHead": "e2ae2e9e924bf0656df60cc99774f7e560d47695"
}

@@ -26,3 +26,3 @@ # Comunica N3 RDF Parse Actor

...
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-parse-n3/^1.0.0/components/context.jsonld"
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-parse-n3/^2.0.0/components/context.jsonld"
],

@@ -32,3 +32,3 @@ "actors": [

{
"@id": "config-sets:rdf-parsers.json#myRdfParserN3",
"@id": "urn:comunica:default:rdf-parse/actors#n3",
"@type": "ActorRdfParseN3",

@@ -43,2 +43,2 @@ "priorityScale": 1.0

* `caam:Actor/AbstractMediaTypedFixed/priorityScale`: An optional priority for this parser, used for content negotiation, defaults to `1`.
* `priorityScale`: An optional priority for this parser, used for content negotiation, defaults to `1`.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc