How can I access, modify or change the Properties for a File

Tamino WebDav says:
“To help to make resources more transparent, WebDAV allows properties, or “metadata”, to be assigned to any type of data. With increasing diversification of resources the possible number of properties can be infinite”.

How can I access, modify or change this properties . Is there a Tool that can help me to
do this ?

Hi,

programmatically you can achieve this
with the aid of a WebDAV-Client implementation,
issuing a PROPPATCH (this is a HTTP-Extension)
Request. The body of the PROPPATCH request
contains the properties to be updated.

See for example
DAV4J
or the currently not activley supported WebDAV
stack form eclipse
Eclipse WebDAV

Regards,

Matthias.

Hi Jegnet,

A tool to set properties is the WebDAV Basic Client, which you can download from the Tamino web site.
In there you can send HTTP requests to the webdavserver and experiment with the header and content of the request that you need.

The same can also be done from any other client that can sent http requests.
Below an example of JScript that can be used to set the lock property of a file and set the lock-owner and lock-timeout.

function LockFile(DatabaseURL,Collection,doctype,filename,user,password) {
var url=DatabaseURL+"/"+Collection+"/"+docytype+"/"+filename
var PostData="<?xml version=\"1.0\" encoding=\"utf-8\" ?><D:lockinfo xmlns:D=‘DAV:’><D:lockscope><D:exclusive/></D:lockscope><D:locktype><D:write/></D:locktype><D:owner><D:xmetal>"+user+"</D:xmetal></D:owner></D:lockinfo>"

var xmlhttp = new ActiveXObject(“Microsoft.XMLHTTP”);
xmlhttp.Open(“LOCK”,url,false,user,passw);
xmlhttp.setRequestHeader(“Content-Type”,“text/xml; charset=“utf-8"”);
xmlhttp.setRequestHeader(“Timeout”,“Second-28800”);//set timout to reset the lock after 28800 sec
xmlhttp.send(PostData);
var status = xmlhttp.Status;
var responsetext = xmlhttp.responseText
xmlhttp = null;
if (status==423) {
Alert(“Document already locked.\n”+status+”\n"+responsetext);
}
}

Regards, Kees