Skip to content

Some items do not belong to a classification #40

@ghost

Description

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
`
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions