Changeset 683

Show
Ignore:
Timestamp:
03/13/07 16:01:24 (2 years ago)
Author:
thomase
Message:

Closes tickets #266 and #281. Rename TemporalAttestation?.certainty to TemporalAttestation?.attestationConfidence. Integrate vocabulary control using an ATVM-managed, VDEX-formatted TemporalAttestationConfidenceThesaurus.

Files:

Legend:

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

    r682 r683  
    7777    atvm = getToolByName(self, ATVOCABULARYTOOL) 
    7878    vocabmap = {'AWMCAncientNameLanguages': ('VdexVocabulary', 'VdexTerm'), 
     79         'AWMCPlaceTypes': ('VdexVocabulary', 'VdexTerm'), 
    7980         'AWMCNameCompleteness': ('VdexVocabulary', 'VdexTerm'), 
    8081         'AWMCNameAccuracy': ('VdexVocabulary', 'VdexTerm'), 
    81          'AWMCPlaceTypes': ('VdexVocabulary', 'VdexTerm'), 
     82         'AWMCTemporalAttestationConfidence': ('VdexVocabulary', 'VdexTerm'), 
    8283        } 
    8384    for vocabname in vocabmap.keys(): 
  • PleiadesEntity/trunk/Extensions/loader.py

    r657 r683  
    154154        if not tpn: 
    155155            raise EntityLoadError, "Incomplete timePeriod element for timePeriod node %s" % xmlcontext.findall("{%s}timePeriod" % ADLGAZ).index(tp) 
    156         cert = 'certain
     156        conf = 'confident
    157157        tpnstr = tpn[0].text 
    158158        if tpnstr.endswith('?'): 
    159             cert = 'less certain
     159            conf = 'less-confident
    160160            tpnstr = tpnstr.replace('?', '') 
    161161        if tp.xpath("ancestor::*[local-name()='featureName']"): 
     
    165165            # location date inference was not noted in BAtlas 
    166166            inferred = tp.xpath("bogus") 
    167         if inferred and cert=='less certain': 
    168             certainty = cert + ' and there is no contemporary evidence' 
    169         elif inferred and cert=='certain': 
    170             certainty = cert + ', but there is no contemporary evidence' 
    171         else: 
    172             certainty = cert 
     167        if inferred: 
     168            confidence = conf + '-inferred' 
     169        else: 
     170            confidence = conf 
    173171        period=periods[tpnstr] 
    174172        id=period_ids[tpnstr] 
     
    177175                title=period, 
    178176                id=id, 
    179                 certainty=certainty 
     177                attestationConfidence=confidence 
    180178                ) 
    181179        except: 
  • PleiadesEntity/trunk/content/TemporalAttestation.py

    r602 r683  
    3131from AccessControl import ClassSecurityInfo 
    3232from Products.Archetypes.atapi import * 
     33from Products.ATVocabularyManager.namedvocabulary import NamedVocabulary 
    3334from Products.PleiadesEntity.config import * 
    3435 
     
    3940 
    4041    StringField( 
    41         name='certainty', 
     42        name='attestationConfidence', 
     43        index="FieldIndex:brains", 
     44        vocabulary=NamedVocabulary("""AWMCTemporalAttestationConfidence"""), 
    4245        default="certain", 
    43         index="FieldIndex:brains"
     46        enforceVocabulary=1
    4447        widget=SelectionWidget( 
    45             label='Certainty'
    46             label_msgid='PleiadesEntity_label_certainty', 
     48            label="Confidence in temporal attestation"
     49            label_msgid='PleiadesEntity_label_attestationConfidence', 
    4750            i18n_domain='PleiadesEntity', 
    48         ), 
    49         enforceVocabulary=1, 
    50         vocabulary=['certain', 'certain, but there is no contemporary evidence', 'less certain', 'less certain and there is no contemporary evidence'] 
     51        ) 
    5152    ), 
    5253 
  • PleiadesEntity/trunk/i18n/generated.pot

    r665 r683  
    178178msgstr "" 
    179179 
     180#. Default: "Attestationconfidence" 
     181#: content\TemporalAttestation.py 
     182msgid "PleiadesEntity_label_attestationConfidence" 
     183msgstr "" 
     184 
    180185#. Default: "Certainty" 
    181186#: content\TemporalAttestation.py 
  • PleiadesEntity/trunk/tests/LoadEntity.txt

    r657 r683  
    8787    >>> tps[0].getId 
    8888    'roman' 
    89     >>> tps[0].getCertainty 
    90     'certain
     89    >>> tps[0].getAttestationConfidence 
     90    'confident
    9191    >>> tps[1].Title 
    9292    'Late Antique (AD 300 - 625)' 
    9393    >>> tps[1].getId 
    9494    'late-antique' 
    95     >>> tps[1].getCertainty 
    96     'certain
     95    >>> tps[1].getAttestationConfidence 
     96    'confident
    9797    >>> srs = n0.getFolderContents({'meta_type':['SecondaryReference']}) 
    9898    >>> len(srs) 
     
    121121    >>> tps[0].getId 
    122122    'classical' 
    123     >>> tps[0].getCertainty 
    124     'certain
     123    >>> tps[0].getAttestationConfidence 
     124    'confident
    125125    >>> srs = n1.getFolderContents({'meta_type':['SecondaryReference']}) 
    126126    >>> len(srs) 
     
    174174    >>> tps[0].getId 
    175175    'classical' 
    176     >>> tps[0].getCertainty 
    177     'certain
     176    >>> tps[0].getAttestationConfidence 
     177    'confident
    178178    >>> tps[1].Title 
    179179    'Roman (30 BC - AD 300)' 
    180180    >>> tps[1].getId 
    181181    'roman' 
    182     >>> tps[1].getCertainty 
    183     'certain
     182    >>> tps[1].getAttestationConfidence 
     183    'confident
    184184    >>> tps[2].Title 
    185185    'Late Antique (AD 300 - 625)' 
    186186    >>> tps[2].getId 
    187187    'late-antique' 
    188     >>> tps[2].getCertainty 
    189     'certain
     188    >>> tps[2].getAttestationConfidence 
     189    'confident
    190190    >>> l.getTimePeriods() 
    191191    ['Classical', 'Roman', 'Late Antique'] 
  • PleiadesEntity/trunk/tests/TemporalAttestations.txt

    r615 r683  
    7575    >>> tps[0].getId 
    7676    'classical' 
    77     >>> tps[0].getCertainty 
    78     'certain
     77    >>> tps[0].getAttestationConfidence 
     78    'confident
    7979    >>> tps[1].Title 
    8080    'Hellenistic/Republican (330 - 30 BC)' 
    8181    >>> tps[1].getId 
    8282    'hellenistic-republican' 
    83     >>> tps[1].getCertainty 
    84     'less certain
     83    >>> tps[1].getAttestationConfidence 
     84    'less-confident
    8585     
    8686    >>> n1 = getattr(folder.names, 'tome-twirling') 
     
    9292    >>> tps[0].getId 
    9393    'roman' 
    94     >>> tps[0].getCertainty 
    95     'certain, but there is no contemporary evidence
     94    >>> tps[0].getAttestationConfidence 
     95    'confident-inferred
    9696    >>> tps[1].Title 
    9797    'Late Antique (AD 300 - 625)' 
    9898    >>> tps[1].getId 
    9999    'late-antique' 
    100     >>> tps[1].getCertainty 
    101     'less certain and there is no contemporary evidence
     100    >>> tps[1].getAttestationConfidence 
     101    'less-confident-inferred
    102102 
    103103    Test locations 
     
    112112    >>> tps[0].getId 
    113113    'archaic' 
    114     >>> tps[0].getCertainty 
    115     'certain
     114    >>> tps[0].getAttestationConfidence 
     115    'confident
    116116    >>> tps[1].Title 
    117117    'Classical (550 - 330 BC)' 
    118118    >>> tps[1].getId 
    119119    'classical' 
    120     >>> tps[1].getCertainty 
    121     'certain
     120    >>> tps[1].getAttestationConfidence 
     121    'confident
    122122    >>> tps[2].Title 
    123123    'Hellenistic/Republican (330 - 30 BC)' 
    124124    >>> tps[2].getId 
    125125    'hellenistic-republican' 
    126     >>> tps[2].getCertainty 
    127     'less certain
     126    >>> tps[2].getAttestationConfidence 
     127    'less-confident
    128128    >>> tps[3].Title 
    129129    'Roman (30 BC - AD 300)' 
    130130    >>> tps[3].getId 
    131131    'roman' 
    132     >>> tps[3].getCertainty 
    133     'certain
     132    >>> tps[3].getAttestationConfidence 
     133    'confident
    134134    >>> tps[4].Title 
    135135    'Late Antique (AD 300 - 625)' 
    136136    >>> tps[4].getId 
    137137    'late-antique' 
    138     >>> tps[4].getCertainty 
    139     'less certain
     138    >>> tps[4].getAttestationConfidence 
     139    'less-confident
    140140     
  • PleiadesEntity/trunk/tests/Vocabularies.txt

    r682 r683  
    4242    >>> len([obj for obj in v.contentValues() if obj.meta_type == "VdexTerm"]) 
    4343    3 
     44 
     45Test temporal attestation confidence vocabulary 
     46----------------------------------------------- 
     47 
     48    >>> v = vt.getVocabularyByName('AWMCTemporalAttestationConfidence') 
     49    >>> v.Title() 
     50    'Levels of Confidence in Assignment of Time Periods to Ancient Names and Locations in AWMC Publications' 
     51    >>> len([obj for obj in v.contentValues() if obj.meta_type == "VdexTerm"]) 
     52    4 
  • PleiadesEntity/trunk/version.txt

    r682 r683  
    1 0.1 build 246 
     10.1 build 248