[Zope3-checkins] CVS: Zope3/src/zope/app/dublincore - annotatableadapter.py:1.1.2.3 general.py:1.1.2.2 timeannotators.py:1.1.2.2 zopedublincore.py:1.1.2.4
Tim Peters
tim.one@comcast.net
Tue, 24 Dec 2002 21:21:27 -0500
Update of /cvs-repository/Zope3/src/zope/app/dublincore
In directory cvs.zope.org:/tmp/cvs-serv19240/src/zope/app/dublincore
Modified Files:
Tag: NameGeddon-branch
annotatableadapter.py general.py timeannotators.py
zopedublincore.py
Log Message:
Whitespace normalization, via Python's Tools/scripts/reindent.py. The
files are fixed-points of that script now. Fixed a few cases where
code relied on significant trailing whitespace (ouch).
=== Zope3/src/zope/app/dublincore/annotatableadapter.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/dublincore/annotatableadapter.py:1.1.2.2 Tue Dec 24 07:51:03 2002
+++ Zope3/src/zope/app/dublincore/annotatableadapter.py Tue Dec 24 21:20:26 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""
$Id$
@@ -48,4 +48,3 @@
self.annotations = None
__doc__ = ZDCAnnotatableAdapter.__doc__ + __doc__
-
=== Zope3/src/zope/app/dublincore/general.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/dublincore/general.py:1.1.2.1 Mon Dec 23 14:31:32 2002
+++ Zope3/src/zope/app/dublincore/general.py Tue Dec 24 21:20:26 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""Interfaces for getting standard dublin core data in it's full generality
@@ -29,7 +29,7 @@
value = Text(title = u"Value",
description = u"The element value",
)
-
+
class IGeneralDublinCore(Interface):
"""Dublin-core data access interface
@@ -52,63 +52,63 @@
"""
def getQualifiedTitles():
- """Return a sequence of Title IDublinCoreElementItem.
+ """Return a sequence of Title IDublinCoreElementItem.
"""
def getQualifiedCreators():
- """Return a sequence of Creator IDublinCoreElementItem.
+ """Return a sequence of Creator IDublinCoreElementItem.
"""
def getQualifiedSubjects():
- """Return a sequence of Subject IDublinCoreElementItem.
+ """Return a sequence of Subject IDublinCoreElementItem.
"""
def getQualifiedDescriptions():
- """Return a sequence of Description IDublinCoreElementItem.
+ """Return a sequence of Description IDublinCoreElementItem.
"""
def getQualifiedPublishers():
- """Return a sequence of Publisher IDublinCoreElementItem.
+ """Return a sequence of Publisher IDublinCoreElementItem.
"""
def getQualifiedContributors():
- """Return a sequence of Contributor IDublinCoreElementItem.
+ """Return a sequence of Contributor IDublinCoreElementItem.
"""
def getQualifiedDates():
- """Return a sequence of Date IDublinCoreElementItem.
+ """Return a sequence of Date IDublinCoreElementItem.
"""
def getQualifiedTypes():
- """Return a sequence of Type IDublinCoreElementItem.
+ """Return a sequence of Type IDublinCoreElementItem.
"""
def getQualifiedFormats():
- """Return a sequence of Format IDublinCoreElementItem.
+ """Return a sequence of Format IDublinCoreElementItem.
"""
def getQualifiedIdentifiers():
- """Return a sequence of Identifier IDublinCoreElementItem.
+ """Return a sequence of Identifier IDublinCoreElementItem.
"""
def getQualifiedSources():
- """Return a sequence of Source IDublinCoreElementItem.
+ """Return a sequence of Source IDublinCoreElementItem.
"""
def getQualifiedLanguages():
- """Return a sequence of Language IDublinCoreElementItem.
+ """Return a sequence of Language IDublinCoreElementItem.
"""
def getQualifiedRelations():
- """Return a sequence of Relation IDublinCoreElementItem.
+ """Return a sequence of Relation IDublinCoreElementItem.
"""
def getQualifiedCoverages():
- """Return a sequence of Coverage IDublinCoreElementItem.
+ """Return a sequence of Coverage IDublinCoreElementItem.
"""
def getQualifiedRights():
- """Return a sequence of Rights IDublinCoreElementItem.
+ """Return a sequence of Rights IDublinCoreElementItem.
"""
class IWritableGeneralDublinCore(Interface):
@@ -117,7 +117,7 @@
This interface augments IStandardDublinCore with methods for
writing elements.
"""
-
+
def setQualifiedTitles(qualified_titles):
"""Set the qualified Title elements.
@@ -126,84 +126,84 @@
def setQualifiedCreators(qualified_creators):
"""Set the qualified Creator elements.
-
- The argument must be a sequence of Creator IDublinCoreElementItem.
+
+ The argument must be a sequence of Creator IDublinCoreElementItem.
"""
- def setQualifiedSubjects(qualified_subjects):
+ def setQualifiedSubjects(qualified_subjects):
"""Set the qualified Subjects elements.
- The argument must be a sequence of Subject IDublinCoreElementItem.
+ The argument must be a sequence of Subject IDublinCoreElementItem.
"""
def setQualifiedDescriptions(qualified_descriptions):
"""Set the qualified Descriptions elements.
- The argument must be a sequence of Description IDublinCoreElementItem.
+ The argument must be a sequence of Description IDublinCoreElementItem.
"""
def setQualifiedPublishers(qualified_publishers):
"""Set the qualified Publishers elements.
- The argument must be a sequence of Publisher IDublinCoreElementItem.
+ The argument must be a sequence of Publisher IDublinCoreElementItem.
"""
def setQualifiedContributors(qualified_contributors):
"""Set the qualified Contributors elements.
- The argument must be a sequence of Contributor IDublinCoreElementItem.
+ The argument must be a sequence of Contributor IDublinCoreElementItem.
"""
def setQualifiedDates(qualified_dates):
"""Set the qualified Dates elements.
- The argument must be a sequence of Date IDublinCoreElementItem.
+ The argument must be a sequence of Date IDublinCoreElementItem.
"""
def setQualifiedTypes(qualified_types):
"""Set the qualified Types elements.
- The argument must be a sequence of Type IDublinCoreElementItem.
+ The argument must be a sequence of Type IDublinCoreElementItem.
"""
def setQualifiedFormats(qualified_formats):
"""Set the qualified Formats elements.
- The argument must be a sequence of Format IDublinCoreElementItem.
+ The argument must be a sequence of Format IDublinCoreElementItem.
"""
def setQualifiedIdentifiers(qualified_identifiers):
"""Set the qualified Identifiers elements.
- The argument must be a sequence of Identifier IDublinCoreElementItem.
+ The argument must be a sequence of Identifier IDublinCoreElementItem.
"""
def setQualifiedSources(qualified_sources):
"""Set the qualified Sources elements.
- The argument must be a sequence of Source IDublinCoreElementItem.
+ The argument must be a sequence of Source IDublinCoreElementItem.
"""
def setQualifiedLanguages(qualified_languages):
"""Set the qualified Languages elements.
- The argument must be a sequence of Language IDublinCoreElementItem.
+ The argument must be a sequence of Language IDublinCoreElementItem.
"""
def setQualifiedRelations(qualified_relations):
"""Set the qualified Relations elements.
- The argument must be a sequence of Relation IDublinCoreElementItem.
+ The argument must be a sequence of Relation IDublinCoreElementItem.
"""
def setQualifiedCoverages(qualified_coverages):
"""Set the qualified Coverages elements.
- The argument must be a sequence of Coverage IDublinCoreElementItem.
+ The argument must be a sequence of Coverage IDublinCoreElementItem.
"""
def setQualifiedRights(qualified_rights):
"""Set the qualified Rights elements.
- The argument must be a sequence of Rights IDublinCoreElementItem.
+ The argument must be a sequence of Rights IDublinCoreElementItem.
"""
=== Zope3/src/zope/app/dublincore/timeannotators.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/dublincore/timeannotators.py:1.1.2.1 Mon Dec 23 14:31:32 2002
+++ Zope3/src/zope/app/dublincore/timeannotators.py Tue Dec 24 21:20:26 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""Objects that take care of annotating dublin core meta data times
@@ -26,7 +26,7 @@
"""Update Dublin-Core time property
"""
__implements__ = ISubscriber
-
+
def __init__(self, property):
self.property = property
@@ -37,6 +37,3 @@
ModifiedAnnotator = DCTimeAnnotatorClass('modified')
CreatedAnnotator = DCTimeAnnotatorClass('created')
-
-
-
=== Zope3/src/zope/app/dublincore/zopedublincore.py 1.1.2.3 => 1.1.2.4 ===
--- Zope3/src/zope/app/dublincore/zopedublincore.py:1.1.2.3 Tue Dec 24 07:51:03 2002
+++ Zope3/src/zope/app/dublincore/zopedublincore.py Tue Dec 24 21:20:26 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""
$Id$
@@ -28,7 +28,7 @@
self.__name__ = name
class ScalarProperty(SimpleProperty):
-
+
def __get__(self, inst, klass):
if inst is None:
return self
@@ -53,9 +53,9 @@
return data[0]
else:
return u''
-
+
class DateProperty(ScalarProperty):
-
+
def __get__(self, inst, klass):
if inst is None:
return self
@@ -73,9 +73,9 @@
super(DateProperty, self).__set__(inst, value)
-
+
class SequenceProperty(SimpleProperty):
-
+
def __get__(self, inst, klass):
if inst is None:
return self
@@ -89,7 +89,7 @@
raise TypeError("Elements must be unicode")
inst._changed()
inst._mapping[self.__name__] = value
-
+
class ZopeDublinCore:
"""Zope Dublin Core Mixin
@@ -110,13 +110,13 @@
self._p_changed = 1
title = ScalarProperty(u'Title')
-
+
def Title(self):
"See IZopeDublinCore"
return self.title
creators = SequenceProperty(u'Creator')
-
+
def Creator(self):
"See IZopeDublinCore"
return self.creators
@@ -330,7 +330,7 @@
def _set_qualified(self, name, qvalue):
data = {}
dict = self._mapping
-
+
for qualification, value in qvalue:
data[qualification] = data.get(qualification, ()) + (value, )
@@ -347,14 +347,13 @@
qualification = u''
for value in avalue:
result.append((qualification, value))
-
+
elif aname.startswith(name):
qualification = aname[len(name)+1:]
for value in avalue:
result.append((qualification, value))
return tuple(result)
-
-__doc__ = ZopeDublinCore.__doc__ + __doc__
+__doc__ = ZopeDublinCore.__doc__ + __doc__