[Commits] (alecf) bug 2454 - move zaobao into its own,
self-contained directory
commits at osafoundation.org
commits at osafoundation.org
Wed Feb 16 17:13:47 PST 2005
Commit by: alecf
Modified files:
chandler/parcels/osaf/views/zaobao/parcel.xml 1.39 None
chandler/parcels/osaf/examples/zaobao/RSSData.py 1.31 1.32
chandler/parcels/osaf/examples/zaobao/parcel.xml 1.38 1.39
chandler/parcels/osaf/examples/zaobao/schema/parcel.xml None 1.1
Log message:
bug 2454 - move zaobao into its own, self-contained directory
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/views/zaobao/parcel.xml.diff?r1=text&tr1=1.39&r2=text&tr2=None
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/examples/zaobao/RSSData.py.diff?r1=text&tr1=1.31&r2=text&tr2=1.32
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/examples/zaobao/parcel.xml.diff?r1=text&tr1=1.38&r2=text&tr2=1.39
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/examples/zaobao/schema/parcel.xml?rev=1.1&content-type=text/vnd.viewcvs-markup
Index: chandler/parcels/osaf/examples/zaobao/RSSData.py
diff -u chandler/parcels/osaf/examples/zaobao/RSSData.py:1.31 chandler/parcels/osaf/examples/zaobao/RSSData.py:1.32
--- chandler/parcels/osaf/examples/zaobao/RSSData.py:1.31 Tue Feb 15 14:21:53 2005
+++ chandler/parcels/osaf/examples/zaobao/RSSData.py Wed Feb 16 17:13:45 2005
@@ -1,5 +1,5 @@
-__revision__ = "$Revision: 1.31 $"
-__date__ = "$Date: 2005/02/15 22:21:53 $"
+__revision__ = "$Revision: 1.32 $"
+__date__ = "$Date: 2005/02/17 01:13:45 $"
__copyright__ = "Copyright (c) 2003-2004 Open Source Applications Foundation"
__license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
@@ -53,7 +53,7 @@
class RSSChannel(ItemCollection):
myKindID = None
- myKindPath = "//parcels/osaf/examples/zaobao/RSSChannel"
+ myKindPath = "//parcels/osaf/examples/zaobao/schema/RSSChannel"
def __init__(self, name=None, parent=None, kind=None, view=None):
super(RSSChannel, self).__init__(name, parent, kind, view)
@@ -142,7 +142,7 @@
##
class RSSItem(ContentItem):
myKindID = None
- myKindPath = "//parcels/osaf/examples/zaobao/RSSItem"
+ myKindPath = "//parcels/osaf/examples/zaobao/schema/RSSItem"
def __init__(self, name=None, parent=None, kind=None, view=None):
super(RSSItem, self).__init__(name, parent, kind, view)
Index: chandler/parcels/osaf/examples/zaobao/parcel.xml
diff -u chandler/parcels/osaf/examples/zaobao/parcel.xml:1.38 chandler/parcels/osaf/examples/zaobao/parcel.xml:1.39
--- chandler/parcels/osaf/examples/zaobao/parcel.xml:1.38 Tue Feb 15 22:39:13 2005
+++ chandler/parcels/osaf/examples/zaobao/parcel.xml Wed Feb 16 17:13:45 2005
@@ -1,223 +1,173 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<Parcel itsName="zaobao"
- xmlns="http://osafoundation.org/parcels/core"
- xmlns:doc="http://osafoundation.org/examples/zaobao/schema"
- xmlns:content="http://osafoundation.org/parcels/osaf/contentmodel">
-
- <namespace value="http://osafoundation.org/examples/zaobao/schema"/>
- <!-- Meta information for the parcel -->
- <displayName>ZaoBao RSS Schema</displayName>
- <description>RSS schema for ZaoBao parcel for 0.4 release</description>
- <version>0.1</version>
-
- <!--
- Shared between RSSChannel and RSSItem
- Note that this doesn't create the attributes, merely declares them.
- They will be referred to later
- -->
- <Attribute itsName="link">
- <displayName>Web URL</displayName>
- <cardinality>single</cardinality>
- <type itemref="URL"/>
- </Attribute>
-
- <Attribute itsName="category">
- <displayName>Category</displayName>
- <cardinality>single</cardinality>
- <type itemref="String"/>
- </Attribute>
-
- <Attribute itsName="author">
- <displayName>Author</displayName>
- <cardinality>single</cardinality>
- <type itemref="String"/>
- </Attribute>
-
- <Attribute itsName="date">
- <displayName>Date</displayName>
- <cardinality>single</cardinality>
- <type itemref="DateTime"/>
- </Attribute>
-
-
- <!-- Kind: RSSChannel -->
-
- <Kind itsName="RSSChannel">
- <!-- make this into an item collection so we can appear natively in the sidebar -->
- <superKinds itemref="content:ItemCollection"/>
-
- <classes key="python">osaf.examples.zaobao.RSSData.RSSChannel</classes>
-
- <displayName>RSS Channel</displayName>
+<!-- $Revision: 1.39 $ -->
+<!-- $Date: 2005/02/17 01:13:45 $ -->
+<!-- Copyright (c) 2003-2004 Open Source Applications Foundation -->
+<!-- License: http://osafoundation.org/Chandler_0.1_license_terms.htm -->
+
+<core:Parcel itsName="zaobao"
+ xmlns="http://osafoundation.org/parcels/osaf/framework/blocks"
+ xmlns:doc="http://osafoundation.org/examples/zaobao"
+ xmlns:core="http://osafoundation.org/parcels/core"
+ xmlns:zbSchema="http://osafoundation.org/examples/zaobao/schema"
+ xmlns:detail="http://osafoundation.org/parcels/osaf/framework/blocks/detail"
+ xmlns:wakeupCall="http://osafoundation.org/parcels/osaf/framework/wakeup">
- <!-- Redirect attributes - this redirects "standard" attributes to RSSChannel-specific attributes -->
- <Attribute itsName="who">
- <redirectTo value="author"/>
- </Attribute>
-
- <Attribute itsName="about">
- <redirectTo value="displayName"/>
- </Attribute>
-
- <!--
- attribute declarations - note that these are
- actually used by <attributes> tag below
- -->
- <Attribute itsName="url">
- <displayName>URL</displayName>
- <cardinality>single</cardinality>
- <type itemref="String"/>
- </Attribute>
-
- <Attribute itsName="etag">
- <displayName>eTag</displayName>
- <cardinality>single</cardinality>
- <type itemref="String"/>
- </Attribute>
-
- <Attribute itsName="lastModified">
- <displayName>Last Modified</displayName>
- <cardinality>single</cardinality>
- <type itemref="DateTime"/>
- </Attribute>
-
- <!-- channel attributes -->
- <Attribute itsName="copyright">
- <displayName>Copyright</displayName>
- <cardinality>single</cardinality>
- <type itemref="String"/>
- </Attribute>
-
- <Attribute itsName="language">
- <displayName>Language</displayName>
- <cardinality>single</cardinality>
- <type itemref="String"/>
- </Attribute>
-
- <Attribute itsName="isUnread">
- <displayName>Is Unread</displayName>
- <cardinality>single</cardinality>
- <type itemref="Boolean"/>
- </Attribute>
-
- <Attribute itsName="items">
- <displayName>Items</displayName>
- <cardinality>single</cardinality>
- <type itemref="content:ItemCollection"/>
- </Attribute>
-
- <!-- Actual attribute uses -->
-
- <!-- RSSChannel attributes -->
- <attributes itemref="doc:RSSChannel/url"/>
- <attributes itemref="doc:RSSChannel/etag"/>
- <attributes itemref="doc:RSSChannel/lastModified"/>
- <attributes itemref="doc:RSSChannel/copyright"/>
- <attributes itemref="doc:RSSChannel/language"/>
-
- <attributes itemref="doc:RSSChannel/isUnread"/>
- <attributes itemref="doc:RSSChannel/items"/>
-
- <!-- These attributes are shared between RSSChannel and RSSItem -->
- <attributes itemref="doc:link"/>
- <attributes itemref="doc:category"/>
- <attributes itemref="doc:author"/>
- <attributes itemref="doc:date"/>
-
-
- <!-- Clouds defined on this item, to aid in sharing and copying -->
- <Cloud itsName="SharingCloud">
- <Endpoint itsName="author">
- <attribute value="author"/>
- </Endpoint>
- <endpoints itemref="doc:RSSChannel/SharingCloud/author"/>
- <Endpoint itsName="copyright">
- <attribute value="copyright"/>
- </Endpoint>
- <endpoints itemref="doc:RSSChannel/SharingCloud/copyright"/>
- <Endpoint itsName="link">
- <attribute value="link"/>
- </Endpoint>
- <endpoints itemref="doc:RSSChannel/SharingCloud/link"/>
- <Endpoint itsName="url">
- <attribute value="url"/>
- </Endpoint>
- <endpoints itemref="doc:RSSChannel/SharingCloud/url"/>
- </Cloud>
- <clouds alias="sharing" itemref="doc:RSSChannel/SharingCloud"/>
-
- </Kind>
-
-
- <!-- Kind: RSSItem -->
-
- <Kind itsName="RSSItem">
- <!-- for now, we are not a Note - mostly because this makes unnecessary UI appear in the detail view -->
- <!-- <superKinds itemref="content:Note"/> -->
- <superKinds itemref="content:ContentItem"/>
-
- <classes key="python">osaf.examples.zaobao.RSSData.RSSItem</classes>
-
- <displayName>RSS Item</displayName>
+ <core:namespace value="http://osafoundation.org/examples/zaobao"/>
+ <core:version>0.3</core:version>
- <!-- Redirect attributes - this redirects "standard" attributes to RSSChannel-specific attributes -->
- <Attribute itsName="about">
- <redirectTo value="displayName"/>
- </Attribute>
- <Attribute itsName="who">
- <redirectTo value="author"/>
- </Attribute>
- <Attribute itsName="body">
- <redirectTo value="content"/>
- </Attribute>
+
+ <!-- Styles -->
+ <CharacterStyle itsName="HeaderCharacterStyle">
+ <fontStyle>bold</fontStyle>
+ </CharacterStyle>
+
+ <!-- ## detail view for RSSItems ## -->
+
+ <ItemDetail itsName="ItemBodyArea" itemClass="osaf.examples.zaobao.blocks.ZaoBaoItemDetail">
+ <blockName value="articletext"/>
+ <size>100,50</size>
+ <minimumSize>100,50</minimumSize>
+ </ItemDetail>
+
+ <!-- URL -->
+ <ContentItemDetail itsName="LinkArea"
+ itemClass="osaf.framework.blocks.detail.Detail.DetailSynchronizedLabeledTextAttributeBlock">
+ <position>0.3</position>
+ <selectedItemsAttribute>link</selectedItemsAttribute>
+ <childrenBlocks itemref="doc:LinkLabel"/>
+ <childrenBlocks itemref="doc:LinkAttribute"/>
+ <stretchFactor>0.0</stretchFactor>
+ </ContentItemDetail>
+
+ <CharacterStyle itsName="LinkStyle">
+ <fontFamily>DefaultUIFont</fontFamily>
+ <fontSize>10</fontSize>
+ <fontStyle>underline</fontStyle>
+ </CharacterStyle>
+
+ <!-- huh, I only seem to be able to apply this to whole ContentItemDetail items -->
+ <ColorStyle itsName="LinkColor">
+ <foregroundColor>0,0,255,255</foregroundColor>
+ </ColorStyle>
+
+ <StaticText itsName="LinkLabel" itemClass="osaf.framework.blocks.detail.Detail.StaticRedirectAttributeLabel">
+ <title>link</title>
+ <characterStyle itemref="detail:LabelStyle"/>
+ <stretchFactor>0.0</stretchFactor>
+ <textAlignmentEnum>Right</textAlignmentEnum>
+ <minimumSize>70, 24</minimumSize>
+ <border>0.0, 0.0, 0.0, 5.0</border>
+ </StaticText>
+
+ <StaticText itsName="LinkAttribute" itemClass="osaf.examples.zaobao.blocks.LinkDetail">
+ <characterStyle itemref="doc:LinkStyle"/>
+ <!-- <colorStyle itemref="doc:LinkColor"/> -->
+ <stretchFactor>0.0</stretchFactor>
+ <textAlignmentEnum>Left</textAlignmentEnum>
+ <title>linkattribute</title>
+ </StaticText>
+
+ <!-- Category -->
+ <ContentItemDetail itsName="CategoryArea"
+ itemClass="osaf.framework.blocks.detail.Detail.DetailSynchronizedLabeledTextAttributeBlock">
+ <position>0.2</position>
+ <selectedItemsAttribute>category</selectedItemsAttribute>
+ <childrenBlocks itemref="doc:CategoryLabel"/>
+ <childrenBlocks itemref="doc:CategoryAttribute"/>
+ <stretchFactor>0.0</stretchFactor>
+ </ContentItemDetail>
+
+ <StaticText itsName="CategoryLabel" itemClass="osaf.framework.blocks.detail.Detail.StaticRedirectAttributeLabel">
+ <title>category</title>
+ <characterStyle itemref="detail:LabelStyle"/>
+ <stretchFactor>0.0</stretchFactor>
+ <textAlignmentEnum>Right</textAlignmentEnum>
+ <minimumSize>70, 24</minimumSize>
+ <border>0.0, 0.0, 0.0, 5.0</border>
+ </StaticText>
+
+ <StaticText itsName="CategoryAttribute" itemClass="osaf.framework.blocks.detail.Detail.StaticRedirectAttribute">
+ <title>category</title>
+ <characterStyle itemref="detail:LabelStyle"/>
+ <stretchFactor>1.0</stretchFactor>
+ <textAlignmentEnum>Left</textAlignmentEnum>
+ </StaticText>
+
+ <!-- Author area -->
+ <ContentItemDetail itsName="AuthorArea" itemClass="osaf.framework.blocks.detail.Detail.DetailSynchronizedLabeledTextAttributeBlock">
+ <position>0.0</position>
+ <selectedItemsAttribute>author</selectedItemsAttribute>
+ <childrenBlocks itemref="doc:AuthorLabel"/>
+ <childrenBlocks itemref="doc:AuthorAttribute"/>
+ <stretchFactor>0.0</stretchFactor>
+ </ContentItemDetail>
+
+ <StaticText itsName="AuthorLabel" itemClass="osaf.framework.blocks.detail.Detail.StaticRedirectAttributeLabel">
+ <title>author</title>
+ <characterStyle itemref="detail:LabelStyle"/>
+ <stretchFactor>0.0</stretchFactor>
+ <textAlignmentEnum>Right</textAlignmentEnum>
+ <minimumSize>70, 24</minimumSize>
+ <border>0.0, 0.0, 0.0, 5.0</border>
+ </StaticText>
+
+ <StaticText itsName="AuthorAttribute" itemClass="osaf.framework.blocks.detail.Detail.StaticRedirectAttribute">
+ <title>author</title>
+ <characterStyle itemref="detail:LabelStyle"/>
+ <stretchFactor>0.0</stretchFactor>
+ <textAlignmentEnum>Left</textAlignmentEnum>
+ </StaticText>
+
+ <!-- Date area -->
+ <ContentItemDetail itsName="DateArea" itemClass="osaf.framework.blocks.detail.Detail.DetailSynchronizedLabeledTextAttributeBlock">
+ <position>0.4</position>
+ <selectedItemsAttribute>date</selectedItemsAttribute>
+ <childrenBlocks itemref="doc:DateLabel"/>
+ <childrenBlocks itemref="doc:DateAttribute"/>
+ <stretchFactor>0.0</stretchFactor>
+ </ContentItemDetail>
+
+ <StaticText itsName="DateAttribute" itemClass="osaf.framework.blocks.detail.Detail.StaticRedirectAttribute">
+ <title>date</title>
+ <characterStyle itemref="detail:LabelStyle"/>
+ <stretchFactor>0.0</stretchFactor>
+ <textAlignmentEnum>Left</textAlignmentEnum>
+ </StaticText>
+
+ <StaticText itsName="DateLabel" itemClass="osaf.framework.blocks.detail.Detail.StaticRedirectAttributeLabel">
+ <title>date</title>
+ <characterStyle itemref="detail:LabelStyle"/>
+ <stretchFactor>0.0</stretchFactor>
+ <textAlignmentEnum>Right</textAlignmentEnum>
+ <minimumSize>70, 24</minimumSize>
+ <border>0.0, 0.0, 0.0, 5.0</border>
+ </StaticText>
+
- <!--
- attribute declarations - note that these are
- actually used by <attributes> tag below
- -->
- <Attribute itsName="channel">
- <displayName>Channel</displayName>
- <cardinality>single</cardinality>
- <type itemref="doc:RSSChannel"/>
- </Attribute>
-
- <Attribute itsName="content">
- <cardinality>single</cardinality>
- <type itemref="Lob"/>
- </Attribute>
-
- <!-- Actual attribute uses -->
- <attributes itemref="doc:RSSItem/content"/>
- <attributes itemref="doc:RSSItem/channel"/>
-
- <attributes itemref="doc:link"/>
- <attributes itemref="doc:category"/>
- <attributes itemref="doc:author"/>
- <attributes itemref="doc:date"/>
-
- <!-- Clouds defined on this item, to aid in sharing and copying -->
- <Cloud itsName="SharingCloud">
- <Endpoint itsName="link">
- <attribute value="link"/>
- </Endpoint>
- <endpoints itemref="doc:RSSItem/SharingCloud/link"/>
- <Endpoint itsName="category">
- <attribute value="category"/>
- </Endpoint>
- <endpoints itemref="doc:RSSItem/SharingCloud/category"/>
- <Endpoint itsName="author">
- <attribute value="author"/>
- </Endpoint>
- <endpoints itemref="doc:RSSItem/SharingCloud/author"/>
- <Endpoint itsName="date">
- <attribute value="date"/>
- </Endpoint>
- <endpoints itemref="doc:RSSItem/SharingCloud/date"/>
- </Cloud>
- <clouds alias="sharing" itemref="doc:RSSItem/SharingCloud"/>
-
- </Kind>
+ <!-- The actual detail area block -->
+ <detail:DetailTrunkSubtree itsName="ChannelSubtree">
+ <!-- This ensures that this detail view gets attached to RSSItems -->
+ <key itemref="zbSchema:RSSItem"/>
+
+ <!-- UI Elements for detail view -->
+ <rootBlocks itemref="detail:MarkupBar"/>
+ <rootBlocks itemref="doc:ItemBodyArea"/>
+ <rootBlocks itemref="doc:LinkArea"/>
+ <rootBlocks itemref="doc:AuthorArea"/>
+ <rootBlocks itemref="doc:DateArea"/>
+ <!--<rootBlocks itemref="doc:DateArea"/> -->
+ <rootBlocks itemref="doc:CategoryArea"/>
+ </detail:DetailTrunkSubtree>
+
+ <!-- Just declaring an item of this type will allow it to be woken up -->
+ <wakeupCall:WakeupCall itsName="ZaoBao">
+ <wakeupCallClass>osaf.examples.zaobao.ZaoBaoWakeupCall.WakeupCall</wakeupCallClass>
+ <callOnStartup>True</callOnStartup>
+ <enabled>True</enabled>
+ <repeat>True</repeat>
+ <delay>00:00:30:00</delay>
+ </wakeupCall:WakeupCall>
-</Parcel>
+</core:Parcel>
More information about the Commits
mailing list