Appendix E: Atom XML Representation examples
In this section we present example Atom format representations of the example resources defined in Appendix A.
Resource
Below is an example Atom entry representation of the example blog entry.
<entry>
<id>http://example.com/blogs/entry/1</id>
<title>I love trash</title>
<author><name>Oscar T. Grouch</name></author>
<content type="application/rdf+xml>
<rdf:RDF
xmlns:oslc_blog="http://open-services.net/ns/bogus/blogs#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:foaf="http://http://xmlns.com/foaf/0.1/"
xmlns:dcterms="http://purl.org/dc/elements/1.1/">
<oslc_blog:Entry
rdf:about="http://example.com/blogs/entry/1">
<rdf:type
rdf:resource="http://open-services.net/ns/bogus/blogs#Entry" />
<dcterms:title>I love trash</dcterms:title>
<dcterms:modified>2002-10-10T12:00:00-05:00</dcterms:modified>
<dcterms:content>
Anything dirty or dingy or dusty.
Anything ragged or rotten or rusty.
</dcterms:content>
<dcterms:creator>
<foaf:Person>
<foaf:name>Oscar T. Grouch</foaf:name>
</foaf:Person>
</dcterms:creator>
</oslc_blog:Entry>
</rdf:RDF>
</content>
</entry>
Below is an example Atom entry representation of the example blog comment.
<entry>
<id>http://example.com/comments/1</id>
<title>Blog Comment</title>
<author><name>William B. Bird</name></author>
<content type="application/rdf+xml>
<rdf:RDF
xmlns:oslc_blog="http://open-services.net/ns/bogus/blogs#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:foaf="http://http://xmlns.com/foaf/0.1/"
xmlns:dcterms="http://purl.org/dc/elements/1.1/" >
<oslc_blog:Comment
rdf:about="http://example.com/comments/1">
<oslc_blog:entry rdf:resource="http://example.com/blogs/entry/1" />
<dcterms:content>LOL! Tell us how you really feel, Oscar.</dcterms:content>
<dcterms:modified>2002-10-10T12:12:23-05:00</dcterms:modified>
<dcterms:creator>
<foaf:Person>
<foaf:name>William B. Bird</foaf:name>
</foaf:Person>
</dcterms:creator>
</oslc_blog:Comment>
</rdf:RDF>
</content>
</entry>
Query Resource
Below is an example Atom feed representation of the example blog query result.
<feed
xmlns:blog="http://open-services.net/ns/bogus#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:foaf="http://http://xmlns.com/foaf/0.1/"
xmlns:oslc="http://open-services.net/ns/core#>
<id>http://example.com/query?page=2&oslc.from [...] 1></id>
<title>Blog Query Results for term [remote]<title>
<updated>2009-10-10T12:00:00-05:00</updated>
<link rel="self"
href="http://example.com/query?oslc.from [...] entry/1>">
<link rel="next"
href="http://example.com/query?page=2&oslc.from [...] entry/1>">
<entry>
<title>Blog Query Result for term [remote]<title>
<updated>2009-10-10T12:00:00-05:00</updated>
<content type="application/rdf+xml">
<rdf:RDF>
<oslc_blog:BlogComment rdf:about="http://example.com/query">
<oslc_blog:comment rdf:resource="http://example.com/blogs/comment/1" />
</oslc_blog:BlogComment>
</rdf:RDF>
</content>
</entry>
<entry>
<title>Blog Query Result for term [remote]<title>
<updated>2009-10-10T12:00:00-05:00</updated>
<content type="application/rdf+xml">
<rdf:RDF>
<oslc_blog:BlogComment rdf:about="http://example.com/query">
<oslc_blog:comment rdf:resource="http://example.com/blogs/comment/5" />
</oslc_blog:BlogComment>
</rdf:RDF>
</content>
</entry>
<entry>
<title>Blog Query Result for term [remote]<title>
<updated>2009-10-10T12:00:00-05:00</updated>
<content type="application/rdf+xml">
<rdf:RDF>
<oslc_blog:BlogComment rdf:about="http://example.com/query">
<oslc_blog:comment rdf:resource="http://example.com/blogs/comment/4" />
</oslc_blog:BlogComment>
</rdf:RDF>
</content>
</entry>
<entry>
<title>Blog Query Result for term [remote]<title>
<updated>2009-10-10T12:00:00-05:00</updated>
<content type="application/rdf+xml">
<rdf:RDF>
<oslc_blog:BlogComment rdf:about="http://example.com/query">
<oslc_blog:comment rdf:resource="http://example.com/blogs/comment/3" />
</oslc_blog:BlogComment>
</rdf:RDF>
</content>
</entry>
<entry>
<title>Blog Query Result for term [remote]<title>
<updated>2009-10-10T12:00:00-05:00</updated>
<content type="application/rdf+xml">
<rdf:RDF>
<oslc_blog:BlogComment rdf:about="http://example.com/query">
<oslc_blog:comment rdf:resource="http://example.com/blogs/comment/2" />
</oslc_blog:BlogComment>
</rdf:RDF>
</content>
</entry>
</feed>
Topic revision: r7 - 30 Jun 2010 - 18:47:02 -
DaveJohnson