Many of the CatDV tags listed above define a clip or catalog variable that contains the values being displayed. It is up to the JSP itself to display the desired attributes of the object. (Note that ‘attributes’ might also be referred to as fields or properties, or as columns when they’re displayed in a table.) Each attribute has a name such as “Name” or “Tape” by which it is known – all the available clip and catalog attribute names are shown in the lists below.
The value of an attribute can be displayed using syntax such as <%= clip.get(“Name”) %> within a JSP page. There are several variants of this call, all of which accept at least one parameter that defines the attribute name. get() will display the value as a string of text, or display an empty string if the attribute has no value. get_t() is similar but returns “ ” if the attribute is empty, which is sometimes necessary when displaying values in an HTML table. More generally, get() with two parameters returns the second string if the attribute is empty, for example get(“WhoCreated”, “N/A”). get_limit() takes a parameter which defines how many characters to display at most – if the text is longer than this limit it is truncated and an ellipsis “…” is shown. If you’re unsure which attributes might be available then the keys() method returns a Java Enumeration of all the property keys.
When a tag is intended to display a list of objects (such as all the clips in catalog) it will iterate over the list and set the variable to each row in succession.
The following attributes are defined for catalogs:
|The numeric id of the catalog.
|Number of clips in the catalog. (Number of matches if performing a query.)
|The catalog name.
|The catalog notes.
|Which user first created the catalog.
|Which user last modified the catalog.
|Who published the catalog to the database.
|When was the catalog last modified.
|Which version of CatDV Pro last saved the catalog.
|All the unique tape name(s) of clips in the catalog.
|All the different clip types represented in the catalog (eg. DV, MOV, JPEG, LOG, etc.)
|A brief status text about the query.
|The earliest record date of any clip in the catalog.
|The latest record date of any clip in the catalog.
|A summary of the range of dates covered by clips in the catalog.
|The earliest file modification date of any media file in the catalog.
|The latest file modification date of any media file in the catalog.
|CatDV user name who owns the catalog (Enterprise server only)
|CatDV group that owns the catalog (Enterprise server only)
The following attributes are defined for clips:
|The numeric id of the clip.
|The numeric id of the catalog that this clip belongs to.
|The name of the catalog the clip belongs to.
|The comments of the catalog the clip belongs to.
|Tape or reel name
|Start of clip (timecode)
|End of clip (timecode)
|Start of selection within clip (timecode)
|End of selection within clip (timecode)
|Duration of clip (timecode)
|The timecode format (eg. 2997 for drop frame NTSC, or 25 for PAL)
|Clip notes field
|Sequence number of clip within its import source
|Transition (for clips that came from importing an EDL)
|Date the clip entry was last modified
|The timecode valid embedded in the DV stream (usually same as In)
|Whether the clip is marked or not
|Whether the clip is marked as being hidden
|The source media filename (for clips imported from a media file)
|The audio format of the clip (if imported from a media file)
|The video format of the clip (if imported from a media file)
|The QuickTime importer used to import the media file
|A list of tracks in the movie (if imported from a media file)
|QuickTime user data (eg. Exif metadata tags)
|The data rate (if known)
|The size of the media file (if known)
|Is this a still image?
|A summary of the format of the media
|The original date of recording (if known, eg. from DV metadata)
|Any camera clock adjustment (from local time to GMT)
|The record date or media file date (corrected for GMT if relevant)
|An encoded version of the DV metadata
|The ID of the poster thumbnail
|This returns an <IMG SRC=…> tag that will display the poster thumbnail for the clip at maximum available size.
|This returns an <IMG SRC=…> that returns the poster thumbnail for the clip scaled so it is no larger than 48×36 pixels in size.
|The URL of the preview movie (if available)
|This returns a complete link including an appropriate icon, whether or not the preview is available, ie. <A href=…><IMG SRC=…></A>
|User1, …, UserN
|These return the user-defined attributes of the clip. Note that the user-defined names of these attributes are not stored in the database and are used for display in the client application only. Within the get() call it is necessary to use the numeric id of the user attributes, for example “User11” might correspond to “Project”, but if you customize the JSP you can of course display your own label that correctly describes the field.
|Unformatted data rate (bytes/sec)
|Unformatted media file size (bytes)
|Sequence of <IMG…> tags containing all the available thumbnails for the clip (between the clip’s In and Out point). (For practical reasons this is limited to a maximum of 16 thumbnails.)
|Modification time of the media file
Not all these properties will be set for all clips or catalogs.
Tags that display a list of objects (<catdv:browseDatabase> and <catdv:cliplist>) may accept a request parameter “order” that defines the sort order of the results returned. This is the name of one of the properties (as listed above), and may be preceded by “–” to reverse the sort order.
The example browseDatabase.jsp shows how to display a header row by iterating over the column names and highlighting the background colour of the column that is being sorted on.
Adding clip basket functionality
It is possible to customize the web site so that users can add search results to a “clip basket” and then send an email (to you as the site administrator and/or to themselves as a reminder) expressing an interest in those clips. There are three steps to do this:
1. Edit the clip.jsp file to add the following:
<form action=”clipBasket.jsp” method=POST>
<input type=”hidden” name=”add”
value=”<%= request.getParameter(“id”) %>” >
<input type=”submit” value=”Add To Basket”>
2. Edit the WEB-INF/web.xml file to enter details of an SMTP mail server that the servlets can use to send emails.
3. Edit clipBasket.jsp to specify the site owner’s email address (in two places, both as a hidden and as a visible field), and customize the subject field if required.