本文整理汇总了Python中DublinCore.DefaultDublinCoreImpl.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python DefaultDublinCoreImpl.__init__方法的具体用法?Python DefaultDublinCoreImpl.__init__怎么用?Python DefaultDublinCoreImpl.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DublinCore.DefaultDublinCoreImpl
的用法示例。
在下文中一共展示了DefaultDublinCoreImpl.__init__方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from DublinCore import DefaultDublinCoreImpl [as 别名]
# 或者: from DublinCore.DefaultDublinCoreImpl import __init__ [as 别名]
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 )
示例2: __init__
# 需要导入模块: from DublinCore import DefaultDublinCoreImpl [as 别名]
# 或者: from DublinCore.DefaultDublinCoreImpl import __init__ [as 别名]
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 )
示例3: __init__
# 需要导入模块: from DublinCore import DefaultDublinCoreImpl [as 别名]
# 或者: from DublinCore.DefaultDublinCoreImpl import __init__ [as 别名]
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: __init__
# 需要导入模块: from DublinCore import DefaultDublinCoreImpl [as 别名]
# 或者: from DublinCore.DefaultDublinCoreImpl import __init__ [as 别名]
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: __init__
# 需要导入模块: from DublinCore import DefaultDublinCoreImpl [as 别名]
# 或者: from DublinCore.DefaultDublinCoreImpl import __init__ [as 别名]
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: __init__
# 需要导入模块: from DublinCore import DefaultDublinCoreImpl [as 别名]
# 或者: from DublinCore.DefaultDublinCoreImpl import __init__ [as 别名]
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: __init__
# 需要导入模块: from DublinCore import DefaultDublinCoreImpl [as 别名]
# 或者: from DublinCore.DefaultDublinCoreImpl import __init__ [as 别名]
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: __init__
# 需要导入模块: from DublinCore import DefaultDublinCoreImpl [as 别名]
# 或者: from DublinCore.DefaultDublinCoreImpl import __init__ [as 别名]
def __init__( self, id, title='' ):
PortalObjectBase.__init__( self, id, title )
DefaultDublinCoreImpl.__init__( self )