This content has been marked as final. Show 8 replies
COLLECTION_ services work with folders, which indeed have tree-like hierarchy. You could use this structure, but as folders have also other connotations (their hierarchy is used to visualize data in Desktop application, or WebDAV), so it probably not wise to "waste" them on a general tree data. Besides, your task is to upgrade the whole structure available services, and available services work (I think all of them) with a single node.
As for updating the database it sounds better, but you should consider all details - e.g. what should happen documents are assigned a node that no longer exists? Disadvantage of using the direct database inserts might also be considered as security violation in some organizations (even though you could have a user authorized to update this single table, which will be completely yours, so it could be safe). If you face such an issue, you will probably have to create your own service to do the same, or some kind of "batch loader"/an application that can be called to the work.
Let me see if I have understood your problem.
Below is the steps you have done to get tree structure in metadata field.
You have created table and corresponding view.
Created relationship's in config manager and assigned to a metadata.
Once this is done you are seeing the values in front end.
What you want to do is add additional nodes to this tree structure?
There is no UCM services that does Add Child node to this tree.The view that you see in front end is done using Java Script so it is only to view. To add values to tree you have to create a custom component and update
your tables in back end, like how Jiri has mentioned.
Let me know if this answers your questions.
Yes, i created table,views,relationship and metadata field with option list - tree enabled. Then we can either add nodes to the tree from db end or we can edit the tree(or views) from ucm config mgr ui.
As in the ucm ui, we have button for 'Add Child Node', 'Delete node' etc when we are on edit metadata field screen, ucm must be using some service internally to perform these tasks. I wanted to know about those, and if we can make a call to the same pre-existing services of ucm from our code so as to modify the tree programmatically.
Actually, there are none. And you can verify if - either read the definition of standard COLLECTION_ services, or in system-wide tracing.
I'd suggest you take a look at the database table COLLECTIONS. The taxonomy is achieved by 2 fields: dCollectionId and dParentCollectionId (which equals dCollectionId of the parent node) - as simple as that.
With this setup you may add a node by inserting a record; delete is a bit trickier - it's a cascading operation. If you use Oracle DB, there is actually support for such operations directly in the db. Read this link for reference: http://docs.oracle.com/cd/E11882_01/server.112/e10592/queries003.htm
I haven't tried this yet but i just set up the db and will be exploring it over the next couple weeks when i have time;
Built into Oracle DB but needing usually to be turned on is Oracle XML DB. It has a number of interesting features and sounds like it may be a pathway for ingesting XML, having tables made reflecting the DTD and having SQL or XQuery run against it.
Id like to see if they can be included as either external tables with Views or some other mechanism to make the XML usable in Content Server.
Any thoughts or experience from anyone else would be appreciated.