1234567891011121314151617181920212223242526272829303132333435363738394041 |
- //© 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 owl: <http://www.w3.org/2002/07/owl#>
- `;
- export const ExtensionalConcisenessMetric = (qualityGraph,dataGraph,observationURI,datasetSource) =>{
- let query = `
- SELECT (COALESCE(?Default, "Subject") AS ?ProblematicThing) ?Subject ?Object (COALESCE(?Default, owl:sameAs) AS ?Predicate) ?FailedMertic ?Exception
- FROM NAMED <${qualityGraph}>
- WHERE
- {
- {GRAPH <${qualityGraph}>
- {?QualityProblem qpro:generatedBy ?Observation;
- a qpro:QualityProblem;
- qpro:isDescribedBy ?FailedMertic;
- qpro:problemStructure qpro:QuadContainer;
- qpro:problematicThing ?SequenceRef}.
- }.
- {GRAPH <${qualityGraph}>
- {?SequenceRef ?Sequence ?Statement}.
- }.
- {GRAPH <${qualityGraph}>
- {?Statement rdf:object ?Exception;
- rdf:subject ?Subject}.
- }.
- FILTER(str(?Observation) = "${observationURI}").
- }
- `;
- return prefix + query;
- }
- export default {ExtensionalConcisenessMetric};
|