Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
CMFCore.interfaces._tools.IMetadataTool Class Reference
Inheritance diagram for CMFCore.interfaces._tools.IMetadataTool:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.interfaces._tools.IMetadataTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def getFullName
def getPublisher
def listAllowedSubjects
def listAllowedFormats
def listAllowedLanguages
def listAllowedRights
def listAllowedVocabulary
def listSchemas
def addSchema
def removeSchema
def setInitialMetadata
def validateMetadata

Static Public Attributes

tuple id

Detailed Description

CMF metadata policies interface.

Definition at line 894 of file _tools.py.


Member Function Documentation

Create a new schema with the given ID.

o Return the newly-created schema object.

o Raise KeyError if such a schema already exists.

Definition at line 984 of file _tools.py.

00984 
00985     def addSchema( schema_id ):
00986         """ Create a new schema with the given ID.
00987 
00988         o Return the newly-created schema object.
00989 
00990         o Raise KeyError if such a schema already exists.
00991         """

Here is the caller graph for this function:

Convert an internal userid to a "formal" name.

o Convert only if possible, perhaps using the 'portal_membership'
  tool;  otherwise, return 'userid'.

o Used to map userid's for Creator, Contributor DCMI queries.

Definition at line 910 of file _tools.py.

00910 
00911     def getFullName(userid):
00912         """ Convert an internal userid to a "formal" name.
00913         
00914         o Convert only if possible, perhaps using the 'portal_membership'
00915           tool;  otherwise, return 'userid'.
00916 
00917         o Used to map userid's for Creator, Contributor DCMI queries.
00918         """

Return the "formal" name of the publisher of the site.

Definition at line 919 of file _tools.py.

00919 
00920     def getPublisher():
00921         """ Return the "formal" name of the publisher of the site.
00922         """

def CMFCore.interfaces._tools.IMetadataTool.listAllowedFormats (   content = None,
  content_type = None 
)
List the allowed values of the 'Format' DCMI element.

o These items should be usable as HTTP 'Content-type' values.

o Return only values appropriate for content's type, or all values if
  both 'content' and 'content_type' are None.

Definition at line 935 of file _tools.py.

00935 
00936     def listAllowedFormats(content=None, content_type=None):
00937         """ List the allowed values of the 'Format' DCMI element.
00938 
00939         o These items should be usable as HTTP 'Content-type' values.
00940 
00941         o Return only values appropriate for content's type, or all values if
00942           both 'content' and 'content_type' are None.
00943         """

def CMFCore.interfaces._tools.IMetadataTool.listAllowedLanguages (   content = None,
  content_type = None 
)
List the allowed values of the 'Language' DCMI element.

o 'Language' element values should be suitable for generating
  HTTP headers.

o Return only values appropriate for content's type, or all values if
  both 'content' and 'content_type' are None.

Definition at line 944 of file _tools.py.

00944 
00945     def listAllowedLanguages(content=None, content_type=None):
00946         """ List the allowed values of the 'Language' DCMI element.
00947 
00948         o 'Language' element values should be suitable for generating
00949           HTTP headers.
00950 
00951         o Return only values appropriate for content's type, or all values if
00952           both 'content' and 'content_type' are None.
00953         """

def CMFCore.interfaces._tools.IMetadataTool.listAllowedRights (   content = None,
  content_type = None 
)
List the allowed values of the 'Rights' DCMI element.

o The 'Rights' element describes copyright or other IP declarations
  pertaining to a resource.

o Return only values appropriate for content's type, or all values if
  both 'content' and 'content_type' are None.

Definition at line 954 of file _tools.py.

00954 
00955     def listAllowedRights(content=None, content_type=None):
00956         """ List the allowed values of the 'Rights' DCMI element.
00957 
00958         o The 'Rights' element describes copyright or other IP declarations
00959           pertaining to a resource.
00960 
00961         o Return only values appropriate for content's type, or all values if
00962           both 'content' and 'content_type' are None.
00963         """

def CMFCore.interfaces._tools.IMetadataTool.listAllowedSubjects (   content = None,
  content_type = None 
)
List the allowed values of the 'Subject' DCMI element.

o 'Subject' elements should be keywords categorizing their resource.

o Return only values appropriate for content's type, or all values if
  both 'content' and 'content_type' are None.

Definition at line 926 of file _tools.py.

00926 
00927     def listAllowedSubjects(content=None, content_type=None):
00928         """ List the allowed values of the 'Subject' DCMI element.
00929 
00930         o 'Subject' elements should be keywords categorizing their resource.
00931 
00932         o Return only values appropriate for content's type, or all values if
00933           both 'content' and 'content_type' are None.
00934         """

def CMFCore.interfaces._tools.IMetadataTool.listAllowedVocabulary (   schema,
  element,
  content = None,
  content_type = None 
)
List allowed values for a given schema element and content object.

o List possible keywords if both 'content' and 'content_type' are None.

Definition at line 971 of file _tools.py.

00971 
00972                              ):
00973         """ List allowed values for a given schema element and content object.
00974         
00975         o List possible keywords if both 'content' and 'content_type' are None.
00976         """

Here is the caller graph for this function:

Return a list of (id, schema) tuples enumerating our schema.

Definition at line 980 of file _tools.py.

00980 
00981     def listSchemas():
00982         """ Return a list of (id, schema) tuples enumerating our schema.
00983         """

Here is the caller graph for this function:

Remove an existing schema with the given ID.

o Raise KeyError if no such schema exists.

Definition at line 992 of file _tools.py.

00992 
00993     def removeSchema( schema_id ):
00994         """ Remove an existing schema with the given ID.
00995 
00996         o Raise KeyError if no such schema exists.
00997         """

Here is the caller graph for this function:

Set initial values for content metatdata.

o Supply any site-specific defaults.

Definition at line 1001 of file _tools.py.

01001 
01002     def setInitialMetadata(content):
01003         """ Set initial values for content metatdata.
01004         
01005         o Supply any site-specific defaults.
01006         """

Enforce portal-wide policies about metadata.

o E.g., policies may require non-empty title/description, etc.

o This method may be called by view / workflow code at "appropriate"
  times, such as immediately before saving changes to the metadata of
  an object.

Definition at line 1007 of file _tools.py.

01007 
01008     def validateMetadata(content):
01009         """ Enforce portal-wide policies about metadata.
01010         
01011         o E.g., policies may require non-empty title/description, etc.
01012         
01013         o This method may be called by view / workflow code at "appropriate"
01014           times, such as immediately before saving changes to the metadata of
01015           an object.
01016         """
01017 
01018 
01019 #
01020 #   Site Properties tool interface
#

Member Data Documentation

Initial value:
Attribute('id',
            """ The tool's ID.o Must be set to 'portal_metadata'.""")
CMF metadata policies interface.

Definition at line 899 of file _tools.py.


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