Skip to content

Commit

Permalink
Add owl:deprecated #287
Browse files Browse the repository at this point in the history
  • Loading branch information
sroertgen committed Feb 6, 2024
1 parent 1c954b0 commit af66e5c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ exports.onPreBootstrap = async ({ createContentDigest, actions, getNode }) => {
topConceptOf,
hasTopConcept,
member,
deprecated,
...properties
} = graph
const type = Array.isArray(properties.type)
Expand Down Expand Up @@ -173,6 +174,7 @@ exports.onPreBootstrap = async ({ createContentDigest, actions, getNode }) => {
* a concept scheme not present in the graphql data layer would not be found and not
* be shown on the concepts page.
*/
deprecated: Boolean(deprecated) || null,
inSchemeAll:
inSchemeFiltered.map((inScheme) => ({ id: inScheme.id })) || null,
// topConceptOf nodes are also set to inScheme to facilitate parsing and filtering later
Expand Down
5 changes: 5 additions & 0 deletions src/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const jsonld = {
schema: "https://schema.org/",
vann: "http://purl.org/vocab/vann/",
ldp: "http://www.w3.org/ns/ldp#",
owl: "http://www.w3.org/2002/07/owl#",
title: {
"@id": "dct:title",
"@container": "@language",
Expand Down Expand Up @@ -95,6 +96,10 @@ const jsonld = {
topConceptOf: {
"@container": "@set",
},
deprecated: {
"@id": "owl:deprecated",
"@type": "xsd:boolean",
},
},
}

Expand Down
1 change: 1 addition & 0 deletions src/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ module.exports.allConcept = (inScheme, languages) => `
${[...languages].join(" ")}
}
}
deprecated
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ module.exports = (languages) => `
exactMatch: [Concept],
inScheme: [ConceptScheme] @link(from: "inScheme___NODE"),
inSchemeAll: [ConceptScheme],
hub: String
hub: String,
deprecated: Boolean
}
type LanguageMap {
Expand Down

0 comments on commit af66e5c

Please sign in to comment.