0

I am doing some work over a subscribe/publish system. With a ontology we can provide with some attributes for users to fill in and then we turn it into a sparql query to match with the items in our database, but there is a function in our system that the users are allowed to view their own queries, as they are stored in the database in sparql format and it is not very good to show them sparql sentences directly, so I am wondering if there is a way to visualize the sparql sentences?

For example, below is a sparql stored in the database, it is about a subscription of auction event:

SELECT ?News1 WHERE {?News1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://sps.kse.seu.edu.cn/ontologydemo.owl#News> .?News1 <http://sps.kse.seu.edu.cn/ontologydemo.owl#aboutEvent> ?Auction1 .
       ?Auction1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://sps.kse.seu.edu.cn/ontologydemo.owl#Auction> .}

With this, can I get some hints like "you're asking for Auction news" to show to the users?By the way, I am using java language and the MyEclipse as the development tool, Thanks!

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
Stepin2
  • 49
  • 8
  • 1
    This is probably too broad for Stack Overflow. SPARQL isn't about "sentences", *per se*, but rather about graph patterns. You could try getting some words relating to the query by retrieving the rdfs:labels and rdfs:comments of resources that appear in the query (e.g., you might have `http://sps.kse.seu.edu.cn/ontologydemo.owl#News rdfs:label "News"@en` and `http://sps.kse.seu.edu.cn/ontologydemo.owl#Auction rdfs:label "Auction"@en`), and then you could use these as "keywords" related to a query. So, rather than "you're asking for auction news", you could show "Terms: Auction, News". – Joshua Taylor Apr 21 '14 at 17:11
  • Of course, if the user's constructing these in the first place, why not just add *them* to provide a string describing the query. That might be more useful for them in terms of tagging and retrieval… – Joshua Taylor Apr 21 '14 at 17:14

0 Answers0