diff --git a/src/finalizing/merge-catalogs.js b/src/finalizing/merge-catalogs.js index a5faeb1..0b3f106 100644 --- a/src/finalizing/merge-catalogs.js +++ b/src/finalizing/merge-catalogs.js @@ -1,7 +1,6 @@ import { resolve } from 'path'; import sh from 'shelljs'; -import { mergeTurtles } from '../utils/blazegraph.js'; -import { reifyTurtle } from '../utils/reify.js'; +import { mergeTurtles, reifyTurtle } from '../utils/reify.js'; export function mergeCatalogs(context) { const graphs = listMetadataGraphs(context); diff --git a/src/utils/reify.js b/src/utils/reify.js index 3796b52..fcb96a3 100644 --- a/src/utils/reify.js +++ b/src/utils/reify.js @@ -72,10 +72,15 @@ export function reifyTurtle(inputPath, graphName, jsonldIsJson = false) { export function convert(inputPath, outputPath, outputFormat, graphName) { let command = `riot --merge --nocheck --output=${outputFormat} "${inputPath}"`; if (isJsonLd(inputPath)) { - command = `cat "${inputPath}" | jsonld toRdf -q | riot --merge --nocheck --output=turtle` + command = `cat "${inputPath}" | jsonld toRdf -q | riot --merge --nocheck --output=turtle`; } if (graphName && outputFormat === FORMATS.nq) { command += ` | perl -pe 's|\ \.\n|\ <${graphName}> .\n|g'`; } throwOnError(`${command} > ${outputPath}`, `Failed to convert to '${outputFormat}' format.`); } + +export function mergeTurtles(outputPath, _prefixesPath, ontologyPaths) { + const inputFiles = ontologyPaths.join(' '); + throwOnError(`riot --merge --nocheck --output=turtle ${inputFiles} > ${outputPath}`, `${inputFiles} failed to load`); +}