Skip to content

Commit

Permalink
Filter only RDF file extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
johardi committed Oct 26, 2023
1 parent a49b4dc commit 026ec0c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/enrichment/enrich-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import { load } from 'js-yaml';
import { resolve } from 'path';
import { error, info } from '../utils/logging.js';
import { convert, merge } from '../utils/robot.js';
import { cleanTemporaryFiles, convertNormalizedDataToOwl, convertNormalizedMetadataToRdf, logOutput } from './utils.js';
import {
cleanTemporaryFiles,
convertNormalizedDataToOwl,
convertNormalizedMetadataToRdf,
runCompleteClosure,
logOutput
} from './utils.js';

export function enrichGraphMetadata(context) {
const { selectedDigitalObject: obj } = context;
Expand Down Expand Up @@ -33,7 +39,7 @@ export function enrichGraphData(context) {
const extension = inputRdfFile.split('.').slice(-1)[0];
if (extension === 'ttl') {
toMerge.push(inputRdf);
} else {
} else if (extension === 'rdf' || extension === 'jsonld' || extension === 'owl'){

This comment has been minimized.

Copy link
@bherr2

bherr2 Oct 26, 2023

Member

What about nq, nt, xml, and json? these are all common extensions for RDF data as well...

const outputTtl = resolve(obj.path, 'enriched', inputRdfFile + '.ttl');
convert(inputRdf, outputTtl, 'ttl');
toMerge.push(outputTtl);
Expand Down

0 comments on commit 026ec0c

Please sign in to comment.