Browse Source

Added Report filter page

IanKelly121 3 years ago
parent
commit
89a5c09b87
60 changed files with 3654 additions and 72 deletions
  1. BIN
      Luzzu Dashboard/public/favicon.ico
  2. BIN
      Luzzu Dashboard/public/favicon2.ico
  3. 1 1
      Luzzu Dashboard/public/index.html
  4. 3 3
      Luzzu Dashboard/public/manifest.json
  5. 9 3
      Luzzu Dashboard/src/_nav.js
  6. BIN
      Luzzu Dashboard/src/assets/img/brand/adapt-logo-4.png
  7. BIN
      Luzzu Dashboard/src/assets/img/brand/petswitchthumb.webp
  8. 1 3
      Luzzu Dashboard/src/containers/DefaultLayout/DefaultFooter.js
  9. 3 2
      Luzzu Dashboard/src/containers/DefaultLayout/DefaultHeader.js
  10. 3 1
      Luzzu Dashboard/src/routes.js
  11. 57 0
      Luzzu Dashboard/src/scss/_custom.scss
  12. 2 1
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/get1SpatialDimensions.js
  13. 29 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getAddressTheme.js
  14. 24 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getAdministrativeDataset.js
  15. 32 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getAllStandard.js
  16. 33 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getAllTheme.js
  17. 30 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getBuildingTheme.js
  18. 34 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getCompletenessDesc.js
  19. 57 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getCompletenessQuality.js
  20. 49 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getCompletenessRatio.js
  21. 29 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getCreationDates.js
  22. 28 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getCreationDatesAndSources.js
  23. 44 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getDCATRatio.js
  24. 62 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getDCATStandard.js
  25. 27 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getDataSources.js
  26. 24 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getDatasetDescriptions.js
  27. 38 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getEPSGStandard.js
  28. 30 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getGeographicalTheme.js
  29. 45 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getISORatio.js
  30. 62 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getISOStandard.js
  31. 37 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getLinkedDataDesc.js
  32. 24 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getLinkedDataset.js
  33. 38 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getLinkedRatio.js
  34. 34 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getLogicalDesc.js
  35. 59 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getLogicalQuality.js
  36. 49 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getLogicalRatio.js
  37. 24 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getMRDSDataset.js
  38. 39 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getMRDSDesc.js
  39. 38 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getMRDSRatio.js
  40. 34 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getPositionalDesc.js
  41. 59 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getPositionalQuality.js
  42. 49 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getPositionalRatio.js
  43. 24 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getPrime2Dataset.js
  44. 37 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getPrime2Desc.js
  45. 38 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getPrime2Ratio.js
  46. 34 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getThematicDesc.js
  47. 59 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getThematicQuality.js
  48. 49 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getThematicRatio.js
  49. 24 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getThemeDescriptions.js
  50. 30 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getTransportTheme.js
  51. 29 0
      Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getWaterTheme.js
  52. 0 5
      Luzzu Dashboard/src/store/datasetDetailsCacheReducer.js
  53. 0 3
      Luzzu Dashboard/src/views/Dashboard/DataSetLarge/DataSetLarge.js
  54. 40 5
      Luzzu Dashboard/src/views/DataSetDetails/OneSpatialDetails/OneSpatialDimensionDetails.js
  55. 98 31
      Luzzu Dashboard/src/views/DataSetDetails/OneSpatialDetails/OneSpatialDimensionQualityDetails.js
  56. 125 10
      Luzzu Dashboard/src/views/Pipeline/DataSetLarge/DataSetLarge.js
  57. 22 0
      Luzzu Dashboard/src/views/Reports/DatasetCollapse.js
  58. 976 0
      Luzzu Dashboard/src/views/Reports/FilterFunctions.js
  59. 829 0
      Luzzu Dashboard/src/views/Reports/ReportFilters.js
  60. 0 4
      Luzzu Dashboard/src/views/Reports/ReportOverTime.js

BIN
Luzzu Dashboard/public/favicon.ico


BIN
Luzzu Dashboard/public/favicon2.ico


+ 1 - 1
Luzzu Dashboard/public/index.html

@@ -6,7 +6,7 @@
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
     <meta name="description" content="Dashboard for Luzzu Assessment Tool">
     <meta name="author" content="Ramneesh Vaidyambath">
-    <title>Luzzu Dashboard</title>
+    <title>ADAPT Data Quality Dashboard</title>
 
     <link rel="manifest" href="%PUBLIC_URL%/manifest.json">
     <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">

+ 3 - 3
Luzzu Dashboard/public/manifest.json

@@ -1,9 +1,9 @@
 {
-  "short_name": "Luzzu Dashboard",
-  "name": "Luzzu Dashboard",
+  "short_name": "ADAPT DATA QUALITY DASHBOARD",
+  "name": "ADAPT DATA QUALITY DASHBOARD",
   "icons": [
     {
-      "src": "./assets/img/favicon.png",
+      "src": "./assets/img/brand/adapt-logo-4.png",
       "sizes": "100x100",
       "type": "image/png"
     }

+ 9 - 3
Luzzu Dashboard/src/_nav.js

@@ -4,7 +4,7 @@ export default {
 
     {
       title: true,
-      name: 'LUZZU DATA QUALITY',
+      name: 'ADAPT DATA QUALITY DASHBOARD',
       wrapper: {            // optional wrapper object
         element: '',        // required valid HTML5 element tag
         attributes: {}        // optional valid JS object with JS API naming ex: { className: "my-class", style: { fontFamily: "Verdana" }, id: "my-id"}
@@ -24,9 +24,15 @@ export default {
 
     },
     {
-      name: 'Reporting',
-      url: '/reporting',
+      name: 'Data Quality',
+      url: '/quality',
       icon: 'icon-chart',
+    },
+    {
+      name: 'Reports',
+      url: '/reports',
+      icon: 'icon-list',
+
     }
   ],
 };

BIN
Luzzu Dashboard/src/assets/img/brand/adapt-logo-4.png


BIN
Luzzu Dashboard/src/assets/img/brand/petswitchthumb.webp


+ 1 - 3
Luzzu Dashboard/src/containers/DefaultLayout/DefaultFooter.js

@@ -17,9 +17,7 @@ class DefaultFooter extends Component {
 
     return (
       <React.Fragment>
-        <span><a href="https://luzzu.adaptcentre.ie/">Luzzu Framework</a></span>
-        <span className="ml-auto">Developed by <a href="mailto: ramneesh.vaidyambath2@mail.dcu.ie">Ramneesh Vaidyambath</a></span>
-      </React.Fragment>
+    </React.Fragment>
     );
   }
 }

+ 3 - 2
Luzzu Dashboard/src/containers/DefaultLayout/DefaultHeader.js

@@ -5,6 +5,7 @@ import {  Nav} from 'reactstrap';
 import PropTypes from 'prop-types';
 
 import { AppNavbarBrand, AppSidebarToggler } from '@coreui/react';
+import adapt from '../../assets/img/brand/adapt-logo-4.png'
 import logo from '../../assets/img/brand/logo.svg'
 import sygnet from '../../assets/img/brand/icon.svg'
 
@@ -24,8 +25,8 @@ class DefaultHeader extends Component {
             <React.Fragment>
                 <AppSidebarToggler className="d-lg-none" display="md" mobile />
                 <AppNavbarBrand
-                    full={{ src: logo, width: 89, height: 25, alt: 'Luzzu Logo' }}
-                    minimized={{ src: sygnet, width: 30, height: 30, alt: 'Luzzu Logo' }}/>
+                    full={{ src: adapt, width: 69, height: 53, alt: 'Luzzu Logo' }}
+                    minimized={{ src: adapt, width: 30, height: 30, alt: 'Luzzu Logo' }}/>
                 <AppSidebarToggler className="d-md-down-none" display="lg" />
 
                 <Nav className="ml-auto" navbar>

+ 3 - 1
Luzzu Dashboard/src/routes.js

@@ -5,6 +5,7 @@ const Dashboard = React.lazy(() => import('./views/Dashboard'));
 const Pipeline = React.lazy(() => import('./views/Pipeline'));
 const Login = React.lazy(() => import('./views/Login'));
 const Reporting = React.lazy(() => import('./views/Reports/ReportList'));
+const Reports = React.lazy(() => import('./views/Reports/ReportFilters'));
 const DataSetDetails = React.lazy(() => import('./views/DataSetDetails'));
 const OneSpatialDetails = React.lazy(() => import('./views/DataSetDetails/OneSpatialDetails/OneSpatialDetails'));
 const OneSpatialDimensionDetails = React.lazy(() => import('./views/DataSetDetails/OneSpatialDetails/OneSpatialDimensionDetails'));
@@ -16,7 +17,8 @@ const routes = [
   { path: '/login', exact: true, name: 'Login', component: Login },
   { path: '/pipeline', exact: true, name: 'Pipeline', component: Pipeline },
   { path: '/linkeddata', exact: true, name: 'Linked Data', component: Dashboard },
-  { path: '/reporting', exact: true, name: 'Reporting', component: Reporting },
+  { path: '/quality', exact: true, name: 'Reporting', component: Reporting },
+  { path: '/reports', exact: true, name: 'Quality', component: Reports },
   { path: '/onespatial/:datasetID', exact: true, name: '1Spatial', component: OneSpatialDetails },
   { path: '/linkeddata/:datasetID', exact : true, name: 'Assessment Details', component: DataSetDetails },
   { path: '/linkeddata/:datasetID/:dimension', exact : true, name: 'Dimension Details', component: DimensionDetails },

+ 57 - 0
Luzzu Dashboard/src/scss/_custom.scss

@@ -121,3 +121,60 @@ select {
   border: 1px solid #ccc;
   border-radius: 3px;
 }
+
+.report-table-width{
+  max-width: 80%;
+}
+
+.btn-primary:hover {
+color: #fff !important;
+text-decoration: none;
+}
+
+sidebar .nav-title-header {
+    padding: 0.75rem 1rem;
+    font-size: 100%;
+    font-weight: 700;
+    color: #e4e7ea;
+    text-transform: uppercase;
+}
+
+.btn-circle {
+    width: 30px;
+    height: 30px;
+    padding: 1px 0px;
+    border-radius: 15px;
+    text-align: center;
+    line-height: 1.42857;
+    float: right;
+    font-size: 20px;
+}
+
+.tooltip-inner{
+  font-size: 15px;
+}
+
+.dropdown-menu {
+  max-height: 400px;
+  overflow-y: scroll;
+}
+
+.btn-clear {
+    color: #23282c;
+    background-color: #fff;
+    border-color: #fff;
+}
+
+.sidebar-minimizer::before{
+  visibility: hidden;
+}
+
+th{
+  min-width: 112px;
+}
+
+.headstick{
+  position: -webkit-sticky;
+  position: sticky;
+  top: 80px;
+}

+ 2 - 1
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/get1SpatialDimensions.js

@@ -16,12 +16,13 @@ PREFIX pro: <http://purl.org/hpi/patchr#>
 
 export const  get1SpatialDimensions = (dataGraph) =>{
         let query = `
-SELECT DISTINCT ?cat ?Metric ?dimInstance ?dim
+SELECT DISTINCT ?cat ?Metric ?dimInstance ?dim ?subDataset
         FROM NAMED  
         <${dataGraph}>
         WHERE {
             {GRAPH ?QualityGraph{?ObservationURI a daq:Observation}}.
             {GRAPH ?QualityGraph {?ObservationURI daq:metric ?Metric} }.
+            {GRAPH ?QualityGraph {?ObservationURI daq:computedOn ?subDataset} }.
             {GRAPH ?QualityGraph {?cat a  <http://data.example.com/category/Oracle>} }.
             {GRAPH ?QualityGraph {?cat ?p  ?dimInstance} }.
             {GRAPH ?QualityGraph {?dimInstance a ?dim} }.

+ 29 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getAddressTheme.js

@@ -0,0 +1,29 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+        `;
+
+
+
+export const  getAddressTheme = () =>{
+        let query = `
+select   ?DATASET ?SUBDATASET ?THEME ?MODIFICATION_DATE_DC WHERE {
+?ds dcat:hasPart ?sds.
+?ds  dc:title ?DATASET.
+?sds  a dcat:Dataset.  
+?sds  dc:title ?SUBDATASET.
+?sds  dct:modified ?MODIFICATION_DATE_DC.
+?sds  dcat:theme <http://purl.org/eis/vocab/unggim-data-themes#Addresses>.
+<http://purl.org/eis/vocab/unggim-data-themes#Addresses> skos:prefLabel ?THEME.
+} 
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getAddressTheme};

+ 24 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getAdministrativeDataset.js

@@ -0,0 +1,24 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+prefix prov:  <http://www.w3.org/ns/prov#>
+        `;
+
+
+
+export const  getAdministrativeDataset = () =>{
+        let query = `
+select ?SUBDATASET  WHERE {
+<http://ontologies.adaptcentre.ie/dataset-hierarchy#administrative-unit> dcat:hasPart ?sds.
+?sds  dc:title ?SUBDATASET.
+} 
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getAdministrativeDataset};

+ 32 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getAllStandard.js

@@ -0,0 +1,32 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+        `;
+
+
+
+export const  getAllStandard = () =>{
+        let query = `
+select   ?STANDARD_CONFORMANCE ?STANDARD_CONFORMANCE2 ?DATASET ?SUBDATASET ?SUBDATASET_DESCRIPTION WHERE {
+?ds dcat:hasPart ?sds.
+?ds  dc:title ?DATASET.
+#?ds  dc:description ?DATASET_DESCRIPTION.
+?sds  a dcat:Dataset.  
+?sds  dc:title ?SUBDATASET.
+?sds  dct:conformsTo <http://www.opengis.net/def/crs/EPSG/0/4326>.
+?sds  dct:conformsTo <http://ontologies.adaptcentre.ie/standard#geoDCAT-AP>.
+?sds  dc:description ?SUBDATASET_DESCRIPTION.
+  <http://www.opengis.net/def/crs/EPSG/0/4326> dct:identifer ?STANDARD_CONFORMANCE.
+   <http://ontologies.adaptcentre.ie/standard#geoDCAT-AP> dct:title ?STANDARD_CONFORMANCE2.
+} 
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getAllStandard};

+ 33 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getAllTheme.js

@@ -0,0 +1,33 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+        `;
+
+
+
+export const  getAllTheme = () =>{
+        let query = `
+select   ?DATASET ?SUBDATASET  ?SUBDATASET_DESCRIPTION ?CATALOG_MODIFICATION_DATE ?MODIFICATION_DATE_DC WHERE {
+?ds dcat:hasPart ?sds.
+?ds  dc:title ?DATASET.
+?sds  a dcat:Dataset.  
+?sds  dc:title ?SUBDATASET.
+?sds  dcat:theme <http://purl.org/eis/vocab/unggim-data-themes#TransportNetworks>.
+?sds  dcat:theme <http://purl.org/eis/vocab/unggim-data-themes#GeographicalNames>.
+?sds  dcat:theme <http://purl.org/eis/vocab/unggim-data-themes#Buildings-Settlements>.
+?sds  dcat:theme <http://purl.org/eis/vocab/unggim-data-themes#Addresses>.
+?sds  dcat:theme <http://purl.org/eis/vocab/unggim-data-themes#Water>.
+?sds  dct:modified ?MODIFICATION_DATE_DC.
+
+} 
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getAllTheme};

+ 30 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getBuildingTheme.js

@@ -0,0 +1,30 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+        `;
+
+
+
+export const  getBuildingTheme = () =>{
+        let query = `
+select   ?DATASET ?SUBDATASET ?THEME ?MODIFICATION_DATE_DC WHERE {
+?ds dcat:hasPart ?sds.
+?ds  dc:title ?DATASET.
+?sds  a dcat:Dataset.  
+?sds  dc:title ?SUBDATASET.
+?sds  dct:modified ?MODIFICATION_DATE_DC.
+?sds  dcat:theme <http://purl.org/eis/vocab/unggim-data-themes#Buildings-Settlements>.
+<http://purl.org/eis/vocab/unggim-data-themes#Buildings-Settlements> skos:prefLabel ?THEME.
+} 
+
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getBuildingTheme};

+ 34 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getCompletenessDesc.js

@@ -0,0 +1,34 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+
+        `;
+
+
+
+export const  getCompletenessDesc = () =>{
+        let query = `
+SELECT DISTINCT ?DIMENSION ?DIMENSION_DESCRIPTION
+WHERE {
+    <http://data.example.com/dimension/Completeness> <http://www.w3.org/2000/01/rdf-schema#label> ?DIMENSION.
+    <http://data.example.com/dimension/Completeness> <http://www.w3.org/2000/01/rdf-schema#comment> ?DIMENSION_DESCRIPTION.
+}
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getCompletenessDesc};

+ 57 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getCompletenessQuality.js

@@ -0,0 +1,57 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+        `;
+
+
+
+export const  getCompletenessQuality = () =>{
+        let query = `
+SELECT DISTINCT ?DATASET ?DIMENSION (ROUND(?avg*100000)/1000 AS ?CONFORMANCE_RATIO) ?LAST_ASSESSMENT_DATE_DM
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://data.example.com/dimension/Completeness>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    <http://data.example.com/dimension/Completeness> <http://www.w3.org/2000/01/rdf-schema#label> ?DIMENSION.
+    GRAPH ?QualityGraph {?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph {?obs <http://purl.org/linked-data/sdmx/2009/dimension#timePeriod> ?LAST_ASSESSMENT_DATE_DM.} 
+    ?ds dcat:hasPart ?sds.
+    ?ds  dc:title ?DATASET.
+    FILTER ( contains( str(?LAST_ASSESSMENT_DATE_DM), "2019-10-23 21:13:32.0" ) )  
+{
+SELECT DISTINCT (AVG(xsd:float(?result)) AS ?avg)
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://data.example.com/dimension/Completeness>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    GRAPH ?QualityGraph {?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph {?obs <http://purl.org/linked-data/sdmx/2009/dimension#timePeriod> ?LAST_ASSESSMENT_DATE_DM.}
+    ?ds dcat:hasPart ?sds.
+    ?ds  dc:title ?DATASET.
+    FILTER ( contains( str(?LAST_ASSESSMENT_DATE_DM), "2019-10-23 21:13:32.0" ) )  
+ }
+  }
+}
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getCompletenessQuality};

+ 49 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getCompletenessRatio.js

@@ -0,0 +1,49 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+        `;
+
+
+
+export const  getCompletenessRatio = () =>{
+        let query = `
+SELECT DISTINCT ?DATASET ?SUBDATASET ?LABEL ?METRIC_DESCRIPTION ( xsd:float(?result)*100 AS ?ASSESSMENT_VALUE) ?LAST_ASSESSMENT_DATE_DM
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://data.example.com/dimension/Completeness>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    GRAPH ?QualityGraph { ?METRIC a  ?metric_type.}
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#label> ?LABEL.
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#comment> ?METRIC_DESCRIPTION.
+    GRAPH ?QualityGraph {?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph {?obs <http://purl.org/linked-data/sdmx/2009/dimension#timePeriod> ?LAST_ASSESSMENT_DATE_DM.} 
+    ?sds  dc:title ?SUBDATASET.
+    ?sds  dct:modified ?MODIFICATION_DATE.
+    ?ds dcat:hasPart ?sds.
+    ?ds  dc:title ?DATASET.
+    FILTER ( contains( str(?LAST_ASSESSMENT_DATE_DM), "2019-10-23 21:13:32.0" )  )
+
+ }
+
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getCompletenessRatio};

+ 29 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getCreationDates.js

@@ -0,0 +1,29 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+prefix prov:  <http://www.w3.org/ns/prov#>
+        `;
+
+
+
+export const  getCreationDates = () =>{
+        let query = `
+select ?CREATION_DATE ?MODIFICATION_DATE ?DATASET ?SUBDATASET WHERE {
+?ds dcat:hasPart ?sds.
+?ds  dc:title ?DATASET.
+?sds  a dcat:Dataset.  
+?sds  dc:title ?SUBDATASET.
+?sds  dct:created ?CREATION_DATE.
+?sds  dct:modified ?MODIFICATION_DATE.
+} 
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getCreationDates};

+ 28 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getCreationDatesAndSources.js

@@ -0,0 +1,28 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+prefix prov:  <http://www.w3.org/ns/prov#>
+        `;
+
+
+
+export const  getCreationDatesAndSources = () =>{
+        let query = `
+select ?SOURCE_NAME ?CREATION_DATE ?MODIFICATION_DATE ?DATASET WHERE {
+?sds  a dcat:Dataset.  
+?sds  dc:title ?DATASET.
+?sds  prov:wasDerivedFrom ?DATASET_SOURCE.
+?DATASET_SOURCE dc:title ?SOURCE_NAME.  
+?sds  dct:created ?CREATION_DATE.
+?sds  dct:modified ?MODIFICATION_DATE.
+} 
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getCreationDatesAndSources};

+ 44 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getDCATRatio.js

@@ -0,0 +1,44 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+        `;
+
+
+
+export const  getDCATRatio = () =>{
+        let query = `
+SELECT DISTINCT ?SUBDATASET ?LABEL ?METRIC_DESCRIPTION (xsd:float(?result)*100 AS ?ASSESSMENT_VALUE) ?LAST_ASSESSMENT_DATE_DM
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://purl.org/eis/vocab/dqm#OGCcomplianceDimension>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+  GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    GRAPH ?QualityGraph { ?METRIC a  ?metric_type.}
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#label> ?LABEL.
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#comment> ?METRIC_DESCRIPTION.
+    ?sds  dc:title ?SUBDATASET.
+  ?sds  dct:modified ?LAST_ASSESSMENT_DATE_DM.
+
+ }
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getDCATRatio};

+ 62 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getDCATStandard.js

@@ -0,0 +1,62 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+
+        `;
+
+
+
+export const  getDCATStandard = () =>{
+        let query = `
+
+SELECT DISTINCT  ?DATASET ?SUBDATASET (ROUND(?avg*100000)/1000 AS ?CONFORMANCE_RATIO) ?LAST_ASSESSMENT_DATE_DM
+WHERE {
+ GRAPH ?QualityGraph { ?comp a  <http://purl.org/eis/vocab/dqm#OGCcomplianceDimension>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+	GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    GRAPH ?QualityGraph { ?METRIC a  ?metric_type.}
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#label> ?LABEL.
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#comment> ?METRIC_DESCRIPTION.
+    ?sds  dc:title ?SUBDATASET.
+	?sds  dct:modified ?LAST_ASSESSMENT_DATE_DM.
+    ?ds dcat:hasPart ?sds.
+	?ds  dc:title ?DATASET.
+  {
+SELECT (AVG(?result) AS ?avg)  (MIN(?result) AS ?min) 
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://purl.org/eis/vocab/dqm#OGCcomplianceDimension>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+	GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    GRAPH ?QualityGraph { ?METRIC a  ?metric_type.}
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#label> ?LABEL.
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#comment> ?METRIC_DESCRIPTION.
+    ?sds  dc:title ?SUBDATASET.
+	?sds  dct:modified ?LAST_ASSESSMENT_DATE_DM.
+    }
+}
+}
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getDCATStandard};

+ 27 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getDataSources.js

@@ -0,0 +1,27 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+prefix prov:  <http://www.w3.org/ns/prov#>
+        `;
+
+
+
+export const  getDataSources = () =>{
+        let query = `
+select ?DATASET ?MODIFICATION_DATE ?SOURCE_NAME WHERE {
+?sds  a dcat:Dataset.  
+?sds  dc:title ?DATASET.
+?sds  prov:wasDerivedFrom ?DATASET_SOURCE.
+?DATASET_SOURCE dc:title ?SOURCE_NAME.  
+?sds  dct:modified ?MODIFICATION_DATE.
+} 
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getDataSources};

+ 24 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getDatasetDescriptions.js

@@ -0,0 +1,24 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+        `;
+
+
+
+export const  getDatasetDescriptions = () =>{
+        let query = `
+select ?DATASET ?DATASET_DESCRIPTION WHERE {
+?sds  a dcat:Dataset.  
+?sds  dc:title ?DATASET.
+?sds dc:description ?DATASET_DESCRIPTION.
+} 
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getDatasetDescriptions};

+ 38 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getEPSGStandard.js

@@ -0,0 +1,38 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#>
+prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
+        `;
+
+
+
+export const  getEPSGStandard = () =>{
+        let query = `
+select ?DATASET ?SUBDATASET ?MODIFICATION_DATE_DC ?STANDARD_CONFORMANCE WHERE {
+?ds dcat:hasPart ?sds.
+?ds  dc:title ?DATASET.
+?sds  a dcat:Dataset.  
+?sds  dc:title ?SUBDATASET.
+?sds  dct:conformsTo <http://www.opengis.net/def/crs/EPSG/0/2157>.
+  <http://www.opengis.net/def/crs/EPSG/0/2157> dct:identifer ?STANDARD_CONFORMANCE.
+?sds  dct:modified ?MODIFICATION_DATE_DC.
+} 
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getEPSGStandard};

+ 30 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getGeographicalTheme.js

@@ -0,0 +1,30 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+        `;
+
+
+
+export const  getGeographicalTheme = () =>{
+        let query = `
+select   ?DATASET ?SUBDATASET ?THEME ?MODIFICATION_DATE_DC WHERE {
+?ds dcat:hasPart ?sds.
+?ds  dc:title ?DATASET.
+?sds  a dcat:Dataset.  
+?sds  dc:title ?SUBDATASET.
+?sds  dct:modified ?MODIFICATION_DATE_DC.
+?sds  dcat:theme <http://purl.org/eis/vocab/unggim-data-themes#GeographicalNames>.
+<http://purl.org/eis/vocab/unggim-data-themes#GeographicalNames> skos:prefLabel ?THEME.
+} 
+
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getGeographicalTheme};

+ 45 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getISORatio.js

@@ -0,0 +1,45 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+        `;
+
+
+
+export const  getISORatio = () =>{
+        let query = `
+
+SELECT DISTINCT ?SUBDATASET ?LABEL ?METRIC_DESCRIPTION (xsd:float(?result)*100 AS ?ASSESSMENT_VALUE) ?LAST_ASSESSMENT_DATE_DM
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://purl.org/eis/vocab/dqm#ISOcomplianceDimension>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    GRAPH ?QualityGraph { ?METRIC a  ?metric_type.}
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#label> ?LABEL.
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#comment> ?METRIC_DESCRIPTION.
+    ?sds  dc:title ?SUBDATASET.
+    ?sds  dct:modified ?LAST_ASSESSMENT_DATE_DM.
+
+ }
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getISORatio};

+ 62 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getISOStandard.js

@@ -0,0 +1,62 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+        `;
+
+
+
+export const  getISOStandard = () =>{
+        let query = `
+
+SELECT DISTINCT  ?DATASET ?SUBDATASET (ROUND(?avg*100000)/1000 AS ?CONFORMANCE_RATIO) ?LAST_ASSESSMENT_DATE_DM
+WHERE {
+ GRAPH ?QualityGraph { ?comp a  <http://purl.org/eis/vocab/dqm#ISOcomplianceDimension>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    GRAPH ?QualityGraph { ?METRIC a  ?metric_type.}
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#label> ?LABEL.
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#comment> ?METRIC_DESCRIPTION.
+    ?sds  dc:title ?SUBDATASET.
+    ?sds  dct:modified ?LAST_ASSESSMENT_DATE_DM.
+    ?ds dcat:hasPart ?sds.
+    ?ds  dc:title ?DATASET.
+  {
+SELECT (AVG(?result) AS ?avg)  (MIN(?result) AS ?min) 
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://purl.org/eis/vocab/dqm#ISOcomplianceDimension>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    GRAPH ?QualityGraph { ?METRIC a  ?metric_type.}
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#label> ?LABEL.
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#comment> ?METRIC_DESCRIPTION.
+    ?sds  dc:title ?SUBDATASET.
+    ?sds  dct:modified ?LAST_ASSESSMENT_DATE_DM.
+    }
+}
+}
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getISOStandard};

+ 37 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getLinkedDataDesc.js

@@ -0,0 +1,37 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#>
+prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
+        `;
+
+
+
+export const  getLinkedDataDesc = () =>{
+        let query = `
+        SELECT DISTINCT ?title ?desc ?modified ?derived
+            WHERE
+            {
+            <http://osi.ie/linked-data> dc:title ?title .
+            <http://osi.ie/linked-data> dc:description ?desc .
+            <http://osi.ie/linked-data> dct:modified ?modified .
+            <http://osi.ie/linked-data> prov:wasDerivedFrom ?derived .
+            }
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getLinkedDataDesc};

+ 24 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getLinkedDataset.js

@@ -0,0 +1,24 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+prefix prov:  <http://www.w3.org/ns/prov#>
+        `;
+
+
+
+export const  getLinkedDataset = () =>{
+        let query = `
+select ?SUBDATASET  WHERE {
+<http://ontologies.adaptcentre.ie/dataset-hierarchy#linked-data> dcat:hasPart ?sds.
+?sds  dc:title ?SUBDATASET.
+} 
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getLinkedDataset};

+ 38 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getLinkedRatio.js

@@ -0,0 +1,38 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+        `;
+
+
+
+export const  getLinkedRatio = () =>{
+        let query = `
+SELECT ?DATASET (?c1/?c2*100 AS ?CONFORMANCE_PERCENTAGE) WHERE {
+
+<http://ontologies.adaptcentre.ie/dataset-hierarchy#linked-data> dc:title ?DATASET.
+# first query
+{
+  select   (count(distinct ?sds) as ?c1)   WHERE {
+	<http://ontologies.adaptcentre.ie/dataset-hierarchy#linked-data> dcat:hasPart ?sds.
+  } 
+}
+
+# second query
+{
+  select   (count(distinct ?sds2) as ?c2)   WHERE {
+   <http://ontologies.adaptcentre.ie/dataset-hierarchy#linked-data> dcat:hasPart ?sds2.
+   ?sds2  dct:conformsTo <http://www.opengis.net/def/crs/EPSG/0/4326>.
+  } 
+}
+}
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getLinkedRatio};

+ 34 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getLogicalDesc.js

@@ -0,0 +1,34 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+
+        `;
+
+
+
+export const  getLogicalDesc = () =>{
+        let query = `
+SELECT DISTINCT ?DIMENSION ?DIMENSION_DESCRIPTION
+WHERE {
+    <http://data.example.com/dimension/LogicalConsistency> <http://www.w3.org/2000/01/rdf-schema#label> ?DIMENSION.
+    <http://data.example.com/dimension/LogicalConsistency> <http://www.w3.org/2000/01/rdf-schema#comment> ?DIMENSION_DESCRIPTION.
+}
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getLogicalDesc};

+ 59 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getLogicalQuality.js

@@ -0,0 +1,59 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+
+        `;
+
+
+
+export const  getLogicalQuality = () =>{
+        let query = `
+SELECT DISTINCT ?DATASET ?DIMENSION (ROUND(?avg*100000)/1000 AS ?CONFORMANCE_RATIO) ?LAST_ASSESSMENT_DATE_DM
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://data.example.com/dimension/LogicalConsistency>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    <http://data.example.com/dimension/LogicalConsistency> <http://www.w3.org/2000/01/rdf-schema#label> ?DIMENSION.
+    GRAPH ?QualityGraph {?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph {?obs <http://purl.org/linked-data/sdmx/2009/dimension#timePeriod> ?LAST_ASSESSMENT_DATE_DM.} 
+    ?ds dcat:hasPart ?sds.
+    ?ds  dc:title ?DATASET.
+    FILTER ( contains( str(?LAST_ASSESSMENT_DATE_DM), "2019-10-23 21:13:32.0" ) )  
+{
+SELECT DISTINCT (AVG(xsd:float(?result)) AS ?avg)
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://data.example.com/dimension/LogicalConsistency>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    GRAPH ?QualityGraph {?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph {?obs <http://purl.org/linked-data/sdmx/2009/dimension#timePeriod> ?LAST_ASSESSMENT_DATE_DM.}
+    ?ds dcat:hasPart ?sds.
+    ?ds  dc:title ?DATASET.
+    FILTER ( contains( str(?LAST_ASSESSMENT_DATE_DM), "2019-10-23 21:13:32.0" ) )  
+ }
+  }
+}
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getLogicalQuality};

+ 49 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getLogicalRatio.js

@@ -0,0 +1,49 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+
+        `;
+
+
+
+export const  getLogicalRatio = () =>{
+        let query = `
+SELECT DISTINCT ?DATASET ?SUBDATASET ?LABEL ?METRIC_DESCRIPTION ( xsd:float(?result)*100 AS ?ASSESSMENT_VALUE) ?LAST_ASSESSMENT_DATE_DM
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://data.example.com/dimension/Completeness>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    GRAPH ?QualityGraph { ?METRIC a  ?metric_type.}
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#label> ?LABEL.
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#comment> ?METRIC_DESCRIPTION.
+    GRAPH ?QualityGraph {?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph {?obs <http://purl.org/linked-data/sdmx/2009/dimension#timePeriod> ?LAST_ASSESSMENT_DATE_DM.} 
+    ?sds  dc:title ?SUBDATASET.
+    ?sds  dct:modified ?MODIFICATION_DATE.
+    ?ds dcat:hasPart ?sds.
+    ?ds  dc:title ?DATASET.
+    FILTER ( contains( str(?LAST_ASSESSMENT_DATE_DM), "2019-10-23 21:13:32.0" )  )
+
+ }
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getLogicalRatio};

+ 24 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getMRDSDataset.js

@@ -0,0 +1,24 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+prefix prov:  <http://www.w3.org/ns/prov#>
+        `;
+
+
+
+export const  getMRDSDataset = () =>{
+        let query = `
+select ?SUBDATASET  WHERE {
+<http://ontologies.adaptcentre.ie/dataset-hierarchy#mrds> dcat:hasPart ?sds.
+?sds  dc:title ?SUBDATASET.
+} 
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getMRDSDataset};

+ 39 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getMRDSDesc.js

@@ -0,0 +1,39 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#>
+prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
+        `;
+
+
+
+export const  getMRDSDesc = () =>{
+        let query = `
+
+
+        SELECT DISTINCT ?title ?desc ?modified ?derived
+            WHERE
+            {
+            <http://osi.ie/mrds> dc:title ?title .
+            <http://osi.ie/mrds> dc:description ?desc .
+            <http://osi.ie/mrds> dct:modified ?modified .
+            <http://osi.ie/mrds> prov:wasDerivedFrom ?derived .
+            }
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getMRDSDesc};

+ 38 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getMRDSRatio.js

@@ -0,0 +1,38 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+        `;
+
+
+
+export const  getMRDSRatio = () =>{
+        let query = `
+SELECT ?DATASET (?c1/?c2*100 AS ?CONFORMANCE_PERCENTAGE) WHERE {
+
+<http://ontologies.adaptcentre.ie/dataset-hierarchy#mrds> dc:title ?DATASET.
+# first query
+{
+  select   (count(distinct ?sds) as ?c1)   WHERE {
+  <http://ontologies.adaptcentre.ie/dataset-hierarchy#mrds> dcat:hasPart ?sds.
+  } 
+}
+
+# second query
+{
+  select   (count(distinct ?sds2) as ?c2)   WHERE {
+   <http://ontologies.adaptcentre.ie/dataset-hierarchy#mrds> dcat:hasPart ?sds2.
+   ?sds2  dct:conformsTo <http://www.opengis.net/def/crs/EPSG/0/4326>.
+  } 
+}
+
+}
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getMRDSRatio};

+ 34 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getPositionalDesc.js

@@ -0,0 +1,34 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+
+        `;
+
+
+
+export const  getPositionalDesc = () =>{
+        let query = `
+SELECT DISTINCT ?DIMENSION ?DIMENSION_DESCRIPTION
+WHERE {
+    <http://data.example.com/dimension/PositionalAccuracy> <http://www.w3.org/2000/01/rdf-schema#label> ?DIMENSION.
+    <http://data.example.com/dimension/PositionalAccuracy> <http://www.w3.org/2000/01/rdf-schema#comment> ?DIMENSION_DESCRIPTION.
+}
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getPositionalDesc};

+ 59 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getPositionalQuality.js

@@ -0,0 +1,59 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+
+        `;
+
+
+
+export const  getPositionalQuality = () =>{
+        let query = `
+SELECT DISTINCT ?DATASET ?DIMENSION (ROUND(?avg*100000)/1000 AS ?CONFORMANCE_RATIO) ?LAST_ASSESSMENT_DATE_DM
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://data.example.com/dimension/PositionalAccuracy>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    <http://data.example.com/dimension/PositionalAccuracy> <http://www.w3.org/2000/01/rdf-schema#label> ?DIMENSION.
+    GRAPH ?QualityGraph {?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph {?obs <http://purl.org/linked-data/sdmx/2009/dimension#timePeriod> ?LAST_ASSESSMENT_DATE_DM.} 
+    ?ds dcat:hasPart ?sds.
+    ?ds  dc:title ?DATASET.
+    FILTER ( contains( str(?LAST_ASSESSMENT_DATE_DM), "2019-10-23 21:13:32.0" ) )  
+{
+SELECT DISTINCT (AVG(xsd:float(?result)) AS ?avg)
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://data.example.com/dimension/PositionalAccuracy>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    GRAPH ?QualityGraph {?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph {?obs <http://purl.org/linked-data/sdmx/2009/dimension#timePeriod> ?LAST_ASSESSMENT_DATE_DM.}
+    ?ds dcat:hasPart ?sds.
+    ?ds  dc:title ?DATASET.
+    FILTER ( contains( str(?LAST_ASSESSMENT_DATE_DM), "2019-10-23 21:13:32.0" ) )  
+ }
+  }
+}
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getPositionalQuality};

+ 49 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getPositionalRatio.js

@@ -0,0 +1,49 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+
+        `;
+
+
+
+export const  getPositionalRatio = () =>{
+        let query = `
+SELECT DISTINCT ?DATASET ?SUBDATASET ?LABEL ?METRIC_DESCRIPTION ( xsd:float(?result)*100 AS ?ASSESSMENT_VALUE) ?LAST_ASSESSMENT_DATE_DM
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://data.example.com/dimension/PositionalAccuracy>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    GRAPH ?QualityGraph { ?METRIC a  ?metric_type.}
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#label> ?LABEL.
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#comment> ?METRIC_DESCRIPTION.
+    GRAPH ?QualityGraph {?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph {?obs <http://purl.org/linked-data/sdmx/2009/dimension#timePeriod> ?LAST_ASSESSMENT_DATE_DM.} 
+    ?sds  dc:title ?SUBDATASET.
+    ?sds  dct:modified ?MODIFICATION_DATE.
+    ?ds dcat:hasPart ?sds.
+    ?ds  dc:title ?DATASET.
+    FILTER ( contains( str(?LAST_ASSESSMENT_DATE_DM), "2019-10-23 21:13:32.0" )  )
+
+ }
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getPositionalRatio};

+ 24 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getPrime2Dataset.js

@@ -0,0 +1,24 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+prefix prov:  <http://www.w3.org/ns/prov#>
+        `;
+
+
+
+export const  getPrime2Dataset = () =>{
+        let query = `
+select ?SUBDATASET  WHERE {
+<http://ontologies.adaptcentre.ie/dataset-hierarchy#prime2> dcat:hasPart ?sds.
+?sds  dc:title ?SUBDATASET.
+} 
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getPrime2Dataset};

+ 37 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getPrime2Desc.js

@@ -0,0 +1,37 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#>
+prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
+        `;
+
+
+
+export const  getPrime2Desc = () =>{
+        let query = `
+        SELECT DISTINCT ?title ?desc ?modified ?derived
+            WHERE
+            {
+            <http://osi.ie/prime2> dc:title ?title .
+            <http://osi.ie/prime2> dc:description ?desc .
+            <http://osi.ie/prime2> dct:modified ?modified .
+            <http://osi.ie/prime2> prov:wasDerivedFrom ?derived .
+            }
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getPrime2Desc};

+ 38 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getPrime2Ratio.js

@@ -0,0 +1,38 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+        `;
+
+
+
+export const  getPrime2Ratio = () =>{
+        let query = `
+SELECT ?DATASET (?c1/?c2*100 AS ?CONFORMANCE_PERCENTAGE) WHERE {
+
+<http://ontologies.adaptcentre.ie/dataset-hierarchy#prime2> dc:title ?DATASET.
+# first query
+{
+  select   (count(distinct ?sds) as ?c1)   WHERE {
+  <http://ontologies.adaptcentre.ie/dataset-hierarchy#prime2> dcat:hasPart ?sds.
+  } 
+}
+
+# second query
+{
+  select   (count(distinct ?sds2) as ?c2)   WHERE {
+   <http://ontologies.adaptcentre.ie/dataset-hierarchy#prime2> dcat:hasPart ?sds2.
+   ?sds2  dct:conformsTo <http://www.opengis.net/def/crs/EPSG/0/4326>.
+  } 
+}
+
+}
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getPrime2Ratio};

+ 34 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getThematicDesc.js

@@ -0,0 +1,34 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+
+        `;
+
+
+
+export const  getThematicDesc = () =>{
+        let query = `
+SELECT DISTINCT ?DIMENSION ?DIMENSION_DESCRIPTION
+WHERE {
+    <http://data.example.com/dimension/ThematicAccuracy> <http://www.w3.org/2000/01/rdf-schema#label> ?DIMENSION.
+    <http://data.example.com/dimension/ThematicAccuracy> <http://www.w3.org/2000/01/rdf-schema#comment> ?DIMENSION_DESCRIPTION.
+}
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getThematicDesc};

+ 59 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getThematicQuality.js

@@ -0,0 +1,59 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+
+        `;
+
+
+
+export const  getThematicQuality = () =>{
+        let query = `
+SELECT DISTINCT ?DATASET ?DIMENSION (ROUND(?avg*100000)/1000 AS ?CONFORMANCE_RATIO) ?LAST_ASSESSMENT_DATE_DM
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://data.example.com/dimension/ThematicAccuracy>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    <http://data.example.com/dimension/ThematicAccuracy> <http://www.w3.org/2000/01/rdf-schema#label> ?DIMENSION.
+    GRAPH ?QualityGraph {?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph {?obs <http://purl.org/linked-data/sdmx/2009/dimension#timePeriod> ?LAST_ASSESSMENT_DATE_DM.} 
+    ?ds dcat:hasPart ?sds.
+    ?ds  dc:title ?DATASET.
+    FILTER ( contains( str(?LAST_ASSESSMENT_DATE_DM), "2019-10-23 21:13:32.0" ) )  
+{
+SELECT DISTINCT (AVG(xsd:float(?result)) AS ?avg)
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://data.example.com/dimension/LogicalConsistency>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    GRAPH ?QualityGraph {?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph {?obs <http://purl.org/linked-data/sdmx/2009/dimension#timePeriod> ?LAST_ASSESSMENT_DATE_DM.}
+    ?ds dcat:hasPart ?sds.
+    ?ds  dc:title ?DATASET.
+    FILTER ( contains( str(?LAST_ASSESSMENT_DATE_DM), "2019-10-23 21:13:32.0" ) )  
+ }
+  }
+}
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getThematicQuality};

+ 49 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getThematicRatio.js

@@ -0,0 +1,49 @@
+//© 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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX daq: <http://purl.org/eis/vocab/daq#>
+PREFIX sdma: <http://purl.org/linked-data/sdmx/2009/dimension#>
+PREFIX cube: <http://purl.org/linked-data/cube#>
+PREFIX prov: <http://www.w3.org/ns/prov#>
+PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
+PREFIX sdm: <http://standard.k-history.kr/resource/>
+PREFIX pr: <http://purl.org/ontology/prv/core#>
+PREFIX pro: <http://purl.org/hpi/patchr#>
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dc:  <http://purl.org/dc/elements/1.1/>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix xsd:    <http://www.w3.org/2001/XMLSchema#> 
+
+        `;
+
+
+
+export const  getThematicRatio = () =>{
+        let query = `
+SELECT DISTINCT ?DATASET ?SUBDATASET ?LABEL ?METRIC_DESCRIPTION ( xsd:float(?result)*100 AS ?ASSESSMENT_VALUE) ?LAST_ASSESSMENT_DATE_DM
+WHERE {
+    GRAPH ?QualityGraph { ?comp a  <http://data.example.com/dimension/ThematicAccuracy>}
+    GRAPH ?QualityGraph { ?comp ?a  ?METRIC}
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#metric> ?METRIC.} 
+    GRAPH ?QualityGraph { ?obs a  <http://purl.org/eis/vocab/daq#Observation>.} 
+    GRAPH ?QualityGraph { ?obs <http://purl.org/eis/vocab/daq#computedOn> ?sds.  } 
+    GRAPH ?QualityGraph { ?METRIC a  ?metric_type.}
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#label> ?LABEL.
+    ?metric_type <http://www.w3.org/2000/01/rdf-schema#comment> ?METRIC_DESCRIPTION.
+    GRAPH ?QualityGraph {?obs <http://purl.org/eis/vocab/daq#value> ?result.} 
+    GRAPH ?QualityGraph {?obs <http://purl.org/linked-data/sdmx/2009/dimension#timePeriod> ?LAST_ASSESSMENT_DATE_DM.} 
+    ?sds  dc:title ?SUBDATASET.
+    ?sds  dct:modified ?MODIFICATION_DATE.
+    ?ds dcat:hasPart ?sds.
+    ?ds  dc:title ?DATASET.
+    FILTER ( contains( str(?LAST_ASSESSMENT_DATE_DM), "2019-10-23 21:13:32.0" )  )
+
+ }
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getThematicRatio};

+ 24 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getThemeDescriptions.js

@@ -0,0 +1,24 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+        `;
+
+
+
+export const  getThemeDescriptions = () =>{
+        let query = `
+select ?THEME ?THEME_DESCRIPTION WHERE {
+?sds  a	skos:Concept.  
+?sds skos:prefLabel ?THEME.
+?sds skos:note ?THEME_DESCRIPTION.
+} 
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getThemeDescriptions};

+ 30 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getTransportTheme.js

@@ -0,0 +1,30 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+        `;
+
+
+
+export const  getTransportTheme= () =>{
+        let query = `
+select   ?DATASET ?SUBDATASET ?THEME ?MODIFICATION_DATE_DC WHERE {
+?ds dcat:hasPart ?sds.
+?ds  dc:title ?DATASET.
+?sds  a dcat:Dataset.  
+?sds  dc:title ?SUBDATASET.
+?sds  dct:modified ?MODIFICATION_DATE_DC.
+?sds  dcat:theme <http://purl.org/eis/vocab/unggim-data-themes#TransportNetworks>.
+<http://purl.org/eis/vocab/unggim-data-themes#TransportNetworks> skos:prefLabel ?THEME.
+} 
+
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getTransportTheme};

+ 29 - 0
Luzzu Dashboard/src/services/tripleStoreAPIs/sparql/getWaterTheme.js

@@ -0,0 +1,29 @@
+//© 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 dc: <http://purl.org/dc/elements/1.1/> 
+prefix dcat:  <http://www.w3.org/ns/dcat#>
+prefix dct:  <http://purl.org/dc/terms/>
+prefix skos:  <http://www.w3.org/2004/02/skos/core#>
+        `;
+
+
+
+export const  getWaterTheme = () =>{
+        let query = `
+select   ?DATASET ?SUBDATASET ?THEME ?MODIFICATION_DATE_DC WHERE {
+?ds dcat:hasPart ?sds.
+?ds  dc:title ?DATASET.
+?sds  a dcat:Dataset.  
+?sds  dc:title ?SUBDATASET.
+?sds  dct:modified ?MODIFICATION_DATE_DC.
+?sds  dcat:theme <http://purl.org/eis/vocab/unggim-data-themes#Water>.
+<http://purl.org/eis/vocab/unggim-data-themes#Water> skos:prefLabel ?THEME.
+}
+
+        `;
+
+        return prefix + query;
+    }
+
+
+export default {getWaterTheme};

+ 0 - 5
Luzzu Dashboard/src/store/datasetDetailsCacheReducer.js

@@ -75,16 +75,12 @@ const datasetDetailsCacheReducer = (state = initialState, action) => {
 
     case "CREATE_PIPELINE_CACHE":
     //console.log("CREATE_DATASET_DETAILS_CACHE");
-    console.log(action.payLoad);
     sessionStorage.setItem("PIPELINECACHE",JSON.stringify(action.payLoad) );
     return({
       pipelineCache : [...action.payLoad]
     });
     case "ADD_PIPELINE_CACHE":
     //console.log("ADD_DATASET_DETAILS_CACHE");
-    console.log(unescape(encodeURIComponent(JSON.stringify(sessionStorage))).length)
-    console.log(unescape(encodeURIComponent(JSON.stringify(action.payLoad))).length)
-    console.log(action.payLoad);
     //console.log(fromSessionStore);
     pipelineStore.push(action.payLoad);
     sessionStorage.setItem("PIPELINECACHE",JSON.stringify(pipelineStore) );
@@ -93,7 +89,6 @@ const datasetDetailsCacheReducer = (state = initialState, action) => {
     });
 
     case "SET_IS_LOGGED_IN":
-    console.log(action.payLoad);
     return({
       loggedIn: action.payload
     });

+ 0 - 3
Luzzu Dashboard/src/views/Dashboard/DataSetLarge/DataSetLarge.js

@@ -121,8 +121,6 @@ class DataSetLarge extends Component {
     {
       this.setState({ isloading: true }, () => {
         triggerAssessment(this.props.dataSetDetails).then((response) => {
-          console.log(this.props.dataSetDetails)
-          console.log(response)
           if (response.status === 200) {
             this.setState(prevState => ({
               isloading: false,
@@ -138,7 +136,6 @@ class DataSetLarge extends Component {
               this.statusUpdate();
               this.setState({ isloading: true }, () => {
                 updateDataset({"lastAssessmentRequestID":response.data['Request-ID'], "knowledgeBaseID":""}, this.props.dataSetDetails.datasetID).then((response) => {
-                  console.log(response)
                   if (response.status === 200) {
                     this.setState({
                       isloading: false,

+ 40 - 5
Luzzu Dashboard/src/views/DataSetDetails/OneSpatialDetails/OneSpatialDimensionDetails.js

@@ -28,9 +28,11 @@ class OneSpatialDimensionDetails extends Component {
       metrics: [],
       percentage: 0,
       dimension: this.props.match.params.dimension,
+      filter: this.props.match.params.filter,
       categories: [],
       metricValues: [],
-      categoryValues: []
+      categoryValues: [],
+      subDataset: ''
     }
   }
 
@@ -44,8 +46,10 @@ class OneSpatialDimensionDetails extends Component {
   }
 
   prepareMetricDetails = () => {
-    //makes an object for each metric with their dimenions and value
+    //makes an object for each metric with their dimensions and value
+    console.log(this.props)
     let tempArrayTwo = [];
+    let tempArrayThree = [];
     this.state.dataset[Number(this.props.match.params.datasetID)].assessmentMetrics.map((metric) => {
       (this.state.dataset[Number(this.props.match.params.datasetID)].lastAssessmentMetrics.map((assessed) => {
         if (((metric.metricURI).split("/")[4])+"-instance" === (assessed.result.MetricUri.value).split("/")[5]) {
@@ -60,6 +64,37 @@ class OneSpatialDimensionDetails extends Component {
         }
       }));
     });
+
+      let dims = [];
+      let dimCodes = [];
+        (this.state.dataset[Number(this.props.match.params.datasetID)].dimensionData.map((assessed) => {
+          var subDataset = (assessed.result.subDataset.value).split("#")[1]
+          subDataset = (subDataset).split('"')[0]
+          var code = (assessed.result.Metric.value).split("/")[5]
+          code = code.split("-")[0]
+            var contains = false
+            dims.forEach((metric)=>{
+              if(metric == subDataset){
+                contains = true
+              }
+            })
+            if(!contains){
+              dims.push(subDataset)
+              dimCodes.push(code)
+            }
+        }));        
+      var item = {
+         category:  'Sub-Datasets',
+         dimensions: dims,
+         dimCode: dimCodes 
+        }
+        console.log(item)
+        for(var i = 0; i < (item.dimensions).length; i++)
+        {
+          if(this.state.dimension === item.dimensions[i]){
+            this.setState({subDataset: item.dimCode[i]})
+          }
+        }
     this.setState(
       {
         metricValues: tempArrayTwo,
@@ -77,8 +112,9 @@ class OneSpatialDimensionDetails extends Component {
     let overallExpected=0;
     let overallActual=0;
     let metrics=[];
+    console.log(metricValues)
     this.state.metricValues.forEach((metric)=>{
-      if(metric.dimension+"-instance" === this.props.match.params.dimension)
+      if(metric.dimension+"-instance" === this.props.match.params.dimension || (metric.metric).split("-")[0] === this.state.subDataset)
         {
           metricsInDimension += 1;
           if(Number(parseFloat(metric.value).toFixed(4)) == -Infinity){
@@ -97,8 +133,6 @@ class OneSpatialDimensionDetails extends Component {
           actual = 0
         }
         let expected = Number(parseFloat(overallExpected/metricsInDimension * 100).toFixed(2));
-        console.log(actual)
-        console.log(expected)
         if (actual >= expected) {
           canPublish = "Ready to Publish";
           displayColour = readyToPublish;
@@ -118,6 +152,7 @@ class OneSpatialDimensionDetails extends Component {
         let color = "danger"
 
         actual = Number(parseFloat(metricDetails.value).toFixed(4)) * 100;
+        actual = (actual).toFixed(2)
         if(actual == -Infinity){
           actual = 0
         }

File diff suppressed because it is too large
+ 98 - 31
Luzzu Dashboard/src/views/DataSetDetails/OneSpatialDetails/OneSpatialDimensionQualityDetails.js


+ 125 - 10
Luzzu Dashboard/src/views/Pipeline/DataSetLarge/DataSetLarge.js

@@ -14,6 +14,7 @@ import {
   DropdownItem,
   DropdownMenu,
   DropdownToggle,
+  Spinner,
   Media
 } from 'reactstrap';
 import { connect } from 'react-redux';
@@ -33,6 +34,9 @@ import { get1SpatialAssessmentMetrics } from '../../../services/tripleStoreAPIs/
 import { get1SpatialAssessmentData } from '../../../services/tripleStoreAPIs/sparql/get1SpatialAssessmentData';
 import { get1SpatialDimensions } from '../../../services/tripleStoreAPIs/sparql/get1SpatialDimensions';
 import { get1SpatialMappings } from '../../../services/tripleStoreAPIs/sparql/get1SpatialMappings';
+import { getPrime2Desc } from '../../../services/tripleStoreAPIs/sparql/getPrime2Desc';
+import { getMRDSDesc } from '../../../services/tripleStoreAPIs/sparql/getMRDSDesc';
+import { getLinkedDataDesc } from '../../../services/tripleStoreAPIs/sparql/getLinkedDataDesc';
 import metricExceptionMapping from '../../../config/metricKnowledgeBaseMapping';
 import uploadImage from '../../../assets/cloud-upload.png'
 
@@ -55,7 +59,11 @@ class DataSetLarge extends Component {
     datasetID:this.props.datasetID,
     dataset: this.props.dataSetDetails,
     hasDataset: false,
-    showGraphSelect: false
+    showGraphSelect: false,
+    prime2Desc: [],
+    linkedDataDesc: [],
+    mrdsDesc: [],
+
   };
 
   recall = 0;
@@ -68,6 +76,16 @@ class DataSetLarge extends Component {
 
 
   componentDidMount() {
+    this.pipelineDescriptions()
+
+  }
+
+  pipelineDescriptions = async() =>
+  {
+    let prime2Desc = await this.fetchPrime2Desc()
+    let mrdsDesc = await this.fetchMRDSDesc()
+    let linkedDataDesc = await this.fetchLinkedDataDesc()
+    this.setState({prime2Desc: prime2Desc, mrdsDesc: mrdsDesc, linkedDataDesc: linkedDataDesc})
   }
 
   componentWillUnmount() {
@@ -115,12 +133,12 @@ class DataSetLarge extends Component {
   //Makes SPARQL queries and adds data to dataset
   setup = async(graphName) =>
   {
+
     let datasetDetails = await this.initialize1Spatial();
     let metrics = await this.fetch1SpatialMetrics()
     let assessmentData = await this.fetch1SpatialAssessmentData(graphName)
     let dimensionData = await this.fetch1SpatialDimensions(graphName)
     let mappingData = await this.fetch1SpatialMappings()
-    console.log(assessmentData)
     datasetDetails.assessmentMetrics = metrics
     datasetDetails.historicAssessmentData = assessmentData.historicAssessmentData
     datasetDetails.dataSetLastAssessed = assessmentData.dataSetLastAssessed
@@ -342,6 +360,90 @@ class DataSetLarge extends Component {
     return graphs
   }
 
+  fetchPrime2DescFromTripleStore = () =>
+  {
+      return new Promise((resolve)=>{
+        let spatialmetrics = [];
+        read(getPrime2Desc())
+          .then((response) => {
+            //console.log(response);
+            if (response) {
+              if (response.results.bindings.length > 0) {
+                spatialmetrics = response.results.bindings.map((result,index) => {
+                  return ({result:result});
+                })
+              }
+            }
+            resolve(spatialmetrics);
+        });
+
+      });
+  }
+
+  fetchPrime2Desc = async() =>
+  {
+    let definedMetrics = Object.keys(metricExceptionMapping.knowledgeBaseMapping);
+    let response = await this.fetchPrime2DescFromTripleStore()
+    let graphs = response;
+    return graphs
+  }
+
+  fetchMRDSDescFromTripleStore = () =>
+  {
+      return new Promise((resolve)=>{
+        let spatialmetrics = [];
+        read(getMRDSDesc())
+          .then((response) => {
+            //console.log(response);
+            if (response) {
+              if (response.results.bindings.length > 0) {
+                spatialmetrics = response.results.bindings.map((result,index) => {
+                  return ({result:result});
+                })
+              }
+            }
+            resolve(spatialmetrics);
+        });
+
+      });
+  }
+
+  fetchMRDSDesc = async() =>
+  {
+    let definedMetrics = Object.keys(metricExceptionMapping.knowledgeBaseMapping);
+    let response = await this.fetchMRDSDescFromTripleStore()
+    let graphs = response;
+    return graphs
+  }
+
+  fetchLinkedDataDescFromTripleStore = () =>
+  {
+      return new Promise((resolve)=>{
+        let spatialmetrics = [];
+        read(getLinkedDataDesc())
+          .then((response) => {
+            //console.log(response);
+            if (response) {
+              if (response.results.bindings.length > 0) {
+                spatialmetrics = response.results.bindings.map((result,index) => {
+                  return ({result:result});
+                })
+              }
+            }
+            resolve(spatialmetrics);
+        });
+
+      });
+  }
+
+  fetchLinkedDataDesc = async() =>
+  {
+    let definedMetrics = Object.keys(metricExceptionMapping.knowledgeBaseMapping);
+    let response = await this.fetchLinkedDataDescFromTripleStore()
+    let graphs = response;
+    return graphs
+  }
+
   //Creates dataset object
   initialize1Spatial = () => {
     let requestBody = {
@@ -429,7 +531,6 @@ class DataSetLarge extends Component {
     if(sessionStore){
       if(sessionStore[this.props.pipelineNum]){
         percentageValue = Number.parseFloat(sessionStore[this.props.pipelineNum].lastAssessmentQuality * 100).toFixed(2);
-      //console.log(percentageValue);
 
         if ((sessionStore[this.props.pipelineNum]).lastAssessmentQuality >= (sessionStore[this.props.pipelineNum]).expectedProgress) {
           canPublish = "Ready to Publish";
@@ -448,23 +549,37 @@ class DataSetLarge extends Component {
       styleCard = "text-white bg-info text-center w-100 h-90 pipelineTiles "
       styleText = "text-value font-weight-bold text-dark text-center text-truncate cardTextDown"
     }
-      if(sessionStore[this.props.pipelineNum])
+      if(sessionStore[this.props.pipelineNum] && this.state.linkedDataDesc.length > 0)
       {
+         var nodeDescription = ''
+         if(this.state.datasetID == 'Prime2'){
+            var nodeDescription = this.state.prime2Desc
+         }else{
+            var nodeDescription = this.state.mrdsDesc
+         }
+
          link =  (<Link to={{ pathname: this.props.link+ "/" +this.props.pipelineNum }}>
-            <CardTitle className={styleText}>{this.state.datasetID}</CardTitle>
+            <CardTitle className={styleText} style={{whiteSpace: 'pre-wrap', overflowWrap: 'break-word', fontSize: '1.1rem'}}>{nodeDescription[0].result['title'].value}</CardTitle>
             <div style={{ width: '150px', margin: 'auto' }}>
               {progressBar}
-            </div>
+            </div><br/>
+            <CardText className="text-dark"><b>Description : </b>{nodeDescription[0].result['desc'].value}</CardText>
+            <CardText className="text-dark"><b>Last Modified : </b>{nodeDescription[0].result['modified'].value}</CardText>
+            <CardText className="text-dark"><b>Derived From : </b>{nodeDescription[0].result['derived'].value}</CardText>
             <br />
           </Link>);
       }
-      else if(this.props.link !== 'onespatial')
-      {
+      else if(this.props.link !== 'onespatial' && this.state.linkedDataDesc.length > 0)
+      { 
+          var nodeDescription = this.state.linkedDataDesc
          link =  (<Link to={{ pathname: this.props.link }}>
-            <CardTitle className={styleText}>{this.state.datasetID}</CardTitle>
+            <CardTitle className={styleText}>{nodeDescription[0].result['title'].value}</CardTitle>
             <div style={{ width: '150px', margin: 'auto' }}>
               {progressBar}
-            </div>
+            </div><br/><br/><br/><br/><br/><br/>
+            <CardText className="text-dark"><b>Description : </b>{nodeDescription[0].result['desc'].value}</CardText>
+            <CardText className="text-dark"><b>Last Modified : </b>{nodeDescription[0].result['modified'].value}</CardText>
+            <CardText className="text-dark"><b>Derived From : </b>{nodeDescription[0].result['derived'].value}</CardText>
             <br />
           </Link>);
       }

+ 22 - 0
Luzzu Dashboard/src/views/Reports/DatasetCollapse.js

@@ -0,0 +1,22 @@
+import React, { useState } from 'react';
+import { Collapse, Button, CardBody, Card } from 'reactstrap';
+
+const DatasetCollapse = (props) => {
+  const [isOpen, setIsOpen] = useState(false);
+
+  const toggle = () => setIsOpen(!isOpen);
+
+  return (
+    <div>
+      <Button color="success" onClick={toggle} style={{ marginBottom: '5%',marginLeft: '1rem', maxWidth: '80%' }}>{props.dataset}</Button>
+      <Collapse isOpen={isOpen}>
+      <Button color="success" onClick={toggle} style={{ marginBottom: '5%',marginLeft: '1rem', maxWidth: '80%' }}>{props.dataset}</Button>
+      <Button color="success" onClick={toggle} style={{ marginBottom: '5%',marginLeft: '1rem', maxWidth: '80%' }}>{props.dataset}</Button>
+      <Button color="success" onClick={toggle} style={{ marginBottom: '5%',marginLeft: '1rem', maxWidth: '80%' }}>{props.dataset}</Button>
+
+      </Collapse>
+    </div>
+  );
+}
+
+export default DatasetCollapse;

File diff suppressed because it is too large
+ 976 - 0
Luzzu Dashboard/src/views/Reports/FilterFunctions.js


File diff suppressed because it is too large
+ 829 - 0
Luzzu Dashboard/src/views/Reports/ReportFilters.js


+ 0 - 4
Luzzu Dashboard/src/views/Reports/ReportOverTime.js

@@ -251,13 +251,11 @@ refreshCacheWithHistoricAssessmentData = (cachedHistoricDates, date, datasetID,d
         }
         else
         {
-          //console.log("No");
           read(getAssessmentQuality(datasetPLD,date.result)).then((response) => {
 
               let assessmentResult = {
                 [date.result] : [...response.results.bindings]
               }
-              //console.log(assessmentResult);
               this.props.updateHistoricAssessmentDetailsToCache(assessmentResult,datasetID);
               resolve();
             }
@@ -299,7 +297,6 @@ random_rgba = () => {
 
 render (){
 
-  console.log(this.state.assessmentDates)
     let mergedDateTime=[];
     let backgroundColour = this.state.qualityStatus.sort((a, b) => parseInt(a.index) - parseInt(b.index));
     let borderColor = this.state.qualityStatus.sort((a, b) => parseInt(a.index) - parseInt(b.index));
@@ -311,7 +308,6 @@ render (){
 
     var time = ''
      dateTime = this.state.assessmentDates.map((date)=>{return((date.result));});
-     console.log(dateTime.map((date)=>{return((date));}))
      dates = dateTime.map((date)=>{return((date).split(" ")[0]);});
      time = dateTime.map((date)=>{return((date).split(" ")[1]);});
     if(assessmentCount>sessionStorage.getItem("LIMIT"))