Changeset 819
- Timestamp:
- 05/31/07 16:18:07 (2 years ago)
- Files:
-
- Bibliomane/trunk/bibliomane-configure.zcml (modified) (1 prop)
- Bibliomane/trunk/bibliomane/README.txt (modified) (1 prop)
- Bibliomane/trunk/bibliomane/__init__.py (modified) (1 prop)
- Bibliomane/trunk/bibliomane/browser/__init__.py (modified) (1 prop)
- Bibliomane/trunk/bibliomane/browser/configure.zcml (modified) (1 prop)
- Bibliomane/trunk/bibliomane/browser/work_index.pt (modified) (1 prop)
- Bibliomane/trunk/bibliomane/browser/workcontainer_index.pt (modified) (1 prop)
- Bibliomane/trunk/bibliomane/browser/works.py (modified) (1 prop)
- Bibliomane/trunk/bibliomane/configure.zcml (modified) (1 prop)
- Bibliomane/trunk/bibliomane/interfaces.py (modified) (7 diffs, 1 prop)
- Bibliomane/trunk/bibliomane/overrides.zcml (modified) (1 prop)
- Bibliomane/trunk/bibliomane/principals.py (modified) (2 diffs, 1 prop)
- Bibliomane/trunk/bibliomane/skin/__init__.py (modified) (1 prop)
- Bibliomane/trunk/bibliomane/skin/bz/style.css (modified) (1 prop)
- Bibliomane/trunk/bibliomane/skin/configure.zcml (modified) (1 prop)
- Bibliomane/trunk/bibliomane/skin/interfaces.py (modified) (1 prop)
- Bibliomane/trunk/bibliomane/tests/__init__.py (modified) (1 prop)
- Bibliomane/trunk/bibliomane/tests/test_doctests.py (modified) (1 prop)
- Bibliomane/trunk/bibliomane/tests/works.txt (modified) (1 diff, 1 prop)
- Bibliomane/trunk/bibliomane/works.py (modified) (6 diffs, 1 prop)
- Bibliomane/trunk/setup.cfg (modified) (1 prop)
- Bibliomane/trunk/setup.py (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Bibliomane/trunk/bibliomane-configure.zcml
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/README.txt
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/__init__.py
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/browser/__init__.py
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/browser/configure.zcml
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/browser/work_index.pt
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/browser/workcontainer_index.pt
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/browser/works.py
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/configure.zcml
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/interfaces.py
- Property svn:eol-style set to native
r818 r819 6 6 # Schemas 7 7 8 class IWork(IContained, IContainer): 8 class ISubject(Interface): 9 10 works = Iterable( 11 title=u"Works", 12 description=u"Other works that have this entity as subject", 13 required=False, 14 readonly=True, 15 ) 16 17 18 class IResponsibility(Interface): 19 20 principals = Iterable( 21 title=u"Principals", 22 description=u"Persons or corporate bodies responsible for this entity", 23 required=False, 24 readonly=True, 25 ) 26 27 28 class IResponsible(Interface): 29 30 creations = Iterable( 31 title=u"Creations", 32 description=u"Works for which this entity is responsible", 33 required=False, 34 readonly=True, 35 ) 36 37 realizations = Iterable( 38 title=u"Realizations", 39 description=u"Expressions for which this entity is responsible", 40 required=False, 41 readonly=True, 42 ) 43 44 productions = Iterable( 45 title=u"Productions", 46 description=u"Manifestations for which this entity is responsible", 47 required=False, 48 readonly=True, 49 ) 50 51 items = Iterable( 52 title=u"Items", 53 description=u"Items for which this entity is responsible", 54 required=False, 55 readonly=True, 56 ) 57 58 59 class IWork(IContained, IContainer, ISubject, IResponsibility): 9 60 10 61 """A Work "is realized through" an Expression and "is created by" a Person … … 57 108 ) 58 109 59 works = Iterable( 60 title=u"Works", 61 description=u"Other works treating this one as a subject", 62 required=False, 63 ) 64 65 creators = Iterable( 66 title=u"Creators", 67 description=u"Creators of this work", 68 required=False, 69 ) 70 71 72 class IExpression(IWork): 110 111 class IExpression(IContained, IContainer, ISubject, IResponsibility): 73 112 74 113 """An Expression "is embodied in" a Manifestation and "is realized by" a … … 76 115 """ 77 116 containers('bibliomane.interfaces.IWork') 117 118 title = TextLine( 119 title=u"Title", 120 description=u"The title of the work", 121 required=True, 122 ) 123 124 title_language = TextLine( 125 title=u"Title Language", 126 description=u"The language and/or script of the work's title", 127 required=False, 128 ) 129 130 form = TextLine( 131 title=u"Form", 132 description=u"Form of the work (e.g. novel, poem, atlas)", 133 required=False, 134 ) 135 136 date = Date( 137 title=u"Date", 138 description=u"The date of creation", 139 required=False, 140 ) 141 142 context = Text( 143 title=u"Context", 144 description=u"The context in which the work was created", 145 required=False, 146 ) 78 147 79 148 language = TextLine( … … 84 153 85 154 86 class IManifestation(IContained, IContainer ):155 class IManifestation(IContained, IContainer, ISubject, IResponsibility): 87 156 88 157 """A Manifestation "is exemplified by" an Item and "is produced by" a … … 117 186 118 187 119 class IItem(IContained ):188 class IItem(IContained, ISubject, IResponsibility): 120 189 121 190 """An Item "is owned by" a Person or Corporate Body. … … 130 199 131 200 132 class IPerson(I nterface):201 class IPerson(ISubject, IResponsible): 133 202 134 203 name = TextLine( … … 150 219 ) 151 220 152 creations = Iterable( 153 title=u"Creations", 154 description=u"Works that the person has created", 155 required=False, 156 ) 157 158 159 class ICorporateBody(Interface): 221 222 class ICorporateBody(ISubject, IResponsible): 160 223 161 224 name = TextLine( Bibliomane/trunk/bibliomane/overrides.zcml
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/principals.py
- Property svn:eol-style set to native
r818 r819 6 6 from bibliomane.relationships import find_sources, find_targets 7 7 8 class Person(Persistent): 8 9 class PrincipalBase(object): 10 11 @property 12 def creations(self): 13 return find_sources(self, ICreatedBy) 14 15 @property 16 def realizations(self): 17 return find_sources(self, IRealizedBy) 18 19 @property 20 def productions(self): 21 return find_sources(self, IProducedBy) 22 23 @property 24 def items(self): 25 return find_sources(self, IOwnedBy) 26 27 28 class Person(Persistent, PrincipalBase): 9 29 implements(IPerson) 10 30 11 31 name = u"" 12 dates = None32 name_language = u"" 13 33 uri = u"" 14 34 … … 16 36 self.name = name 17 37 18 @property19 def items(self):20 return find_sources(self, IOwnedBy)21 38 22 @property 23 def creations(self): 24 return find_sources(self, ICreatedBy) 39 class CorporateBody(Persistent, PrincipalBase): 40 implements(ICorporateBody) 25 41 42 name = u"" 43 name_language = u"" 44 place = u"" 45 46 def __init__(self, name=u""): 47 self.name = name 48 49 Bibliomane/trunk/bibliomane/skin/__init__.py
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/skin/bz/style.css
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/skin/configure.zcml
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/skin/interfaces.py
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/tests/__init__.py
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/tests/test_doctests.py
- Property svn:eol-style set to native
Bibliomane/trunk/bibliomane/tests/works.txt
- Property svn:eol-style set to native
r818 r819 133 133 >>> [w.title for w in herodotus.creations] 134 134 [u'The Histories'] 135 >>> [c.name for c in work. creators]135 >>> [c.name for c in work.principals] 136 136 [u'Herodotus'] 137 137 Bibliomane/trunk/bibliomane/works.py
- Property svn:eol-style set to native
r818 r819 9 9 from bibliomane.interfaces import IWork, IExpression, IManifestation, IItem 10 10 from bibliomane.interfaces import IHasSubject 11 from bibliomane.interfaces import ICreatedBy 11 from bibliomane.interfaces import ICreatedBy, IRealizedBy, IProducedBy, IOwnedBy 12 12 from bibliomane.relationships import find_sources, find_targets 13 13 14 14 15 class Work(BTreeContainer, Contained): 15 class GroupOneBase(object): 16 17 responsibility_marker = None 18 19 @property 20 def works(self): 21 return find_sources(self, IHasSubject) 22 23 @property 24 def principals(self): 25 return find_targets(self, self.responsibility_marker) 26 27 28 class Work(BTreeContainer, Contained, GroupOneBase): 16 29 implements(IWork) 17 30 … … 24 37 context = u"" 25 38 subject_tags = [] 39 responsibility_marker = ICreatedBy 26 40 27 41 def __init__(self, title=u""): … … 33 47 return find_targets(self, IHasSubject) 34 48 35 @property36 def works(self):37 return find_sources(self, IHasSubject)38 39 @property40 def creators(self):41 return find_targets(self, ICreatedBy)42 43 49 44 class Expression(BTreeContainer, Contained ):50 class Expression(BTreeContainer, Contained, GroupOneBase): 45 51 implements(IExpression) 46 52 … … 53 59 context = u"" 54 60 language = u"" 61 responsibility_marker = IRealizedBy 55 62 56 63 57 class Manifestation(BTreeContainer, Contained ):64 class Manifestation(BTreeContainer, Contained, GroupOneBase): 58 65 implements(IManifestation) 59 66 … … 64 71 series = u"" 65 72 identifier = u"" 73 responsibility_marker = IProducedBy 66 74 67 75 68 class Item(Persistent, Contained ):76 class Item(Persistent, Contained, GroupOneBase): 69 77 implements(IItem) 70 78 … … 72 80 73 81 identifier = u"" 82 responsibility_marker = IOwnedBy 74 83 84 Bibliomane/trunk/setup.cfg
- Property svn:eol-style set to native
Bibliomane/trunk/setup.py
- Property svn:eol-style set to native
