Extending SparqlQueryEvaluatorDefault #5749
-
|
For our project we're thinking about extending the However, this class is package-private: Moreover, even if we would be able to import this class, we would run into the next problem: We cannot use I don't think a wrapper would help here, so, it looks like the only way to "extend" How would you go about this? Is there a specific reason why these two classes were not made public (@naturzukunft)? If not, could they be made |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi, The rebuild was a while ago. I can't remember the details anymore. Back then, I rebuilt it to the best of my knowledge and belief so that I could use it. But it's not optimal. I'm not a fan of inheritance, and my interface implementations are almost always package private ;-) Almost 10 years ago, I first heard about "share nothing" and was appalled. It occupied my thoughts for many days, and I came to the conclusion that many problems in my then 15 years as a Java developer could be traced back to it. We often accept dependencies for a handful of lines of code, and our software becomes more complex and dependent as a result. The dreaded word "redundancy" might not be as bad as it's made out to be. "QueryTypes" has always scared me. I wanted to rebuild it back then, but it's not that easy! Making QueryTypes public would mean rdf4j could never refactor it! And since SparqlQueryEvaluatorDefault uses QueryTypes, the same would apply! I think the implementation of SparqlQueryEvaluator could be improved, and if it were my framework, I wouldn't publish it. The original code wasn't mine, though; I don't know if it was package private from the start or not. In my rdf4j abstraction, I have more or less a copy of SparqlQueryEvaluatorDefault & QueryTypes, and I've never managed to refactor it there either ;-o And after several years and "attempts" (including commons-rdf), I've ended up with my own rdf abstraction layer. It works for me, and I can replace rdf4j with Jena or something else without having to change my projects. ^ I wrote this in a hurry and translated it using Google Translate without checking it over. I hope it’s okay.
|
Beta Was this translation helpful? Give feedback.
Hi,
The rebuild was a while ago. I can't remember the details anymore.
Back then, I rebuilt it to the best of my knowledge and belief so that I could use it. But it's not optimal.
I'm not a fan of inheritance, and my interface implementations are almost always package private ;-)
Almost 10 years ago, I first heard about "share nothing" and was appalled. It occupied my thoughts for many days, and I came to the conclusion that many problems in my then 15 years as a Java developer could be traced back to it.
We often accept dependencies for a handful of lines of code, and our software becomes more complex and dependent as a result.
The dreaded word "redundancy" might not be as bad as it's ma…