Skip to content

Commit

Permalink
Remove trailing hash
Browse files Browse the repository at this point in the history
  • Loading branch information
literarymachine committed Feb 13, 2020
1 parent f6b6400 commit 455e644
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions xml2nt.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,32 @@ console.log(`
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix dct: <http://purl.org/dc/terms/> .
<scheme#> a skos:ConceptScheme ;
<scheme> a skos:ConceptScheme ;
dct:title "Destatis-Systematik der Fächergruppen, Studienbereiche und Studienfächer"@de ;
skos:hasTopConcept ${topConcepts.map(concept => '<' + concept.id + '#>').join(', ')} .
skos:hasTopConcept ${topConcepts.map(concept => '<' + concept.id + '>').join(', ')} .
`)

topConcepts.forEach(concept => console.log(`
<${concept.id}#> a skos:Concept ;
<${concept.id}> a skos:Concept ;
skos:prefLabel "${concept.label}"@de ;
${
childConcepts.some(child => child.parent === concept.id) &&
'skos:narrower ' + childConcepts.filter(child => child.parent === concept.id).map(child => '<' + child.id + '#>').join(', ') + ';'
'skos:narrower ' + childConcepts.filter(child => child.parent === concept.id).map(child => '<' + child.id + '>').join(', ') + ';'
|| ''
}
skos:notation "${concept.notation}" ;
skos:topConceptOf <scheme#> .
skos:topConceptOf <scheme> .
`))

childConcepts.forEach(concept => console.log(`
<${concept.id}#> a skos:Concept ;
<${concept.id}> a skos:Concept ;
skos:prefLabel "${concept.label}"@de ;
${
childConcepts.some(child => child.parent === concept.id) &&
'skos:narrower ' + childConcepts.filter(child => child.parent === concept.id).map(child => '<' + child.id + '#>').join(', ') + ';'
'skos:narrower ' + childConcepts.filter(child => child.parent === concept.id).map(child => '<' + child.id + '>').join(', ') + ';'
|| ''
}
skos:broader <${concept.parent}#> ;
skos:broader <${concept.parent}> ;
skos:notation "${concept.notation}" ;
skos:inScheme <scheme#> .
skos:inScheme <scheme> .
`))

0 comments on commit 455e644

Please sign in to comment.