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

zone.cogni.semanticz:irigenerator

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zone.cogni.semanticz:irigenerator

This project serves for generating IRIs using a predefined template based on existing RDF data.

  • 1.0.1
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

IRI Generator

This project servers for generating IRIs using a predefined template based on existing RDF data.

Use-case: Renaming temporary IRIs generated on the front-end to the proper ones

Having an RDF resource with an IRI:

@prefix eczm: <https://example.cogni.zone/model#> .
https://resource/2 a eczm:Two ; 
    eczm:year "2021" ;
    eczm:sequence "0005" .

created on the frontend, we want to generate the IRI https://example.cogni.zone/2021/0005 based on:

  • a template #{[baseUri]}/#{[year]}/#{[sequence]}
  • a baseUri of https://example.cogni.zone
  • a SPARQL query supplying the values for year and sequence
PREFIX eczm: <https://example.cogni.zone/model#> 
SELECT ?year ?sequence {
  <#{[uri]}> eczm:year ?year ;
  eczm:sequence ?sequence
}

where #{[uri]} points to the original IRI of the resource (https://resource/2).

To pick the correct template for the given IRI another SPARQL query is used:

PREFIX eczm: <https://example.cogni.zone/model#> .
SELECT ?uri { ?uri a eczm:Two }

Dependencies

The project has been extracted from Asquare and the following classes are either copies of subset of their respective Asquare counterparts:

FAQs

Package last updated on 05 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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