We have to integrate our software with content DB. We need to upload and store files with a sets of attributes defined in our software and later search for documents using those attributes to get document content. Is there a way to define new attributes in content DB and store files with them?
sure there is. Custom attributes can be stored with a document as so called "categories". The CDB Developer Kit has examples how to create new categories on the fly and associated them with documents in CDB. You can then immediately search by this attributes for your documents.
The CDB Dev Kit is available here: http://www.oracle.com/technology/products/contentdb/index.html and contains the API, Javadoc and examples.
It is also possible to create new categories via the standard WebUI. See here http://download.oracle.com/docs/cd/B32119_01/doc/contentdb.1012/b31265/site.htm#CBAGHFCI for more details.
Storing attributes in category works fine but I have a problem when I have to store multiple attributes with the same attribute name but different values. Is there a way to save document with category that have for example two atrributes Test = "first value of test" and Test = "second value of test" ?
When I add document with table of strings added to value property of some attribute and when I go to GUI console and check the category attributes I see that value of attribute is something like : [Ljava.lang.String;@5d8d512a. I believe I should see values like "Test 1" and "test 2' separeted somehow ?
I will try to explain the situation. When user adds document in our application and documents meets some criteria (For example one of it's attributes it is attribute "Test") then our application adds such document to Content DB with category attributes. When user updates any attriubutes in our application for document send to Content DB we have to update category attributes in Content DB for that document as well.
The problem is that in our application documents can have several attributes with te same name but different values. It is not a predefined list of values. User can set attribute value to any value. For example attribute Test can have values 1 or 11 or 123 or 001 ... ad so on. We can not predict what the value will be and how many attributes with the same name document will have. One document can can have attributes Test ="FirstValue" and Test ="SecondValue" other documents can have even more attributes with the same name but different value.
When I add attribute for category in GUI I see that there are only two choices "string" or "enumerated string". In enumerated string I have to define values (it is impossible in my case) and when using type of string I can store only one value for an attribute :(