make parsed SPARQL queries re-serializable
currently, once a sparql query is parsed, it's very difficult to get the text form back if you didn't remember it somewhere
in #565 i accepted a hackish quick solution for this in order to move on, but it's certainly desirable to:
- "just" add
__str__and__repr__toQuery? - revert ff5ada5fa878ca4c9f89b650c588416a6ad320f4 and 6de4da04c162450aedd767f41754d4f6cd3912f3
I think an explicit method is better. __str__ and __repr__ of Query should probably be the prologue and algebra properties. Also, the query should serialize its current state rather than the original string used for parsing this will allow interpolating the algebra and prologue if needed.
I have been working on this on this issue for quite some time now. I was wondering if you could explain in detail, the exact expectations from this so that I can keep those in mind before sending out a PR.