sdcreader

v4.5.0
io.github.SemanticDataCharter/sdcreader Checked 1 day ago Published 12 days ago

Read published Semantic Data Charter models: catalog search, record structure, codes, pinned schema.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

find_models

Search SDCStudio's public catalog of published models by text, or list the models of one public project by name. Needs no account. Returns identifiers, titles and projects; pass an identifier to describe_model.

ParameterTypeDescription
pageinteger
page_sizeinteger
projectstringA public project's exact name, for example NIH_CDE.
searchstringText matched against title and description.

describe_model

Describe one published model: title, description, project, the root record, how many leaves and components it has and of which types, its Dublin Core as the modeler wrote it (defaults reported as null), its semantic links, and the schema URL pinned to the SHA-256 of the bytes every record is validated against. Since 4.5.0 also its reference-model parts beyond the data cluster: the elements the schema declares for the DM and each Party, Participation, Attestation and Audit, and the Parties a record's subject or provider can be.

ParameterTypeDescription
ct_idstringThe model's identifier (CUID2) in the public catalog; the package is fetched from the host this server was started with.
directorystringA package directory already on disk (dm-<ct>.jsonld and dm-<ct>.xsd, optionally catalog.json and versions.json). Give this or ct_id, not both.

list_leaves

The model's leaves in document order, each with its path of clusters, its SDC4 type, its constraints, how many enumerated values it has and its identity links. Paged: a model can have more than a thousand leaves. With parts (4.5.0), the leaves of the reference-model parts beyond the data cluster instead: each Party's details, each Participation's and Attestation's elements, the workflow, with the reference-model element each step stands in.

ParameterTypeDescription
ct_idstringThe model's identifier (CUID2) in the public catalog; the package is fetched from the host this server was started with.
directorystringA package directory already on disk (dm-<ct>.jsonld and dm-<ct>.xsd, optionally catalog.json and versions.json). Give this or ct_id, not both.
limitinteger
offsetinteger
partsbooleanList the reference-model parts' leaves rather than the data cluster's.

list_codes

The enumerated values of one component in a model: each value with the IRI, definition and code system the published schema annotates it with.

ParameterTypeDescription
component *stringThe component's identifier (ct_id), as list_leaves reports it.
ct_idstringThe model's identifier (CUID2) in the public catalog; the package is fetched from the host this server was started with.
directorystringA package directory already on disk (dm-<ct>.jsonld and dm-<ct>.xsd, optionally catalog.json and versions.json). Give this or ct_id, not both.

read_record

Read a Governed Data Record (an XML file on disk) against its model: the record's attributes and each value in document order with its component, path of clusters, elements, context and any Exceptional Value (ISO 21090 code, name, and whether it was written at the source or inserted by recovery beside a rejected value). The model is the one the record names, fetched by its identifier unless ct_id or directory is given. Paged. Does not validate the record. With reference_model (4.5.0), also the reference-model parts beyond the data cluster: subject, providers, Participations, workflow, Audits a…

ParameterTypeDescription
record *stringPath to the record's XML file on disk.
ct_idstringThe model's identifier (CUID2) in the public catalog; the package is fetched from the host this server was started with.
directorystringA package directory already on disk (dm-<ct>.jsonld and dm-<ct>.xsd, optionally catalog.json and versions.json). Give this or ct_id, not both.
limitinteger
offsetinteger
reference_modelbooleanAlso read the reference-model parts beyond the data cluster.

check_package

Run the reader's integrity check on a package directory: the JSON-LD names the directory's model, it has components, the schema is an XML Schema, and its bytes are the published current version when versions.json is present. Returns the SHA-256 and the pinned schema URL.

ParameterTypeDescription
directory *stringA package directory already on disk (dm-<ct>.jsonld and dm-<ct>.xsd, optionally catalog.json and versions.json). Give this or ct_id, not both.