@prefix rr: . @prefix daq: . @prefix rdf: . @prefix rdfs: . @prefix ex: . @prefix xsd: . <#Class-ValidationRule-View> rr:sqlQuery """ SELECT DISTINCT CATEGORY, DIMENSION, SUBSTR(VALIDATION_RULE, 0, INSTR(validation_rule, ' ') - 1) as VAL_RULE_ID, SUBSTR(VALIDATION_RULE, INSTR(validation_rule, ' ') + 1) as VAL_RULE_LABEL FROM VALIDATION_FEATURE2 inner join MAPPING2 on SUBSTR(VALIDATION_RULE, 0, INSTR(validation_rule, ' ') - 1) = MAPPING2.METRIC """; rr:sqlVersion rr:Oracle . <#OracleCategory> rr:logicalTable <#Class-ValidationRule-View> ; rr:subjectMap [ rr:template "http://data.example.com/category/{CATEGORY}" ; rr:class rdfs:Class ; ] ; rr:predicateObjectMap [ rr:predicate rdfs:label ; rr:objectMap [ rr:column "CATEGORY" ]; ] ; rr:predicateObjectMap [ rr:predicate rdfs:subClassOf ; rr:objectMap [ rr:constant daq:Category ] ; ] . <#TriplesMapForDimensionClass> rr:logicalTable <#Class-ValidationRule-View> ; rr:subjectMap [ rr:template "http://data.example.com/dimension/{DIMENSION}"; rr:class rdfs:Class ; ] ; rr:predicateObjectMap [ rr:predicate rdfs:label ; rr:objectMap [ rr:column "DIMENSION" ]; ] ; rr:predicateObjectMap [ rr:predicate rdfs:subClassOf ; rr:objectMap [ rr:constant daq:Dimension ] ; ] . <#TriplesMapForDimensionProperty> rr:logicalTable <#Class-ValidationRule-View> ; rr:subjectMap [ rr:template "http://data.example.com/dimension/has{DIMENSION}Dimension"; rr:class rdf:Property ; ] ; rr:predicateObjectMap [ rr:predicate rdfs:subPropertyOf ; rr:objectMap [ rr:constant daq:hasDimension ] ; ] ; rr:predicateObjectMap [ rr:predicate rdfs:domain ; rr:objectMap [ rr:template "http://data.example.com/category/{CATEGORY}" ] ; ] ; rr:predicateObjectMap [ rr:predicate rdfs:range ; rr:objectMap [ rr:template "http://data.example.com/dimension/{DIMENSION}" ] ; ] . <#TriplesMapForMetricClass> rr:logicalTable <#Class-ValidationRule-View> ; rr:subjectMap [ rr:template "http://data.example.com/metric/{VAL_RULE_ID}"; rr:class rdfs:Class ; ] ; rr:predicateObjectMap [ rr:predicate rdfs:label ; rr:objectMap [ rr:column "VAL_RULE_ID" ]; ] ; rr:predicateObjectMap [ rr:predicate rdfs:subClassOf ; rr:objectMap [ rr:constant daq:Metric ] ; ] ; rr:predicateObjectMap [ rr:predicate rdfs:comment ; rr:objectMap [ rr:column "VAL_RULE_LABEL" ] ; ] ; rr:predicateObjectMap [ rr:predicate daq:expectedDataType ; rr:objectMap [ rr:constant xsd:double ] ; ] . <#TriplesMapForMetricProperty> rr:logicalTable <#Class-ValidationRule-View> ; rr:subjectMap [ rr:template "http://data.example.com/metric/has{VAL_RULE_ID}Metric"; rr:class rdf:Property ; ] ; rr:predicateObjectMap [ rr:predicate rdfs:subPropertyOf ; rr:objectMap [ rr:constant daq:hasMetric ] ; ] ; rr:predicateObjectMap [ rr:predicate rdfs:domain ; rr:objectMap [ rr:template "http://data.example.com/dimension/{DIMENSION}" ] ; ] ; rr:predicateObjectMap [ rr:predicate rdfs:range ; rr:objectMap [ rr:template "http://data.example.com/metric/{VAL_RULE_ID}" ] ; ] .