diff --git a/ontology/.htaccess b/ontology/.htaccess index 488d587..2197d8b 100644 --- a/ontology/.htaccess +++ b/ontology/.htaccess @@ -16,7 +16,7 @@ AddType application/ld+json .jsonld # Rewrite engine setup RewriteEngine On #Change the path to the folder here -RewriteBase /rml-lv +RewriteBase /rml-lv # Rewrite rule to serve JSON-LD content from the vocabulary URI if requested # Placed before HTML to support serving JSON-LD from a browser (e.g., JSON Playground) @@ -53,13 +53,13 @@ RewriteRule ^def/(.+)$ doc/ontology.nt [R=303,NE,L] # Rewrite rule to serve TTL content from the vocabulary URI if requested RewriteCond %{HTTP_ACCEPT} text/turtle [OR] RewriteCond %{HTTP_ACCEPT} text/\* [OR] -RewriteCond %{HTTP_ACCEPT} \*/turtle +RewriteCond %{HTTP_ACCEPT} \*/turtle RewriteRule ^def$ doc/ontology.ttl [R=303,L] # Rewrite rule to serve TTL content from the vocabulary URI if requested RewriteCond %{HTTP_ACCEPT} text/turtle [OR] RewriteCond %{HTTP_ACCEPT} text/\* [OR] -RewriteCond %{HTTP_ACCEPT} \*/turtle +RewriteCond %{HTTP_ACCEPT} \*/turtle RewriteRule ^def/(.+)$ doc/ontology.ttl [R=303,NE,L] RewriteCond %{HTTP_ACCEPT} .+ @@ -67,4 +67,4 @@ RewriteRule ^def$ doc/406.html [R=406,L] # Default response # --------------------------- # Rewrite rule to serve the RDF/XML content from the vocabulary URI by default -RewriteRule ^def$ doc/ontology.owl [R=303,L] \ No newline at end of file +RewriteRule ^def$ doc/ontology.owl [R=303,L] diff --git a/ontology/documentation/OOPSevaluation/oopsEval.html b/ontology/documentation/OOPSevaluation/oopsEval.html index df09619..0dc0a95 100644 --- a/ontology/documentation/OOPSevaluation/oopsEval.html +++ b/ontology/documentation/OOPSevaluation/oopsEval.html @@ -67,19 +67,19 @@

-

Ontology elements (classes, object properties and datatype properties) are created isolated, with no relation to the rest of the ontology.

This pitfall affects to the following ontology elements:

+

Ontology elements (classes, object properties and datatype properties) are created isolated, with no relation to the rest of the ontology.

This pitfall affects to the following ontology elements:

-P08. Missing annotations2 cases detected. Minor +P08. Missing annotations3 cases detected. Minor

-

This pitfall consists in creating an ontology element and failing to provide human readable annotations attached to it. Consequently, ontology elements lack annotation properties that label them (e.g. rdfs:label, lemon:LexicalEntry, skos:prefLabel or skos:altLabel) or that define them (e.g. rdfs:comment or dc:description). This pitfall is related to the guidelines provided in [5].

This pitfall affects to the following ontology elements:

+

This pitfall consists in creating an ontology element and failing to provide human readable annotations attached to it. Consequently, ontology elements lack annotation properties that label them (e.g. rdfs:label, lemon:LexicalEntry, skos:prefLabel or skos:altLabel) or that define them (e.g. rdfs:comment or dc:description). This pitfall is related to the guidelines provided in [5].

This pitfall affects to the following ontology elements:

@@ -103,7 +103,7 @@

+

Object and/or datatype properties without domain or range (or none of them) are included in the ontology.

This pitfall affects to the following ontology elements:

@@ -115,7 +115,7 @@

-

This pitfall appears when any relationship (except for those that are defined as symmetric properties using owl:SymmetricProperty) does not have an inverse relationship (owl:inverseOf) defined within the ontology.

This pitfall affects to the following ontology elements:

+

This pitfall appears when any relationship (except for those that are defined as symmetric properties using owl:SymmetricProperty) does not have an inverse relationship (owl:inverseOf) defined within the ontology.

This pitfall affects to the following ontology elements:

diff --git a/ontology/documentation/index-en.html b/ontology/documentation/index-en.html index 2d3bb62..9a29a71 100644 --- a/ontology/documentation/index-en.html +++ b/ontology/documentation/index-en.html @@ -96,7 +96,98 @@

Release: 2024-01-01

draft
-
+
+ + +

RML Logical Views: Overview back to ToC

+ +This ontology has the following classes and properties. +

Classes

+

Object Properties

Data Properties

+
+ + + +

RML Logical Views: Description back to ToC

+ +RML Logical Views flatten nested data, allow flexible joining of data sources, and handle mix source formats.
+

Cross-reference for RML Logical Views classes, object properties and data properties back to ToC

@@ -104,10 +195,12 @@

Release: 2024-01-01

Classes

+
+

Expression Fieldc back to ToC or Class ToC

+

IRI: http://w3id.org/rml/ExpressionField

+
+ A expression field is an expression map that gives a name to an expression. +
+
+
+ Is defined by +
+
+ http://w3id.org/rml/lv/ +
+
+
+
+ has super-classes +
+
+ Expression Map c, Field c +
+
+

Fieldc back to ToC or Class ToC

IRI: http://w3id.org/rml/Field

- A field is an expression map that gives a name to an expression. + A field gives a name to data derived from the abstract logical source on which a logical view is defined.
@@ -131,10 +247,10 @@

Fieldc back

- has super-classes + has sub-classes
- Expression Map c, Logical Iterable c + Expression Field c, Iterable Field c
is in domain of @@ -231,11 +347,34 @@

IRI Safe Annotationc +

Iterable Fieldc back to ToC or Class ToC

+

IRI: http://w3id.org/rml/IterableField

+
+ A iterable field is an iterable that gives a name to a logical iteration. +
+
+
+ Is defined by +
+
+ http://w3id.org/rml/lv/ +
+
+
+
+ has super-classes +
+
+ Field c, Iterable c +
+
+

Logical Viewc back to ToC or Class ToC

IRI: http://w3id.org/rml/LogicalView

- A logical view (rml:LogicalView) is a type of logical source that is derived from another logical source by defining field with data from said logical source. + A logical view (rml:LogicalView) is a type of abstract logical source that is derived from another abstract logical source by defining field with data from said abstract logical source.
@@ -250,7 +389,7 @@

Logical Viewc
- Logical Source c + Abstract Logical Source c
is in domain of @@ -270,7 +409,7 @@

Logical Viewc Logical View Joinc back to ToC or Class ToC

IRI: http://w3id.org/rml/LogicalViewJoin

- A LogicalViewJoin is an operation that adapts the logical iterations of one logical view (the child logical view) with fields from another logical view (the parent logical view). + A logical view join is an operation that adapts the logical iterations of one logical view (the child logical view) with fields from another logical view (the parent logical view).
@@ -676,7 +815,7 @@

target viewop view onop back to ToC or Object Property ToC

IRI: http://w3id.org/rml/viewOn

- The source of the logical view. This is the logical source from which the logical view is derived. + The source of the logical view. This is the abstract logical source from which the logical view is derived.
@@ -698,7 +837,7 @@

view onop Logical Source c + Abstract Logical Source c

@@ -748,6 +887,15 @@

Legend back to ToC

+ + + +
+

References back to ToC

+ +Add your references here. It is recommended to have them as a list. + +

Acknowledgments back to ToC

diff --git a/ontology/documentation/ontology.jsonld b/ontology/documentation/ontology.jsonld index b95ecda..01aa90a 100644 --- a/ontology/documentation/ontology.jsonld +++ b/ontology/documentation/ontology.jsonld @@ -27,21 +27,36 @@ "@id" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#List" } ] }, { - "@id" : "http://w3id.org/rml/Field", + "@id" : "http://w3id.org/rml/AbstractLogicalSource", + "@type" : [ "http://www.w3.org/2002/07/owl#Class" ] +}, { + "@id" : "http://w3id.org/rml/ExpressionField", "@type" : [ "http://www.w3.org/2002/07/owl#Class" ], "http://www.w3.org/2000/01/rdf-schema#comment" : [ { - "@value" : "A field is an expression map that gives a name to an expression." + "@value" : "A expression field is an expression map that gives a name to an expression." } ], "http://www.w3.org/2000/01/rdf-schema#isDefinedBy" : [ { "@id" : "http://w3id.org/rml/lv/" } ], "http://www.w3.org/2000/01/rdf-schema#label" : [ { - "@value" : "Field" + "@value" : "Expression Field" } ], "http://www.w3.org/2000/01/rdf-schema#subClassOf" : [ { "@id" : "http://w3id.org/rml/ExpressionMap" }, { - "@id" : "http://w3id.org/rml/LogicalIterable" + "@id" : "http://w3id.org/rml/Field" + } ] +}, { + "@id" : "http://w3id.org/rml/Field", + "@type" : [ "http://www.w3.org/2002/07/owl#Class" ], + "http://www.w3.org/2000/01/rdf-schema#comment" : [ { + "@value" : "A field gives a name to data derived from the abstract logical source on which a logical view is defined." + } ], + "http://www.w3.org/2000/01/rdf-schema#isDefinedBy" : [ { + "@id" : "http://w3id.org/rml/lv/" + } ], + "http://www.w3.org/2000/01/rdf-schema#label" : [ { + "@value" : "Field" } ] }, { "@id" : "http://w3id.org/rml/ForeignKeyAnnotation", @@ -89,13 +104,30 @@ "@id" : "http://w3id.org/rml/StructuralAnnotation" } ] }, { - "@id" : "http://w3id.org/rml/LogicalIterable", + "@id" : "http://w3id.org/rml/Iterable", "@type" : [ "http://www.w3.org/2002/07/owl#Class" ] +}, { + "@id" : "http://w3id.org/rml/IterableField", + "@type" : [ "http://www.w3.org/2002/07/owl#Class" ], + "http://www.w3.org/2000/01/rdf-schema#comment" : [ { + "@value" : "A iterable field is an iterable that gives a name to a logical iteration." + } ], + "http://www.w3.org/2000/01/rdf-schema#isDefinedBy" : [ { + "@id" : "http://w3id.org/rml/lv/" + } ], + "http://www.w3.org/2000/01/rdf-schema#label" : [ { + "@value" : "Iterable Field" + } ], + "http://www.w3.org/2000/01/rdf-schema#subClassOf" : [ { + "@id" : "http://w3id.org/rml/Field" + }, { + "@id" : "http://w3id.org/rml/Iterable" + } ] }, { "@id" : "http://w3id.org/rml/LogicalView", "@type" : [ "http://www.w3.org/2002/07/owl#Class" ], "http://www.w3.org/2000/01/rdf-schema#comment" : [ { - "@value" : "A logical view (rml:LogicalView) is a type of logical source that is derived from another logical source by defining field with data from said logical source." + "@value" : "A logical view (rml:LogicalView) is a type of abstract logical source that is derived from another abstract logical source by defining field with data from said abstract logical source." } ], "http://www.w3.org/2000/01/rdf-schema#isDefinedBy" : [ { "@id" : "http://w3id.org/rml/lv/" @@ -104,13 +136,13 @@ "@value" : "Logical View" } ], "http://www.w3.org/2000/01/rdf-schema#subClassOf" : [ { - "@id" : "http://w3id.org/rml/LogicalSource" + "@id" : "http://w3id.org/rml/AbstractLogicalSource" } ] }, { "@id" : "http://w3id.org/rml/LogicalViewJoin", "@type" : [ "http://www.w3.org/2002/07/owl#Class" ], "http://www.w3.org/2000/01/rdf-schema#comment" : [ { - "@value" : "A LogicalViewJoin is an operation that adapts the logical iterations of one logical view (the child logical view) with fields from another logical view (the parent logical view)." + "@value" : "A logical view join is an operation that adapts the logical iterations of one logical view (the child logical view) with fields from another logical view (the parent logical view)." } ], "http://www.w3.org/2000/01/rdf-schema#isDefinedBy" : [ { "@id" : "http://w3id.org/rml/lv/" @@ -312,7 +344,7 @@ "@id" : "http://w3id.org/rml/onFields", "@type" : [ "http://www.w3.org/2002/07/owl#ObjectProperty" ], "http://www.w3.org/2000/01/rdf-schema#comment" : [ { - "@value" : "\n The property onFields specifies the fields in LogicalView that are involved by the structural annotation.\n The semantics of this involvement depends on the specific annotation.\n " + "@value" : "\r\n The property onFields specifies the fields in LogicalView that are involved by the structural annotation.\r\n The semantics of this involvement depends on the specific annotation.\r\n " } ], "http://www.w3.org/2000/01/rdf-schema#domain" : [ { "@id" : "http://w3id.org/rml/StructuralAnnotation" @@ -402,7 +434,7 @@ "@id" : "http://w3id.org/rml/viewOn", "@type" : [ "http://www.w3.org/2002/07/owl#ObjectProperty" ], "http://www.w3.org/2000/01/rdf-schema#comment" : [ { - "@value" : "The source of the logical view. This is the logical source from which the logical view is derived." + "@value" : "The source of the logical view. This is the abstract logical source from which the logical view is derived." } ], "http://www.w3.org/2000/01/rdf-schema#domain" : [ { "@id" : "http://w3id.org/rml/LogicalView" @@ -414,7 +446,7 @@ "@value" : "view on" } ], "http://www.w3.org/2000/01/rdf-schema#range" : [ { - "@id" : "http://w3id.org/rml/LogicalSource" + "@id" : "http://w3id.org/rml/AbstractLogicalSource" } ] }, { "@id" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#List", diff --git a/ontology/documentation/ontology.nt b/ontology/documentation/ontology.nt index 8b010f6..dbbf3a3 100644 --- a/ontology/documentation/ontology.nt +++ b/ontology/documentation/ontology.nt @@ -76,7 +76,7 @@ _:genid1 . . . - "\n The property onFields specifies the fields in LogicalView that are involved by the structural annotation.\n The semantics of this involvement depends on the specific annotation.\n " . + "\r\n The property onFields specifies the fields in LogicalView that are involved by the structural annotation.\r\n The semantics of this involvement depends on the specific annotation.\r\n " . . "on fields" . # @@ -115,8 +115,9 @@ _:genid1 . . - . - "The source of the logical view. This is the logical source from which the logical view is derived." . + . + . + "The source of the logical view. This is the abstract logical source from which the logical view is derived." . . "view on" . # @@ -146,12 +147,19 @@ _:genid1 . + . + . + "A expression field is an expression map that gives a name to an expression." . + . + "Expression Field" . +# # http://w3id.org/rml/Field . - . - . - . - "A field is an expression map that gives a name to an expression." . + "A field gives a name to data derived from the abstract logical source on which a logical view is defined." . . "Field" . # @@ -176,18 +184,27 @@ _:genid1 . "Inclusion Dependency Annotation" . # -# http://w3id.org/rml/LogicalIterable +# http://w3id.org/rml/Iterable + . +# +# http://w3id.org/rml/IterableField + . + . + . + "A iterable field is an iterable that gives a name to a logical iteration." . + . + "Iterable Field" . # # http://w3id.org/rml/LogicalView . - . - "A logical view (rml:LogicalView) is a type of logical source that is derived from another logical source by defining field with data from said logical source." . + . + "A logical view (rml:LogicalView) is a type of abstract logical source that is derived from another abstract logical source by defining field with data from said abstract logical source." . . "Logical View" . # # http://w3id.org/rml/LogicalViewJoin . - "A LogicalViewJoin is an operation that adapts the logical iterations of one logical view (the child logical view) with fields from another logical view (the parent logical view)." . + "A logical view join is an operation that adapts the logical iterations of one logical view (the child logical view) with fields from another logical view (the parent logical view)." . . "Logical View Join" . # diff --git a/ontology/documentation/ontology.owl b/ontology/documentation/ontology.owl index 5b05cff..ede31b0 100644 --- a/ontology/documentation/ontology.owl +++ b/ontology/documentation/ontology.owl @@ -189,8 +189,8 @@ - - The source of the logical view. This is the logical source from which the logical view is derived. + + The source of the logical view. This is the abstract logical source from which the logical view is derived. view on @@ -234,13 +234,31 @@ + + + + + + + + + + + + + + A expression field is an expression map that gives a name to an expression. + + Expression Field + + + + - - - A field is an expression map that gives a name to an expression. + A field gives a name to data derived from the abstract logical source on which a logical view is defined. Field @@ -283,10 +301,23 @@ - + + + + + + + + - + + + + A iterable field is an iterable that gives a name to a logical iteration. + + Iterable Field + @@ -294,8 +325,8 @@ - - A logical view (rml:LogicalView) is a type of logical source that is derived from another logical source by defining field with data from said logical source. + + A logical view (rml:LogicalView) is a type of abstract logical source that is derived from another abstract logical source by defining field with data from said abstract logical source. Logical View @@ -306,7 +337,7 @@ - A LogicalViewJoin is an operation that adapts the logical iterations of one logical view (the child logical view) with fields from another logical view (the parent logical view). + A logical view join is an operation that adapts the logical iterations of one logical view (the child logical view) with fields from another logical view (the parent logical view). Logical View Join diff --git a/ontology/documentation/ontology.ttl b/ontology/documentation/ontology.ttl index cc4fd14..d0d2819 100644 --- a/ontology/documentation/ontology.ttl +++ b/ontology/documentation/ontology.ttl @@ -122,8 +122,8 @@ ### http://w3id.org/rml/viewOn rdf:type owl:ObjectProperty ; rdfs:domain ; - rdfs:range ; - rdfs:comment "The source of the logical view. This is the logical source from which the logical view is derived." ; + rdfs:range ; + rdfs:comment "The source of the logical view. This is the abstract logical source from which the logical view is derived." ; rdfs:isDefinedBy ; rdfs:label "view on" . @@ -145,14 +145,26 @@ # Classes ################################################################# +### http://w3id.org/rml/AbstractLogicalSource + rdf:type owl:Class . + + +### http://w3id.org/rml/ExpressionField + rdf:type owl:Class ; + rdfs:subClassOf , + ; + rdfs:comment "A expression field is an expression map that gives a name to an expression." ; + rdfs:isDefinedBy ; + rdfs:label "Expression Field" . + + ### http://w3id.org/rml/Field rdf:type owl:Class ; - rdfs:subClassOf , - ; - rdfs:comment "A field is an expression map that gives a name to an expression." ; + rdfs:comment "A field gives a name to data derived from the abstract logical source on which a logical view is defined." ; rdfs:isDefinedBy ; rdfs:label "Field" . + ### http://w3id.org/rml/ForeignKeyAnnotation rdf:type owl:Class ; rdfs:subClassOf ; @@ -177,21 +189,30 @@ rdfs:label "Inclusion Dependency Annotation" . -### http://w3id.org/rml/LogicalIterable - rdf:type owl:Class . +### http://w3id.org/rml/Iterable + rdf:type owl:Class . + + +### http://w3id.org/rml/IterableField + rdf:type owl:Class ; + rdfs:subClassOf , + ; + rdfs:comment "A iterable field is an iterable that gives a name to a logical iteration." ; + rdfs:isDefinedBy ; + rdfs:label "Iterable Field" . ### http://w3id.org/rml/LogicalView rdf:type owl:Class ; - rdfs:subClassOf ; - rdfs:comment "A logical view (rml:LogicalView) is a type of logical source that is derived from another logical source by defining field with data from said logical source." ; + rdfs:subClassOf ; + rdfs:comment "A logical view (rml:LogicalView) is a type of abstract logical source that is derived from another abstract logical source by defining field with data from said abstract logical source." ; rdfs:isDefinedBy ; rdfs:label "Logical View" . ### http://w3id.org/rml/LogicalViewJoin rdf:type owl:Class ; - rdfs:comment "A LogicalViewJoin is an operation that adapts the logical iterations of one logical view (the child logical view) with fields from another logical view (the parent logical view)." ; + rdfs:comment "A logical view join is an operation that adapts the logical iterations of one logical view (the child logical view) with fields from another logical view (the parent logical view)." ; rdfs:isDefinedBy ; rdfs:label "Logical View Join" . diff --git a/ontology/ontology.owl b/ontology/ontology.owl index 315f9e6..1b34238 100644 --- a/ontology/ontology.owl +++ b/ontology/ontology.owl @@ -59,9 +59,9 @@ rml:field rdf:type owl:ObjectProperty ; ### http://w3id.org/rml/viewOn rml:viewOn rdf:type owl:ObjectProperty ; rdfs:label "view on" ; - rdfs:comment "The source of the logical view. This is the logical source from which the logical view is derived." ; + rdfs:comment "The source of the logical view. This is the abstract logical source from which the logical view is derived." ; rdfs:domain rml:LogicalView ; - rdfs:range rml:LogicalSource ; + rdfs:range rml:AbstractLogicalSource ; rdfs:isDefinedBy . @@ -150,23 +150,37 @@ rml:fieldName rdf:type owl:DatatypeProperty ; ### http://w3id.org/rml/Field rml:Field rdf:type owl:Class ; rdfs:label "Field" ; - rdfs:comment "A field is an expression map that gives a name to an expression." ; - rdfs:subClassOf rml:ExpressionMap, rml:LogicalIterable ; + rdfs:comment "A field gives a name to data derived from the abstract logical source on which a logical view is defined." ; + rdfs:isDefinedBy . + +### http://w3id.org/rml/ExpressionField +rml:ExpressionField rdf:type owl:Class ; + rdfs:label "Expression Field" ; + rdfs:comment "An expression field is an expression map that gives a name to an expression." ; + rdfs:subClassOf rml:Field, rml:ExpressionMap ; + rdfs:isDefinedBy . + + +### http://w3id.org/rml/IterableField +rml:IterableField rdf:type owl:Class ; + rdfs:label "Iterable Field" ; + rdfs:comment "An iterable field is an iterable that gives a name to a logical iteration." ; + rdfs:subClassOf rml:Field, rml:Iterable ; rdfs:isDefinedBy . ### http://w3id.org/rml/LogicalView rml:LogicalView rdf:type owl:Class ; rdfs:label "Logical View" ; - rdfs:comment "A logical view (rml:LogicalView) is a type of logical source that is derived from another logical source by defining field with data from said logical source." ; - rdfs:subClassOf rml:LogicalSource ; + rdfs:comment "A logical view (rml:LogicalView) is a type of abstract logical source that is derived from another abstract logical source by defining fields with data from said abstract logical source." ; + rdfs:subClassOf rml:AbstractLogicalSource ; rdfs:isDefinedBy . ### http://w3id.org/rml/LogicalViewJoin rml:LogicalViewJoin rdf:type owl:Class ; rdfs:label "Logical View Join" ; - rdfs:comment "A LogicalViewJoin is an operation that adapts the logical iterations of one logical view (the child logical view) with fields from another logical view (the parent logical view)." ; + rdfs:comment "A logical view join is an operation that adapts the logical iterations of one logical view (the child logical view) with fields from another logical view (the parent logical view)." ; rdfs:isDefinedBy . diff --git a/ontology/requirements/requirements.xlsx b/ontology/requirements/requirements.xlsx new file mode 100644 index 0000000..2e992a6 Binary files /dev/null and b/ontology/requirements/requirements.xlsx differ diff --git a/ontology/rml-lv_diagram.png b/ontology/rml-lv_diagram.png index 17df291..c6aa0d7 100644 Binary files a/ontology/rml-lv_diagram.png and b/ontology/rml-lv_diagram.png differ diff --git a/ontology/rml-lv_diagram.svg b/ontology/rml-lv_diagram.svg new file mode 100644 index 0000000..a5d89f9 --- /dev/null +++ b/ontology/rml-lv_diagram.svg @@ -0,0 +1 @@ +
rml:innerJoin
rml:innerJoin
rml:field
rml:field
rml:joinCondition
rml:joinCondition
rml:Join
rml:parentLogicalView
rml:parentLogicalView
rml:leftJoin
rml:leftJoin
rml:LogicalViewJoinrml:Field
rml:fieldName: string 
rml:fieldName: strin...
rml:ExpressionMap
rml:targetView
rml:targetView
rml:InclusionDependencyAnnotationrml:ForeignKeyAnnotation
rml:targetFields
rml:targetFields
rml:StructuralAnnotationrml:NonNullableAnnotationrml:UniqueAnnotationrml:PrimaryKeyAnnotation
rml:structuralAnnotation
rml:structuralAnnotation
rml:viewOn
rml:viewOn
rml:field
rml:field
rml:LogicalViewrml:Iterablerml:AbstractLogicalSourcerml:IRISafeAnnotationrml:IterableFieldrml:ExpressionField
Legend
Legend
Class
Data Property: datatype
Data Property: datatype
subClassOf
subClassOf
Object Property
Object Property
RML CoreRML-LV
rml: http://w3id.org/rml/
rml: http://w3id.org/rml/
rml:onFields
rml:onFields
Text is not SVG - cannot display
\ No newline at end of file diff --git a/shapes/lv.ttl b/shapes/lv.ttl index 12b424e..b988fdd 100644 --- a/shapes/lv.ttl +++ b/shapes/lv.ttl @@ -14,12 +14,12 @@ rmlsh:LogicalViewShape a sh:NodeShape ; rdfs:label "LogicalView" ; rdfs:comment """ - A logical view (rml:LogicalView) is a type of logical source that is derived from another logical source by defining field with data from said logical source. + A logical view (rml:LogicalView) is a type of abstract logical source that is derived from another abstract logical source by defining fields with data from said abstract logical source. """ ; sh:message """ Node must have a valid rml:LogicalView description. rml:LogicalView requires - - exactly one rml:viewOn property, with a rml:LogicalSource as its value. + - exactly one rml:viewOn property, with a rml:AbstractLogicalSource as its value. - at least one rml:field property, with a rml:Field as its value. """ ; sh:targetClass rml:LogicalView ; @@ -29,7 +29,7 @@ rmlsh:LogicalViewShape a sh:NodeShape ; The source of the logical view. This is the logical source from which the logical view is derived. """ ; sh:message """ - Exactly one rml:viewOn property must be specified for a rml:LogicalView, with a rml:LogicalSource as its value. + Exactly one rml:viewOn property must be specified for a rml:LogicalView, with a rml:AbstractLogicalSource as its value. """ ; sh:path rml:viewOn ; sh:minCount 1 ; @@ -46,6 +46,10 @@ rmlsh:LogicalViewShape a sh:NodeShape ; sh:path rml:field ; sh:minCount 1 ; sh:nodeKind sh:BlankNodeOrIRI ; + sh:xone ( + [ sh:node rmlsh:ExpressionFieldShape ] + [ sh:node rmlsh:IterableFieldShape ] + ) ] , [ sh:description """ A left join of the logical view. @@ -80,12 +84,12 @@ rmlsh:LogicalViewShape a sh:NodeShape ; rmlsh:FieldShape a sh:NodeShape ; rdfs:label "Field" ; rdfs:comment """ - A field is an expression map that gives a name to an expression. + A field is a construct that gives a name to data derived from an abstract logical source. """ ; sh:message """ Node must have a valid rml:Field description. rml:Field requires a rml:fieldName and may have zero or more rml:field properties. - Furthermore, rml:Field requires what an rml:ExpressionMap requires. + Furthermore, subclass rml:ExpressionField requires what an rml:ExpressionMap requires, subclass rml:IterableField requires what an rml:Iterable requires,. """ ; sh:targetClass rml:Field ; sh:targetObjectsOf rml:field ; @@ -110,6 +114,51 @@ rmlsh:FieldShape a sh:NodeShape ; """ ; sh:path rml:field ; sh:nodeKind sh:BlankNodeOrIRI ; + sh:xone ( + [ sh:node rmlsh:ExpressionFieldShape ] + [ sh:node rmlsh:IterableFieldShape ] + ) + ] . + +rmlsh:ExpressionFieldShape a sh:NodeShape ; + rdfs:label "Expression Field" ; + rdfs:comment """ + A expression field is an expression map that gives a name to an expression. + """ ; + sh:message """ + Node must have a valid rml:ExpressionField description. + rml:ExpressionField requires what an rml:ExpressionMap and rml:Field requires. + """ ; + sh:targetClass rml:ExpressionField ; + sh:node rmlsh:RMLExpressionMapShape, rmlsh:Field ; +. + +rmlsh:IterableFieldShape a sh:NodeShape ; + rdfs:label "Iterable Field" ; + rdfs:comment """ + An iterable field is a construction that gives a name to logical iterations derived from the parent of the field. + """ ; + sh:message """ + Node must have a valid rml:IterableField description. + rml:IterableField must have one or more rml:field properties. + Furthermore, rml:IterableField requires what an rml:Iterable and rml:Field requires. + """ ; + sh:targetClass rml:IterableField ; + sh:node rmlsh:Iterable, rmlsh:Field ; # TODO requires rmlsh:Iterable to be defined in core + sh:property [ + sh:description """ + A child field of the iterable field. + """ ; + sh:message """ + The value of a rml:field property for a rml:Field must be a resource. + """ ; + sh:path rml:field ; + sh:minCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:xone ( + [ sh:node rmlsh:ExpressionFieldShape ] + [ sh:node rmlsh:IterableFieldShape ] + ) ] . rmlsh:LogicalViewJoinShape a sh:NodeShape ; @@ -158,6 +207,10 @@ rmlsh:LogicalViewJoinShape a sh:NodeShape ; sh:path rml:field ; sh:minCount 1 ; sh:nodeKind sh:BlankNodeOrIRI ; + sh:xone ( + [ sh:node rmlsh:ExpressionFieldShape ] + [ sh:node rmlsh:IterableFieldShape ] + ) ] . rmlsh:StructuralAnnotationShape a sh:NodeShape; diff --git a/spec/rendered.html b/spec/rendered.html index a1442ac..906c20e 100644 --- a/spec/rendered.html +++ b/spec/rendered.html @@ -42,13 +42,13 @@ .dfn-panel li{margin-left:1em} .dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto} - + RML Logical Views - - + + - - + + - - - + + + - + @@ -320,34 +320,34 @@ }

- -

RML Logical Views

+ +

RML Logical Views

Draft Community Group Report

- +
Latest published version:
none
Latest editor's draft:
https://w3id.org/kg-construct/rml-lv
- - - - + + + +
Editors:
(Skemu)
(Ghent University – imec – IDLab)
- +
Authors:
(Skemu)
(Ghent University – imec – IDLab)
- +
This Version
https://kg-construct.github.io/rml-lv/%thisDate%/
Previous Version
@@ -356,19 +356,19 @@

RML Logical Views

https://rml.io/
- +
@@ -387,11 +387,11 @@

RML Logical Views

This specification was published by the Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it on the W3C Standards Track. - + Please note that under the W3C Community Contributor License Agreement (CLA) there is a limited opt-out and other conditions apply. - + Learn more about W3C Community and Business Groups.

@@ -402,7 +402,7 @@

RML Logical Views

1. Overview

This section is non-normative.

1.1 Document conventions

We assume readers have basic familiarity with RDF and RML concepts.

-

In this document, examples assume +

In this document, examples assume the following namespace prefix bindings unless otherwise stated:

@@ -452,18 +452,18 @@

RML Logical Views

2. Problem

This section is non-normative.

RML Logical Views aims to resolve challenges such as handling hierarchy of nested data, more flexible joining (also across data hierarchies), and handling data sources that mix source formats.

2.1 Nested data structures

-

References to nested data structures, like JSON or XML, may return multiple values. These values can be composite: they may again contain multiple values. -RML-Core defines mapping constructs that produce results by combining the results of other mapping constructs in a specific order. -For example, a triples map combines the results of a subject map and a predicate-object map in that order. -Another example is a template expression, -which combines character strings and zero or more reference expressions in declared order. +

References to nested data structures, like JSON or XML, may return multiple values. These values can be composite: they may again contain multiple values. +RML-Core defines mapping constructs that produce results by combining the results of other mapping constructs in a specific order. +For example, a triples map combines the results of a subject map and a predicate-object map in that order. +Another example is a template expression, +which combines character strings and zero or more reference expressions in declared order. When mapping constructs produce multiple results, the combining mapping constructs will apply an n-ary Cartesian product over the sets of results, maintaining the order of the mapping constructs. In the case of nested data structures, this may cause the generation of results that do not match the source hierarchy, i.e. do not follow the root-to-leaf paths in the source data, since values are combined irrespective of it.

Furthermore, there is varying expressiveness in data source expression and query languages, and many languages have limited support for hierarchy traversal. For example, JSONPath has no operator to refer to an ancestor in the document hierarchy.

This limits the ability of RML-Core to map nested data.

- + + + @@ -317,6 +338,8 @@ Note some columns in the table below have been shortened for brevity. ``` + + @@ -334,6 +357,8 @@ Note some columns in the table below have been shortened for brevity. ``` + + @@ -350,8 +375,9 @@ Note some columns in the table below have been shortened for brevity. {...} ``` - + + @@ -364,7 +390,9 @@ Note some columns in the table below have been shortened for brevity. ### Using field names in triples maps -A field reference is a reference expression that references a defined [=field=]. A [=field reference=] MUST be a defined [=field name=]. A [=field reference=] is a special type of reference expression for which no reference formulation need be defined. +A field reference is a reference expression that references a defined [=field=]. +A [=field reference=] MUST be a defined [=field name=] of an [=expression field=], to obtain the records in the [=field record sequence=], or a defined [=field name=] followed by the string `.#` of a [=field=], to obtain the index key of the position of the current entry in the [=field record sequence=]. +A [=field reference=] is a special type of reference expression for which no reference formulation need be defined. A [=field reference=] can be used in expression maps just as any other reference expression. @@ -376,17 +404,21 @@ A [=field reference=] can be used in :jsonView a rml:LogicalView ; rml:viewOn :jsonSource ; rml:field [ + a rml:ExpressionField ; rml:fieldName "name" ; rml:reference "$.name" ; ] ; rml:field [ + a rml:IterableField ; rml:fieldName "item" ; rml:reference "$.items[*]" ; rml:field [ + a rml:ExpressionField ; rml:fieldName "type" ; rml:reference "$.type" ; ] ; rml:field [ + a rml:ExpressionField ; rml:fieldName "weight" ; rml:reference "$.weight" ; ] ; @@ -522,7 +554,7 @@ Note some columns in the table below have been shortened for brevity. :triplesMapItem a rml:TriplesMap ; rml:logicalSource :jsonView ; rml:subjectMap [ - rml:template "http://example.org/person/{name}/item/{item.type}" ; + rml:template "http://example.org/person/{name}/item/{item.#}" ; ] ; rml:predicateObjectMap [ rml:predicate :hasName ; @@ -544,19 +576,19 @@ Note some columns in the table below have been shortened for brevity. ```turtle :hasName "alice" ; - :hasItem , - . + :hasItem , + . :hasName "bob" ; - :hasItem . + :hasItem . - :hasName "sword" ; + :hasName "sword" ; :hasWeight 1500 . - :hasName "shield" ; + :hasName "shield" ; :hasWeight 2500 . - :hasName "flower" ; + :hasName "flower" ; :hasWeight 15 . ``` diff --git a/spec/section/joins.md b/spec/section/joins.md index fd3ef02..e1d7967 100644 --- a/spec/section/joins.md +++ b/spec/section/joins.md @@ -5,15 +5,15 @@ A logical view join (`rml:LogicalViewJoin`) is an operation that exte A [=logical view join=] (`rml:LogicalViewJoin`) MUST contain: - exactly one parent logical view property (`rml:parentLogicalView`), whose value is a [=logical view=] (`rml:LogicalView`) that supplies the additional fields, fulfills the role of the [parent logical source]() in the join condition(s) of the [=logical view join=], and is referred to as parent logical view. - at least one join condition property (`rml:joinCondition`), whose value is a join condition. -- at least one field property (`rml:field`), whose value is a [=field=] (`rml:Field`). This field SHOULD only contain references to fields that exists in the parent logical view. +- at least one field property (`rml:field`), whose value is an [=expression field=] (`rml:ExpressionField`). This field SHOULD only contain [=field references=] that can be evaluated on the parent logical view. The [=logical view=] in the subject position of the [=join property=], fulfills the role of [child logical source]() in the join condition(s) of the [=logical view join=], and is referred to as child logical view. -| Property | Domain | Range | -|-------------------------|-----------------------|-------------------| -| `rml:parentLogicalView` | `rml:LogicalViewJoin` | `rml:LogicalView` | -| `rml:joinCondition` | `rml:LogicalViewJoin` | `rml:Join` | -| `rml:field` | `rml:LogicalViewJoin` | `rml:Field` | +| Property | Domain | Range | +|-------------------------|-----------------------|-----------------------| +| `rml:parentLogicalView` | `rml:LogicalViewJoin` | `rml:LogicalView` | +| `rml:joinCondition` | `rml:LogicalViewJoin` | `rml:Join` | +| `rml:field` | `rml:LogicalViewJoin` | `rml:ExpressionField` | ### Join types {#dfn-join-type} @@ -39,10 +39,12 @@ If an inner joins would have been used, the logical view would have only 3 logic :csvView a rml:LogicalView ; rml:viewOn :csvSource ; rml:field [ + a rml:ExpressionField ; rml:fieldName "name" ; rml:reference "name" ; ] ; rml:field [ + a rml:ExpressionField ; rml:fieldName "birthyear" ; rml:reference "birthyear" ; ] ; @@ -53,10 +55,12 @@ If an inner joins would have been used, the logical view would have only 3 logic rml:child "name" ; ] ; rml:field [ + a rml:ExpressionField ; rml:fieldName "item_type" ; rml:reference "item.type" ; ] ; rml:field [ + a rml:ExpressionField ; rml:fieldName "item_weight" ; rml:reference "item.weight" ; ] ; @@ -143,10 +147,12 @@ When an inner join is used, the resulting logical view has only 3 logical iterat :csvView a rml:LogicalView ; rml:viewOn :csvSource ; rml:field [ + a rml:ExpressionField ; rml:fieldName "name" ; rml:reference "name" ; ] ; rml:field [ + a rml:ExpressionField ; rml:fieldName "birthyear" ; rml:reference "birthyear" ; ] ; @@ -157,10 +163,12 @@ When an inner join is used, the resulting logical view has only 3 logical iterat rml:child "name" ; ] ; rml:field [ + a rml:ExpressionField ; rml:fieldName "item_type" ; rml:reference "item.type" ; ] ; rml:field [ + a rml:ExpressionField ; rml:fieldName "item_weight" ; rml:reference "item.weight" ; ] ; @@ -246,10 +254,12 @@ tobias,789 :additionalCsvView a rml:LogicalView ; rml:viewOn :additioncalCsvSource ; rml:field [ + a rml:ExpressionField ; rml:fieldName "name" ; rml:reference "name" ; ] ; rml:field [ + a rml:ExpressionField ; rml:fieldName "id" ; rml:reference "id" ; ] . @@ -257,10 +267,12 @@ tobias,789 :csvView a rml:LogicalView ; rml:viewOn :csvSource ; rml:field [ + a rml:ExpressionField ; rml:fieldName "name" ; rml:reference "name" ; ] ; rml:field [ + a rml:ExpressionField ; rml:fieldName "birthyear" ; rml:reference "birthyear" ; ] ; @@ -271,10 +283,12 @@ tobias,789 rml:child "name" ; ] ; rml:field [ + a rml:ExpressionField ; rml:fieldName "item_type" ; rml:reference "item.type" ; ] ; rml:field [ + a rml:ExpressionField ; rml:fieldName "item_weight" ; rml:reference "item.weight" ; ] ; @@ -286,6 +300,7 @@ tobias,789 rml:child "name" ; ] ; rml:field [ + a rml:ExpressionField ; rml:fieldName "id" ; rml:reference "id" ; ] ; diff --git a/spec/section/records.md b/spec/section/records.md index 243b751..1f3c47c 100644 --- a/spec/section/records.md +++ b/spec/section/records.md @@ -20,7 +20,7 @@ tobias,2005
item.type.# item.type item.weight.#item.weightitem.weight
0 @@ -1126,7 +1126,7 @@

RML Logical Views

-

5.4 Field reference formulations and iterators

A field MUST have a reference formulation and a logical iterator . +

5.4 Field reference formulations and iterators

A field MUST have a reference formulation and a logical iterator . If no reference formulation is declared for a field, the reference formulation of the field parent is implied. If no iterator is declared for a field, the default iterator of the field's reference formulation is implied.

For the application of the expression of a field on the records of the field parent, the parent's reference formulation is used, resulting in record sequence R. Afterwards the field's iterator is applied on this resulting record sequence R to obtain the field record sequence defined by the field.

@@ -1135,7 +1135,7 @@

RML Logical Views

In this example a logical view is defined on a logical source with reference formulation rml:JSONPath. -The field with declared name "item" has a declared reference formulation rml:CSV and CSV row as implicit iterator. +The field with declared name "item" has a declared reference formulation rml:CSV and CSV row as implicit iterator. First the expression "$.items" is evaluated using the reference formulation of the field parent. Second, the implicit iterator of the field is applied on the resulting records. The nested fields with declared name "type" and "weight" are evaluated using the reference formulation rml:CSV from their parent field with declared name "item".

{
@@ -1149,12 +1149,12 @@ 

RML Logical Views

"items": "type,weight\nflower,15" } ] -} +}
# <it>itemsitems.# item item.# item.typetype,weight\nsword,1500\nshield,25000 sword,1500 0 swordtype,weight\nsword,1500\nshield,25000 shield,2500 1 shieldtype,weight\nflower,150 flower,15 0 flower