Changeset 238
- Timestamp:
- 09/08/06 12:46:38 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
PleiadesThesauri/trunk/PleiadesThesauri/Extensions/AppInstall.py
r168 r238 1 1 from Products.PleiadesThesauri.config import PROJECTNAME 2 2 from Products.PleiadesThesauri.AppConfig import VOCABLISTFILE 3 from Products.PleiadesThesauri.Extensions.UtilCreation import setupContentItem 4 from Products.CMFCore.utils import getToolByName 3 5 import os, logging 4 6 from xml.dom.minidom import parse … … 32 34 """ 33 35 logger = logging.getLogger(PROJECTNAME + '.AppInstall.installThesaurus') 36 34 37 th_dom = getXMLDOM(th_file_path) 35 38 thesaurus = th_dom.getElementsByTagName("vdex") … … 65 68 66 69 # create a new thesaurus in portal_thesauri 70 portal_thesauri = getToolByName(self, 'portal_thesauri') 71 67 72 # set new thesaurus title = vocabName 68 73 # set new thesaurus identifier = vocabIdentifier 69 74 # leave new thesaurus description empty (there's nothing in vdex to correspond) 75 76 c_thesaurus_title = getText(thesaurus[0].getElementsByTagName("vocabName")[0].childNodes) 77 c_thesaurus_id = getText(thesaurus[0].getElementsByTagName("vocabIdentifier")[0].childNodes) 78 79 setupContentItem(portal_thesauri, 'Thesaurus', c_thesaurus_id, c_thesaurus_title, 'blah blah blah') 80 70 81 # for each term in the thesaurus 71 82 # create a new term in this thesaurus
