Back to index

plone3  3.1.7
Public Member Functions
Archetypes.interfaces._vocabulary.IVocabulary Class Reference
Inheritance diagram for Archetypes.interfaces._vocabulary.IVocabulary:
Inheritance graph
[legend]
Collaboration diagram for Archetypes.interfaces._vocabulary.IVocabulary:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def getDisplayList
def getVocabularyDict
def isFlat
def showLeafsOnly

Detailed Description

interface for vocabularies used in fields 

Definition at line 3 of file _vocabulary.py.


Member Function Documentation

returns an object of class DisplayList as defined in
    Products.Archetypes.utils.

    The instance of the content is given as parameter.

Definition at line 6 of file _vocabulary.py.

00006 
00007     def getDisplayList(self, instance):
00008         """ returns an object of class DisplayList as defined in
00009             Products.Archetypes.utils.
00010 
00011             The instance of the content is given as parameter.
00012         """
 
returns the vocabulary as a dictionary with a string key and a
    string value. If it is not a flat vocabulary, the value is a
    tuple with a string and a sub-dictionary with the same format
    (or None if its a leave).

    Example for a flat vocabulary-dictionary:
    {'key1':'Value 1', 'key2':'Value 2'}

    Example for a hierachical:
    {'key1':('Value 1',{'key1.1':('Value 1.1',None)}), 'key2':('Value 2',None)}

    The instance of the content is given as parameter.

Definition at line 13 of file _vocabulary.py.

00013 
00014     def getVocabularyDict(self, instance):
00015         """ returns the vocabulary as a dictionary with a string key and a
00016             string value. If it is not a flat vocabulary, the value is a
00017             tuple with a string and a sub-dictionary with the same format
00018             (or None if its a leave).
00019 
00020             Example for a flat vocabulary-dictionary:
00021             {'key1':'Value 1', 'key2':'Value 2'}
00022 
00023             Example for a hierachical:
00024             {'key1':('Value 1',{'key1.1':('Value 1.1',None)}), 'key2':('Value 2',None)}
00025 
00026             The instance of the content is given as parameter.
00027         """

returns true if the underlying vocabulary is flat, otherwise
    if its hierachical (tree-like) it returns false.

Definition at line 28 of file _vocabulary.py.

00028 
00029     def isFlat(self):
00030         """ returns true if the underlying vocabulary is flat, otherwise
00031             if its hierachical (tree-like) it returns false.
00032         """

returns true for flat vocabularies. In hierachical (tree-like)
    vocabularies it defines if only leafs should be displayed, or
    knots and leafs.

Definition at line 33 of file _vocabulary.py.

00033 
00034     def showLeafsOnly(self):
00035         """ returns true for flat vocabularies. In hierachical (tree-like)
00036             vocabularies it defines if only leafs should be displayed, or
00037             knots and leafs.
00038         """

The documentation for this class was generated from the following file: