equal
deleted
inserted
replaced
1 # copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
1 # copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
3 # |
3 # |
4 # This file is part of CubicWeb. |
4 # This file is part of CubicWeb. |
5 # |
5 # |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
14 # details. |
14 # details. |
15 # |
15 # |
16 # You should have received a copy of the GNU Lesser General Public License along |
16 # You should have received a copy of the GNU Lesser General Public License along |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
18 |
18 |
19 from yams.buildobjs import RelationDefinition |
19 from yams.buildobjs import RelationDefinition, EntityType, String |
20 |
20 |
21 class friend(RelationDefinition): |
21 class friend(RelationDefinition): |
22 subject = ('CWUser', 'CWGroup') |
22 subject = ('CWUser', 'CWGroup') |
23 object = ('CWUser', 'CWGroup') |
23 object = ('CWUser', 'CWGroup') |
24 symmetric = True |
24 symmetric = True |
25 |
25 |
|
26 class Folder(EntityType): |
|
27 name = String() |
|
28 |
|
29 class parent(RelationDefinition): |
|
30 subject = 'Folder' |
|
31 object = 'Folder' |
|
32 composite = 'object' |
|
33 cardinality = '?*' |
|
34 |
|
35 class children(RelationDefinition): |
|
36 subject = 'Folder' |
|
37 object = 'Folder' |
|
38 composite = 'subject' |