File:  [Repository] / OSAS / OSA_system / Attic / OSAS_addfiles.pyc
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Wed Oct 8 18:06:22 2003 UTC (20 years, 8 months ago) by dwinter
Branches: MAIN
CVS tags: HEAD
New Template for the repository

-
GC?csdkZdklZdkZdkZdkZdklZ	dk	l
Z

dklZdk
lZdklZdefdYZPd	ZUed
Z]ee`defdYZd
ZedZeedefdYZdZedZee
defdYZ2dZ7edZ?eeAdefdYZrdZdZ edZ!eedS(N(sECHO_collection(sFolder(sClassSecurityInfo(sInitializeClass(sPageTemplateFile(sPageTemplatesOSAS_add_DocumentcstZdZeZdZdZeihdd<dd<fZei	ddZ
$ei	d%ed	Z+ei	d
,dZ
1ei	d2d
Z6dZ:dZ>dZBdZGdZKdZRS(s(Hinzufuegen eines Dokumentes zum Storagecs||_dS(sinitialize a new instanceN(sidsself(sselfsid((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pys__init__ssOSAS_add_DocumentsMain Configslabelsadd_Document_configsactioncs, !tdi|}"|SdS(sMain configurations.products/OSA_system/ChangeOSAS_addDocument.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysadd_Document_configsschange_OSAS_add_Documentcs.%&(|tj	o)|idndS(sChangesmanage_mainN(sRESPONSEsNonesredirect(sselfsRESPONSE((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pyschange_OSAS_add_Document%ss
index_htmlcs ,-.ti|ddSdS(sstantard aufrufs	no_uploadiN(sOSAS_addsaddsself(sself((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pys
index_html,ssadd2cs234ti|SdS(s anlegen naechster schrittN(sOSAS_addsadd2sself(sself((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysadd22scs678ti|SdS(s
FoldernameN(sOSAS_addsadd3sself(sself((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysadd36scs:;<ti|SdS(sAppletN(sOSAS_addsadd4sself(sself((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysadd4:scs>?@ti|SdS(s
FoldernameN(sOSAS_addsadd5sself(sself((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysadd5>scsBCDti|SdS(swrite new index.meta fileN(sOSAS_addsadd6sself(sself((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysadd6BscsGHIti||SdS(s$Hinzufgen eines neuen ImagesfoldersN(sOSAS_adds	addImagessselfspath(sselfspath((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pys	addImagesGscsKLMti|SdS(sUpload des neuen ImagefoldersN(sOSAS_adds
addImages2sself(sself((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pys
addImages2Ks(s__name__s
__module__s__doc__sClassSecurityInfossecuritys__init__s	meta_typesFoldersmanage_optionss
declarePublicsadd_Document_configsNoneschange_OSAS_add_Documents
index_htmlsadd2sadd3sadd4sadd5sadd6s	addImagess
addImages2(((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysOSAS_add_Documents&	%cs,PQRtdi|}S|SdS(s*interface for adding the OSAS_add_Metadatas(products/OSA_system/AddOSAS_document.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysmanage_AddOSAS_add_DocumentFormPscsVUVWt|}X|ii||Y|tj	oZ|idndS(sadd the OSAS_rootsmanage_mainN(	sOSAS_add_DocumentsidsnewObjsselfsDestinations
_setObjectsRESPONSEsNonesredirect(sselfsidsRESPONSEsnewObj((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysmanage_AddOSAS_add_DocumentUs
s
OSAS_add_Textcs`tZdZabeZddZidZjeihdd<dd<fZpei	dqdZ
vei	dwed	Z}d
Z
dZRS(s-Hinzufuegen eines Text-Dokumentes zum Storagecsdef||_dS(sinitialize a new instanceN(sidsself(sselfsid((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pys__init__dss
OSAS_add_TextsMain Configslabelsadd_Text_configsactioncs,qrstdi|}t|SdS(sMain configurations*products/OSA_system/ChangeOSAS_addText.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysadd_Text_configqsschange_OSAS_add_Textcs.wxz|tj	o{|idndS(sChangesmanage_mainN(sRESPONSEsNonesredirect(sselfsRESPONSE((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pyschange_OSAS_add_Textwscs}~ti||SdS(sAdd a fulltextN(sOSAS_addsaddTextsselfspath(sselfspath((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysaddText}scsti|SdS(sRead the file and store itN(sOSAS_addsaddText2sself(sself((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysaddText2s(s__name__s
__module__s__doc__sClassSecurityInfossecuritys__init__s	meta_typesFoldersmanage_optionss
declarePublicsadd_Text_configsNoneschange_OSAS_add_TextsaddTextsaddText2(((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pys
OSAS_add_Text`s	%cs,tdi|}|SdS(s*interface for adding the OSAS_add_Metadatas$products/OSA_system/AddOSAS_text.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysmanage_AddOSAS_add_TextFormscsVt|}|ii|||tj	o|idndS(sadd the OSAS_rootsmanage_mainN(	s
OSAS_add_TextsidsnewObjsselfsDestinations
_setObjectsRESPONSEsNonesredirect(sselfsidsRESPONSEsnewObj((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysmanage_AddOSAS_add_Texts
sOSAS_add_contextDatacstZdZeZdZdZdZdZddZ	dZ
dZd	Ze
ihd
d<dd
<fZdZedZRS(s-Einfuegen eines Documentes in eine CollectionsOSAS_add_contextDatacs||_||_dS(N(sidsselfs
collection(sselfsids
collection((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pys__init__scsdg}xG|D]<}||dj||dj@o|i|nqW|SdS(Nii(slistsitemssobjectsdepthsidsappend(sselfsidsdepthsitemssobjectslist((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pys	getChildss	
	"c
sd}d}	|d7}|i|||}d}x|D]}||joP|||}||	|dd|i|d|||d}n3||d|}||	|dd}qSW|SdS(Ncs]d}d}x7|d|jo"|d7}|dd}qW|SdS(Nsiiis&nbsp;(stmpsksdepth(sdepthstmpsk((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysspacess		
cs-dti|id|ifSdS(Ns><input type='checkbox' name='collection' value='%s'>%s</input>s.(sstringsjoinsobjectsgetPhysicalPathstitle(sobject((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysretLinksiss<br>i(sspacessretLinksdepthsselfs	getChildss	startItemsitemsschildsstmpschildsenddepthsprintChilds(
sselfs	startItemsdepthsitemssenddepthschildsstmpsspacesschildsretLink((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysprintChildss
	
	=icsJd|iddU|ieddded}|SdS(s Erzeugt HTML-Tree der Collectionsitems=self.getPhysicalRoot().s.getCollectionTree()Nii(sselfs
collectionsprintChildssitemsschilds(sselfsdepthschilds((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysgenerateTrees#cs'd|iddUeSdS(sZeige Partnerlistesitems=self.getPhysicalRoot().s.partners.getPartners()N(sselfs
collectionsitems(sself((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysgetPartnersscsfyEti|id|dtdi|}|SWndSnXdS(sHinzufgen zu einer Sammlungs
SERVER_URLs/index.metas'products/OSA_system/contextDataMain.zptsindex.meta file has to exist!N(surllibsurlopensselfsREQUESTspathsPageTemplateFiles__of__spt(sselfspathspt((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysaddContextDatasc
s|id}|e|d}|e|d}|id|d}
d}d|dUeie
|||||||||	|
|||
|deee
|i|iii|id	d
|SdS(sHinzufuegen der Resources/is
SERVER_URLs/index.metasTOBEDONEscollection_object=selfNsRESPONSEsURL2s?path=(spathssplitssplittedslensidstitlesselfsREQUESTsmetalinkslinks
collectionsECHO_collectionsmanage_AddECHO_resourcescollection_objectscontextssciencespracticessource_typesperiodslabelsdescriptionscontent_typesresponsiblescreditssNonesgetattrsECHO_getResourceMDsRESPONSEsredirect(sselfspaths
collectionscontextssciencespracticessource_typesperiodslabelsdescriptionscontent_typesresponsiblescreditssmetalinkslinksidssplittedstitle((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysaddContextData2s	@sMain Configslabelsadd_contextData_configsactioncs,tdi|}|SdS(sMain configurations2products/OSA_system/ChangeOSAS_add_contextData.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysadd_contextData_configscs:||_|tj	o|idndS(sChangesmanage_mainN(s
collectionsselfsRESPONSEsNonesredirect(sselfs
collectionsRESPONSE((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pyschange_OSAS_add_contextDatas(s__name__s
__module__s__doc__sClassSecurityInfossecuritys	meta_types__init__s	getChildssprintChildssgenerateTreesgetPartnerssaddContextDatasaddContextData2sFoldersmanage_optionssadd_contextData_configsNoneschange_OSAS_add_contextData(((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysOSAS_add_contextDatas	
%cs,tdi|}|SdS(s*interface for adding the OSAS_add_Metadatas+products/OSA_system/AddOSAS_contextData.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pys"manage_AddOSAS_add_contextDataFormscsYt||}|ii|||tj	o|i	dndS(sadd the OSAS_rootsmanage_mainN(
sOSAS_add_contextDatasids
collectionsnewObjsselfsDestinations
_setObjectsRESPONSEsNonesredirect(sselfsids
collectionsRESPONSEsnewObj((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysmanage_AddOSAS_add_contextDatas
sOSAS_add_Presentationcs
tZdZeZdZdZeihdd<dd<fZei	ddZ
#ei	d$ed	Z*d
Z
.dZRS(s)Hinzufgen der Presentationsinformationencs||_dS(sinitialize a new instanceN(sidsself(sselfsid((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pys__init__ssOSAS_add_PresentationsMain Configslabelsadd_Presentation_configsactioncs, tdi|}!|SdS(sMain configurations2products/OSA_system/ChangeOSAS_addPresentation.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysadd_Presentation_configsschange_OSAS_add_Presentationcs.$%'|tj	o(|idndS(sChangesmanage_mainN(sRESPONSEsNonesredirect(sselfsRESPONSE((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pyschange_OSAS_add_Presentation$scs*+,ti||SdS(s&Hinzufgen der PresenationsinformationN(sOSAS_addsaddPresentationsselfspath(sselfspath((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysaddPresentation*scs./0ti|SdS(s"Eingabe von MetadateninformationenN(sOSAS_addsaddPresentation2sself(sself((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysaddPresentation2.s(s__name__s
__module__s__doc__sClassSecurityInfossecuritys__init__s	meta_typesFoldersmanage_optionss
declarePublicsadd_Presentation_configsNoneschange_OSAS_add_PresentationsaddPresentationsaddPresentation2(((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysOSAS_add_Presentation
s	%cs,234tdi|}5|SdS(s*interface for adding the OSAS_add_Metadatas,products/OSA_system/AddOSAS_presentation.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pys#manage_AddOSAS_add_PresentationForm2scsV789t|}:|ii||;|tj	o<|idndS(sadd the OSAS_rootsmanage_mainN(	sOSAS_add_PresentationsidsnewObjsselfsDestinations
_setObjectsRESPONSEsNonesredirect(sselfsidsRESPONSEsnewObj((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysmanage_AddOSAS_add_Presentation7s
sOSAS_combineTextImagecsAtZdZBCeZEdZJdZKeihdd<dd<fZQei	dRdZ
Wei	dXed	Z^ei	d
_dZ
cdZRS(
s%Hinzufgen der Combine Text und ImagecsEFG||_dS(sinitialize a new instanceN(sidsself(sselfsid((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pys__init__EssOSAS_combineTextImagesMain ConfigslabelscombineTextImage_configsactioncs,RSTtdi|}U|SdS(sMain configurations3products/OSA_system/ChangeOSAS_combineTextImage.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pyscombineTextImage_configRsschange_OSAS_combineTextImagecs.XY[|tj	o\|idndS(sChangesmanage_mainN(sRESPONSEsNonesredirect(sselfsRESPONSE((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pyschange_OSAS_combineTextImageXsscombineTextImagecs_`ati||SdS(s&Hinzufgen der PresenationsinformationN(sOSAS_addscombineTextImagesselfspath(sselfspath((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pyscombineTextImage_scscdeti||f|id}g|t|d}hd|}i||i	i
d<kt||dmtdi
|}o|SdS(s"Eingabe von Metadateninformationens/isOhttp://nausikaa2.mpiwg-berlin.mpg.de:86/cgi-bin/toc/toc.x.cgi?dir=%s&step=thumbslinkViewerEnvironmentsECHO standard environments5products/OSA_system/AddOSAS_combineTextImageFinal.zptN(sOSAS_addscombineTextImage2sselfspathssplitssplittedslenslinkPathslinkViewerEnvironmentsREQUESTsSESSIONswriteToContextsPageTemplateFiles__of__spt(sselfspathslinkPathsptssplittedslinkViewerEnvironment((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pyscombineTextImage2cs
(s__name__s
__module__s__doc__sClassSecurityInfossecuritys__init__s	meta_typesFoldersmanage_optionss
declarePublicscombineTextImage_configsNoneschange_OSAS_combineTextImagescombineTextImagescombineTextImage2(((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysOSAS_combineTextImageAs	%c	s(rsttiii|d}u|idd}w|id}y|id}z|i
|}{|i
|||i
|~|id}|i
|}|i
||i
||i
|t|dd}|i|iid|id	S(
s:Created an additional entry to the index.meta file of paths/index.metasresourceiscontextslinksnameswsutf-8N(sxmlsdomsminidomsparsespathsgetElementsByTagNamesnodes
createElementssubnodeslinknodescreateTextNodeslinksnamelinknodesappendChildsdescriptionsfiles	writefileswritestoxmlsencodesclose(	spathslinksdescriptionsnodesdomsnamelinknodes	writefileslinknodessubnode((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pyswriteToContextrs cs,tdi|}|SdS(s*interface for adding the OSAS_add_Metadatas0products/OSA_system/AddOSAS_combineTextImage.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pys#manage_AddOSAS_combineTextImageFormscsVt|}|ii|||tj	o|idndS(sadd the OSAS_rootsmanage_mainN(	sOSAS_combineTextImagesidsnewObjsselfsDestinations
_setObjectsRESPONSEsNonesredirect(sselfsidsRESPONSEsnewObj((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pysmanage_AddOSAS_combineTextImages
("sxml.dom.minidomsxmlsProducts.ECHO_contentsECHO_collectionsurllibsOSAS_addsstrings
OFS.FoldersFolders
AccessControlsClassSecurityInfosGlobalssInitializeClasss'Products.PageTemplates.PageTemplateFilesPageTemplateFiles#Products.PageTemplates.PageTemplatesPageTemplatesOSAS_add_Documentsmanage_AddOSAS_add_DocumentFormsNonesmanage_AddOSAS_add_Documents
OSAS_add_Textsmanage_AddOSAS_add_TextFormsmanage_AddOSAS_add_TextsOSAS_add_contextDatas"manage_AddOSAS_add_contextDataFormsmanage_AddOSAS_add_contextDatasOSAS_add_Presentations#manage_AddOSAS_add_PresentationFormsmanage_AddOSAS_add_PresentationsOSAS_combineTextImageswriteToContexts#manage_AddOSAS_combineTextImageFormsmanage_AddOSAS_combineTextImage(sOSAS_addsClassSecurityInfosstringsmanage_AddOSAS_add_PresentationsOSAS_combineTextImages"manage_AddOSAS_add_contextDataFormsInitializeClasssmanage_AddOSAS_add_TextsOSAS_add_PresentationsFoldersmanage_AddOSAS_add_DocumentForms#manage_AddOSAS_add_PresentationFormsxmlsmanage_AddOSAS_add_contextDatasmanage_AddOSAS_add_TextFormsECHO_collections#manage_AddOSAS_combineTextImageFormsurllibsPageTemplates
OSAS_add_Textsmanage_AddOSAS_add_DocumentsOSAS_add_DocumentsPageTemplateFileswriteToContextsOSAS_add_contextDatasmanage_AddOSAS_combineTextImage((sS/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_addfiles.pys?s<B
$
k
%
1

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>