3.1.1 • Published 1 month ago

@rdmr-eu/rdfjs-source-msaccess v3.1.1

Weekly downloads
-
License
MPL-2.0
Repository
github
Last release
1 month ago

rdfjs-source-msaccess

NPM

This library and CLI creates RDF quads from a Microsoft Access database (.accdb or .mdb).

Read the introductory blog post or go directly to NPM.

Usage

Run it without installing using e.g. npx: $ npx @rdmr-eu/rdfjs-source-msaccess.

Add it as a library with e.g. $ yarn add @rdmr-eu/rdfjs-source-msaccess and use the exported class:

const data = fs.readFileSync(inputFilePath);
const mdb = new MSAccess(data, { baseIRI: "https://example.org/data#" });
const store = mdb.store(); // then use this RDF.Store in your code.

Model

The generated quads are according to the Facade-X model (default) or a simpler csv-like model.

Id (Long)DateAdded (Date/Time)ContentBody (Text with markup)Published (Boolean)
110-3-2023This is contentJa
29-3-2023OldNee
  • With the above table, the mode facade-x (default) generates:

    <https://example.org/data#ContentTable> {
      [] rdf:type fx:root ;
        rdf:_1 _:ContentTable1 ;
        rdf:_2 _:ContentTable2 .
    
      _:ContentTable1 xyz:Id "1"^^xsd:long ;
        xyz:DateAdded "2023-03-10T00:00:00.000Z"^^xsd:dateTime ;
        xyz:ContentBody "<div>This is <strong>content</strong></div>" ;
        xyz:Published "true"^^xsd:boolean .
    
      _:ContentTable2 xyz:Id "2"^^xsd:long ;
        xyz:DateAdded "2023-03-09T00:00:00.000Z"^^xsd:dateTime ;
        xyz:ContentBody "<div><em>Old</em></div>" ;
        xyz:Published "false"^^xsd:boolean .
    }

    This is based on the spreadsheet format for SPARQL-Anything.

  • With the above tabe, the mode csv generates:

    <csv:table/ContentTable> {
      <csv:table/ContentTable/row/1> <csv:Id> "1"^^xsd:long ;
        <csv:DateAdded> "2023-03-10T00:00:00.000Z"^^xsd:dateTime ;
        <csv:ContentBody> "<div>This is <strong>content</strong></div>" ;
        <csv:Published> "true"^^xsd:boolean .
    
      <csv:table/ContentTable/row/2> <csv:Id> "2"^^xsd:long ;
        <csv:DateAdded> "2023-03-09T00:00:00.000Z"^^xsd:dateTime ;
        <csv:ContentBody> "<div><em>Old</em></div>" ;
        <csv:Published> "false"^^xsd:boolean .
    }
3.1.1

1 month ago

3.1.0

1 month ago

3.0.0

8 months ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago