Changeset 685

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

Closes tickets #267 and #280. Changes PlacefulAssociation?.certainty to PlacefulAssociation?.associationCertainty. Controls vocabulary for same using an ATVocabularyManager-managed, vdex-formatted PlacefulAssociationCertaintyThesaurus.

Files:

Legend:

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

    r683 r685  
    7676    from Products.ATVocabularyManager.config import TOOL_NAME as ATVOCABULARYTOOL 
    7777    atvm = getToolByName(self, ATVOCABULARYTOOL) 
    78     vocabmap = {'AWMCAncientNameLanguages': ('VdexVocabulary', 'VdexTerm'), 
     78    vocabmap = {'AWMCTemporalAttestationConfidence': ('VdexVocabulary', 'VdexTerm'), 
    7979         'AWMCPlaceTypes': ('VdexVocabulary', 'VdexTerm'), 
     80         'AWMCAncientNameLanguages': ('VdexVocabulary', 'VdexTerm'), 
     81         'AWMCNameAccuracy': ('VdexVocabulary', 'VdexTerm'), 
     82         'AWMCPlacefulAssociationCertainty': ('VdexVocabulary', 'VdexTerm'), 
    8083         'AWMCNameCompleteness': ('VdexVocabulary', 'VdexTerm'), 
    81          'AWMCNameAccuracy': ('VdexVocabulary', 'VdexTerm'), 
    82          'AWMCTemporalAttestationConfidence': ('VdexVocabulary', 'VdexTerm'), 
    8384        } 
    8485    for vocabname in vocabmap.keys(): 
  • PleiadesEntity/trunk/Extensions/loader.py

    r683 r685  
    399399                id="unnamed-%s" % lid, 
    400400                placeType=placeType, 
    401                 certainty='certain', 
     401                associationCertainty='certain', 
    402402                ) 
    403403            a = getattr(p, aid) 
     
    416416                    id="%s-%s" % (nid,lid), 
    417417                    placeType=placeType, 
    418                     certainty=certainty, 
     418                    associationCertainty=certainty, 
    419419                    ) 
    420420                a = getattr(p, aid) 
     
    432432                    id="%s-unlocated" % nid, 
    433433                    placeType=placeType, 
    434                     certainty='certain', 
     434                    associationCertainty='certain', 
    435435                    ) 
    436436            a = getattr(p, aid) 
  • PleiadesEntity/trunk/content/PlacefulAssociation.py

    r676 r685  
    5353 
    5454    StringField( 
    55         name='certainty', 
     55        name='associationCertainty', 
    5656        widget=SelectionWidget( 
    5757            label="Certainty of association", 
    5858            description="Certainty of association between locations and names", 
    59             label_msgid='PleiadesEntity_label_certainty', 
    60             description_msgid='PleiadesEntity_help_certainty', 
     59            label_msgid='PleiadesEntity_label_associationCertainty', 
     60            description_msgid='PleiadesEntity_help_associationCertainty', 
    6161            i18n_domain='PleiadesEntity', 
    6262        ), 
    63         enforceVocabulary=1
    64         vocabulary=["certain", "less-certain", "uncertain"] 
     63        vocabulary=NamedVocabulary("""AWMCPlacefulAssociationCertainty""")
     64        enforceVocabulary=1 
    6565    ), 
    6666 
  • PleiadesEntity/trunk/i18n/generated.pot

    r683 r685  
    8484#. Default: "Certainty of association between locations and names" 
    8585#: content\PlacefulAssociation.py 
     86msgid "PleiadesEntity_help_associationCertainty" 
     87msgstr "" 
     88 
     89#. Default: "Certainty of association between locations and names" 
     90#: content\PlacefulAssociation.py 
    8691msgid "PleiadesEntity_help_certainty" 
    8792msgstr "" 
     
    178183msgstr "" 
    179184 
     185#. Default: "Certainty of association" 
     186#: content\PlacefulAssociation.py 
     187msgid "PleiadesEntity_label_associationCertainty" 
     188msgstr "" 
     189 
    180190#. Default: "Attestationconfidence" 
    181191#: content\TemporalAttestation.py 
  • PleiadesEntity/trunk/tests/LoadEntity.txt

    r683 r685  
    213213    >>> a.getPlaceType() 
    214214    'settlement' 
    215     >>> a.getCertainty() 
     215    >>> a.getAssociationCertainty() 
    216216    'certain' 
    217217 
     
    267267    >>> a.getPlaceType() 
    268268    'fort' 
    269     >>> a.getCertainty() 
     269    >>> a.getAssociationCertainty() 
    270270    'certain' 
    271271 
     
    298298    >>> a.getPlaceType() 
    299299    'undefined' 
    300     >>> a.getCertainty() 
     300    >>> a.getAssociationCertainty() 
    301301    'certain' 
    302302 
  • PleiadesEntity/trunk/tests/Vocabularies.txt

    r683 r685  
    5151    >>> len([obj for obj in v.contentValues() if obj.meta_type == "VdexTerm"]) 
    5252    4 
     53 
     54Test placeful association certainty vocabulary 
     55---------------------------------------------- 
     56 
     57    >>> v = vt.getVocabularyByName('AWMCPlacefulAssociationCertainty') 
     58    >>> v.Title() 
     59    'Levels of Certainty Assigned to Placeful Associations in AWMC Publications' 
     60    >>> len([obj for obj in v.contentValues() if obj.meta_type == "VdexTerm"]) 
     61    3 
  • PleiadesEntity/trunk/version.txt

    r683 r685  
    1 0.1 build 248 
     10.1 build 249