Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some items do not belong to a classification #40

Open
ghost opened this issue Nov 15, 2016 · 0 comments
Open

Some items do not belong to a classification #40

ghost opened this issue Nov 15, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Nov 15, 2016

This item http://www.ims/concepts/ateco2007/Ateco2007/812201 does not seem to be related to a classification with the skos:inScheme predicate.

That's why correspondence details cannot be loaded for http://stamina-project.org/codes/nacer2-ateco2007/correspondence (http://localhost:8080/correspondence/nacer2-ateco2007) : the source and target classifications are retrieved via the sourceConcept and targetConcept from an association, and the association refers to this item without inScheme relation (see

//HACK For now, the database provides information about the classifications
//being compared, but no information about which classification acts as the
//source, and which acts as the target. This information is retrieved by valuing
//one assocaition
// const correspondenceDetails = correspondence => `
// PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
// PREFIX xkos:<http://rdf-vocabulary.ddialliance.org/xkos#>
// SELECT ?classification ?code ?label {
// <${correspondence}> xkos:compares ?classification .
// ?classification skos:prefLabel ?label ;
// skos:notation ?code
// }
// `
const correspondenceDetails = correspondence => `
PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
PREFIX xkos:<http://rdf-vocabulary.ddialliance.org/xkos#>
SELECT
?source ?sourceCode ?sourceLabel
?target ?targetCode ?targetLabel {
<${correspondence}> xkos:madeOf ?association .
?association xkos:sourceConcept ?sourceItem ;
xkos:targetConcept ?targetItem .
?sourceItem skos:inScheme ?source .
?targetItem skos:inScheme ?target .
?source skos:prefLabel ?sourceLabel ;
skos:notation ?sourceCode .
?target skos:prefLabel ?targetLabel ;
skos:notation ?targetCode .
}
LIMIT 1
`
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants