Manta Developers
GitHub
Menu

@manta-eu/codegen

Reference for @manta-eu/codegen as it is on main, generated from its TypeScript sources.

The last release is 0.8.1. An export added on main since then arrives with the next release.

pnpm add @manta-eu/codegen

Entry points

  • @manta-eu/codegen, on this page

Type Aliases

RealmShapes

RealmShapes = object

Properties

apps

apps: string

ontology

ontology: string

ontologyGraphIri

ontologyGraphIri: string

shacl

shacl: string

targetClasses

targetClasses: Record<string, number>

vocabBase

vocabBase: string


ShapeSources

ShapeSources = object

Properties

apps?

optional apps?: string

ontology

ontology: string

shacl

shacl: string

vocabBase

vocabBase: string

Variables

realmPrefix

const realmPrefix: "m" = "m"

Functions

countTargetClasses()

countTargetClasses(turtle): Record<string, number>

Parameters

turtle

string

Returns

Record<string, number>


failOnUnknownNamespace()

failOnUnknownNamespace(outDir): void

Parameters

outDir

string

Returns

void


fetchRealmShapes()

fetchRealmShapes(endpoint, token, fetchImpl?): Promise<RealmShapes>

Parameters

endpoint

string

token

TokenSource

fetchImpl?

FetchLike = fetch

Returns

Promise<RealmShapes>


generatePackage()

generatePackage(__namedParameters, outDir): Promise<void>

Parameters

__namedParameters

ShapeSources

outDir

string

Returns

Promise<void>


mergeShapes()

mergeShapes(shacl, ontology, vocabBase, apps?): Promise<string>

Parameters

shacl

string

ontology

string

vocabBase

string

apps?

string = ""

Returns

Promise<string>


removeGeneratedFiles()

removeGeneratedFiles(outDir): void

Parameters

outDir

string

Returns

void


sortQuads()

sortQuads(quads): Quad[]

Parameters

quads

readonly Quad[]

Returns

Quad[]


sortSchemas()

sortSchemas(source): string

Parameters

source

string

Returns

string


sparqlEndpoint()

sparqlEndpoint(apiUrl, datastoreId): string

Parameters

apiUrl

string

datastoreId

string

Returns

string