Skip to content

Supported URI Schemes

TOGoS edited this page Sep 13, 2010 · 6 revisions

ContentCouch understands the following types of URIs

HTTP

File

SHA-1

Example: urn:sha1:NEMJDPPG5JPXP7LSYSZFJLNY2G4OP6TZ

The part after urn:sha1: is the RFC3548 base 32-encoded SHA-1 sum of the blob.

This scheme is described on Open-Content.net .

Bitprint

Equivalent to SHA-1 URNs if you ignore the part after the dot.

This scheme is used by Bitzi .

RDF Subject

Meaning: the object described by the blob of RDF at the URI following x-rdf-subject:

Example: x-rdf-subject:urn:sha1:CBKXM6DYVMYNYF6YOVQQIRX5LAGWXRBL

This scheme is used to reference Directories, Commits, and possibly other objects.

x-parse-rdf: means the same thing and is supported for backwards compatibility with earlier versions of ContentCouch.

Active

Example:

active:contentcouch.graphics.scale-image+operand@urn%3Asha1%3ANEMJDPPG5JPXP7LSYSZFJLNY2G4OP6TZ+scale@data%3A,0.5

The Active URI scheme is also used by NetKernel

Pseudo-Active

These aren’t really URIs, but ContentCouch will accept them in most places where a URI would normally be required. They are equivalent to Active URIs but are written in a Lisp-like syntax to make them more easily written and read by humans. For example, the following:

(contentcouch.graphics.serialize-image
  (contentcouch.graphics.scale-image
    urn:sha1:NEMJDPPG5JPXP7LSYSZFJLNY2G4OP6TZ
    scale="0.5")
  format="jpeg"
  quality="85")

is equivalent to this active URI:

active:contentcouch.graphics.serialize-image+format@data%3A,jpeg+operand@active%3Acontentcouch.graphics.scale-image%2Boperand%40urn%253Asha1%253ANEMJDPPG5JPXP7LSYSZFJLNY2G4OP6TZ%2Bscale%40data%253A,0.5+quality@data%3A,10
Clone this wiki locally