Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

OpComponentAnalyser and fx:anySlot #407

Closed
luigi-asprino opened this issue Oct 19, 2023 · 1 comment
Closed

OpComponentAnalyser and fx:anySlot #407

luigi-asprino opened this issue Oct 19, 2023 · 1 comment
Assignees
Labels
Bug Something isn't working
Milestone

Comments

@luigi-asprino
Copy link
Member

luigi-asprino commented Oct 19, 2023

OpComponentAnalyser does not work well with fx:anySlot.

I'm trying to make SA work with no service mode (see #150) and with magic properties (see #150 (comment)).
I set up a test in sparql-anything-cli/../test/OptionsViaCommandLineTest to experiment with this new feature.
The test executes SA with the command-line property {content=abc} and the query

PREFIX fx: <http://sparql.xyz/facade-x/ns/> 
SELECT ?v {  
   ?root a fx:root ;   
          fx:anySlot ?v  . 
}

which translates to algebra

(propfunc <http://sparql.xyz/facade-x/ns/anySlot>
  ?root ?v
  (bgp (triple ?root <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://sparql.xyz/facade-x/ns/root>)))

1b7afae introduces a FXWorker for reacting to OpPropFunc.
This makes it possible to execute the FX workflow in case of queries like the one above in which the outer operation involves magic properties.
However, the execution goes as expected except for the OpComponentAnalyser which filters out the triple

_:xx rdf:_1 "abc"

This is maybe due to the fact that fx:anySlot is not listed among the components (i.e. opComponents) thus making the match() to fail.

@luigi-asprino luigi-asprino self-assigned this Oct 19, 2023
@luigi-asprino luigi-asprino added the Bug Something isn't working label Oct 19, 2023
@luigi-asprino luigi-asprino added this to the v0.9.0 milestone Oct 19, 2023
@luigi-asprino
Copy link
Member Author

8c25151 makes OpComponentsAnalyser sensible to OpPropFunc. Specifically, the OpPropFuncs are collected in opComponents and then used by the match() method. The match method checks that the triple/quad to insert in the dataset graph matches with the property of the OpPropFunc and subject and object match with the arguments of the operation.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant