Skip to content
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

Defining the tree:relation in terms of SPARQL algebra #116

Open
constraintAutomaton opened this issue Oct 14, 2024 · 1 comment
Open

Defining the tree:relation in terms of SPARQL algebra #116

constraintAutomaton opened this issue Oct 14, 2024 · 1 comment
Assignees

Comments

@constraintAutomaton
Copy link

I think it is fair to assume that the intention behind the tree:relation is to use them in the context of SPARQL. The current tree:relation(s) (apart from the geospatial one, but there is an extension to SPARQL for geospatial queries , called GeoSPARQL) are strongly linked to the SPARQL algebra. Thus, to improve the understanding of that relation and to help their implementation inside query engines, it might be a good idea to define them in terms of SPARQL algebra. The task should be simple and not have a big impact on how the current relation has been defined.

I will make soon a proposal.

@constraintAutomaton constraintAutomaton self-assigned this Oct 14, 2024
@pietercolpaert pietercolpaert moved this to In progress in 2025-March Oct 18, 2024
@constraintAutomaton
Copy link
Author

constraintAutomaton commented Jan 20, 2025

I've produced this simple draft. I know we might want to complexify the string relations and that tree:GreaterThanRelation mention

For string comparison, this relation can refer to a comparison configuration

Draft

An entity that describes a relation between two tree:Nodes.

The tree:Relation has specific sub-classes that implement a more specific type between the values. These types are described in the ontology (all classes are rdf:subClassOf tree:Relation). tree:Relation can be express in term of SPARQL algebra functions.

  • String, Date or Number comparison:

    • tree:PrefixRelation — All elements in the related node have this prefix. Must conform to the STRSTARTS SPARQL function.
    • tree:SubstringRelation — All elements in the related node have this substring. Must conform to the SUBSTR SPARQL function.
    • tree:SuffixRelation — All members of this related node end with this suffix. Must conform to the STRENDS SPARQL function.
    • tree:GreaterThanRelation — the related Node’s members are greater than the value. Must conform to the SPARQL Operator Mapping.
    • tree:GreaterThanOrEqualToRelation, tree:LessThanRelation, tree:LessThanOrEqualToRelation, tree:EqualToRelation, tree:NotEqualToRelation — similar to ↑
  • Geo-spatial comparison (requires the node values to be WKT-strings):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

No branches or pull requests

1 participant