Language-Research-Technology / ro-crate-schema-tools

Tools for RO-Crate to be used for creating and distributing Schema.org style ontologies and editor Profiles for Crate-O and other RO-Crate editors.
GNU General Public License v3.0
0 stars 3 forks source link

ro-crate-schema-tools

This repository contains node-based tools for Research Object Crate (RO-Crate) to be used for creating and distributing Schema.org Style Schemas (SOSSs) and Mode Files for configuring the Crate-O editor.

Background: What's a Schema.org Style Schema?

Schema.org is available in schema.org JSON-LD format.

For example, schema:Dataset has the following definition:

   {
      "@id": "schema:Dataset",
      "@type": "rdfs:Class",
      "owl:equivalentClass": [
        {
          "@id": "dcmitype:Dataset"
        },
        {
          "@id": "dcat:Dataset"
        },
        {
          "@id": "void:Dataset"
        }
      ],
      "rdfs:comment": "A body of structured information describing some topic(s) of interest.",
      "rdfs:label": "Dataset",
      "rdfs:subClassOf": {
        "@id": "schema:CreativeWork"
      },
      "schema:source": {
        "@id": "http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_DatasetClass"
      }
   }

Note that while there is a schema:Class Class, we follow Schema.org practice and use rdfs:Class and rdf:Property for describing classes and schemas.

About the tools

These tools:

To generate documentation for a SOSS Crate

To see the usage, type >> node roc-schema.js -h

Usage: roc-schema [options] <d>

Extracts a markdown or HTML page from an RO-Crate that contains Schema.org style Classes and Properties.

Options:
  -V, --version            output the version number
  -c, --config [conf]      configuration file
  --html                   Output HTML (default is markdown)
  -t,  --ro-crate-terms    Output vocabulary and context file for terms
  -u,  --url [url]         URL for the final result (so links can be made relative)
  -o, --output-path [rep]  Directory into which to write output (default: null)
  -h, --help               display help for command

To generate or update a SOSS Crate from one or more examples

The Makefile contains some examples.

To make a generic RO-Crate Editor Mode File:

make generic

To make a base Mode File that includes ALL of schema.org plus the RO-Crate add-ins:

make base

For usage:

rocsoss --help