# HG changeset patch # User casties # Date 1311770936 -7200 # Node ID c1dbf78cc0361fb76425a1efac977d71aea57b71 # Parent 8291255b18684a2ea99f165aaca47034c07f3b5c more MetaDataFolder diff -r 8291255b1868 -r c1dbf78cc036 MetaData.py --- a/MetaData.py Wed Jul 27 14:13:45 2011 +0200 +++ b/MetaData.py Wed Jul 27 14:48:56 2011 +0200 @@ -81,7 +81,7 @@ meta_type='MetaData' security=ClassSecurityInfo() manage_options = Folder.manage_options+( - {'label':'Main Config','action':'changeMetadataForm'}, + {'label':'Main Config','action':'changeMetaDataForm'}, {'label':'Import XML Schema','action':'importMetaDataExportXML'}, #{'label':'Select Fields for Display','action':'indicateDisplayFieldsForm'}, ) @@ -399,14 +399,14 @@ return self.getFormatted('label_template', path) - security.declarePublic('changeMetadataForm') - def changeMetadataForm(self): + security.declarePublic('changeMetaDataForm') + def changeMetaDataForm(self): """Main configuration""" - pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','changeMetadata.zpt')).__of__(self) + pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','changeMetaData.zpt')).__of__(self) return pt() - security.declarePublic('changeMetadata') - def changeMetadata(self,shortDescription,description,fields,metaDataServerUrl,RESPONSE=None): + security.declarePublic('changeMetaData') + def changeMetaData(self,shortDescription,description,fields,metaDataServerUrl,RESPONSE=None): """Change Metadata""" self.shortDescription=shortDescription self.description=description @@ -418,7 +418,7 @@ def manage_addMetaDataForm(self): """interface for adding the OSAS_add_Metadata""" - pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','addMetadataForm.zpt')).__of__(self) + pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','addMetaDataForm.zpt')).__of__(self) return pt() def manage_addMetaData(self,id,shortDescription,description,fields,RESPONSE=None): diff -r 8291255b1868 -r c1dbf78cc036 MetaDataFolder.py --- a/MetaDataFolder.py Wed Jul 27 14:13:45 2011 +0200 +++ b/MetaDataFolder.py Wed Jul 27 14:48:56 2011 +0200 @@ -35,16 +35,14 @@ meta_type='MetaDataFolder' security=ClassSecurityInfo() manage_options = Folder.manage_options+( - {'label':'Main Config','action':'changeMetadataFolderForm'}, - {'label':'Import XML Schema','action':'importMetaDataExportXML'}, - #{'label':'Select Fields for Display','action':'indicateDisplayFieldsForm'}, + {'label':'Main Config','action':'changeMetaDataFolderForm'}, ) - def __init__(self,id,title=''): + def __init__(self,id,title='',metaDataServerUrl=''): """initialize a new instance""" self.id = id self.title = title - self.metaDataServerUrl="" # muss mit change metadata gesetzt werden + self.metaDataServerUrl = metaDataServerUrl def getMDFromPathOrUrl(self,path): diff -r 8291255b1868 -r c1dbf78cc036 MetaDataMapping.py --- a/MetaDataMapping.py Wed Jul 27 14:13:45 2011 +0200 +++ b/MetaDataMapping.py Wed Jul 27 14:48:56 2011 +0200 @@ -131,7 +131,7 @@ RESPONSE.redirect('manage_main') -manage_addMetaDataMappingForm = PageTemplateFile('zpt/addMetadataMappingForm', globals()) +manage_addMetaDataMappingForm = PageTemplateFile('zpt/addMetaDataMappingForm', globals()) def manage_addMetaDataMapping(self,idOfObject,titleOfObject,RESPONSE=None): """add the MetapdataMapping""" diff -r 8291255b1868 -r c1dbf78cc036 __init__.py --- a/__init__.py Wed Jul 27 14:13:45 2011 +0200 +++ b/__init__.py Wed Jul 27 14:48:56 2011 +0200 @@ -1,5 +1,6 @@ import MetaData import MetaDataMapping +import MetaDataFolder def initialize(context): """initialize Metadata""" @@ -18,4 +19,12 @@ MetaDataMapping.manage_addMetaDataMappingForm, MetaDataMapping.manage_addMetaDataMapping ) - ) \ No newline at end of file + ) + + context.registerClass( + MetaDataFolder.MetaDataFolder, + constructors = ( + MetaDataFolder.manage_addMetaDataFolderForm, + MetaDataFolder.manage_addMetaDataFolder + ) + ) diff -r 8291255b1868 -r c1dbf78cc036 zpt/addMetadataFolderForm.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/addMetadataFolderForm.zpt Wed Jul 27 14:48:56 2011 +0200 @@ -0,0 +1,9 @@ + + +
+ ID:

+ Title:

+

+
+ + diff -r 8291255b1868 -r c1dbf78cc036 zpt/changeMetaDataFolder.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/changeMetaDataFolder.zpt Wed Jul 27 14:48:56 2011 +0200 @@ -0,0 +1,12 @@ +
Header
+ +
Tabs
+ + +
+ Title:

+ Server for XML files (e.g. url of digilib Texter-servlet)
+

+

+