Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

AxKit::App::TABOO::Data::MediaType
MediaType Data objects for TABOO

AxKit::App::TABOO::Data::MediaType - MediaType Data objects for TABOO


NAME

AxKit::App::TABOO::Data::MediaType - MediaType Data objects for TABOO


SYNOPSIS


  use AxKit::App::TABOO::Data::MediaType;

  $type = AxKit::App::TABOO::Data::MediaType->new(@dbconnectargs);

  $type->load(limit => {mimetype => 'text/html'});


DESCRIPTION

This contains a simple class for MIME Types as defined by IANA.


METHODS

This class implements only one method and reimplements two, in addition to the constructor, the rest is inherited from the AxKit::App::TABOO::Data manpage.

new(@dbconnectargs)
The constructor. Nothing special.

load(what => fields, limit => {mimetype => value, [...]})
Nothing very different from other load methods. You would usually load an object by specifying the mimetype as in the above example.

populate($args)
The populate method is reimplemented, to deal well with the MIME::Type manpage objects. Its interface is unchanged, however.

mimetype
Will return a the MIME::Type manpage object with the loaded MIME Type.


STORED DATA

The data is stored in named fields, and for certain uses, it is good to know them. If you want to subclass this class, you might want to use the same names, see the documentation of the AxKit::APP::TABOO::Data manpage for more about this. These are the names of the stored data of this class:

  • mimetype
  • The IANA-registered MIME types.

  • name
  • An expanded name intended for human consumption.

  • uri
  • Creating new media types seems like a long and burdensome process. I was hoping that some day, also media types will be identified by URIs. I don't know if there is any progress on that, but I reserve this field in the hope. Also, in the Semantic Web you'd like to identify things and their relationships with URIs, so we might as well have a field.


XML representation

The write_xml() method, implemented in the parent class, can be used to create an XML representation of the data in the object. The above names will be used as element names. The xmlelement(), xmlns() and xmlprefix() methods can be used to set the name of the root element, the namespace URI and namespace prefix respectively. Usually, it doesn't make sense to change the default namespace or prefix, that are

However, the root element may change depending on what kind of mediatype we have. The default is mediatype.


FORMALITIES

See the AxKit::App::TABOO manpage.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy