File:  [Repository] / ECHO_content / Attic / ECHO_collection.pyc
Revision 1.11: download - view: text, annotated - select for diffs - revision graph
Fri Apr 2 16:29:25 2004 UTC (20 years, 2 months ago) by dwinter
Branches: MAIN
CVS tags: HEAD
*** empty log message ***

;
m@c@smdZdkZdkZdkZdkTdklZdklZdk	l
Z
dklZdk
lZdklZdklZd	klZd
klZdklZdklZdkZdkZdkZd
klZlZddgZdZdZdZ ddZ!deeefdYZ"de
eefdYZ#de
fdYZ$dZ%e&e&e&dZ'de
fdYZ(dZ)e&e&e&d Z*d!e
eefd"YZ+d#Z,de&e&dd$Z-d%e
eefd&YZ.e&d'Z/d(Z0d)eefd*YZ1ed+e2d,d)d-d)Z3ddde&d.Z4dS(/sNew version of the product started February, 8th. Without scientific classification, use content-type for further classification.N(s*(sImage(sDTMLFile(sFolder(s
SimpleItem(sClassSecurityInfo(sInitializeClass(sPageTemplateFile(sPageTemplate(s
Persistent(sImplicit(sjavaHandlersjavaScriptMains
view pointsareacCs&t|tjo|gSn|SdS(sEinzelfeld in Liste umwandelnN(stypesfields
StringType(sfield((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pystoList'scCsCd}x2|D]*}|i|ijo||i}q
q
W|SdS(Ns(srcsnodelistsnodesnodeTypes	TEXT_NODEsdata(snodelistsnodesrc((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysgetText.scCswh}y4d}x'ti|iD]}||}q%WWntd|fSnXyti	i
i|}Wntd|d|fSnX|id}d|d<t|djo|id	}d
|d<nt|djo|di}y+t|iddidi|d<WnnXx<|D]0}y t|i||ii<Wq1q1Xq1Wn|dfSdS(
sYMethoden zum Auslesen der Metadateninformation zu einer Resource
    Vorerst noch Typ bibss
Cannot open: sCannot parse: s<br>sbibsBooksbib_typeis
archimedess
ArchimedesstypeN(smetadictsgeturlsurllibsurlopensurls	readlinesslinesNonesxmlsdomsminidomsparseStringsgetElementsByTagNamesmetanodeslens
childNodessmetacontentsgetTexts
attributessnodestagNameslower(surlsgeturlsnodesdomsmetadictsmetanodesmetacontentsline((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysreadMetadata7s>

+ sc

Cs|	|_||_||_||_||_||_t||_||_	g}
|oExB|D]6}y|i
d}Wn
g}nX|
i|qbWn|
d|_
dS(s2Allegemeine Informationen zu einer ECHO Collections,iN(sviewClassificationsselfslabelstitlesdescriptionscontent_typesresponsiblestoListscreditssweightscoordss	coordstrsscoordstrssplitstemcosappend(
sselfstitleslabelsdescriptionscontent_typesresponsiblescreditssweights	coordstrssviewClassificationscoordsstemcoscoordstr((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pyssetECHO_collectionInformationcs&							
sscientificClassificationcBsbtZdZeZdZeiddZeiddZeiddZ	RS(s8outdated will be deleeted in the next versions: subclasscCs(||_||_||_d|_dS(Nsscientific_Classification(scontextsselfssciencespracticesid(sselfscontextssciencespractice((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys__init__s			sget_contextcCs|iSdS(N(sselfscontext(sself((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysget_contextssget_sciencecCs|iSdS(N(sselfsscience(sself((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysget_sciencessget_practicecCs|iSdS(N(sselfspractice(sself((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysget_practices(
s__name__s
__module__s__doc__sClassSecurityInfossecuritys__init__s
declarePublicsget_contextsget_sciencesget_practice(((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysscientificClassifications		
	
	
sscientificInformationcBsLtZdZeZdZeiddZeiddZRS(sMoutdated will be deleted in the next versions: subclass scientificInformationcCsd|_||_||_dS(Nsscientific_Information(sselfsidssource_typesperiod(sselfssource_typesperiod((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys__init__s		sget_source_typecCs|iSdS(N(sselfssource_type(sself((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysget_source_typess
get_periodcCs|iSdS(N(sselfsperiod(sself((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys
get_periods(	s__name__s
__module__s__doc__sClassSecurityInfossecuritys__init__s
declarePublicsget_source_types
get_period(((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysscientificInformations		
	
s
ECHO_resourcecBstZdZdZeZdZdZdZdZ	dZ
deeedZe
ihd	d
<dd<hd	d
<dd<hd	d<dd<fZdZdZdedZddZdZdZdZRS(sECHO Ressources
ECHO_resourcecCs#t|do|iSndSdS(NsviewClassifications(shasattrsselfsviewClassification(sself((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysgetViewClassificationscCs|io|iSngSdS(sAusgabe der creditsN(sselfscredits(sself((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys
getCreditss
cCs||_||_||_||_||_|
|_t|	|_||_	||_
||_|o7gi
}|D]}
|ti|
dqu~}ng}||_dS(Ns,(sidsselfslabelslinksmetalinkstitlesweightstoListscreditssdescriptionscontent_typesresponsiblescoordssappends_[1]sxsstringssplits	coordsnew(sselfsidslinksmetalinkstitleslabelsdescriptionscontent_typesresponsiblescreditssweightscoordss_[1]sxs	coordsnew((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys__init__s									7cCsJy8gi}|iD]}|ti|dq~SWngSnXdS(Ns,(sappends_[1]sselfscoordssxsstringsjoin(sselfs_[1]sx((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys	getCoordss8cCsht|do
d|_nt|do
g|_ndG|iGHtdi|}|SdS(sMain configurationsweightsscoordssvorhers1Products/ECHO_content/zpt/ChangeECHO_resource.zptN(shasattrsselfsweightscoordssPageTemplateFiles__of__spt(sselfspt((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysECHO_resource_configs

sc

Csgi}|
D]}
|ti|
dq~}t|||||||||	|d|_||_||_|tj	o|idndS(snderung der Propertiess,ismanage_mainN(sappends_[1]scoordssxsstringssplits	coordsnewssetECHO_collectionInformationsselfstitleslabelsdescriptionscontent_typesresponsiblescreditssweightslinksmetalinksRESPONSEsNonesredirect(sselfsmetalinkslinkstitleslabelsdescriptionscontent_typesresponsiblesweightsviewClassificationscoordsscreditssRESPONSEsxs_[1]s	coordsnew((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pyschangeECHO_resources3"
		
slabelsMain ConfigsactionsECHO_resource_configsMetadatasECHO_getResourceMDsGraphicssECHO_graphicEntrycCs(|ii|iddgddSdS(soverview graphicssobj_idssoverviewiiN(sselfs	aq_parentsZopeFind(sself((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysgetOverviewscCsM|ii|iddg}|o tdi|}|SndSdS(s
DO nothingsobj_idssoverviews'Products/ECHO_content/zpt/ECHO_draw.zptsNO OVERVIEW GRAPHICSN(sselfs	aq_parentsZopeFindsoverviewsPageTemplateFiles__of__spt(sselfsoverviewspt((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysECHO_graphicEntryscCsa|i}|id}|i||i||d|_|tj	o|i	dndS(sEnter coordss,isECHO_graphicEntryN(
sselfscoordsscoordstrssplitstemcosappendsanglesRESPONSEsNonesredirect(sselfscoordstrsanglesRESPONSEscoordsstemco((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysECHO_enterCoordss	



syescCst|i\}}|djod|fSnx4|iD]&}t||||iddq>W|i|_	|i
|_|djo t
di|}|SndS(sREinlesen der Metadaten und Anlegen dieser Metadaten als Informationen zur ResourcessERROR:sasciisreplacesyess-Products/ECHO_content/zpt/ECHO_resourceMD.zptN(sreadMetadatasselfsmetalinksmetadictserrorskeysskeyssetattrsencodesmetadatasgenerate_labelslabelstemplatesPageTemplateFiles__of__spt(sselfstemplateserrorsmetadictsptskey((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysECHO_getResourceMD s
$
cCst||SdS(sAusgabe der MDN(sgetattrsselfsitem(sselfsitem((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys
ECHO_getMD5scCs|iii|iSdS(s
standard pageN(sselfsREQUESTsRESPONSEsredirectslink(sself((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys
index_html9scCs!t|d|i}|SdS(s#Erzeugt_standard_Label aus Templateslabel_template_N(sgetattrsselfsbib_typespt(sselfspt((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysgenerate_label>s(s__name__s
__module__s__doc__s	meta_typesviewClassificationListMastersviewClassificationListsgetViewClassifications
getCreditss__init__s	getCoordssECHO_resource_configsNoneschangeECHO_resourcesFoldersmanage_optionssgetOverviewsECHO_graphicEntrysECHO_enterCoordssECHO_getResourceMDs
ECHO_getMDs
index_htmlsgenerate_label(((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys
ECHO_resources"					
L					cCs tdi|}|SdS(sForm for adding a ressources2Products/ECHO_content/zpt/AddECHO_resourceForm.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysmanage_addECHO_resourceFormDsc
Cs\t|||||||||
|	|}
|i||
|tj	o|idndS(saddaresourcesmanage_mainN(s
ECHO_resourcesidslinksmetalinkstitleslabelsdescriptionscontent_typesresponsiblescreditssweightscoordssnewObjsselfs
_setObjectsRESPONSEsNonesredirect(sselfsidstitleslabelsdescriptionscontent_typesresponsibleslinksmetalinksweightscreditsscoordssRESPONSEsnewObj((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysmanage_addECHO_resourceKs
*
sECHO_externalLinkcBsutZdZeZdZdZdZeeedZ	e
ihdd<dd<fZd	Zd
Z
RS(s Link zu einer externen RessourcesECHO_externalLinkcCs||_t||_||_||_||_|	|_||_||_	||_
gi}|
D]}|ti|dqe~}
|
|_
dS(Ns,(sidsselfstoListscreditsslabelslinkstitlesweightsdescriptionscontent_typesresponsiblesappends_[1]scoordssxsstringssplits	coordsnew(sselfsidslinkstitleslabelsdescriptionscontent_typesresponsiblescreditssweightscoordss_[1]sxs	coordsnew((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys__init__\s								3cCs_t|do
d|_nt|dodg|_ntdi|}|SdS(sMain configurationsweightsscoordss5Products/ECHO_content/zpt/ChangeECHO_externalLink.zptN(shasattrsselfsweightscoordssPageTemplateFiles__of__spt(sselfspt((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysECHO_externalLink_configls
c
Csgi}|D]}|ti|dq~}
t|||||||	||	|
d|_||_|
tj	o|
idndS(snderung der Propertiess,ismanage_mainN(sappends_[1]scoordssxsstringssplits	coordsnewssetECHO_collectionInformationsselfstitleslabelsdescriptionscontent_typesresponsiblescreditssweightslinksRESPONSEsNonesredirect(sselfslinkstitleslabelsdescriptionscontent_typesresponsiblesweightscoordsscreditssRESPONSEsxs_[1]s	coordsnew((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pyschangeECHO_externalLinkzs3"
	
slabelsMain ConfigsactionsECHO_externalLink_configcCs|io|iSngSdS(sAusgabe der creditsN(sselfscredits(sself((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys
getCreditss
cCs|iii|iSdS(s
standard pageN(sselfsREQUESTsRESPONSEsredirectslink(sself((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys
index_htmls(s__name__s
__module__s__doc__sClassSecurityInfossecuritys	meta_types__init__sECHO_externalLink_configsNoneschangeECHO_externalLinksFoldersmanage_optionss
getCreditss
index_html(((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysECHO_externalLinkVs			
"	cCs tdi|}|SdS(sForm for external Linkss6Products/ECHO_content/zpt/AddECHO_externalLinkForm.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysmanage_addECHO_externalLinkFormsc
CsYt||||||||
||	
}|i
|||tj	o|idndS(sAdd an external Linksmanage_mainN(sECHO_externalLinksidslinkstitleslabelsdescriptionscontent_typesresponsiblescreditssweightscoordssnewObjsselfs
_setObjectsRESPONSEsNonesredirect(
sselfsidstitleslabelsdescriptionscontent_typesresponsibleslinksweightscoordsscreditssRESPONSEsnewObj((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysmanage_addECHO_externalLinks
'
sECHO_collectioncBstZdZeZdZdZeeedZdZ	dZ
eiddZeidd	Z
eid
dZeidd
ZddZeihdd<dd<hdd<dd
<hdd<dd<fZdZdZdedZeiddZeidedeeddZeiddZd Zd!Zd"Zdd#ZRS($sECHO CollectionsECHO_collectioncCsy|iSWndSnXdS(sGetTagsN(sselfsimageTag(sself((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysgetImageTags
c

CsQy?t||||||||||	dtdtdt
dSWntSnXdS(sSSSscreditsscoordssRESPONSEsdoneN(smanage_addECHO_resourcesselfsidstitleslabelsdescriptionscontent_typesresponsibleslinksmetalinksweightsNone(
sselfsidstitleslabelsdescriptionscontent_typesresponsibleslinksmetalinksweightscreditsscoordssRESPONSE((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysaddResources7cs%ddd|dSdS(sTree as XMLics|d7}d}x|iiD]q}t||}yR|idjo>|d|i	d|i
d7}|||d7}nWq q Xq W|SdS(NissECHO_collections<element name="s" url="s">s</element>
(sdepthscollectionssobjects__dict__skeyssentrysgetattrselements	meta_typestitlesabsolute_urls
getCollection(sobjectsdepthselementscollectionssentry(s
getCollection(sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys
getCollections
#s<collection>s
</collection>N(s
getCollectionsself(sselfs
getCollection((s
getCollectionsI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysgetCollectionTreeXMLscCsUt}d}x0|iD]"}|d|d|df7}qW|t|7}|SdS(s
CreateJavass'Coords.push(new Coord('%s', Img, %s));
iiN(sjavaScriptMainsrets	dynamicalsselfsgetGraphicCoordssobsjavaHandler(sselfs	dynamicalsobsret((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pyscreateJavaScripts
 sgetCreditObjectcCs&yt|i|SWndSnXdS(scredit id to credititemsN(sgetattrsselfspartnerssname(sselfsname((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysgetCreditObjects
sECHO_generateNavBarcCsd}d}g}|i}xp|D]h}|djoT|d|7}t|i}|d|7}|djo|i	||fqq%q%W|SdS(sErzeuge Navigationsbarssselfs.s/N(
slinksobjectsretsselfsgetPhysicalPathspathselementsevalslabelsappend(sselfsobjectsretselementslinkspathslabel((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysECHO_generateNavBarssECHO_rerenderLinksMDcCsjxX|iiD]G}t||}y(|idjo|iddnWqqXqWd|iSdS(sRerender all Linkss
ECHO_resourcestemplatesnos%Rerenderd all links to resources in: N(	sselfs__dict__skeyssentrysgetattrsobjects	meta_typesECHO_getResourceMDstitle(sselfsentrysobject((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysECHO_rerenderLinksMDssECHO_newViewerLinkcCsPy>gi}|iD]}|ti|dq~}|SWngSnXdS(Ns,(sappends_[1]sselfscoordssxsstringsjoin(sselfs_[1]sx((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys	getCoordss
6scCs||_t||_||_||_||_||_||_||_	||_
|	|_gi}|
D]}
|ti|
dqn~}||_dS(Ns,(sidsselfstoListscreditsslabelstitlesdescriptionscontent_typesresponsiblesimageTagsweights	sortfieldsappends_[1]scoordssxsstringssplits	coordsnew(sselfsidstitleslabelsdescriptionscontent_typesresponsiblescreditssweights	sortfieldscoordssimageTags_[1]sxs	coordsnew((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys__init__s									3slabelsMain ConfigsactionsECHO_collection_configsRerender LinkssGraphicssECHO_graphicEntrycCs(|ii|iddgddSdS(soverview graphicssobj_idssoverviewiiN(sselfs	aq_parentsZopeFind(sself((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysgetOverview.scCsM|ii|iddg}|o tdi|}|SndSdS(s
DO nothingsobj_idssoverviews'Products/ECHO_content/zpt/ECHO_draw.zptsNO OVERVIEW GRAPHICSN(sselfs	aq_parentsZopeFindsoverviewsPageTemplateFiles__of__spt(sselfsoverviewspt((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysECHO_graphicEntry4scCsa|i}|id}|i||i||d|_|tj	o|i	dndS(sEnter coordss,isECHO_graphicEntryN(
sselfscoordsscoordstrssplitstemcosappendsanglesRESPONSEsNonesredirect(sselfscoordstrsanglesRESPONSEscoordsstemco((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysECHO_enterCoords?s	



cCszt|do
d|_nt|do
d|_nt|do
g|_ntdi|}|SdS(sMain configurationsweightss	sortfieldscoordss3Products/ECHO_content/zpt/ChangeECHO_collection.zptN(shasattrsselfsweights	sortfieldscoordssPageTemplateFiles__of__spt(sselfspt((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysECHO_collection_configLs


schangeECHO_collectionsweightc
Cs||_gi}|	D]}
|ti|
dq~}t	|||||||||	|d|_||_|
tj	o|
idndS(snderung der Propertiess,ismanage_mainN(simageTagsselfsappends_[1]scoordssxsstringssplits	coordsnewssetECHO_collectionInformationstitleslabelsdescriptionscontent_typesresponsiblescreditssweights	sortfieldsRESPONSEsNonesredirect(sselfstitleslabelsdescriptionscontent_typesresponsiblesweightscreditss	sortfieldscoordssRESPONSEsimageTags_[1]sxs	coordsnew((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pyschangeECHO_collection_s	3"
	
s
index_htmlcCsJd|iijot|dSntdi|}|SdS(soverviewsECHO_overview.htmls3Products/ECHO_content/zpt/ECHO_content_overview.zptN(sselfs__dict__skeyssgetattrsPageTemplateFiles__of__spt(sselfspt((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysshowOverviewps
cCswd|iijot|dSn%d|iijo|iSntdi|}d|_|SdS(s
standard pages
index.htmlsoverviews3Products/ECHO_content/zpt/ECHO_content_standard.zpts	text/htmlN(	sselfs__dict__skeyssgetattrsshowOverviewsPageTemplateFiles__of__sptscontent_type(sselfspt((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys
index_htmlxs	cCs|io|iSngSdS(sAusgabe der creditsN(sselfscredits(sself((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys
getCreditss
cCsdddg}g}x|iiD]{}t||}y\|i|joHxE|i	D]6}t|djo|dd!}t
|do|idjo2|iti|d	|i|i|gqt
|d
ox|idjo2|iti|d	|i|i|gq|iti|d	|i|i|gq|iti|d	|i|i|gqWqWWnWq%q%Xq%W|SdS(sGive list of coordinatessECHO_collectionsECHO_externalLinks
ECHO_resourceiiislabelss, stitleN(ssubColTypessidssselfs__dict__skeyssentrysgetattrsobjects	meta_typescoordss	coordtempslenscoordshasattrslabelsappendsstringsjoinsgetIdstitle(sselfsobjectsidss	coordtempscoordssubColTypessentry((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysgetGraphicCoordss,

!225AcCs*dddg}	g}xU|iiD]D}
t||
}y%|i|	jo|i	|nWq%q%Xq%Wy
|i
}WnnXg}xd|D]\}t
||o-yt|}WnnXt||}nd}|i	||fqW|igi	}|D]\}}||q	~SdS(NsECHO_collectionsECHO_externalLinks
ECHO_resourcei(ssubColTypessidssselfs__dict__skeyssentrysgetattrsobjects	meta_typesappends	sortfieldstmplistsxshasattrsintstmpssorts_[1]skey(sselfs	sortfieldstmps_[1]sobjectsidsstmplistskeysxssubColTypessentry((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys
getSubColss6

(s__name__s
__module__s__doc__sClassSecurityInfossecuritys	meta_typesgetImageTagsNonesaddResourcesgetCollectionTreeXMLscreateJavaScripts
declarePublicsgetCreditObjectsECHO_generateNavBarsECHO_rerenderLinksMDs	getCoordss__init__sFoldersmanage_optionssgetOverviewsECHO_graphicEntrysECHO_enterCoordssECHO_collection_configschangeECHO_collectionsshowOverviews
index_htmls
getCreditssgetGraphicCoordss
getSubCols(((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysECHO_collections<				

	
	
	
	
L		
	

		
			cCs tdi|}|SdS(sAdd collection forms4Products/ECHO_content/zpt/AddECHO_collectionForm.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysmanage_addECHO_collectionFormsc
Cs\t|||||||
|||	|}
|i||
|tj	o|idndS(sadd a echo collectionsmanage_mainN(sECHO_collectionsidstitleslabelsdescriptionscontent_typesresponsiblescreditssweights	sortfieldscoordssimageTagsnewObjsselfs
_setObjectsRESPONSEsNonesredirect(sselfsidstitleslabelsdescriptionscontent_typesresponsiblesweights	sortfieldscoordsscreditssRESPONSEsimageTagsnewObj((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysmanage_addECHO_collections
*
s	ECHO_rootcBsttZdZdZedZdZdZedZdZ	dZ
dZd	Zd
Z
dZRS(sECHO Root Folders	ECHO_rootcCs|o
|}n|i|dddg}x^|D]V}|didjo'tidd|di|d_q4|di	|dq4Wd|i
SdS(	schange links (:86 faellt weg)s
obj_metatypess
ECHO_resourcesECHO_collectionis\:86ss%Rerenderd all links to resources in: N(sobjsselfsZopeFindsentriessentrys	meta_typesressubslinksECHO_newViewerLinkstitle(sselfsobjsentrysentries((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysECHO_newViewerLinks
'cCs||_||_dS(sinitN(sidsselfstitle(sselfsidstitle((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys__init__s	cCs<|t|ddjo|dt|d!Sn|SdS(s!delete space at the end of a lineis iN(sstrslen(sselfsstr((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysdeleteSpacescCs|oWd}|id}x5|D]-}||}dG|GH|d||f7}q#W|}n|otidd|SndSdS(s"ersetze ascii umbrueche durch <br>ss
sstrs<a href="%s">%s</a><br/>s[\n]s<br/>N(	surlsretStrsstrssplitswordsswordsstrUrlsressub(sselfsstrsurlswordsretStrsstrUrlswords((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysformatAsciis
	
cCs|o|GHtidd|}tiiid|d}|id}dG|GHx[|D]S}d|_
|id}|i|o%|id|iid	|q]q]W|id
SndSdS(
s&link2html fuer VLP muss hier noch rauss\&s&amp;s<?xml version='1.0' ?><txt>s</txt>slinksasrefshrefs
/vlp_coll?id=sutf-8sN(sstrsressubsxmlsdomsminidomsparseStringsgetElementsByTagNameslinksslinkstagNamesgetAttributesrefsselfscheckRefssetAttributes	aq_parentsabsolute_urlstoxml(sselfsstrslinkssdomslinksref((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys	link2htmls		)c	Csvhdd<dd<dd<}t}xD|iD]6}|p'|idtd||||f}q4W|SdS(Ns
vl_literaturesAND CD LIKE '%lise%'s
vl_technologyss	vl_peoplesvars1select reference from %s where reference ='%s' %s(	sdbssNonesresskeyssdbsselfssearchsstrsref(sselfsrefsressdbsdbs((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pyscheckRef,s!
4cCsti|SdS(sQuote stringN(slibpqs
PgQuoteStringsstring(sselfsstring((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys
PgQuoteString7scCsdg}g}ybx[|iiiD]G}t|i|}y%|i	|jo|i
|nWq%q%Xq%WWn
g}nX|SdS(s>Get list of Partners. Presently only from a subfolder partnerssECHO_partnerN(spartnerTypessidssselfspartnerss__dict__skeyssentrysgetattrsobjects	meta_typesappend(sselfspartnerTypessobjectsidssentry((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysgetPartners<s	
csdd|SdS(s>get the collection tree (list of triples (parent,child, depth)ics|d7}g}xq|iiD]`}t||}yA|idjo-|i	|||f|||7}nWq q Xq W|SdS(NisECHO_collection(sdepthscollectionssobjects__dict__skeyssentrysgetattrselements	meta_typesappends
getCollection(sobjectsdepthselementscollectionssentry(s
getCollection(sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys
getCollectionUs
N(s
getCollectionsself(sselfs
getCollection((s
getCollectionsI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysgetCollectionTreeRscCsSg}xB|iD]4}|i|di|di|dfqW|SdS(sShow the IDs of the TreeiiiN(sretsselfsgetCollectionTrees
collectionsappendsgetId(sselfs
collectionsret((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysgetCollectionTreeIdses
2(s__name__s
__module__s__doc__s	meta_typesNonesECHO_newViewerLinks__init__sdeleteSpacesformatAsciis	link2htmlscheckRefs
PgQuoteStringsgetPartnerssgetCollectionTreesgetCollectionTreeIds(((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys	ECHO_roots							cCs;|i|t|||tj	o|idndS(sAdd an ECHO_rootsmanage_mainN(sselfs
_setObjectsids	ECHO_rootstitlesRESPONSEsNonesredirect(sselfsidstitlesRESPONSE((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysmanage_addECHO_rootns
cCs tdi|}|SdS(sNothing yets*Products/ECHO_content/zpt/AddECHO_root.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysmanage_addECHO_rootFormussECHO_partnercBsZtZdZdZdddZeihdd<dd<fZedZd	Z	RS(
sECHO PartnersECHO_partnersc	Csh||_||_||_||_|i|\}}|i
||||}|i|||dS(N(
sidsselfs__name__stitlesurlspreconditions
_read_datasfilesdatassizes_get_content_typescontent_typesupdate_data(	sselfsidstitlesurlsfilescontent_typespreconditionsdatassize((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys__init__s				slabelsPartner InformationsactionsECHO_partner_configcCs+||_|tj	o|idndS(sChange main informationsmanage_mainN(surlsselfsRESPONSEsNonesredirect(sselfsurlsRESPONSE((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pyschangeECHO_partners	
cCs>t|do
d|_ntdi|}|SdS(sMain configurationsurlss0Products/ECHO_content/zpt/ChangeECHO_partner.zptN(shasattrsselfsurlsPageTemplateFiles__of__spt(sselfspt((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysECHO_partner_configs

(
s__name__s
__module__s__doc__s	meta_types__init__sImagesmanage_optionssNoneschangeECHO_partnersECHO_partner_config(((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysECHO_partnerzs
"sdtml/ECHO_partnerAddsKindskindc	Cst|}t|}t|}t|}tii|||\}}|i
}|i|t|||d|||o|i|i|n|o||i|_n|tj	o<y|i}Wn|d}nX|iid|n|SdS(s
    Add a new ECHO_partner object.

    Creates a new ECHO_partner object 'id' with the contents of 'file'.
    Based on Image.manage_addImage
    ssURL1s%s/manage_mainN(sstrsidstitlescontent_typespreconditionsOFSsImagescookIdsfilesselfsthiss
_setObjectsECHO_partnersurls_getObs
manage_uploadsREQUESTsNonesDestinationURLsRESPONSEsredirect(sselfsidsfilesurlstitlespreconditionscontent_typesREQUEST((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pysmanage_addECHO_partners&%
(5s__doc__sstringsres	OFS.ImagesOFSstypessImagesGlobalssDTMLFiles
OFS.FoldersFoldersOFS.SimpleItems
SimpleItems
AccessControlsClassSecurityInfosInitializeClasss'Products.PageTemplates.PageTemplateFilesPageTemplateFiles#Products.PageTemplates.PageTemplatesPageTemplates
PersistentsAcquisitionsImplicitsxml.dom.minidomsxmlsurllibsECHO_graphicalOverviewsjavaHandlersjavaScriptMainsviewClassificationListMasterstoListsgetTextsreadMetadatassetECHO_collectionInformationsscientificClassificationsscientificInformations
ECHO_resourcesmanage_addECHO_resourceFormsNonesmanage_addECHO_resourcesECHO_externalLinksmanage_addECHO_externalLinkFormsmanage_addECHO_externalLinksECHO_collectionsmanage_addECHO_collectionFormsmanage_addECHO_collections	ECHO_rootsmanage_addECHO_rootsmanage_addECHO_rootFormsECHO_partnersglobalssmanage_addECHO_partnerFormsmanage_addECHO_partner('sgetTextsmanage_addECHO_externalLinkFormsECHO_externalLinksmanage_addECHO_partnersFoldersxmlstoLists	ECHO_rootsmanage_addECHO_rootFormsECHO_collectionssetECHO_collectionInformationsurllibsPageTemplatesresPageTemplateFilesreadMetadatasInitializeClasssImplicitsECHO_partnersstringsmanage_addECHO_partnerFormsscientificInformationsClassSecurityInfos
PersistentsDTMLFilesOFSsmanage_addECHO_collectionFormsjavaScriptMains
ECHO_resourcesmanage_addECHO_externalLinksmanage_addECHO_resources
SimpleItemsImagesscientificClassificationsmanage_addECHO_resourceFormsviewClassificationListMastersmanage_addECHO_collectionsmanage_addECHO_rootsjavaHandler((sI/usr/local/zope_devel/lib/python/Products/ECHO_content/ECHO_collection.pys?sX
			










							, 	A	$		#

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