From: Adam R. <ad...@ex...> - 2010-07-28 07:31:37
|
One design option in my opinion - Existing metadata i.e. file permissions and attributes stay where they are. Its crucial for performance not to complicate this, as it needs to be interpreted for each document queried. The new user customisable metadata becomes a simple key value store and is indexed on document id and unique key name. Each value follows XQuery datatype rules and may be either an atomic value or a sequence. We then establish a metadata axis which is available in XQuery. From here we can use the standard predicates and update facilities of XQuery to maintain the metadata. The context of the metadata axis would always be the document root of the current node as metadata is on a per-document level, not a per-node level. e.g. doc("/db/abc.xml)/someNode[@value eq $some-value][metadata::someKey eq $some-metadata-value] update value doc("/db/abc.xml)/metadata::someKey with $new-metadata-value or maybe even - doc("/db/abc.xml)/someNode[@value eq $some-value][metadata::entry['someKey'] eq $some-metadata-value] update value doc("/db/abc.xml)/metadata::entry['someKey'] with $new-metadata-value Hows that sound? Cheers Adam. On 28 July 2010 01:52, Patrick Bosek <pat...@jo...> wrote: > Hello eXist Developers! > > I need the ability to set up some pretty advanced metadata for documents and > for binary objects (perhaps even collections?). I spoke briefly with Adam, > he seemed to think a module was the wrong path, and eXist needed metadata > functionality built into the core (Adam, please feel free to correct me if > you don't feel I've properly represented you). This is a job I'm more than > willing to undertake, but I think it would be best if I was directed by the > core developers, since I want to make sure anything I write benefits > everyone and not just my needs. Also, I think I could probably build it much > faster if given a few pointers. > > My needs are basically just the ability to efficiently store and index a > schema validated piece of XML associated with other objects in the system. I > was also thinking this might be a good time to consider how this could be > extended into native XLink functionality. > > I've done a little work in the code base, I built a small addition to the > unix permissions to allow more granular permissions (which I still intend to > contribute, but I haven't had time to fully test, and now I'm thinking of > changing it as I work on the metadata stuff). But a quick "here's where I > would start" would be very helpful. Also, any tips to ensure efficiency > would be appreciated. Lastly, links to reading material are always great. > > Let me know what ya'll think! > > > Cheers, > > -- > Patrick Bosek > Jorsek Software > Cell (585) 820 9634 > Office (585) 239 6060 > Jorsek.com > > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > Exist-development mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-development > > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |