-
Notifications
You must be signed in to change notification settings - Fork 11
Output dataset section #246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Include last updates
pmaria
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output dataset section is missing descriptions on multivalued term maps and on language maps and datatype maps.
|
Descriptions of datatype/language maps and multivalues are provided |
|
@pmaria can we merge this PR? |
pmaria
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some notes on parts of the text that were merged earlier and I cannot comment on in this PR:
line 93 and 94. The mentions of [=URI=] can be left out, since a URI is an IRI.
I notice in the Adding Triples to the Output Dataset section two points that are new compared to R2RML:
- RDF graphs MUST NOT contain duplicate triples. Adding multiple identical triples to the same graph has the same effect as adding it once.
I cannot recall discussing this in the group. But I do not agree with this point. Deduping does not matter in many cases, and should depend on the implementation and the use case.
- The scope of blank nodes is limited to the output dataset being generated.
This is true, but seems somewhat misplaced in this section. I think it would make more sense in the Generated RDF Term of a Term Map section.
| - **sm** be the [=subject map=] of the [=Triples Map=]. | ||
| - **records** be the set of logical records obtained by evaluating the [=logical source=] of the [=Triples Map=] using its declared [=reference formulation=]. | ||
| - **iterations** be the set of [=logical iterations=] obtained by evaluating the [=logical source=] of the [=Triples Map=] using its declared [=reference formulation=]. | ||
| - **classes** be the set of class [=IRIs=] defined in **sm** (via `rml:class`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - **classes** be the set of class [=IRIs=] defined in **sm** (via `rml:class`). | |
| - **classes** be the set of [=class IRIs=] defined in **sm** (via `rml:class`). |
May have to mark class IRIs as definition.
| 2. Let **subject_graphs** be the set of [=RDF term=] resulting from applying each graph map in **sgm** to **record**. | ||
| 1. Let [=subject=] be the [=RDF term=] resulting from applying **sm** to **iteration**. | ||
| 2. Let **subject_graphs** be the set of [=RDF term=] resulting from applying each graph map in **sgm** to **iteration**. | ||
| 3. For each class [=IRI=] in **classes**, add a triple to the [=output dataset=] as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 3. For each class [=IRI=] in **classes**, add a triple to the [=output dataset=] as follows: | |
| 3. For each [=class IRI=] in **classes**, add a triple to the [=output dataset=] as follows: |
| 1. Let [=subject=] be the [=RDF term=] resulting from applying **sm** to **record**. | ||
| 2. Let **subject_graphs** be the set of [=RDF term=] resulting from applying each graph map in **sgm** to **record**. | ||
| 1. Let [=subject=] be the [=RDF term=] resulting from applying **sm** to **iteration**. | ||
| 2. Let **subject_graphs** be the set of [=RDF term=] resulting from applying each graph map in **sgm** to **iteration**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 2. Let **subject_graphs** be the set of [=RDF term=] resulting from applying each graph map in **sgm** to **iteration**. | |
| 2. Let **subject_graphs** be the set of [=generated RDF terms=] resulting from applying each graph map in **sgm** to **iteration**. |
| - Let **predicates** be the set of [=RDF terms=] resulting from applying each predicate map of the predicate-object map to **record**. | ||
| - Let **objects** be the set of [=RDF terms=] resulting from applying each object map (excluding [=referencing object maps=]) to **record**. | ||
| - Let **predicates** be the set of [=RDF terms=] resulting from applying each predicate map of the predicate-object map to **iteration**. | ||
| - Let **objects** be the set of [=RDF terms=] resulting from applying each object map (excluding [=referencing object maps=]) to **iteration**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Let **objects** be the set of [=RDF terms=] resulting from applying each object map (excluding [=referencing object maps=]) to **iteration**. | |
| - Let **objects** be the set of [=generated RDF terms=] resulting from applying each [=object map=] (excluding [=referencing object maps=]) to **iteration**. |
| - Let **objects** be the set of [=RDF terms=] resulting from applying each object map (excluding [=referencing object maps=]) to **iteration**. | ||
| - Let **pogm** be the set of graph maps of the predicate-object map. | ||
| - Let **predicate_object_graphs** be the set of RDF terms resulting from applying each graph map in **pogm** to **record**. | ||
| - Let **predicate_object_graphs** be the set of RDF terms resulting from applying each graph map in **pogm** to **iteration**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Let **predicate_object_graphs** be the set of RDF terms resulting from applying each graph map in **pogm** to **iteration**. | |
| - Let **predicate_object_graphs** be the set of [=generated RDF terms=] resulting from applying each [=graph map=] in **pogm** to **iteration**. |
| - **Empty**, if any referenced value of the [=term map=] evaluates to a null, empty or missing value (each data format defines it in [RML-IO-Registry](https://w3id.org/kg-construct/rml-io-registry/)); | ||
| - **An [=RDF term=]**, when evaluation produces a valid [=RDF term=]according to the [=term generation rules=]; | ||
| - **An [=RDF term=]**, when evaluation produces a valid [=RDF term=] according to the [=term generation rules=]; | ||
| - **A data error**, when a valid RDF term cannot be produced. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - **A data error**, when a valid RDF term cannot be produced. | |
| - **A [=data error=]**, when a valid RDF term cannot be produced. |
| The [=generated RDF term=] of a [=term map=] for a given logical record is determined as follows: | ||
| The [=generated RDF term=] of a [=term map=] for a given [=logical iteration=] is determined as follows: | ||
|
|
||
| 1. If the term map is a **constant-valued term map**, then the generated RDF term is the term map’s constant value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 1. If the term map is a **constant-valued term map**, then the generated RDF term is the term map’s constant value. | |
| 1. If the term map is a [=constant-valued term map=], then the generated RDF term is the term map’s [=constant value=]. |
| 1. If the term map is a **constant-valued term map**, then the generated RDF term is the term map’s constant value. | ||
| 2. If the term map is a **reference-valued term map**, then the generated RDF term is determined by evaluating the [=reference value=] expression over the logical record and applying the *term generation rules* to the resulting value. | ||
| 3. If the term map is a **template-valued term map**, then the generated RDF term is determined by evaluating the [=template value=] against the logical record and applying the *term generation rules* to the resulting value. | ||
| 2. If the term map is a **reference-valued term map**, then the generated RDF term is determined by evaluating the [=reference value=] expression over the [=logical iteration=] and applying the [=term generation rules=] to the resulting value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 2. If the term map is a **reference-valued term map**, then the generated RDF term is determined by evaluating the [=reference value=] expression over the [=logical iteration=] and applying the [=term generation rules=] to the resulting value. | |
| 2. If the term map is a [=reference-valued term map=], then the generated RDF term is determined by applying the [=term generation rules=] to its [=reference value=]. |
| 2. If the term map is a **reference-valued term map**, then the generated RDF term is determined by evaluating the [=reference value=] expression over the logical record and applying the *term generation rules* to the resulting value. | ||
| 3. If the term map is a **template-valued term map**, then the generated RDF term is determined by evaluating the [=template value=] against the logical record and applying the *term generation rules* to the resulting value. | ||
| 2. If the term map is a **reference-valued term map**, then the generated RDF term is determined by evaluating the [=reference value=] expression over the [=logical iteration=] and applying the [=term generation rules=] to the resulting value. | ||
| 3. If the term map is a **template-valued term map**, then the generated RDF term is determined by evaluating the [=template value=] expression over the [=logical iteration=] and applying the [=term generation rules=] to the resulting value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 3. If the term map is a **template-valued term map**, then the generated RDF term is determined by evaluating the [=template value=] expression over the [=logical iteration=] and applying the [=term generation rules=] to the resulting value. | |
| 3. If the term map is a [=template-valued term map=], then the generated RDF term is determined by applying the [=term generation rules=] to the [=template value=]. |
| 3. If the term map is a **template-valued term map**, then the generated RDF term is determined by evaluating the [=template value=] expression over the [=logical iteration=] and applying the [=term generation rules=] to the resulting value. | ||
|
|
||
| The <dfn>term generation rules</dfn> define how a concrete RDF term is generated from a given value: | ||
| The <dfn>term generation rules</dfn> define how a concrete RDF term is generated from each value from the [=expression evaluation result=]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The <dfn>term generation rules</dfn> define how a concrete RDF term is generated from each value from the [=expression evaluation result=]: | |
| The <dfn>term generation rules</dfn> define how a concrete RDF term is generated from each value from an [=expression evaluation result=]: |
@pmaria I don't know why output-dataset was included in #244, but please, use this PR to review the whole section.