# File: PDDBType.py
"""\
unknown

RCS-ID $Id: codesnippets.py 3571 2005-02-10 17:48:47Z optilude $
"""
# Copyright (c) 2005 by Institut fuer Elektronische Musik, KU Graz, Austria
#
# Generated: Fri Feb 11 16:20:49 2005
# Generator: ArchGenXML Version 1.4 devel http://sf.net/projects/archetypes/
#
# GNU General Public Licence (GPL)
# 
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA  02111-1307  USA
#
__author__  = '''Winfried Ritsch <ritsch@iem.at>'''
__docformat__ = 'plaintext'

from AccessControl import ClassSecurityInfo
from Products.Archetypes.public import *

from Products.ATVocabularyManager.types.SimpleVocabularyItem import SimpleVocabularyItem
from Products.ATVocabularyManager.VocabularyTool import registerVocabularyItem

from Products.PDDatabase.config import *

##code-section module-header #fill in your manual code here
##/code-section module-header

schema= Schema((
    StringField('id',
        widget=StringWidget(
            label_msgid="label_short_name",
            i18n_domain="plone",
            description_msgid="help_short_name",
            label='Id',
            description='Enter a value for id.',
        ),
    ),
    
    StringField('title',
        widget=StringWidget(
            label_msgid="label_title",
            i18n_domain="plone",
            description_msgid="help_title",
            label='Title',
            description='Enter a value for title.',
        ),
        accessor="Title",
        searchable=1,
    ),
    
    TextField('text',
        widget=TextAreaWidget(
            label='Text',
            label_msgid='PDDatabase_label_text',
            description='Enter a value for text.',
            description_msgid='PDDatabase_help_text',
            i18n_domain='PDDatabase',
        ),
    ),
    
    TextField('comment',
        widget=TextAreaWidget(
            label='Comment',
            label_msgid='PDDatabase_label_comment',
            description='Enter a value for comment.',
            description_msgid='PDDatabase_help_comment',
            i18n_domain='PDDatabase',
        ),
    ),
    
),
)

##code-section after-schema #fill in your manual code here
##/code-section after-schema

class PDDBType(BaseContent,SimpleVocabularyItem):
    security = ClassSecurityInfo()
    __implements__ = (getattr(BaseContent,'__implements__',()),) + (getattr(SimpleVocabularyItem,'__implements__',()),)

    portal_type = meta_type    = 'PDDBType' 
    archetype_name             = 'PDDBType' #this name appears in the 'add' box 
    allowed_content_types      = [] + getattr(SimpleVocabularyItem,'allowed_content_types',[])
    filter_content_types       = 0
    global_allow               = 0
    allow_discussion           = 0
    #content_icon               = 'PDDBType.gif'
    immediate_view             = 'base_view'
    typeDescription            = """PDDBType"""
    typeDescMsgId              = 'description_edit_pddbtype'

    schema = getattr(SimpleVocabularyItem,'schema',Schema(())) + \
             schema

    ##code-section class-header #fill in your manual code here
    ##/code-section class-header


    #Methods

registerType(PDDBType)
registerVocabularyItem(PDDBType, 'SimpleVocabulary')# end of class PDDBType

##code-section module-footer #fill in your manual code here
##/code-section module-footer


