Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

All media element supported by Sousa must have a file extention and MIME type associated with them. Generally, standard MIME types should be used. See http://www.feedforall.com/mime-types.htm for an all in one list, or the official list at http://www.iana.org/assignments/media-types/.

1a. Resource Tool Types

In some cases, the Sakai Resource tool has already defined a media type. The following line in AddItemProducer (in the Page tool) can be enabled to see all media types going by:

...

Thus we learn that the item "Nolaria.com" has a media type of "text/url".

1b. Registering the Media Type

Media types are registered in the ContentElementHandler class of the Sousa content handler package (sousa-content/util). Create a new registered type using code like this:

...