in Education by
I am trying to use Jena or some other Java library to achieve some coding challenge (in this case a rewriting through post-order traversal). I am not asking a methodology to translate SPARQL to SQL query. I already have that. I am currently trying to translate a given SPARQL query into an some other SQL query. So far, I've used Jena parser, that given a SPARQL query, returns an ARQ tree representation, that can be traversed in post-order. This is exactly what I want to do. The only problem is that the Walker, just walks through the tree. What I would like to do, is something like this (suppose I am going through a MINUS) : String visit(OpMinus minus){ String l_res = minus.getLeft().visit(); String r_res = minus.getRight().visit(); /* ... do some stuff with the result ... */ String res = l_res + "MINUS (" + r_res + ")"; return res; } Jena's visitor however returns void, making this impossible. Is there another way of doing it, instead of copying the Walker and the Visitor code, in order to make it work the way I want ? Thank you. I am not looking for a SPARQL-to-SQL direct translator, because I need to work with the tree elements. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I eventually solved the problem by implementing my own Walker (since anything I am looking for is implemented in Jena) that traverses the tree in post-order and returns Strings

Related questions

0 votes
    How do you load more than 1 Max Sal in each Department through Informatica or write sql query in oracle?...
asked Mar 28, 2021 in Technology by JackTerrance
0 votes
    Why the parsing is used? (a) Interpretation (b) Building a parse tree (c) Recognition (d) All of the mentioned Please answer the above question....
asked Oct 22, 2022 in Education by JackTerrance
0 votes
    How many states are present in parsing? (a) 1 (b) 2 (c) 3 (d) 4 Please answer the above question....
asked Oct 22, 2022 in Education by JackTerrance
0 votes
    Pick out the correct option about the types of parsing. (a) Top-down and bottom-up parsing (b) Interpretation and ... (d) None of the mentioned Please answer the above question....
asked Oct 22, 2022 in Education by JackTerrance
0 votes
    Parsing determines Parse Trees (Grammatical Analysis) for a given sentence. (a) True (b) False I got ... and Acting of Artificial Intelligence Please answer the above question....
asked Oct 9, 2022 in Education by JackTerrance
0 votes
    Parsing determines Parse Trees (Grammatical Analysis) for a given sentence. (a) True (b) False I got ... and Acting of Artificial Intelligence Please answer the above question....
asked Oct 2, 2022 in Education by JackTerrance
0 votes
    How do I parse a string eg. "01/21 - 02/20" which is represented as month/day to month/day. ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 14, 2022 in Education by JackTerrance
0 votes
    How do I parse a string eg. "01/21 - 02/20" which is represented as month/day to month/day. ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 18, 2022 in Education by JackTerrance
0 votes
    In my first class i parse my xml file like this : class ListActeurs(): fonction_key = "DiagramElements" ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
0 votes
    I want parse one line from html site, but my code not working MainActivity: @Override protected void ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    I've got a problem similar to this question: SAXParseException localized I'm trying to parse a XML file ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    Someone please correct me if I'm wrong, but parsing a yyyy/MM/dd (or other specific formats) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 26, 2022 in Education by JackTerrance
0 votes
    Someone please correct me if I'm wrong, but parsing a yyyy/MM/dd (or other specific formats) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 26, 2022 in Education by JackTerrance
0 votes
    I am constructing a tuning fork app. The fork should allow up to 12 preset pitches. Moreover, I ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 27, 2022 in Education by JackTerrance
0 votes
    Main way to read the data back in (parsing it) using the function. (a) dput() (b) write() (c) ... and Operations of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
...