My favorites | Sign in
Project Logo
                
Search
for
Updated Jul 21, 2008 by alexmilowski
users  
Users Guide

Resource Structure

Atomojo stores feeds in a hierarchy much like a file system. Each feed is accessible from a base path much like a directory name starting with the root resource /R/.

For example, if your server is listening on https://localhost:8080, then your root feed is:

https://localhost:8080/R/

A sub-feed is just another segment in the resource path. That is, if you have a sub-feed with segment name 'S1', then the feed's URI is:

https://localhost:8080/R/S1/

If you upload media entries, those entries will be located related to the feed's URI with the slug you choose. For example, if you post a media entry with a Slug header of index.html, then the resource URI (using the above feed's URI) is:

https://localhost:8080/R/S1/index.html

Finally, entries can be accessed as "entry documents" by suffixing the feed's URI with _/{entry-id} where {entry-id} is the UUID of the entry.

Getting Started

When you first start Atomojo you have no feeds in the database--not even a root feed. You can create a feed at any path and Atomojo will create the feeds inbetween.

A feed is created by a POST of a Atom feed document to a path. All the necessary feed documents for missing path segments are created and the feed document's information (e.g. title) is used to create the feed.

For example, to create a root feed on a server running at https://localhost:8080, just post:

POST /R/
Content-Type: application/atom+xml
...
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Root Feed</title>
...
</feed>

After the feed is created, the Atom Publishing Protocol can be used to manipulated a feed.

If you want to delete a feed, you just use a DELETE on the feed's URI. This will delete the feed and all children feeds.

Introspection

The service introspection document is available from the root resource at the base URI of the server. It returns only one workspace for the entire atomojo database.

Metadata Feeds

Metadata feeds give you information about a feed's context. This feed currently returns entries for the children feeds and all ancestor feeds categorized either with terms:

A metadata feed can be retrieved for each feed using the resource base /M/. For example, if the feed's URI is:

   https://localhost:8080/R/S1/

the metadata feed is:

   https://localhost:8080/M/S1/

Term Feeds

A term feed enumerates all entries and feeds that use a particular term. These feeds are accessible from the resource base /T/.

Terms are associated with feeds or entries using the Atom category element. The scheme attribute and term attribute are concatenated to create a single URI that represents the term.

The term URI can be use to directly pull the feed by the URI:

   https://localhost:8080/T/{uri}

By default, a category element that does not have scheme attribute is considered a keyword (i.e. "tag") and can be retrieved by the term value alone:

   https://localhost:8080/T/{term}

A term is generated from the atom:category element. For example:

   <atom:category scheme="http://www.atomojo.org/O/example/" term="term"/>

generates the Term URI http//www.atomojo.org/O/example/term. If the element has a value, that value is associated with that term and the entry or feed on which the atom:category exists.

For example, if an entry has the element:

   <atom:category scheme="http://www.atomojo.org/O/example/" term="term">some value</atom:

The entry has the triple:

   (entry, http://www.atomojo,org/O/example/term, 'some value')

You can then query for that value by the URI:

   https://localhost:8080/T/http://www.atomojo,org/O/example/term?value=some+value

You may also leave off the 'http://' on the term just in case the client system has an issue with a colon in segment names:

   https://localhost:8080/T/www.atomojo,org/O/example/term?value=some+value

In either case, the feed returned will contain entries or feed entries for any object whose triple has the term with the associated value of 'some value'.

Term Queries

You can query your feeds by term information by posting a SPARQL query to the term base URI:

   https://localhost:8080/T/

The media type of SPARQL is application/sparql-query.

For example, to retrieve any entry with the keyword atom:

PREFIX k: <http://www.atomojo.org/O/keyword/>
PREFIX t: <http://www.atomojo.org/O/type/>
SELECT ?e
WHERE { ?e t:entry (); k:atom () . }

The result is a feed that contains the entries that matched the query.



Sign in to add a comment
Hosted by Google Code