I guess you are looking for SPARQL CONSTRUCT statement.
Reference: http://www.w3.org/TR/rdf-sparql-query/#construct
This gives you the possibility to get "personalised ontologies" as result
(= whole rdf statements).
With SELECT in contrast you always get results of tables (in your query
it's a table with one column).
Here two examples:
CONSTRUCT {<http://dbpedia.org/resource/Presidency_of_Barack_Obama> ?prop
category:Presidency_of_Barack_Obama}
WHERE {<http://dbpedia.org/resource/Presidency_of_Barack_Obama> ?prop
category:Presidency_of_Barack_Obama}
CONSTRUCT {?s ?prop category:Presidency_of_Barack_Obama. ?s
<http://myProperty> "I like it".}
WHERE {?s ?prop category:Presidency_of_Barack_Obama}
With the Sparql Endpoint you can even choose a desired result format (at
http://dbpedia.org/sparql drop down box called "Format Results As"), e.g.
"RDF/XML". Jena should be able to import "RDF/XML" serialized strings.
Greets,
Benjamin
Am 03.03.2011, 23:06 Uhr, schrieb Erdem Begenilmis
<[email protected]>:
> ---------- Forwarded message ----------
> From: Erdem Begenilmis <[email protected]>
> Date: 2011/3/3
> Subject: Re: [Dbpedia-discussion] getting graph of data
> To: l Yu <[email protected]>
>
>
> yes my question was about that. But it is not exactly what I want.
>
> I'm looking for getting graphs as a result of my sparql query. Because,
> the
> results of sparql are url based in dbpedia, so I can not use them as
> ontology. When I get a property or an object as the result of sparql, it
> is
> only the url of it. Therefore, I can not use it in Jena and can not see
> the
> other properties connected to it. For instance, when I execute the query
> below
>
> * select distinct ?prop where { <
> http://dbpedia.org/resource/Presidency_of_Barack_Obama> ?prop
> category:Presidency_of_Barack_Obama} *
> *
> *
> the result is the url of the property which is *
> http://purl.org/dc/terms/subject. *However, because of it is url based, I
> can not get the other ranges that connected to this property by simply
> using
> Jena. So, everytime I write query, I need to expand the results of query.
>
> I wonder is it possible to take this property from dbpedia in the
> format that we can simply put it in Jena and use functionalities of Jena
> to
> get other data connected to that property.
>
> 2011/3/3 l Yu <[email protected]>
>
> hope I understand the question correct.
>>
>> DBpedia allows you to download a collection of datasets from here:
>>
>> http://wiki.dbpedia.org/Downloads36
>>
>> and these are in N-Triple format (not RDF/XML). You should be able to
>> find
>> short description about each dataset from the above page as well.
>> On Wed, Mar 2, 2011 at 4:53 AM, Erdem Begenilmis <
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>> we'd like to take data as a graph for better query performance and
>>> usage
>>> of ontology.However, we couldn't find how to do it in DBPedia. DBPedia
>>> provides data only with a sparql end point. How can we achieve that ??
>>> ------------------------------------------------------------------------------
>>> Free Software Download: Index, Search & Analyze Logs and other IT data
>>> in
>>> Real-Time with Splunk. Collect, index and harness all the fast moving
>>> IT
>>> data
>>> generated by your applications, servers and devices whether physical,
>>> virtual
>>> or in the cloud. Deliver compliance at lower cost and gain new business
>>> insights. http://p.sf.net/sfu/splunk-dev2dev
>>> _______________________________________________
>>> Dbpedia-discussion mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
>>>
>>>
>>
--
Benjamin Großmann
Neofonie
Technologieentwicklung und
Informationsmanagement GmbH
Robert-Koch-Platz 4
10115 Berlin
fon: +49.30 24627 257
fax: +49.30 24627 120
[email protected]
http://www.neofonie.de
Handelsregister
Berlin-Charlottenburg: HRB 67460
Geschäftsfuehrung
Thomas Kitlitschko
Dr. Mario Lenz
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion