DAV, or WebDAV, is a protocol for Web-based Distributed Authoring and Versioning. The location where content items are placed is called the repository . Content elements are called documents , corresponding to files, and folders/collections , corresponding to directories. Collectively these documents and folders (collections) are known as resources .

Virtuoso implements the DAV protocol, allowing you to create and manage resources either directly through repository manipulations or indirectly, through a variety of WebDAV services.

To make sure that when Virtuoso serves files to client user agents the type of file is conveyed properly so that the right application can be used with that file a list or file types are maintained in the server. This list is used when sending any content via the HTTP server which include content in DAV and under VSP.

Figure 6.75. DAV Resource Types

DAV Resource Types

The Web Application Server/Content Management/Resource Types page shows the list of currently defined resource types in the Virtuoso server. You can edit or remove these types by using the action links on the right most column of the list next to the type applicable.

Add new types by typing the details into the fields provided and pressing the Save button.

The content management page gives you an interface to the WebDAV repository resources. From here you can navigate or create directories, commonly referred to as collections or folders in DAV, alter properties, upload or remove files, or edit documents.

The Repository tab lists the current location within the tree and the current login name. The root of the repository is usually /DAV/ .

Figure 6.76. Content Management

Content Management

Resource names are given with collection (folder) names listed first, then individual documents. Permissions on resources are presented in a style similar to Unix, with (r)ead, (w)rite, and e(x)ecute permissions listed for the resource owner (the user), the resource's group, and for the general public. If a permission is present, the letter is shown; if not, it is replaced with a dash.

Unlike Unix, the Repository does not use the designation 'd' for directories, which in DAV are more commonly referred to as collections. Collections are distinguished by a different icon - a folder-like icon - and by having the type named "collection".

In addition, the permissions string has a trailing letter designating the indexing status of the resource. This letter is 'n' to designate that indexing is off, 'r' for recursive indexing, and 't' for direct indexing.

By default, the user and group of a DAV resource are those set by the service that created the resource, or they are the ID and primary group of the user who was logged in when the resource was created.

The size of a document resource is its size in disk bytes. Note that this does not necessarily correspond to characters displayed on the screen because of encodings. For example, the HTML token &-a-m-p-semicolon is five bytes on disk but displays as a single screen character.

The type of a resource is always "collection" for collections (folder). For documents it can be any of the known resource types (see Resource Types below). The resource type is usually based on the resource's extension; for example, .xml files are usually assumed to be text/xml . If Virtuoso does not recognize the extension of a resource, it assigns the default type of application/octet-stream .

Within the Content Management screen, you can change any of the properties of a resource, other than its name, by selecting the resource via the checkbox to the left of the icon, and pressing the "Properties" button.

Figure 6.77. Edit Resource Properties

Edit Resource Properties

XML documents also permit you to edit their XML properties specifically. This can be done on any document of type text/xml by clicking on the icon for the document.

When clicked this button from the bottom of the page, you can edit the properties for one or a group of resources which should be selected. The name of a resource cannot be changed.

The owner, group, permissions, and indexing controls on this form apply to the appropriate properties of resources, as documented above. Changes to the type of a collection (folder) are ignored.

Figure 6.78. Multiple Resources Edit Properties

Multiple Resources Edit Properties

The "Property" control permits you to change or add additional properties. There is a pulldown of predefined XML-related properties, or you may create your own property.

Figure 6.79. Multiple Resources Edit Properties

Multiple Resources Edit Properties

This control permits you to manipulate the specific properties of XML documents. Existing properties are shown with their values, and can be removed. New properties can be added.

XML-related properties are generally set by specific XML-related services and do not need to be edited directly by users; however, this interface provides a quick means to correct a minor typo or other change without re-running the entire service. For example, you can change the xml-sql-root property, which controls the name of the root XML element for the document.

Resources may be added to the repository in two ways: by uploading files or by creating new collections (folders). Buttons for both these methods are on the page.

The "Create Folder" button brings up a form in which you can specify the name of the collection (folder), its owner and group, and the initial permissions. You may also turn on indexing for the folder's contents at this point.

Figure 6.80. Create Folder

Create Folder

The "Upload File" button brings up a form in which you can specify the name and location of a file on your local computer that is to be copied into the DAV repository. You need to specify the name of the resource in the repository and give it a type. You can also set the basic repository properties here.

Figure 6.81. Upload File

Upload File

When files are inserted into Virtuoso's WebDAV repository, if their type is a type of text file such as plain text TXT, XML, or HTML, then they may be automatically free text indexed.

By default files are automatically free text indexed as they are inserted into Virtuoso. This is very convenient but can be time consuming if you frequently insert or update text files. For this reason Virtuoso can be set to index in batch mode at a particular interval in minutes.

Figure 6.82. DAV Free Text Index Configuration

DAV Free Text Index Configuration

To change the free-text index mode to batch mode check the check-box and provide a non-zero time interval (in minutes). Press the Accept button to save the changes into the server.