
Security News
NVD Quietly Sweeps 100K+ CVEs Into a “Deferred” Black Hole
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
Merweb (Mermaid meets Semantic Web) is library and command line interface to generate SHACL shapes and vocabularies from Mermaid class diagrams.
npm i -g merweb
.merweb -f path/to/diagram -s path/to/jsonld
.
You can trymerweb -f examples/diagram.txt \
-s shapes.jsonld \
-b "sc=https://w3id.org/idlab/ns/supply-chain/#" \
-v "sc=https://w3id.org/idlab/ns/supply-chain/#" \
-p "swrl=http://www.w3.org/2003/11/swrl#;owl=http://www.w3.org/2002/07/owl#" \
-c vocab.jsonld
or
merweb -f examples/diagram_with_supertypes.txt \
-s shapes.jsonld \
-b "ex=https://example.org/examples#" \
-v "ex=https://example.org/examples#" \
-p "swrl=http://www.w3.org/2003/11/swrl#;owl=http://www.w3.org/2002/07/owl#" \
-c vocab.jsonld
You can find example diagrams in the folder examples
.
Memweb reuses one existing Mermaid annotation and uses five new annotations to generate the correct shapes and vocabularies from the class diagrams. Below you can find a table of these annotations.
Annotation | Description | Shape | Vocabulary | Existing or new annotation |
---|---|---|---|---|
@type | The type of a class | Object of sh:targetNode | A rdfs:Class | New |
@superTypes | The super-types of a class | N/A | Object(s) of rdfs:subClassOf | New |
@extraTypes | The extra types of a class | Object of sh:property with rdf:type as sh:path | A rdfs:Class | New |
@label | The label of a class or property | N/A | Object of rdfs:label | New |
@comment | The comment of a class or property | N/A | Object of rdfs:comment | New |
Cardinality on a class attribute | The cardinality of datatype property | Objects of sh:minCount and sh:maxCount | N/A | New |
Cardinality on a relationship between two classes | The cardinality of object property | Objects of sh:minCount and sh:maxCount | N/A | Existing |
Please note that the annotations @type
, @superTypes
, and @extraTypes
assume a strict ordering:
@type
should always be declared before @superTypes
and @extraTypes
are declared. The internal ordering of the latter two can be arbitrary.
You can remove the annotations starting with @
from diagrams via the -r, --remove-annotations
option.
The changed diagram is outputted to the terminal.
merweb -f examples/diagram.txt -r
This code is copyrighted by Ghent University – imec and released under the MIT license.
FAQs
Generate SHACL shapes and vocabularies from Mermaid class diagrams.
The npm package merweb receives a total of 26 weekly downloads. As such, merweb popularity was classified as not popular.
We found that merweb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
Research
Security News
Lazarus-linked threat actors expand their npm malware campaign with new RAT loaders, hex obfuscation, and over 5,600 downloads across 11 packages.
Security News
Safari 18.4 adds support for Iterator Helpers and two other TC39 JavaScript features, bringing full cross-browser coverage to key parts of the ECMAScript spec.