Пример #1
0
    def __init__( self
                , id
                , title=''
                , file=''
                , content_type=''
                , precondition=''
                , subject=()
                , description=''
                , contributors=()
                , effective_date=None
                , expiration_date=None
                , format=None
                , language='en-US'
                , rights=''
                ):
        OFS.Image.File.__init__( self, id, title, file
                               , content_type, precondition )
        self._setId(id)
        delattr(self, '__name__')

        # If no file format has been passed in, rely on what OFS.Image.File
        # detected.
        if format is None:
            format = self.content_type

        DefaultDublinCoreImpl.__init__( self, title, subject, description
                               , contributors, effective_date, expiration_date
                               , format, language, rights )
Пример #2
0
 def __init__(self, id, title='', description='', text_format='', text=''):
     DefaultDublinCoreImpl.__init__(self)
     self.id = id
     self.title = title
     self.description = description
     self._edit( text=text, text_format=text_format )
     self.setFormat( text_format )
Пример #3
0
    def __init__( self
                , id
                , title=''
                , file=''
                , content_type=''
                , precondition=''
                , subject=()
                , description=''
                , contributors=()
                , effective_date=None
                , expiration_date=None
                , format=None
                , language='en-US'
                , rights=''
                ):
        OFS.Image.File.__init__( self, id, title, file
                               , content_type, precondition )

        # If no file format has been passed in, rely on what OFS.Image.File
        # detected. Unlike Images, which have code to try and pick the content
        # type out of the binary data, File objects only provide the correct
        # type if a "hint" in the form of a filename extension is given.
        if format is None:
            format = self.content_type 

        DefaultDublinCoreImpl.__init__( self, title, subject, description
                               , contributors, effective_date, expiration_date
                               , format, language, rights )
Пример #4
0
 def __init__(self, id, title='', description='', text_format='', text=''):
     DefaultDublinCoreImpl.__init__(self)
     self.id=id
     self.title=title
     self.description=description
     self.text=text
     self.text_format=text_format
     self._parse()
Пример #5
0
 def __init__( self
             , id
             , title=''
             , remote_url=''
             , description=''
             ):
     DefaultDublinCoreImpl.__init__(self)
     self.id=id
     self.title=title
     self.remote_url=remote_url
     self.description=description
Пример #6
0
 def __init__( self
             , id
             , title=''
             , remote_url=''
             , description=''
             ):
     DefaultDublinCoreImpl.__init__(self)
     self.id=id
     self.title=title
     self.description=description
     self._edit(remote_url)
     self.format=self.URL_FORMAT
Пример #7
0
 def __init__( self
             , id
             , title=''
             , file=''
             , content_type=''
             , precondition=''
             , subject=()
             , description=''
             , contributors=()
             , effective_date=None
             , expiration_date=None
             , format='text/html'
             , language='en-US'
             , rights=''
             ):
     OFS.Image.File.__init__( self, id, title, file
                            , content_type, precondition )
     DefaultDublinCoreImpl.__init__( self, title, subject, description
                            , contributors, effective_date, expiration_date
                            , format, language, rights )
Пример #8
0
 def __init__(self,
              id,
              title='',
              file='',
              content_type='',
              precondition='',
              subject=(),
              description='',
              contributors=(),
              effective_date=None,
              expiration_date=None,
              format='text/html',
              language='en-US',
              rights=''):
     OFS.Image.File.__init__(self, id, title, file, content_type,
                             precondition)
     DefaultDublinCoreImpl.__init__(self, title, subject, description,
                                    contributors, effective_date,
                                    expiration_date, format, language,
                                    rights)
Пример #9
0
 def getMetadataHeaders(self):
     """Return RFC-822-style header spec."""
     hdrlist = DefaultDublinCoreImpl.getMetadataHeaders(self)
     hdrlist.append(('SafetyBelt', self._safety_belt))
     return hdrlist
Пример #10
0
 def __init__(self, id, title='', remote_url='', description=''):
     DefaultDublinCoreImpl.__init__(self)
     self.id = id
     self.title = title
     self.remote_url = remote_url
     self.description = description
Пример #11
0
 def __init__(self, id, title=''):
     PortalObjectBase.__init__(self, id, title)
     DefaultDublinCoreImpl.__init__(self)
Пример #12
0
 def getMetadataHeaders(self):
     """Return RFC-822-style header spec."""
     hdrlist = DefaultDublinCoreImpl.getMetadataHeaders(self)
     hdrlist.append( ('SafetyBelt', self._safety_belt) )
     return hdrlist
Пример #13
0
 def __init__( self, id, title='' ):
     PortalObjectBase.__init__( self, id, title )
     DefaultDublinCoreImpl.__init__( self )