on 12-10-2007 3:06 PM
Hi All,
I am very new to KM. I have a custom property called "hitscount" under PropertyMetadata, which shows the hitscounts for all documents. But the NameSpace of the customproperty shows "default".
How can i create a NameSpace For the Customproperty? Can anyone provide sample code for creating a namespace for the custom property?
Regards,
Divya
answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Divya,
You need to declare a namespace first, that matches your property.
Can't tell you which namespace to use, try around...
Resource res = ....
String myNameSpace= "http://mynamespace.com/xmlns/cm";
String myProperty = "hitscount";
IPropertyName propertyname = new PropertyName(myNameSpace, myProperty);
IProperty prop = new Property(propertyname, "hitscountValue");
res.setProperty(prop);
"hitscountValue" will contain the value for the property.
Maybe the code helps you!?
regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.