Callimachus supports iterative resource-oriented discovery of folder and "file" resources. Callimachus folders may be discovered and traversed using the REST API. Each folder may be introspected to discover its contents. Contents of folders may be either file-like resources (Binary Large Objects or BLOBs) or RDF resources (in RDF/XML or Turtle formats). BLOBs are stored in a BLOB store and RDF is stored in an RDF database. Folders are virtual constructs so you do not need to know what kind of resource you are dealing with; the interface abstracts one away from that information. The various resource types are described in Appendices.

General metadata regarding a Callimachus instance may be found by requesting an HTTP OPTIONS response from the top-level URL:

OPTIONS http://example.com:8080/ HTTP/1.1

The equivalent curl command is:

curl -i --digest --user john -X OPTIONS "http://example.com:8080/"

A typical response is shown below. Look specifically at the link: header:

HTTP/1.1 204 No Content
Age: 0
ETag: W/"274dde21-a038f4fe"
Last-Modified: Fri, 17 Feb 2012 15:24:45 GMT
Date: Fri, 17 Feb 2012 16:25:20 GMT
Cache-Control: public
access-control-allow-headers: Authorization,Host,Cache-Control,Location,Range,Accept,Accept-Charset,Accept-Encoding,
  Accept-Language,Content-Encoding,Content-Language,Content-Length,Content-Location,Content-MD5,Content-Type,
  If-Match,If-Modified-Since,If-None-Match,If-Range,If-Unmodified-Since
access-control-allow-origin: *
allow: OPTIONS, TRACE, POST, GET, HEAD, DELETE, PUT
link: <http://example.com:8080/#rel=version-history>; rel="version-history"; type="application/atom+xml;q=0.5 text/html"
link: <http://example.com:8080/#rel=search>; rel="search"; type="application/opensearchdescription+xml"
link: <http://example.com:8080/#rel=describedby>; rel="describedby"; type="text/html"; title="RDF Describe"
link: <http://example.com:8080/#rel=contents>; rel="contents"; type="application/atom+xml;q=0.5"
link: <http://example.com:8080/#rel=..archive>; rel="http://callimachusproject.org/rdf/2009/framework#archive"
link: <http://example.com:8080/#rel=alternate&type=html>; rel="alternate"; type="text/html"
link: <http://example.com:8080/#rel=alternate&type=atom>; rel="alternate"; type="text/html application/atom+xml;q=0.5"
content-version: "274dde21"
vary: Accept,Access-Control-Request-Method
access-control-allow-methods: OPTIONS, TRACE, POST, GET, HEAD, DELETE, PUT
Accept-Ranges: bytes
Content-Length: 0
Server: Callimachus Server/Callimachus 0.15

To get a list of top-level resources, look for the Contents URL in the link: header with rel=”contents” (in this fictious case, http://example.com:8080/#rel=contents). Perform an HTTP GET on the URL using an Accept: header as noted in the type attribute (in this case, application/atom+xml), e.g.

GET http://example.com:8080/#rel=contents HTTP/1.1
Accept: application/atom+xml

The equivalent curl command is:

curl -H "Accept: application/atom+xml" "http://example.com:8080/#rel=contents"

Typical results will look like the following. Note that only the first one hundred resources are shown.

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:calli="http://callimachusproject.org/rdf/2009/framework#"
  xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:app="http://www.w3.org/2007/app">
        <id>http://example.com:8080/#rel=contents</id>
        <link href="http://example.com:8080/#rel=describedby" rel="describedby"/>
        <title>example.com:8080</title>
        <app:collection href="http://example.com:8080/#app:collection">
                <title>example.com:8080</title>
                <app:accept>text/plain</app:accept>
                <app:accept>application/rdf+xml</app:accept>
                <app:accept>text/turtle</app:accept>
                <app:accept>application/xhtml+xml</app:accept>
                <app:accept>application/font-woff</app:accept>
                <app:accept>application/sparql-query</app:accept>
                <app:accept>application/docbook+xml</app:accept>
                <app:accept>text/css</app:accept>
                <app:accept>text/xsl</app:accept>
                <app:accept>text/html</app:accept>
                <app:accept>image/gif</app:accept>
                <app:accept>image/vnd.microsoft.icon</app:accept>
                <app:accept>image/png</app:accept>
                <app:accept>image/svg+xml</app:accept>
                <app:accept>image/jpeg</app:accept>
                <app:accept>text/javascript</app:accept>
        </app:collection>
        <link href="http://example.com:8080/#rel=alternate&amp;type=atom" rel="alternate" type="application/atom+xml"/>
        <updated>2012-02-23T13:55:59.504Z</updated>
        <openSearch:totalResults>5</openSearch:totalResults>
        <link href="http://example.com:8080/#rel=search" rel="search" type="application/opensearchdescription+xml"/>
        <entry>
                <id>http://example.com:8080/.well-known/</id>
                <title>.well known</title>
                <updated>2012-02-17T15:02:22.556Z</updated>
                <icon>http://example.com:8080/callimachus/folder.png</icon>
                <link href="http://example.com:8080/auth/groups/users" rel="http://callimachusproject.org/rdf/2009/framework#reader" title="users"/>
                <link href="http://example.com:8080/auth/groups/staff" rel="http://callimachusproject.org/rdf/2009/framework#reader" title="staff"/>
                <link href="http://example.com:8080/auth/groups/admin" rel="http://callimachusproject.org/rdf/2009/framework#administrator" title="admin"/>
                <content src="http://example.com:8080/.well-known/"/>
                <link href="http://example.com:8080/.well-known/#rel=contents" rel="contents" type="application/atom+xml"/>
                <link href="http://example.com:8080/.well-known/#rel=..archive" rel="http://callimachusproject.org/rdf/2009/framework#archive" type="application/zip"/>
                <link href="http://example.com:8080/.well-known/#rel=alternate&amp;type=html" rel="alternate" type="text/html"/>
                <link href="http://example.com:8080/.well-known/#rel=describedby" rel="describedby"/>
                <link href="http://example.com:8080/.well-known/#rel=version-history" rel="version-history"/>
        </entry>
        <entry>
                <id>http://example.com:8080/callimachus/</id>
                <title>callimachus</title>
                <updated>2012-02-09T17:35:14.984Z</updated>
                <icon>http://example.com:8080/callimachus/folder.png</icon>
                <link href="http://example.com:8080/auth/groups/staff" rel="http://callimachusproject.org/rdf/2009/framework#reader" title="staff"/>
                <link href="http://example.com:8080/auth/groups/admin" rel="http://callimachusproject.org/rdf/2009/framework#administrator" title="admin"/>
                <content src="http://example.com:8080/callimachus/"/>
                <link href="http://example.com:8080/callimachus/#rel=contents" rel="contents" type="application/atom+xml"/>
                <link href="http://example.com:8080/callimachus/#rel=..archive" rel="http://callimachusproject.org/rdf/2009/framework#archive" type="application/zip"/>
                <link href="http://example.com:8080/callimachus/#rel=alternate&amp;type=html" rel="alternate" type="text/html"/>
                <link href="http://example.com:8080/callimachus/#rel=describedby" rel="describedby"/>
                <link href="http://example.com:8080/callimachus/#rel=version-history" rel="version-history"/>
        </entry>
        <entry>
                <id>http://example.com:8080/main-article.docbook</id>
                <title>main article</title>
                <updated>2012-02-06T01:27:09.545Z</updated>
                <icon>http://example.com:8080/callimachus/article.png</icon>
                <link href="http://example.com:8080/auth/groups/users" rel="http://callimachusproject.org/rdf/2009/framework#reader" title="users"/>
                <link href="http://example.com:8080/auth/groups/staff" rel="http://callimachusproject.org/rdf/2009/framework#editor" title="staff"/>
                <link href="http://example.com:8080/auth/groups/admin" rel="http://callimachusproject.org/rdf/2009/framework#administrator" title="admin"/>
                <link href="http://example.com:8080/main-article.docbook#rel=edit-media" rel="edit-media"/>
                <content src="http://example.com:8080/main-article.docbook" type="application/docbook+xml"/>
                <link href="http://example.com:8080/main-article.docbook#rel=alternate&amp;type=html" rel="alternate" type="text/html"/>
                <link href="http://example.com:8080/main-article.docbook#rel=describedby" rel="describedby"/>
                <link href="http://example.com:8080/main-article.docbook#rel=version-history" rel="version-history"/>
        </entry>
        <entry>
                <id>http://example.com:8080/sparql</id>
                <title>sparql</title>
                <contributor>
                        <name>James Leigh</name>
                        <uri>http://example.com:8080/user/james</uri>
                </contributor>
                <updated>2012-02-23T13:55:59.504Z</updated>
                <link href="http://example.com:8080/auth/groups/admin" rel="http://callimachusproject.org/rdf/2009/framework#administrator" title="admin"/>
                <content src="http://example.com:8080/sparql"/>
                <link href="http://example.com:8080/sparql#rel=alternate&amp;type=html" rel="alternate" type="text/html"/>
                <link href="http://example.com:8080/sparql#rel=describedby" rel="describedby"/>
                <link href="http://example.com:8080/sparql#rel=version-history" rel="version-history"/>
        </entry>
</feed>

The query above provided the contents and description of the top-level folder. The details may change in subsequent Callimachus releases. Resolving the URL of a folder will allow you to traverse the folder hierarchy.

Folders may be identified by the presence of an Atom feed with rel="contents" type="application/atom+xml" in a resource record. News readers may be used to track changes to Callimachus folders by subscribing to the alternate Atom feed (with rel="alternate" and type="application/atom+xml"), which will sort resources by last modified data. e.g.

<link href="http://example.com:8080/#rel=alternate&amp;type=atom" rel="alternate" type="application/atom+xml"/>