Changeset 686
- Timestamp:
- 03/15/07 14:23:50 (2 years ago)
- Files:
-
- PleiadesEntity/trunk/Extensions/Install.py (modified) (2 diffs)
- PleiadesEntity/trunk/Extensions/loader.py (modified) (4 diffs)
- PleiadesEntity/trunk/content/EthnicName.py (deleted)
- PleiadesEntity/trunk/content/GeographicName.py (deleted)
- PleiadesEntity/trunk/content/Name.py (modified) (2 diffs)
- PleiadesEntity/trunk/content/PlacefulAssociation.py (modified) (1 diff)
- PleiadesEntity/trunk/content/__init__.py (modified) (1 diff)
- PleiadesEntity/trunk/data/AWMCNameTypes.vdex (added)
- PleiadesEntity/trunk/models/PleiadesEntity.zargo (modified) (previous)
- PleiadesEntity/trunk/models/PleiadesEntityUML.png (modified) (previous)
- PleiadesEntity/trunk/skins/PleiadesEntity/ethnicname_view.pt (deleted)
- PleiadesEntity/trunk/skins/PleiadesEntity/geographicname_view.pt (deleted)
- PleiadesEntity/trunk/skins/PleiadesEntity/name_view.pt (added)
- PleiadesEntity/trunk/tests/BatchLoad.txt (modified) (1 diff)
- PleiadesEntity/trunk/tests/Entities.txt (modified) (2 diffs)
- PleiadesEntity/trunk/tests/GeoRSS_KML.txt (modified) (2 diffs)
- PleiadesEntity/trunk/tests/LoadEntity.txt (modified) (3 diffs)
- PleiadesEntity/trunk/tests/TemporalAttestations.txt (modified) (1 diff)
- PleiadesEntity/trunk/tests/Vocabularies.txt (modified) (1 diff)
- PleiadesEntity/trunk/thesauri/types/AWMCNameTypes.xml (deleted)
- PleiadesEntity/trunk/version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
PleiadesEntity/trunk/Extensions/Install.py
r685 r686 79 79 'AWMCPlaceTypes': ('VdexVocabulary', 'VdexTerm'), 80 80 'AWMCAncientNameLanguages': ('VdexVocabulary', 'VdexTerm'), 81 'AWMCNameTypes': ('VdexVocabulary', 'VdexTerm'), 81 82 'AWMCNameAccuracy': ('VdexVocabulary', 'VdexTerm'), 82 83 'AWMCPlacefulAssociationCertainty': ('VdexVocabulary', 'VdexTerm'), … … 129 130 "Location", 130 131 "TemporalAttestation", 131 "GeographicName",132 "EthnicName",133 132 "Reference", 134 133 "SecondaryReference", PleiadesEntity/trunk/Extensions/loader.py
r685 r686 79 79 lpf_allow = lpf.global_allow 80 80 lpf.global_allow = True 81 82 n = self.portal_types[' GeographicName']81 82 n = self.portal_types['Name'] 83 83 n_allow = n.global_allow 84 84 n.global_allow = True 85 85 86 n = self.portal_types['EthnicName']87 n_allow = n.global_allow88 n.global_allow = True89 86 90 87 try: … … 279 276 # false -> geographic 280 277 if type == 'false': type = 'geographic' 281 typename = "%sName" % type.capitalize() 282 278 283 279 certainty = 'certain' 284 280 try: … … 288 284 289 285 try: 290 nid = names.invokeFactory( typename,286 nid = names.invokeFactory("Name", 291 287 id=id, 292 288 title=transliteration.encode('utf-8'), 293 289 nameAttested=nameAttested.encode('utf-8'), 294 290 nameLanguage=nameLanguage.encode('utf-8'), 291 nameType=type, 295 292 accuracy=accuracy, 296 293 completeness=completeness, … … 302 299 name = getattr(names, nid) 303 300 except: 304 nid = names.duplicates.invokeFactory( typename,301 nid = names.duplicates.invokeFactory("Name", 305 302 id=id, 306 303 title=transliteration.encode('utf-8'), 307 304 nameAttested=nameAttested.encode('utf-8'), 308 305 nameLanguage=nameLanguage.encode('utf-8'), 306 nameType=type, 309 307 accuracy=accuracy, 310 308 completeness=completeness, PleiadesEntity/trunk/content/Name.py
r682 r686 75 75 76 76 StringField( 77 name='nameType', 78 widget=SelectionWidget( 79 label="Name type", 80 label_msgid='PleiadesEntity_label_nameType', 81 i18n_domain='PleiadesEntity', 82 ), 83 vocabulary=NamedVocabulary("""AWMCNameTypes"""), 84 enforceVocabulary=1 85 ), 86 87 StringField( 77 88 name='accuracy', 78 89 index="FieldIndex", … … 125 136 allowed_content_types = ['TemporalAttestation', 'SecondaryReference', 'PrimaryReference'] 126 137 filter_content_types = 1 127 global_allow = 1138 global_allow = 0 128 139 content_icon = 'document_icon.gif' 129 140 immediate_view = 'base_view' PleiadesEntity/trunk/content/PlacefulAssociation.py
r685 r686 84 84 i18n_domain='PleiadesEntity', 85 85 ), 86 allowed_types=('Name', 'EthnicName', 'GeographicName'),86 allowed_types=('Name',), 87 87 multiValued=1, 88 88 relationship='hasName' PleiadesEntity/trunk/content/__init__.py
r647 r686 41 41 import Location 42 42 import TemporalAttestation 43 import GeographicName44 import EthnicName45 43 import Reference 46 44 import SecondaryReference PleiadesEntity/trunk/tests/BatchLoad.txt
r647 r686 17 17 >>> lpf.global_allow = True 18 18 19 >>> n = self.portal.portal_types['GeographicName'] 20 >>> n_allow = n.global_allow 21 >>> n.global_allow = True 22 23 >>> n = self.portal.portal_types['EthnicName'] 19 >>> n = self.portal.portal_types['Name'] 24 20 >>> n_allow = n.global_allow 25 21 >>> n.global_allow = True PleiadesEntity/trunk/tests/Entities.txt
r645 r686 17 17 >>> lpf.global_allow = True 18 18 19 >>> n = self.portal.portal_types[' GeographicName']19 >>> n = self.portal.portal_types['Name'] 20 20 >>> n_allow = n.global_allow 21 21 >>> n.global_allow = True … … 36 36 Entities 37 37 38 >>> _ = names.invokeFactory(' GeographicName', id='neverpolis', title='Neverpolis')38 >>> _ = names.invokeFactory('Name', id='neverpolis', title='Neverpolis', nameType='geographic') 39 39 >>> lid = locations.invokeFactory('Location') 40 40 >>> pid = places.invokeFactory('Place') PleiadesEntity/trunk/tests/GeoRSS_KML.txt
r684 r686 11 11 >>> lpf.global_allow = True 12 12 13 >>> n = self.portal.portal_types[' GeographicName']13 >>> n = self.portal.portal_types['Name'] 14 14 >>> n_allow = n.global_allow 15 15 >>> n.global_allow = True … … 28 28 Entities 29 29 30 >>> _ = names.invokeFactory(' GeographicName', id='neverpolis', title='Neverpolis')30 >>> _ = names.invokeFactory('Name', id='neverpolis', title='Neverpolis', nameType='geographic') 31 31 >>> lid = locations.invokeFactory('Location') 32 32 >>> pid = places.invokeFactory('Place', id='54321') PleiadesEntity/trunk/tests/LoadEntity.txt
r685 r686 17 17 >>> lpf.global_allow = True 18 18 19 >>> n = self.portal.portal_types['GeographicName'] 20 >>> n_allow = n.global_allow 21 >>> n.global_allow = True 22 23 >>> n = self.portal.portal_types['EthnicName'] 19 >>> n = self.portal.portal_types['Name'] 24 20 >>> n_allow = n.global_allow 25 21 >>> n.global_allow = True … … 74 70 >>> n0.nameAttested 75 71 u'\u1f08\u03c6\u03c1\u03bf\u03b4\u03b9\u03c3\u03b9\u1f71\u03c2' 72 >>> n0.getNameLanguage() 73 'grc' 74 >>> n0.getNameType() 75 'geographic' 76 >>> n0.getAccuracy() 77 'accurate' 78 >>> n0.getCompleteness() 79 'complete' 76 80 >>> n0.Creators() 77 81 ('C. Foss (compiler, west)', 'S. Mitchell (compiler)') … … 136 140 >>> n2.nameAttested 137 141 u'\u1f08\u03c6\u03c1\u03bf\u03b4\u03b9\u03c3\u03b9\u03b5\u1f7b\u03c2' 142 >>> n2.getNameLanguage() 143 'grc' 144 >>> n2.getNameType() 145 'ethnic' 138 146 >>> tps = n2.getFolderContents({'meta_type':['TemporalAttestation']}) 139 147 >>> len(tps) PleiadesEntity/trunk/tests/TemporalAttestations.txt
r683 r686 17 17 >>> lpf.global_allow = True 18 18 19 >>> n = self.portal.portal_types['GeographicName'] 20 >>> n_allow = n.global_allow 21 >>> n.global_allow = True 22 23 >>> n = self.portal.portal_types['EthnicName'] 19 >>> n = self.portal.portal_types['Name'] 24 20 >>> n_allow = n.global_allow 25 21 >>> n.global_allow = True PleiadesEntity/trunk/tests/Vocabularies.txt
r685 r686 15 15 >>> len([obj for obj in v.contentValues() if obj.meta_type == "VdexTerm"]) 16 16 51 17 18 Test ancient name types vocabulary 19 ---------------------------------- 20 21 >>> v = vt.getVocabularyByName('AWMCNameTypes') 22 >>> v.Title() 23 'Types of Historical Names Distinguished in AWMC Publications' 24 >>> len([obj for obj in v.contentValues() if obj.meta_type == "VdexTerm"]) 25 3 17 26 18 27 Test ancient name languages vocabulary PleiadesEntity/trunk/version.txt
r685 r686 1 0.1 build 2 491 0.1 build 254
