Changeset 1360

Show
Ignore:
Timestamp:
08/19/08 15:47:01 (3 months ago)
Author:
sgillies
Message:

Fix access to temporal attestations, IGeoreferenced adapters, and bump english vocab representations to the head of all lists

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • PleiadesEntity/trunk/Extensions/loader.py

    r1358 r1360  
    370370    names = site['names'] 
    371371    locations = site['locations'] 
     372    fids = [] 
    372373 
    373374    savepoint = transaction.savepoint() 
    374      
    375375    try: 
    376376        root = etree.parse(file).getroot() 
     
    430430        p = places[pid] 
    431431 
    432         fids = [] 
    433432        # Iterate over locations 
    434433        for lid in lids: 
  • PleiadesEntity/trunk/content/Location.py

    r1356 r1360  
    2424 
    2525##code-section module-header #fill in your manual code here 
     26from Products.CMFCore import permissions 
    2627##/code-section module-header 
    2728 
     
    107108        """ 
    108109        """ 
    109         periods = [] 
    110         for ta in self.getFolderContents({'meta_type':['TemporalAttestation']}): 
    111             periods.append(ta.getId) 
    112         return periods 
     110        return [t.getId() for t in self.getTemporalAttestations()] 
     111 
     112    security.declareProtected(permissions.View, 'getTemporalAttestations') 
     113    def getTemporalAttestations(self): 
     114         for o in self.values(): 
     115            if interfaces.ITemporalAttestation.providedBy(o): 
     116                yield o 
    113117 
    114118 
  • PleiadesEntity/trunk/content/Name.py

    r1356 r1360  
    133133        """ 
    134134        """ 
    135         periods = [] 
    136         for ta in self.getFolderContents({'meta_type':['TemporalAttestation']}): 
    137             periods.append(ta.getId) 
    138         return periods 
     135        return [t.getId() for t in self.getTemporalAttestations()] 
    139136 
    140137    security.declarePublic('setNameTransliterated') 
     
    162159        self.setNameTransliterated('') 
    163160 
     161    security.declareProtected(View, 'getTemporalAttestations') 
     162    def getTemporalAttestations(self): 
     163         for o in self.values(): 
     164            if interfaces.ITemporalAttestation.providedBy(o): 
     165                yield o 
     166 
    164167    # Manually created methods 
    165168 
  • PleiadesEntity/trunk/data/ancient-name-languages.vdex

    r727 r1360  
    66     
    77    <vocabName> 
     8        <langstring language="en">Standard Codes for Languages and Writing Systems of Ancient Names</langstring> 
    89        <langstring language="de">Standardcodes fÃŒr die Sprachen und Schreiben Systeme der alten Namen</langstring> 
    9         <langstring language="en">Standard Codes for Languages and Writing Systems of Ancient Names</langstring> 
    1010        <langstring language="es">Códigos estándares para las idiomas y los sistemas de la escritura de nombres antiguos</langstring> 
    1111        <langstring language="fr">Codes standard pour des langues et des systÚmes d'écriture des noms antiques </langstring> 
     
    1919        <termIdentifier>grc</termIdentifier> 
    2020        <caption> 
     21            <langstring language="en">Greek (ancient)</langstring> 
    2122            <langstring language="de">Griechische Sprache (alte)</langstring> 
    22             <langstring language="en">Greek (ancient)</langstring> 
    2323            <langstring language="es">Griega antigua</langstring> 
    2424            <langstring language="fr">Grecque antique</langstring> 
     
    3535        <termIdentifier>grc-Latn</termIdentifier> 
    3636        <caption> 
     37            <langstring language="en">Greek (ancient, in Latin characters)</langstring> 
    3738            <langstring language="de">Griechische Sprache (alte, in den lateinischen Buchstaben)</langstring> 
    38             <langstring language="en">Greek (ancient, in Latin characters)</langstring> 
    3939            <langstring language="es">Griega antigua en los caracteres latinos</langstring> 
    4040            <langstring language="fr">Grecque antique en caractÚres latins</langstring> 
     
    5050        <termIdentifier>la</termIdentifier> 
    5151        <caption> 
     52            <langstring language="en">Latin</langstring> 
    5253            <langstring language="de">Lateinisch</langstring> 
    5354            <langstring language="el">ΛατιΜική</langstring> 
    54             <langstring language="en">Latin</langstring> 
    5555            <langstring language="es">Latino</langstring> 
    5656            <langstring language="fr">Latin</langstring> 
     
    6868        <termIdentifier>la-Grek</termIdentifier> 
    6969        <caption> 
     70            <langstring language="en">Latin in Greek Characters</langstring> 
    7071            <langstring language="de">Lateinisch in den griechischen Buchstaben</langstring> 
    71             <langstring language="en">Latin in Greek Characters</langstring> 
    7272            <langstring language="es">Latino en los caracteres griegos</langstring> 
    7373            <langstring language="fr">Latin en caractÚres grecs</langstring> 
  • PleiadesEntity/trunk/geo.py

    r1356 r1360  
    7373        x = self.context.getRefs('hasLocation') 
    7474        if len(x) == 0: 
    75             raise Exception, "Unlocated: could not adapt %s" % str(context) 
     75            raise ValueError, "Unlocated: could not adapt %s" % str(context) 
    7676        else: 
    7777            self._adapter = IGeoreferenced(x[0]) 
     
    116116            break 
    117117        if not self._adapter: 
    118             raise Exception, "Could not adapt %s" % str(context) 
     118            raise ValueError, "Could not adapt %s" % str(context) 
    119119 
    120120    @property 
  • PleiadesEntity/trunk/skins/PleiadesEntity/feature_view.pt

    r1356 r1360  
    6666          </tal:if_visible> 
    6767                  </div> 
    68               <p metal:use-macro="here/placefulassociation_contents/macros/placecontents">place contents</p> 
     68              <p metal:use-macro="here/feature_contents/macros/placecontents">place contents</p> 
    6969        <hr style="display: block; clear: right; visibility: hidden;"/> 
    7070        </div> 
  • PleiadesEntity/trunk/skins/PleiadesEntity/pleiades_featurelisting.pt

    r1356 r1360  
    99          <metal:namecontentlisting_macro define-macro="contentlisting"> 
    1010                  <tal:chunk 
    11                     contentsMethod python:here.getFeatures; 
    12                     folderContents python:contentsMethod();" 
     11                    tal:define="folderContents python:context.getFeatures();" 
    1312                    > 
    1413                      <ul tal:condition="folderContents">