About MVD version 1.0alpha3

Introduction

A "multivalent document" comprises layers of related data, and behaviors, dynamically loadable pieces of functionality. Almost all functionality is provided by the individual behaviors a document specifies. An MVD implementation (e.g., this is MVD 1.0 alpha) provides a framework within which behaviors can interoperate. You can provide whatever kind of functionality you like, or even create new kinds of documents, by writing your own behaviors and assembling them (and associated layers of information) into multivalent documents.

MVD is not document-type specific. Instead, special behaviors (called "media adaptors") are written to handle a given format. As of this point in time, we have provided media adaptors that handle scanned images, ASCII, and (a reasonable subset of) HTML. Thus you can use this MVD implementation on these document types.

Since a given MVD has its own set of layers and behaviors, we need to specify what these are. A "hub document" is the persistent version of an MVD, and contains this sort of information. Hub documents usually have the extension ".mvd". If you are already running the MVD applet, and happen to know of a hub document, you can just them MVD "File/Open" menu item to supply its name, and MVD will open it.

More likely, you are just starting out, so we provide a few shortcuts. One is that you can enter a reference to a "base layer", and MVD will do the rest. I.e., in most cases, an MVD has some "base layer", e.g., a scanned page image or an HTML page, and behaviors that make sense with this document format, and perhap some additional layers and behaviors (e.g., third party annotations.) You can supply the URL for an HTML web page--we say how below--and the applet will implicitly wrap a default hub document around it. We do the same for our collection of scanned images.

In particular, in the UC Berkeley Digital Library Project, we have assembled a sizable collection of scanned image documents. As a way of demonstrating the sorts of things one can do with multivalent documents, we have written a number of MVD behaviors that "enliven" these scanned images. You can access the MVD version of any document in our DLIB collection simply by locating the document you want from our project server, and then either selecting MVD on that document's home page, or going to a scan page image and then clicking on the MVD con at the top or bottom of each page. (In both instances, we really happens is that a hub document is synthesized, and passed to the MVD applet call.)

For our scanned image documents, the layers include the scanned images, and the text extracted from those images by an OCR process. The behaviors specified for each document implement a wide range of functions, ranging from basic "behind the scenes" actions, such as building up the internal document structure, to performing basic document manipulation functions, such as searching, to implementing interesting user-interface tools, such as providing a "lens" that magnifies a region of the screen.

Most of these behaviors are specified for all our documents; however, behaviors will vary somewhat from document to document, and even page to page.

Entering a Multivalent Document

When you enter an MVD document, the individual behaviors and layer will be loaded. They arrange their user-interface "facets" in menus, so what you see is a typical looking application window with pull-down menus and a document page in the main canvas. You interact with the document simply by choosing menus and performing conventional mouse clicks.

Selection

One of the few pieces of functionality built into MVD is selection. You can select text by a convention mouse click-and-drag, even in scanned-image documents. (In Windows, you need to do a C-c to copy the selectoon into the cut buffer.) Various behaviors can affect exactly what selection does. Also, a lot of behaviors refer to the selection. E.g., if you select from the menu "Anno/Highlight", the selection area will be colored as if by a student highlight marker.

Getting Help

You can find out what individual behaviors do by using some of Help menu items. For example, the Help on Menu Items entry in the Help menu enables you to get help on each individual entry in a menu. Select the Help on Menu Items entry, and notice that the cursor changes to a cross. Now select the menu item on which to you would like help. A separate web page will come up describing the menu item (and its associated behavior, if there is one).

Some Examples

A good behavior to try out first is Search. To use the Search behavior, pull down the Edit menu, and select the Search menu entry. A small window will pop up into which you may enter terms to be searched for in a document. If the Inc box is checked, the search will be performed incrementally, i.e., as the user types text. Otherwise, the search is performed after the Enter or Return key is hit, or after the user left-mouse clicks on the Search button.

To find out more about the search behavior, select the Help on Menu Items entry in the Help menu. Notice that the cursor changes to a cross. Now select the Search menu entry again. A web page should pop up that describes the Search behavior in more detail.

Of course, a system can only operate on a scanned image document to the extent that it has understood its structure. You can see what the imputed structure of a document is in a number of ways. For example, in the Meta menu is an entry called OCR Regions. Selecting this item will toggle on and off little boxes more or less around each word. These boxes show where the OCR process believes words are in the scanned image.

Another way to see what the document looks like to the OCR process is to use the Scanned as OCR entry in the View menu. This asks a behind-the-scenes behavior (called Xdoc, after the name of the format used by a particular OCR process) to render the document as text recognized by the OCR process, as opposed to the bit image.

Yet a third (and, we think, the most interesting) way to see the underlying OCR content is via a "lens". First, be sure that the Scanned as OCR menu entry is toggled off, so you are again looking at a scanned page image. Now select the Show OCR entry in the Lens. This creates a new Show OCR lens. A lens is a resizable region which presents a different view of a document. The Show OCR lens presents a region of an image document with the word images replaced by their contents as rendered by an optical character recognition process. The Show OCR lens, like other lens, can be resized by a mouse-click-and-drag on its lower right hand corner. It can be put away by mouse-clicking in the small square on its top border. It can be moved around the page by a left-mouse-click-and-drag on its header bar. And, like other lens, you can pass user events through the Show OCR lens. For example clicking on text through the lens will select the underlying text.

Composition

One of the main architectural goals of the MVD infrastructure is to allow behaviors to compose gracefully. As an example, pop a Show OCR lens and then pop up a Magnify lens, positioning the latter so that it somewhat overlaps the former. You will see that where the Magnify lens is over the image, it magnifies the image, but where it is over the Show OCR lens, it magnifies the extracted text.

Some "Special Behaviors"

One set of interesting behaviors allow various kinds of annotation. E.g., on any scanned image document, select a word or two, and then select an item in the "CopyEd" menu, e.g., "Italics". The region should become marked with an annotation to this effect, and the page re-laid out so that the marks can be seen. Try some of the other marks, just as "Insert"or "Replace".

Another form of annotation is the note. If you look under the "Anno" menu, you can see some notes already written. You can select one of these to see if. Or, you can use the "Anno/New Note" menu to created you own note.

It is interesting to try some of these behaviors on an html page. To do so, you can just use the menu item "File/Open", and put in your favorite URL. E.g., you might try our home page, "http://elib.cs.berkeley.edu". After the page loads, try some of the behaviors discussed above, especially copyediting behaviors. Note that for HTML, these annotations are executable. Just move the cursor over one and double-click on it.

You can save the various annotations you create in your own hub document. Because of Java limitations, you can only save them on our server at the moment; we'll provide scratch space for you soon. In the meantime, we marked up a few pages and saved them for you to look at. E.g., if you select "File/Open" and change the contents to "http://elib.cs:8080/annotations/mvd/sa.mvd", you can see persistent annotations we placed on the Stanford DLIB project's web page.

Written in Java 1.1



Known Bugs


Currently, this code will run properly on the following configurations:

Unfortunately, bugs in IE preclude this application from working properly on the following configurations: