Contacts Tutorial

From n² wiki

Jump to: navigation, search
  • send mail to danny.ayers@gmail.com -
I'd like to play around with a store,
 could you give me an account?
  • create some FOAF, save as person.rdf -
<rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns="http://xmlns.com/foaf/0.1/">
      
 <Person rdf:about="http://example.com/joelambda#me">
    <name>Joe Lambda</name>
    <nick>jol</nick>
    <mbox rdf:resource="mailto:joe.lambda@example.com" />
  </Person>
  
 <Person rdf:about="http://example.com/janelambda#me">
    <name>Jane Lambda</name>
    <nick>jal</nick>
    <mbox rdf:resource="mailto:jane.lambda@example.com" />
  </Person>
  
   <Person rdf:about="http://example.com/lutherblisset#me">
    <name>Luther Blisset</name>
    <nick>lblisset</nick>
    <mbox rdf:resource="mailto:luther.blisset@example.com" />
  </Person>  
  
 </rdf:RDF>
  • upload using curl (change user:pass) -
curl -v --digest -u "user:pass" \
     -H "Content-type:application/rdf+xml" \
     --data @person.rdf \
     http://api.talis.com/stores/danja-dev1/meta

-v : verbose

--digest : use digest auth

-u : user

-H : header

--data @filename : HTTP POST filename

  • check data is in store
    • open a browser at :

http://api.talis.com/stores/{store name}/services/sparql

PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
DESCRIBE ?x
WHERE    { ?x a foaf:Person }

SPARQL_CONTACTS = "\";


Personal tools