Changeset 1356
- Timestamp:
- 08/15/08 15:16:58 (4 months ago)
- Files:
-
- PleiadesEntity/trunk (modified) (1 prop)
- PleiadesEntity/trunk/Extensions (modified) (1 prop)
- PleiadesEntity/trunk/Extensions/Install.py (modified) (1 diff)
- PleiadesEntity/trunk/Extensions/loader.py (modified) (5 diffs)
- PleiadesEntity/trunk/__init__.py (modified) (3 diffs)
- PleiadesEntity/trunk/config.py (modified) (2 diffs)
- PleiadesEntity/trunk/configure.zcml (modified) (2 diffs)
- PleiadesEntity/trunk/content (modified) (1 prop)
- PleiadesEntity/trunk/content/Feature.py (added)
- PleiadesEntity/trunk/content/FeatureContainer.py (added)
- PleiadesEntity/trunk/content/Location.py (modified) (3 diffs)
- PleiadesEntity/trunk/content/LocationContainer.py (modified) (3 diffs)
- PleiadesEntity/trunk/content/Name.py (modified) (3 diffs)
- PleiadesEntity/trunk/content/NameContainer.py (added)
- PleiadesEntity/trunk/content/Place.py (modified) (8 diffs)
- PleiadesEntity/trunk/content/PlaceContainer.py (modified) (4 diffs)
- PleiadesEntity/trunk/content/PlacefulAssociation.py (modified) (4 diffs)
- PleiadesEntity/trunk/content/PrimaryReference.py (modified) (3 diffs)
- PleiadesEntity/trunk/content/Reference.py (modified) (3 diffs)
- PleiadesEntity/trunk/content/SecondaryReference.py (modified) (3 diffs)
- PleiadesEntity/trunk/content/TemporalAttestation.py (modified) (3 diffs)
- PleiadesEntity/trunk/content/__init__.py (modified) (2 diffs)
- PleiadesEntity/trunk/content/interfaces.py (modified) (2 diffs)
- PleiadesEntity/trunk/data (modified) (1 prop)
- PleiadesEntity/trunk/geo.py (modified) (4 diffs)
- PleiadesEntity/trunk/i18n (modified) (1 prop)
- PleiadesEntity/trunk/interfaces (modified) (1 prop)
- PleiadesEntity/trunk/models (modified) (1 prop)
- PleiadesEntity/trunk/models/PleiadesEntity.zargo (modified) (previous)
- PleiadesEntity/trunk/profiles (modified) (1 prop)
- PleiadesEntity/trunk/profiles/default (modified) (1 prop)
- PleiadesEntity/trunk/profiles/default/catalog.xml (added)
- PleiadesEntity/trunk/profiles/default/cssregistry.xml (added)
- PleiadesEntity/trunk/profiles/default/factorytool.xml (added)
- PleiadesEntity/trunk/profiles/default/import_steps.xml (modified) (3 diffs)
- PleiadesEntity/trunk/profiles/default/jsregistry.xml (added)
- PleiadesEntity/trunk/profiles/default/portal_atct.xml (added)
- PleiadesEntity/trunk/profiles/default/skins (modified) (1 prop)
- PleiadesEntity/trunk/profiles/default/skins.xml (added)
- PleiadesEntity/trunk/profiles/default/skins/custom (modified) (1 prop)
- PleiadesEntity/trunk/profiles/default/types (modified) (1 prop)
- PleiadesEntity/trunk/profiles/default/types.xml (modified) (2 diffs)
- PleiadesEntity/trunk/profiles/default/types/Feature.xml (added)
- PleiadesEntity/trunk/profiles/default/types/FeatureContainer.xml (added)
- PleiadesEntity/trunk/profiles/default/types/Location.xml (added)
- PleiadesEntity/trunk/profiles/default/types/LocationContainer.xml (added)
- PleiadesEntity/trunk/profiles/default/types/NameContainer.xml (added)
- PleiadesEntity/trunk/profiles/default/types/Place.xml (added)
- PleiadesEntity/trunk/profiles/default/types/PrimaryReference.xml (added)
- PleiadesEntity/trunk/profiles/default/types/Reference.xml (added)
- PleiadesEntity/trunk/profiles/default/types/SecondaryReference.xml (added)
- PleiadesEntity/trunk/profiles/default/types/TemporalAttestation.xml (added)
- PleiadesEntity/trunk/setuphandlers.py (modified) (3 diffs)
- PleiadesEntity/trunk/skins (modified) (1 prop)
- PleiadesEntity/trunk/skins/PleiadesEntity (modified) (1 prop)
- PleiadesEntity/trunk/skins/PleiadesEntity/FeatureContainer.gif (added)
- PleiadesEntity/trunk/skins/PleiadesEntity/LocationContainer.gif (added)
- PleiadesEntity/trunk/skins/PleiadesEntity/NameContainer.gif (added)
- PleiadesEntity/trunk/skins/PleiadesEntity/PlaceContainer.gif (added)
- PleiadesEntity/trunk/skins/PleiadesEntity/PrimaryReference.gif (added)
- PleiadesEntity/trunk/skins/PleiadesEntity/Reference.gif (added)
- PleiadesEntity/trunk/skins/PleiadesEntity/SecondaryReference.gif (added)
- PleiadesEntity/trunk/skins/PleiadesEntity/TemporalAttestation.gif (added)
- PleiadesEntity/trunk/skins/PleiadesEntity/document_icon.gif (added)
- PleiadesEntity/trunk/skins/PleiadesEntity/feature_contents.pt (moved) (moved from PleiadesEntity/trunk/skins/PleiadesEntity/placefulassociation_contents.pt)
- PleiadesEntity/trunk/skins/PleiadesEntity/feature_view.pt (moved) (moved from PleiadesEntity/trunk/skins/PleiadesEntity/placefulassociation_view.pt)
- PleiadesEntity/trunk/skins/PleiadesEntity/link_icon.gif (added)
- PleiadesEntity/trunk/skins/PleiadesEntity/place_contents.pt (modified) (1 diff)
- PleiadesEntity/trunk/skins/PleiadesEntity/pleiades_featurelisting.pt (added)
- PleiadesEntity/trunk/skins/PleiadesEntity_public (modified) (1 prop)
- PleiadesEntity/trunk/tests (modified) (1 prop)
- PleiadesEntity/trunk/tests/BatchLoad.txt (modified) (1 diff)
- PleiadesEntity/trunk/tests/Entities.txt (modified) (3 diffs)
- PleiadesEntity/trunk/tests/LoadEntity.txt (modified) (13 diffs)
- PleiadesEntity/trunk/tests/NameViews.txt (modified) (3 diffs)
- PleiadesEntity/trunk/tests/TemporalAttestations.txt (modified) (3 diffs)
- PleiadesEntity/trunk/tests/data (modified) (1 prop)
- PleiadesEntity/trunk/tests/data/batlas-65-2-24-frank.xml (added)
- PleiadesEntity/trunk/tests/test_docfiles.py (modified) (2 diffs)
- PleiadesEntity/trunk/thesauri (modified) (1 prop)
- PleiadesEntity/trunk/thesauri/batlas (modified) (1 prop)
- PleiadesEntity/trunk/thesauri/languages (modified) (1 prop)
- PleiadesEntity/trunk/thesauri/vdex (modified) (1 prop)
- PleiadesEntity/trunk/thesauri/vdex/schemata (modified) (1 prop)
- PleiadesEntity/trunk/utils (modified) (1 prop)
- PleiadesEntity/trunk/utils/agxit.sh (modified) (1 diff)
- PleiadesEntity/trunk/version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
PleiadesEntity/trunk
- Property svn:ignore set to
*.pyc
- Property svn:ignore set to
PleiadesEntity/trunk/Extensions
- Property svn:ignore set to
*.pyc
- Property svn:ignore set to
PleiadesEntity/trunk/Extensions/Install.py
r1244 r1356 134 134 "SecondaryReference", 135 135 "PrimaryReference", 136 " PlacefulAssociation",136 "Feature", 137 137 "LocationContainer", 138 138 "PlaceContainer", PleiadesEntity/trunk/Extensions/loader.py
r1354 r1356 198 198 if srs is not None: 199 199 bibls = srs.xpath('tei:bibl', namespaces={'tei': TEI}) 200 if not bibls: 201 raise EntityLoadError, "Encountered an empty secondaryReferences" 202 else: 200 #if not bibls: 201 # return 202 # #raise EntityLoadError, "Encountered an empty secondaryReferences" 203 if bibls is not None: 203 204 for bibl in bibls: 204 205 title_elem = bibl.xpath('tei:title', namespaces={'tei': TEI}) … … 311 312 pass 312 313 313 try: 314 vid = find_next_valid_name_id(names, id) 315 nid = names.invokeFactory("Name", 316 id=vid, 317 title = transliteration.encode('utf-8'), 318 nameTransliterated=transliteration.encode('utf-8'), 319 nameAttested=nameAttested.encode('utf-8'), 320 nameLanguage=nameLanguage.encode('utf-8'), 321 nameType=type, 322 accuracy=accuracy, 323 completeness=completeness, 324 creators=creators, 325 contributors=contributors, 326 rights=rights, 327 description=description 328 ) 329 name = names[nid] 330 except: 331 nid = names.duplicates.invokeFactory("Name", 332 id=id, 333 title = transliteration.encode('utf-8'), 334 nameTransliterated=transliteration.encode('utf-8'), 335 nameAttested=nameAttested.encode('utf-8'), 336 nameLanguage=nameLanguage.encode('utf-8'), 337 nameType=type, 338 accuracy=accuracy, 339 completeness=completeness, 340 creators=creators, 341 contributors=contributors, 342 rights=rights, 343 description=description 344 ) 345 name = names.duplicates[nid] 314 #vid = find_next_valid_name_id(names, id) 315 nid = names.invokeFactory("Name", 316 #id=vid, 317 title = transliteration.encode('utf-8'), 318 nameTransliterated=transliteration.encode('utf-8'), 319 nameAttested=nameAttested.encode('utf-8'), 320 nameLanguage=nameLanguage.encode('utf-8'), 321 nameType=type, 322 accuracy=accuracy, 323 completeness=completeness, 324 creators=creators, 325 contributors=contributors, 326 rights=rights, 327 description=description 328 ) 329 name = names[nid] 346 330 347 331 nids.append(nid) … … 383 367 384 368 places = site['places'] 369 features = site['features'] 385 370 names = site['names'] 386 371 locations = site['locations'] … … 435 420 436 421 pid = places.invokeFactory('Place', 437 id=id,422 #id=id, 438 423 title=computedTitle, 439 424 modernLocation=modernLocation, … … 449 434 # Handle the unnamed case 450 435 if len(nids) == 0: 451 aid = p.invokeFactory('PlacefulAssociation',452 id="unnamed-%s" % lid,453 placeType=placeType,436 fid = features.invokeFactory('Feature', 437 #id="unnamed,%s" % lid, 438 featureType=placeType, 454 439 associationCertainty='certain', 455 440 ) 456 a = p[aid]457 a.addReference(locations[lid], 'hasLocation')441 f = features[fid] 442 f.addReference(locations[lid], 'hasLocation') 458 443 # Secondary references for the place 459 parse_secondary_references(root, a, ptool) #, wftool)460 444 parse_secondary_references(root, f, ptool) #, wftool) 445 p.addReference(f, 'hasFeature') 461 446 else: 462 447 for i, nid in enumerate(nids): 463 448 # Get association certainty from XML 464 449 certainty = association_certainties[i] 465 466 aid = p.invokeFactory('PlacefulAssociation', 467 id="%s-%s" % (nid,lid), 468 placeType=placeType, 450 fid = features.invokeFactory('Feature', 451 #id="%s,%s" % (nid,lid), 452 featureType=placeType, 469 453 associationCertainty=certainty, 470 454 ) 471 a = p[aid]472 a.addReference(locations[lid], 'hasLocation')473 a.addReference(names[nid], 'hasName')455 f = features[fid] 456 f.addReference(locations[lid], 'hasLocation') 457 f.addReference(names[nid], 'hasName') 474 458 # Secondary references for the place 475 parse_secondary_references(root, a, ptool) #, wftool) 476 459 parse_secondary_references(root, f, ptool) #, wftool) 460 p.addReference(f, 'hasFeature') 461 477 462 # If there are no locations, iterate over the names 478 463 if len(lids) == 0: 479 464 for nid in nids: 480 aid = p.invokeFactory('PlacefulAssociation',481 id="%s-unlocated" % nid,482 placeType=placeType,465 fid = features.invokeFactory('Feature', 466 #id="%s,unlocated" % nid, 467 featureType=placeType, 483 468 associationCertainty='certain', 484 469 ) 485 a = p[aid]486 a.addReference(names[nid], 'hasName')470 f = features[fid] 471 f.addReference(names[nid], 'hasName') 487 472 # Secondary references for the place 488 parse_secondary_references(root, a, ptool) #, wftool) 473 parse_secondary_references(root, f, ptool) #, wftool) 474 p.addReference(f, 'hasFeature') 489 475 490 476 except: PleiadesEntity/trunk/__init__.py
r1244 r1356 5 5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 2. 07 # Generator: ArchGenXML Version 2.1 8 8 # http://plone.org/products/archgenxml 9 9 # … … 72 72 73 73 # Initialize portal content 74 content_types, constructors,ftis = process_types(74 all_content_types, all_constructors, all_ftis = process_types( 75 75 listTypes(PROJECTNAME), 76 76 PROJECTNAME) … … 78 78 cmfutils.ContentInit( 79 79 PROJECTNAME + ' Content', 80 content_types = content_types,80 content_types = all_content_types, 81 81 permission = DEFAULT_ADD_CONTENT_PERMISSION, 82 extra_constructors = constructors,83 fti = ftis,82 extra_constructors = all_constructors, 83 fti = all_ftis, 84 84 ).initialize(context) 85 86 # Give it some extra permissions to control them on a per class limit 87 for i in range(0,len(all_content_types)): 88 klassname=all_content_types[i].__name__ 89 if not klassname in ADD_CONTENT_PERMISSIONS: 90 continue 91 92 context.registerClass(meta_type = all_ftis[i]['meta_type'], 93 constructors= (all_constructors[i],), 94 permission = ADD_CONTENT_PERMISSIONS[klassname]) 85 95 86 96 ##code-section custom-init-bottom #fill in your manual code here PleiadesEntity/trunk/config.py
r1244 r1356 5 5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 2. 07 # Generator: ArchGenXML Version 2.1 8 8 # http://plone.org/products/archgenxml 9 9 # … … 34 34 DEFAULT_ADD_CONTENT_PERMISSION = "Add portal content" 35 35 setDefaultRoles(DEFAULT_ADD_CONTENT_PERMISSION, ('Manager', 'Owner')) 36 ADD_CONTENT_PERMISSIONS = { 37 'Name': 'PleiadesEntity: Add Name', 38 'Location': 'PleiadesEntity: Add Location', 39 'TemporalAttestation': 'PleiadesEntity: Add TemporalAttestation', 40 'Reference': 'PleiadesEntity: Add Reference', 41 'SecondaryReference': 'PleiadesEntity: Add SecondaryReference', 42 'PrimaryReference': 'PleiadesEntity: Add PrimaryReference', 43 'Feature': 'PleiadesEntity: Add Feature', 44 'NameContainer': 'PleiadesEntity: Add NameContainer', 45 'LocationContainer': 'PleiadesEntity: Add LocationContainer', 46 'PlaceContainer': 'PleiadesEntity: Add PlaceContainer', 47 'Place': 'PleiadesEntity: Add Place', 48 'FeatureContainer': 'PleiadesEntity: Add FeatureContainer', 49 } 50 51 setDefaultRoles('PleiadesEntity: Add Name', ('Manager','Owner')) 52 setDefaultRoles('PleiadesEntity: Add Location', ('Manager','Owner')) 53 setDefaultRoles('PleiadesEntity: Add TemporalAttestation', ('Manager','Owner')) 54 setDefaultRoles('PleiadesEntity: Add Reference', ('Manager','Owner')) 55 setDefaultRoles('PleiadesEntity: Add SecondaryReference', ('Manager','Owner')) 56 setDefaultRoles('PleiadesEntity: Add PrimaryReference', ('Manager','Owner')) 57 setDefaultRoles('PleiadesEntity: Add Feature', ('Manager','Owner')) 58 setDefaultRoles('PleiadesEntity: Add NameContainer', ('Manager','Owner')) 59 setDefaultRoles('PleiadesEntity: Add LocationContainer', ('Manager','Owner')) 60 setDefaultRoles('PleiadesEntity: Add PlaceContainer', ('Manager','Owner')) 61 setDefaultRoles('PleiadesEntity: Add Place', ('Manager','Owner')) 62 setDefaultRoles('PleiadesEntity: Add FeatureContainer', ('Manager','Owner')) 36 63 37 64 product_globals = globals() PleiadesEntity/trunk/configure.zcml
r1346 r1356 1 <configure xmlns="http://namespaces.zope.org/zope" 2 xmlns:browser="http://namespaces.zope.org/browser" 3 xmlns:five="http://namespaces.zope.org/five"> 1 <configure xmlns="http://namespaces.zope.org/zope" 2 xmlns:browser="http://namespaces.zope.org/browser" 3 xmlns:five="http://namespaces.zope.org/five"> 4 4 5 5 <include file="profiles.zcml" /> 6 7 6 8 7 9 <!-- ##code-section configure.zcml --> … … 13 15 14 16 <adapter 15 for="Products.PleiadesEntity.content. PlacefulAssociation.PlacefulAssociation"17 for="Products.PleiadesEntity.content.Feature.Feature" 16 18 provides="zgeo.geographer.interfaces.IGeoreferenced" 17 factory=".geo. PlacefulAssociationGeoItem"19 factory=".geo.FeatureGeoItem" 18 20 /> 19 21 PleiadesEntity/trunk/content
- Property svn:ignore set to
*.pyc
- Property svn:ignore set to
PleiadesEntity/trunk/content/Location.py
r1346 r1356 5 5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 2. 07 # Generator: ArchGenXML Version 2.1 8 8 # http://plone.org/products/archgenxml 9 9 # … … 58 58 ), 59 59 ), 60 60 61 ), 61 62 ) … … 75 76 """ 76 77 security = ClassSecurityInfo() 78 77 79 implements(interfaces.ILocation) 78 80 PleiadesEntity/trunk/content/LocationContainer.py
r1244 r1356 5 5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 2. 07 # Generator: ArchGenXML Version 2.1 8 8 # http://plone.org/products/archgenxml 9 9 # … … 31 31 schema = Schema(( 32 32 33 33 34 ), 34 35 ) … … 48 49 """ 49 50 security = ClassSecurityInfo() 51 50 52 implements(interfaces.ILocationContainer) 51 53 PleiadesEntity/trunk/content/Name.py
r1244 r1356 5 5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 2. 07 # Generator: ArchGenXML Version 2.1 8 8 # http://plone.org/products/archgenxml 9 9 # … … 96 96 enforceVocabulary=1, 97 97 ), 98 98 99 ), 99 100 ) … … 112 113 """ 113 114 security = ClassSecurityInfo() 115 114 116 implements(interfaces.IName) 115 117 PleiadesEntity/trunk/content/Place.py
r1244 r1356 5 5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 2. 07 # Generator: ArchGenXML Version 2.1 8 8 # http://plone.org/products/archgenxml 9 9 # … … 21 21 from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin 22 22 23 from Products.ATReferenceBrowserWidget.ATReferenceBrowserWidget import \ 24 ReferenceBrowserWidget 23 25 from Products.PleiadesEntity.config import * 24 26 25 27 ##code-section module-header #fill in your manual code here 28 from Products.CMFCore import permissions 26 29 ##/code-section module-header 27 30 … … 38 41 ), 39 42 ), 43 TextField( 44 name='content', 45 widget=RichWidget( 46 label="Content", 47 description="About the place", 48 label_msgid='PleiadesEntity_label_content', 49 description_msgid='PleiadesEntity_help_content', 50 i18n_domain='PleiadesEntity', 51 ), 52 ), 53 ReferenceField( 54 name='features', 55 widget=ReferenceBrowserWidget( 56 label='Features', 57 label_msgid='PleiadesEntity_label_features', 58 i18n_domain='PleiadesEntity', 59 ), 60 allowed_types=('Feature',), 61 multiValued=1, 62 relationship='hasFeature', 63 ), 64 40 65 ), 41 66 ) … … 44 69 ##/code-section after-local-schema 45 70 46 Place_schema = Base FolderSchema.copy() + \71 Place_schema = BaseSchema.copy() + \ 47 72 schema.copy() 48 73 … … 50 75 ##/code-section after-schema 51 76 52 class Place(Base Folder, BrowserDefaultMixin):77 class Place(BaseContent, BrowserDefaultMixin): 53 78 """ 54 79 """ 55 80 security = ClassSecurityInfo() 81 56 82 implements(interfaces.IPlace) 57 83 … … 70 96 """ 71 97 """ 72 try: 73 associations = self.listFolderContents() 74 nametitles = [] 75 nametypes = [] 76 for a in associations: 77 try: 78 name = a.getRefs('hasName')[0] # there can only be one name per association 79 nametitles.append(name.Title()) 80 nametypes.append(name.getNameType()) 81 except: 82 pass 83 title = '/'.join([title for i, title in enumerate(nametitles) if nametypes[i] == 'geographic' and not title.startswith('Unnamed')]) 84 if title == '': 85 '/'.join([title for title in nametitles if not title.startswith('Unnamed')]) 86 return title 87 except AttributeError: 98 titles = [] 99 types = [] 100 for o in self.getFeatures(): 101 try: 102 name = o.getRefs('hasName')[0] 103 titles.append(name.Title()) 104 types.append(name.getNameType()) 105 except: 106 pass 107 if len(titles) == 0: 88 108 return 'Unnamed Place' 109 else: 110 return '/'.join(titles) 89 111 90 112 security.declarePublic('getTimePeriods') … … 93 115 """ 94 116 result = [] 95 for a in self.listFolderContents():96 for p in a.getTimePeriods():97 if pnot in result:98 result.append( p)117 for o in self.getFeatures(): 118 for t in o.getTimePeriods(): 119 if t not in result: 120 result.append(t) 99 121 return result 100 122 … … 104 126 """ 105 127 result = [] 106 for a in self.listFolderContents(): 107 if a.getPlaceType() not in result: 108 result.append(a.getPlaceType()) 128 for o in self.getFeatures(): 129 t = o.getFeatureType() 130 if t not in result: 131 result.append(t) 109 132 return result 133 134 # Manually created methods 135 136 security.declareProtected(permissions.View, 'getFeatures') 137 def getFeatures(self): 138 for o in self.getRefs('hasFeature'): 139 if interfaces.IFeature.providedBy(o): 140 yield o 141 110 142 111 143 PleiadesEntity/trunk/content/PlaceContainer.py
r1244 r1356 5 5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 2. 07 # Generator: ArchGenXML Version 2.1 8 8 # http://plone.org/products/archgenxml 9 9 # … … 31 31 schema = Schema(( 32 32 33 33 34 ), 34 35 ) … … 47 48 """ 48 49 security = ClassSecurityInfo() 50 49 51 implements(interfaces.IPlaceContainer) 50 52 … … 78 80 79 81 # Places are handled differently 80 if id :82 if id is not None: 81 83 obid = str(id) 82 84 else: 83 # prevent ids in the reserved range 84 obid = -1 85 while int(obid) <= BA_ID_MAX: 86 obid = self.generateId(prefix='') 85 obid = self.generateId(prefix='') 87 86 args = ('Place', self, obid, RESPONSE) 88 87 new_id = pt.constructContent(*args, **kw) PleiadesEntity/trunk/content/PlacefulAssociation.py
r1244 r1356 1 1 # -*- coding: utf-8 -*- 2 2 # 3 # File: PlacefulAssociation.py3 # File: Feature.py 4 4 # 5 5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North … … 82 82 ##/code-section after-local-schema 83 83 84 PlacefulAssociation_schema = BaseFolderSchema.copy() + \84 Feature_schema = BaseFolderSchema.copy() + \ 85 85 schema.copy() 86 86 … … 88 88 ##/code-section after-schema 89 89 90 class PlacefulAssociation(BaseFolder, BrowserDefaultMixin):90 class Feature(BaseFolder, BrowserDefaultMixin): 91 91 """Associates Names and Locations 92 92 """ 93 93 security = ClassSecurityInfo() 94 implements(interfaces.I PlacefulAssociation)94 implements(interfaces.IFeature) 95 95 96 meta_type = ' PlacefulAssociation'96 meta_type = 'Feature' 97 97 _at_rename_after_creation = False 98 98 99 schema = PlacefulAssociation_schema99 schema = Feature_schema 100 100 101 101 ##code-section class-header #fill in your manual code here … … 143 143 144 144 145 registerType( PlacefulAssociation, PROJECTNAME)146 # end of class PlacefulAssociation145 registerType(Feature, PROJECTNAME) 146 # end of class Feature 147 147 148 148 ##code-section module-footer #fill in your manual code here PleiadesEntity/trunk/content/PrimaryReference.py
r1244 r1356 5 5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 2. 07 # Generator: ArchGenXML Version 2.1 8 8 # http://plone.org/products/archgenxml 9 9 # … … 28 28 schema = Schema(( 29 29 30 30 31 ), 31 32 ) … … 45 46 """ 46 47 security = ClassSecurityInfo() 48 47 49 implements(interfaces.IPrimaryReference) 48 50 PleiadesEntity/trunk/content/Reference.py
r1244 r1356 5 5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 2. 07 # Generator: ArchGenXML Version 2.1 8 8 # http://plone.org/products/archgenxml 9 9 # … … 63 63 ), 64 64 ), 65 65 66 ), 66 67 ) … … 79 80 """ 80 81 security = ClassSecurityInfo() 82 81 83 implements(interfaces.IReference) 82 84 PleiadesEntity/trunk/content/SecondaryReference.py
r1244 r1356 5 5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 2. 07 # Generator: ArchGenXML Version 2.1 8 8 # http://plone.org/products/archgenxml 9 9 # … … 28 28 schema = Schema(( 29 29 30 30 31 ), 31 32 ) … … 45 46 """ 46 47 security = ClassSecurityInfo() 48 47 49 implements(interfaces.ISecondaryReference) 48 50 PleiadesEntity/trunk/content/TemporalAttestation.py
r1244 r1356 5 5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 2. 07 # Generator: ArchGenXML Version 2.1 8 8 # http://plone.org/products/archgenxml 9 9 # … … 52 52 required=1, 53 53 ), 54 54 55 ), 55 56 ) … … 68 69 """ 69 70 security = ClassSecurityInfo() 71 70 72 implements(interfaces.ITemporalAttestation) 71 73 PleiadesEntity/trunk/content/__init__.py
r1244 r1356 5 5 # Copyright (c) 2008 by Ancient World Mapping Center, University of North 6 6 # Carolina at Chapel Hill, U.S.A. 7 # Generator: ArchGenXML Version 2. 07 # Generator: ArchGenXML Version 2.1 8 8 # http://plone.org/products/archgenxml 9 9 # … … 44 44 import SecondaryReference 45 45 import PrimaryReference 46 import PlacefulAssociation 46 import Feature 47 import NameContainer 47 48 import LocationContainer 48 49 import PlaceContainer 49 50 import Place 51 import FeatureContainer 50 52 51 53 ##code-section init-module-footer #fill in your manual code here PleiadesEntity/trunk/content/interfaces.py
r1251 r1356 30 30 """ 31 31 32 class IPlacefulAssociation(Interface): 33 """Marker interface for .PlacefulAssociation.PlacefulAssociation 32 class IFeature(Interface): 33 """Marker interface for .Feature.Feature 34 """ 35 36 class INameContainer(Interface): 37 """Marker interface for .NameContainer.NameContainer 34 38 """ 35 39 … … 46 50 """ 47 51 52 class IFeatureContainer(Interface): 53 """Marker interface for .FeatureContainer.FeatureContainer 54 """ 55 48 56 ##code-section FOOT 49 57 ##/code-section FOOT PleiadesEntity/trunk/data
- Property svn:ignore set to
*.pyc
- Property svn:ignore set to
PleiadesEntity/trunk/geo.py
r1325 r1356 31 31 from zgeo.geographer.interfaces import IGeoreferenced, IWriteGeoreferenced 32 32 import simplejson 33 33 from Products.PleiadesEntity.content.interfaces import IPlace 34 34 import logging 35 35 log = logging.getLogger('PleiadesEntity.geo') … … 64 64 65 65 66 class PlacefulAssociationGeoItem(object):66 class FeatureGeoItem(object): 67 67 implements(IGeoreferenced) 68 68 … … 109 109 self.context = context 110 110 self._adapter = None 111 for ob in self.context. values():111 for ob in self.context.getFeatures(): 112 112 try: 113 113 self._adapter = IGeoreferenced(ob) … … 137 137 def createGeoItem(context): 138 138 """Factory for adapters.""" 139 if IPlace fulContainer.providedBy(context):139 if IPlace.providedBy(context): 140 140 return PlaceGeoItem(context) 141 141 else: 142 return PlacefulAssociationGeoItem(context)142 return FeatureGeoItem(context) PleiadesEntity/trunk/i18n
- Property svn:ignore set to
*.pyc
- Property svn:ignore set to
PleiadesEntity/trunk/interfaces
- Property svn:ignore set to
