From: Joachim B. <ma...@jo...> - 2006-04-15 10:48:20
|
Hi, a idea I've been carrying around for a while now, and maybe it's an idea for a Summer of Code 2006 project: Sometimes, you want a relatively complex selection of persons for a report. e.g: I want all predecessors and all descendants from person A, with their spouses, unless they are related to person B. Currently, the selection is limited to a few predefined options. What I'd like to see to solve this problem is a "Domain Specific Language" with a view set operations and a few genealogical functins. The example above might spell out: (PredecessorsOf(A) and AddSpouses(DescendantsOf(A) and A) without (Relatio= nsOf(B) The code to parse and calculate these should actually be not too hard, using pythons "set". Another benefit is that the existing selections could easily interally written as one of those DSL string, which makes adding and maintaining these easy. An entry field for such a line could be made available under an extra option "Advanced Selection", so that difficult requirements are made possible and simple selection stay easy. If needed and someone writes that, one might include a DSL builder similar to the interface OfficeSuites provide for their calulation formulars. Of course the syntax can be different. A just brainstormed list of operators include: Set operators: and (union) and also in (intersection) without (difference) all but (complement) Functions: (All these should take singe persons as well as sets) ParentsOf ChildrenOf SpouseOf DescendantsOf PredecessorsOf AddChildren,... (maybe a generic Add(<function>,<set>) ... What do you think? Greetings, Joachim --=20 Joachim "nomeata" Breitner mail: ma...@jo... | ICQ# 74513189 | GPG-Key: 4743206C JID: joa...@am... | http://www.joachim-breitner.de/ Debian Developer: no...@de... |