3

I just ran into this question which if you just read the title - RDF/XML Output with Jena - is a fairly specific question about a specific framework. It contains a specific code example of using the Jena API (if pretty much lifted verbatim from the official documentation) and describes what the OP is attempting to achieve and their problem.

However on reading the question properly I find that the actual real question boils down to the following (quoted directly from the question text):

Is there a direct way to convert the data returned by the outputsream into a string (or anything similar that can be returned)? Or do i have to save the data to a file with a fileoutputstream and then convert it again to return it?

So essentially the OP is actually asking for how to convert an OutputStream into a String. I know how to do this and I figure surely this must already be covered elsewhere on StackOverflow so after a quick Google I find this question helpfully titled Get an OutputStream into a String which answers the actual question. I could easily write a short answer that tells the OP what to do but for something so general I would much rather point to an appropriate duplicate question.

Therefore I have noted this in a comment on the question and I have voted to close this as a duplicate.

However I am concerned whether this will be considered as a valid duplicate since non-experts are likely to glance at the question and see two completely different questions and reject/skip the question but the duplicate I have voted for is quite clearly appropriate IMO since it will resolve the OPs actual question.

If closing as a duplicate is not appropriate here what would be the appropriate close reason?

The question is not unclear/too broad/primarily opinion based nor does it belong elsewhere on the SE network so duplicate seems the only appropriate close reason.

Also a down vote as opposed to closing does not seem appropriate either in this case as the OP has shown some clear research effort.

4
  • 1
    If the question title doesn't properly indicate the actual question but it is a duplicate, then editing the title and VTC as dupe would probably be appropriate. That way, users with a similar actual problem will find this and the target easily. Often times, titles aren't quite constructed in the most efficient/descriptive way.
    – codeMagic
    Commented Jul 7, 2014 at 14:03
  • The problem is that is isn't just the title that is misleading but that the whole question is. To make the question a clear duplicate I would have to pretty much rip out the entire post apart from the sentences I quoted which is likely to annoy the OP rather than help them and so I am reluctant to do this
    – RobV
    Commented Jul 7, 2014 at 14:05
  • Down vote doesn't indicate a question was poorly researched. It indicates a question is poor. Research is only a (small) part of that.
    – Joe
    Commented Jul 7, 2014 at 14:20
  • Must be an XY problem then. Short of editing the question and changing the title and everything to point to the real problem I cannot think of anything good to do. But then it would be a duplicate. Commented Jul 7, 2014 at 14:24

1 Answer 1

6

Yes. The point of duplicates isn't actually that the questions are identical; it's that the questions have the same functionality and answer. Further, having two very differently titled questions, with different contents (and keywords!) in the question, makes it more likely this set of questions will show up in a Google/whatever search.

You don't need to edit the question, unless it otherwise needs editing. As long as the other question has the same functionality in the question-answer, it's fine to VTC directly.

This does, however, require the question being an otherwise good question. In this case it sounds like the question may not be a great question, in which case it should be edited and/or closed for other reasons.

3
  • As it is the question is more noise than signal and might even distract searchers more than helping anyone. Commented Jul 7, 2014 at 14:26
  • I don't know enough about the framework to agree or disagree, but if what the poster is asking about is a common thing to do, and if the ability to convert an OutputStream into a string is the common necessary bit people are missing in doing that, then it seems fine to me. If that's not true, then, not.
    – Joe
    Commented Jul 7, 2014 at 14:30
  • 1
    Jena is written in Java and the Model.write function takes an OutputSteam or a Writer as argument. Redirecting this into a String is independent from the framework and probably only needs Java knowledge. But yeah, maybe this is a typical problem for Jena users.. Commented Jul 7, 2014 at 14:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .