Previous | Next | WireHose Developers Guide |
The new resource template includes several attributes which are
part of the WHTaggable and WHIndexable interface. The
dateAdded
attribute is common to both interfaces, and
allows users to search for recently inserted resources. The
indexed
property and the resourceKeywords
and keywords
relationships provide the ability to search
by keywords, while resourceTags
is used to provide a
to-many relationship to available tags. The affiliate
attribute is an optional convention which allows partitioning
WireHose resources, channel factories, tags and other objects into
groups.
First you'll model the RSSFeed's title. We're calling it "name" instead of "title" because it's a convention for WireHose resources to have a name, if possible.
Note: The whString255 prototype defines a column of type CHAR(255). You can safely redefine all the whString prototypes to be VARCHAR columns of any size. See the WHEnterpriseObject reference for details. |
Next, you'll model the RSSFeed's link.
Next, you'll model the RSSFeed's description. Since "description" is a reserved word in WebObjects, it's a WireHose convention to name the attribute "textDescription".
There are a number of other attributes defined in the RSS 2.0 specification which we are not modeling here for simplicity's sake. However, we will model some more attributes which will be used in the Hello World application.
The first is a "lastFetchDate" property, which is the date the items from a feed were last imported.
Since there are several versions of RSS, some feeds may be valid but not supported by Hello World. The last attribute you'll model is a boolean indicating whether or not the feed was valid the last time we fetched, so the crawler can skip those feeds the next time.
Note: There is no standard way to store booleans in a database; some support BOOLEAN columns, while others may store a "Y" or "N" in a CHAR(1) column, or a zero or one in an INTEGER. WireHose provides the whBoolean prototype and several utility methods which make it easy to deal with varying definitions for boolean attributes in a transparent fashion. |
Note: Your Java code will
actually call methods named
|
Copyright ©2000-2003 Gary Teter. All rights reserved. WireHose is a trademark of Gary Teter.