Brainomics项目的立方体,见http://www.brainomics.net/
cubicweb-brainomics的Python项目详细描述
脑组学项目的立方体,请参见http://www.brainomics.net/
uicfg文档
在脑组学中,我们为uicfg实验了一个新的函数 允许在“属性”中显示特定的资源集/信息 或主视图的“关系”部分。
uicfg的display rset方法有3个参数:
- the name of the etype concerned by the rule;
- the section where the information is displayed (attributes or relations);
- a dictionnary of properties.
属性的措辞必须具有:
- a ‘callback’ item OR a ‘rql’ and a ‘vid’ items.
“callback”是一个获取实体并呈现html snipet的函数。
“rql”是一个rql查询,其中变量“x”是当前实体。“视频” 是将应用于RQL查询结果的视图的注册。
它还可以有:
- a ‘label’ (‘’ if not given);
- an ‘order’ (9999 if not given);
它应按如下方式使用,例如使用etype属性:
>>> _pvdc = uicfg.primaryview_display_ctrl >>> _pvdc.display_rset('MyEtype', 'attributes', {'callback': lambda x: x.formatted_description, 'label': _('description')})
或具有“rql”和“vid”属性:
>>> _pvdc = uicfg.primaryview_display_ctrl >>> _pvdc.display_rset('MyEtype', 'relations', {'rql': 'Any Z WHERE X relation1 Y, Y relation2 Z', 'vid': 'my-view', 'label': _('My label')})
或者使用视图进行“回调”:
>>> _pvdc = uicfg.primaryview_display_ctrl >>> _pvdc.display_rset('MyEtype', 'relations', {'callback': lambda x: x.view('my-secondary-view'), 'order': 2, 'label': _('My label')})