123456789101112131415161718192021222324252627282930313233343536373839 |
- //© 2019 Dublin City University, Trinity College Dublin. All rights reserved. This material may not be reproduced, displayed, modified or distributed without the express prior written permission of the copyright holder.
- const prefix = `
- PREFIX qpro: <http://purl.org/eis/vocab/qpro#>
- PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
- PREFIX dqm-prob: <http://www.diachron-fp7.eu/dqm-prob#>
- `;
- export const EntitiesAsMembersOfDisjointClassesMetric = (qualityGraph,dataGraph,observationURI,datasetSource) =>{
- let query = `
- SELECT (?ProblematicThingResource AS ?Subject) (COALESCE(?Default, rdf:type) AS ?Predicate) ?Object ?FailedMertic ?Exception
- FROM NAMED <${qualityGraph}>
- WHERE
- {
- {GRAPH <${qualityGraph}>
- {?QualityProblem qpro:generatedBy ?Observation;
- a qpro:QualityProblem;
- qpro:isDescribedBy ?FailedMertic;
- qpro:problemStructure qpro:ModelContainer;
- qpro:problematicThing ?ProblematicThingResource}.
- }
- {GRAPH <${qualityGraph}>
- {?ProblematicThingResource qpro:exceptionDescription ?Exception;
- ?Property ?Object}.
- FILTER(?Exception IN (dqm-prob:MultiTypedResourceWithDisjointedClasses)).
- FILTER(?Property IN (dqm-prob:violatingDisjoinedClass)).
- }
- FILTER(str(?Observation) = "${observationURI}").
- }
- `;
- return prefix + query;
- }
- export default {EntitiesAsMembersOfDisjointClassesMetric};
|