Changeset 683
- Timestamp:
- 03/13/07 16:01:24 (2 years ago)
- Files:
-
- PleiadesEntity/trunk/Extensions/Install.py (modified) (1 diff)
- PleiadesEntity/trunk/Extensions/loader.py (modified) (3 diffs)
- PleiadesEntity/trunk/content/TemporalAttestation.py (modified) (2 diffs)
- PleiadesEntity/trunk/data/AWMCTemporalAttestationConfidence.vdex (added)
- PleiadesEntity/trunk/i18n/generated.pot (modified) (1 diff)
- PleiadesEntity/trunk/models/PleiadesEntity.zargo (modified) (previous)
- PleiadesEntity/trunk/tests/LoadEntity.txt (modified) (3 diffs)
- PleiadesEntity/trunk/tests/TemporalAttestations.txt (modified) (3 diffs)
- PleiadesEntity/trunk/tests/Vocabularies.txt (modified) (1 diff)
- PleiadesEntity/trunk/thesauri/certainty/AWMCTemporalAttestationConfidence.xml (deleted)
- PleiadesEntity/trunk/version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
PleiadesEntity/trunk/Extensions/Install.py
r682 r683 77 77 atvm = getToolByName(self, ATVOCABULARYTOOL) 78 78 vocabmap = {'AWMCAncientNameLanguages': ('VdexVocabulary', 'VdexTerm'), 79 'AWMCPlaceTypes': ('VdexVocabulary', 'VdexTerm'), 79 80 'AWMCNameCompleteness': ('VdexVocabulary', 'VdexTerm'), 80 81 'AWMCNameAccuracy': ('VdexVocabulary', 'VdexTerm'), 81 'AWMC PlaceTypes': ('VdexVocabulary', 'VdexTerm'),82 'AWMCTemporalAttestationConfidence': ('VdexVocabulary', 'VdexTerm'), 82 83 } 83 84 for vocabname in vocabmap.keys(): PleiadesEntity/trunk/Extensions/loader.py
r657 r683 154 154 if not tpn: 155 155 raise EntityLoadError, "Incomplete timePeriod element for timePeriod node %s" % xmlcontext.findall("{%s}timePeriod" % ADLGAZ).index(tp) 156 c ert = 'certain'156 conf = 'confident' 157 157 tpnstr = tpn[0].text 158 158 if tpnstr.endswith('?'): 159 c ert = 'less certain'159 conf = 'less-confident' 160 160 tpnstr = tpnstr.replace('?', '') 161 161 if tp.xpath("ancestor::*[local-name()='featureName']"): … … 165 165 # location date inference was not noted in BAtlas 166 166 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 173 171 period=periods[tpnstr] 174 172 id=period_ids[tpnstr] … … 177 175 title=period, 178 176 id=id, 179 certainty=certainty177 attestationConfidence=confidence 180 178 ) 181 179 except: PleiadesEntity/trunk/content/TemporalAttestation.py
r602 r683 31 31 from AccessControl import ClassSecurityInfo 32 32 from Products.Archetypes.atapi import * 33 from Products.ATVocabularyManager.namedvocabulary import NamedVocabulary 33 34 from Products.PleiadesEntity.config import * 34 35 … … 39 40 40 41 StringField( 41 name='certainty', 42 name='attestationConfidence', 43 index="FieldIndex:brains", 44 vocabulary=NamedVocabulary("""AWMCTemporalAttestationConfidence"""), 42 45 default="certain", 43 index="FieldIndex:brains",46 enforceVocabulary=1, 44 47 widget=SelectionWidget( 45 label= 'Certainty',46 label_msgid='PleiadesEntity_label_ certainty',48 label="Confidence in temporal attestation", 49 label_msgid='PleiadesEntity_label_attestationConfidence', 47 50 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 ) 51 52 ), 52 53 PleiadesEntity/trunk/i18n/generated.pot
r665 r683 178 178 msgstr "" 179 179 180 #. Default: "Attestationconfidence" 181 #: content\TemporalAttestation.py 182 msgid "PleiadesEntity_label_attestationConfidence" 183 msgstr "" 184 180 185 #. Default: "Certainty" 181 186 #: content\TemporalAttestation.py PleiadesEntity/trunk/tests/LoadEntity.txt
r657 r683 87 87 >>> tps[0].getId 88 88 'roman' 89 >>> tps[0].get Certainty90 'c ertain'89 >>> tps[0].getAttestationConfidence 90 'confident' 91 91 >>> tps[1].Title 92 92 'Late Antique (AD 300 - 625)' 93 93 >>> tps[1].getId 94 94 'late-antique' 95 >>> tps[1].get Certainty96 'c ertain'95 >>> tps[1].getAttestationConfidence 96 'confident' 97 97 >>> srs = n0.getFolderContents({'meta_type':['SecondaryReference']}) 98 98 >>> len(srs) … … 121 121 >>> tps[0].getId 122 122 'classical' 123 >>> tps[0].get Certainty124 'c ertain'123 >>> tps[0].getAttestationConfidence 124 'confident' 125 125 >>> srs = n1.getFolderContents({'meta_type':['SecondaryReference']}) 126 126 >>> len(srs) … … 174 174 >>> tps[0].getId 175 175 'classical' 176 >>> tps[0].get Certainty177 'c ertain'176 >>> tps[0].getAttestationConfidence 177 'confident' 178 178 >>> tps[1].Title 179 179 'Roman (30 BC - AD 300)' 180 180 >>> tps[1].getId 181 181 'roman' 182 >>> tps[1].get Certainty183 'c ertain'182 >>> tps[1].getAttestationConfidence 183 'confident' 184 184 >>> tps[2].Title 185 185 'Late Antique (AD 300 - 625)' 186 186 >>> tps[2].getId 187 187 'late-antique' 188 >>> tps[2].get Certainty189 'c ertain'188 >>> tps[2].getAttestationConfidence 189 'confident' 190 190 >>> l.getTimePeriods() 191 191 ['Classical', 'Roman', 'Late Antique'] PleiadesEntity/trunk/tests/TemporalAttestations.txt
r615 r683 75 75 >>> tps[0].getId 76 76 'classical' 77 >>> tps[0].get Certainty78 'c ertain'77 >>> tps[0].getAttestationConfidence 78 'confident' 79 79 >>> tps[1].Title 80 80 'Hellenistic/Republican (330 - 30 BC)' 81 81 >>> tps[1].getId 82 82 'hellenistic-republican' 83 >>> tps[1].get Certainty84 'less certain'83 >>> tps[1].getAttestationConfidence 84 'less-confident' 85 85 86 86 >>> n1 = getattr(folder.names, 'tome-twirling') … … 92 92 >>> tps[0].getId 93 93 'roman' 94 >>> tps[0].get Certainty95 'c ertain, but there is no contemporary evidence'94 >>> tps[0].getAttestationConfidence 95 'confident-inferred' 96 96 >>> tps[1].Title 97 97 'Late Antique (AD 300 - 625)' 98 98 >>> tps[1].getId 99 99 'late-antique' 100 >>> tps[1].get Certainty101 'less certain and there is no contemporary evidence'100 >>> tps[1].getAttestationConfidence 101 'less-confident-inferred' 102 102 103 103 Test locations … … 112 112 >>> tps[0].getId 113 113 'archaic' 114 >>> tps[0].get Certainty115 'c ertain'114 >>> tps[0].getAttestationConfidence 115 'confident' 116 116 >>> tps[1].Title 117 117 'Classical (550 - 330 BC)' 118 118 >>> tps[1].getId 119 119 'classical' 120 >>> tps[1].get Certainty121 'c ertain'120 >>> tps[1].getAttestationConfidence 121 'confident' 122 122 >>> tps[2].Title 123 123 'Hellenistic/Republican (330 - 30 BC)' 124 124 >>> tps[2].getId 125 125 'hellenistic-republican' 126 >>> tps[2].get Certainty127 'less certain'126 >>> tps[2].getAttestationConfidence 127 'less-confident' 128 128 >>> tps[3].Title 129 129 'Roman (30 BC - AD 300)' 130 130 >>> tps[3].getId 131 131 'roman' 132 >>> tps[3].get Certainty133 'c ertain'132 >>> tps[3].getAttestationConfidence 133 'confident' 134 134 >>> tps[4].Title 135 135 'Late Antique (AD 300 - 625)' 136 136 >>> tps[4].getId 137 137 'late-antique' 138 >>> tps[4].get Certainty139 'less certain'138 >>> tps[4].getAttestationConfidence 139 'less-confident' 140 140 PleiadesEntity/trunk/tests/Vocabularies.txt
r682 r683 42 42 >>> len([obj for obj in v.contentValues() if obj.meta_type == "VdexTerm"]) 43 43 3 44 45 Test 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 24 61 0.1 build 248
