Hi, Gunnar,

What you are talking about is interesting to me.

I have files which have some triples like the following.

<http://opendatacommunities.org/id/geography/administration/par/E04009840> 
<http://opendatacommunities.org/def/geography#boundaryAsJSONP> 
<http://maps.communities.gov.uk/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeName=admingeo:PAR_DEC_2013_EW_WGS84&outputFormat=text/javascript&cql_filter=PAR13CD=%27E04009840%27>
 
.

How can I define something with geography, then specify boundaryAsJSONP, so 
that I can retrieve the long string definition.

Regards,

David

On Monday, November 25, 2013 at 6:43:02 PM UTC, Gunnar Aastrand Grimnes 
wrote:
>
> Hey Benedikt, 
>
> You have two mistakes, firstly, RDF is triples of subject, predicate, 
> object (s,p,o) - the rdflib resource object lets you tie down the subject 
> part and more easily query the p's and o's to go with that subject. If you 
> wanted to list everything known about a given person, you could have used 
> "resource", but you are actually interested in all (s,o) pairs that are 
> related the surname property. 
>
> The other mistake is the URL for the surname property, you did: 
>
> > gnd.resource('gnd:surname')
>
> but RDFLib doesn't know how to expand the "gnd:" prefix shorthand to the 
> full URL like this. Instead, you define a namespace: 
>
> > GND = Namespace('http://d-nb.info/standards/elementset/gnd#')
>
> and then you can do: 
>
> GND.surname 
>
> to get the a URIRef object representing your property. 
>
> This you can use in a call to graph.subject_objects() and you get your 
> values: 
>
> for person, name in gnd.subject_objects(GND.surname): 
>    print person, name
>
> Have fun!
>
> - Gunnar
>
>
>
>
> On 25 November 2013 18:27, Benedikt Tröster <[email protected] 
> <javascript:>> wrote:
>
>> Hey!
>>
>> I'm completely new to the rdf-lib and I tried my best to understand the 
>> examples. But I couldn't find a good example for my simple task of reading 
>> only surnames from an rdf-file (it's portion of the GND, to be exact).
>>
>> Here is my code:
>> http://pastebin.com/aGJyS9Vz
>>
>> Here are the contents of the rdf-file:
>> http://pastebin.com/x3HVT4vf
>>
>> This code simply returns nothing...
>> I don't understand how to achieve what I want... Is there a significant 
>> difference when accessing data online and from a file? (I'm a little 
>> confused by the BaseURI - What are they used for?)
>>
>> Greetings and thanks for helping out a newbie :)
>>
>> -- 
>> http://github.com/RDFLib
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "rdflib-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/rdflib-dev/73fba093-53f8-4396-bb17-196ec1bbd3c9%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> http://gromgull.net 
>

-- 
http://github.com/RDFLib
--- 
You received this message because you are subscribed to the Google Groups 
"rdflib-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rdflib-dev/1d14ce66-c098-4b8b-995b-d52e4093103f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to