Forum OpenACS Q&A: Re: Learning to use XOTcl

Collapse
9: Re: Learning to use XOTcl (response to 4)
Posted by Richard Hamilton on

The object with item_id 989 is an xowiki instance

server1=# select item_id, name, content_type from cr_items where parent_id=989;
 item_id |       name        |   content_type
---------+-------------------+------------------
    1035 | en:weblog         | ::xowiki::Page
    1038 | en:weblog-portlet | ::xowiki::Object
     991 | en:index          | ::xowiki::Page
    1000 | en:gallery_demo   | ::xowiki::Page
    1027 | file:2080.jpg     | ::xowiki::File
    1382 | file:01.jpg       | ::xowiki::File
    1386 | file:02.jpg       | ::xowiki::File
    1390 | file:03.jpg       | ::xowiki::File
(8 rows)

server1=# select * from images where image_id in (1027,1382,1386,1390); image_id | width | height ----------+-------+-------- (0 rows)

So now I see that images uploaded to the content repository via xowiki are stored as instances of ::xowiki::File, whilst other images in the content repository have entries in the images table.

Presumably in order to leverage the built-in CR support for images and image resizing etc. I would need to create a subclass of ::xowiki::File that will have all the characteristics of ::xowiki::File objects, whilst also having entries in the images table and being subject to the image:: procedures shown here:

http://www.openacs.org/api-doc/proc-search?query_string=image%3A%3A&name_weight=5&param_weight=3&doc_weight=2

Is this correct, and should I also re-implement these image:: procs as methods for the ::xowiki::File::Image class?

Regards
Richard