Java Doc for RSSItem.java in  » RSS-RDF » curn » org » clapper » curn » parser » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » RSS RDF » curn » org.clapper.curn.parser 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.clapper.curn.parser.RSSElement
      org.clapper.curn.parser.RSSItem

All known Subclasses:   org.clapper.curn.parser.rome.RSSItemAdapter,
RSSItem
abstract public class RSSItem extends RSSElement implements Cloneable,Comparable(Code)
This abstract class defines a simplified view of an RSS item, providing only the methods necessary for curn to work. curn uses the RSSParserFactory class to get a specific implementation of RSSParser, which returns RSSChannel-conforming objects that, in turn, return item objects that subclass RSSItem. This strategy isolates the bulk of the code from the underlying RSS parser, making it easier to substitute different parsers as more of them become available. RSSItem. This strategy isolates the bulk of the code from the underlying RSS parser, making it easier to substitute different parsers as more of them become available.
See Also:   RSSParserFactory
See Also:   RSSParser
See Also:   RSSChannel
version:
   $Revision: 7041 $


Field Summary
final public static  StringDEFAULT_CONTENT_TYPE
     Constant defining the pseudo-MIME type to use for default content.
final public static  intNO_SUMMARY_LIMIT
    

Constructor Summary
protected  RSSItem()
    

Method Summary
abstract public  voidaddAuthor(String author)
     Add to the item's author list.
abstract public  voidclearAuthors()
     Clear the authors list.
public  voidclearContent()
     Clear the stored content for all MIME types, without clearing any other fields.
public  Objectclone()
     Clone this channel.
public  intcompareTo(Object other)
     Compare two items for order.
abstract protected  voidcopyPrivateFields(RSSItem toItem)
     Used by RSSItem.makeCopy , this method copies any subclass fields that aren't visible to this class.
public  booleanequals(Object o)
     Compare this item to some other object for equality.
abstract public  Collection<String>getAuthors()
     Get the item's author list.
abstract public  Collection<String>getCategories()
     Get the categories the item belongs to.
public  StringgetContent(String mimeType)
     Get the item's content, if available.
abstract protected  Collection<RSSContent>getContent()
     Get all content associated with this item.
final public  StringgetFirstContentOfType(String... mimeTypes)
     Get the first content item that matches one of a list of MIME types.
abstract public  StringgetID()
     Get the item's ID field, if any.
abstract public  Collection<RSSLink>getLinks()
     Get the item's published links.
abstract public  RSSChannelgetParentChannel()
    
abstract public  DategetPublicationDate()
     Get the item's publication date.
abstract public  StringgetSummary()
     Get the item's summary (also sometimes called the description or synopsis).
abstract public  StringgetTitle()
    
public  inthashCode()
     Generate a hash code for this item.
public  RSSItemmakeCopy(RSSChannel parentChannel)
     Make a deep copy of this RSSItem object.
abstract public  RSSItemnewInstance(RSSChannel channel)
     Create a new, empty instance of the underlying concrete class.
abstract public  voidsetCategories(Collection<String> categories)
     Set the categories the item belongs to.
public  voidsetContent(String content, String mimeType)
     Set the content for a specific MIME type.
abstract public  voidsetID(String id)
     Set the item's ID field, if any.
abstract public  voidsetLinks(Collection<RSSLink> links)
     Set the item's published links.
abstract public  voidsetPublicationDate(Date date)
     Set the item's publication date.
abstract public  voidsetSummary(String newSummary)
     Set the item's summary (also sometimes called the description or synopsis).
abstract public  voidsetTitle(String newTitle)
    
public  StringtoString()
     Return the string value of the item (which, right now, is its title).

Field Detail
DEFAULT_CONTENT_TYPE
final public static String DEFAULT_CONTENT_TYPE(Code)
Constant defining the pseudo-MIME type to use for default content.



NO_SUMMARY_LIMIT
final public static int NO_SUMMARY_LIMIT(Code)
Unlimited summary size




Constructor Detail
RSSItem
protected RSSItem()(Code)
Default constructor




Method Detail
addAuthor
abstract public void addAuthor(String author)(Code)
Add to the item's author list.
Parameters:
  author - another author string to add
See Also:   RSSItem.getAuthors
See Also:   RSSItem.clearAuthors
See Also:   RSSItem.setAuthors



clearAuthors
abstract public void clearAuthors()(Code)
Clear the authors list.
See Also:   RSSItem.getAuthors
See Also:   RSSItem.addAuthor
See Also:   RSSItem.setAuthors



clearContent
public void clearContent()(Code)
Clear the stored content for all MIME types, without clearing any other fields. (In particular, the summary is not cleared.)
See Also:   RSSItem.getContent
See Also:   RSSItem.getFirstContentOfType
See Also:   RSSItem.setContent



clone
public Object clone() throws CloneNotSupportedException(Code)
Clone this channel. This method simply calls the type-safe RSSItem.makeCopy method. The clone is a deep-clone (i.e., the items are cloned, too). the cloned RSSChannel
throws:
  CloneNotSupportedException - doesn't, actually, but theCloneable interfacerequires that this exceptionbe declared
See Also:   RSSItem.makeCopy



compareTo
public int compareTo(Object other)(Code)
Compare two items for order. The channels are ordered first by publication date (if any), then by title, then by unique ID, then by hash code (if all else is equal).
Parameters:
  other - the other object negative number: this item is less than other;
0: this item is equivalent to other
positive unmber: this item is greater than other



copyPrivateFields
abstract protected void copyPrivateFields(RSSItem toItem)(Code)
Used by RSSItem.makeCopy , this method copies any subclass fields that aren't visible to this class.
Parameters:
  toItem - the other RSSItem into which to copy fields.item will have been created by a call toRSSItem.newInstance



equals
public boolean equals(Object o)(Code)
Compare this item to some other object for equality.
Parameters:
  o - the object true if the objects are equal, false if not



getAuthors
abstract public Collection<String> getAuthors()(Code)
Get the item's author list. the authors, or null (or an empty Collection) ifnot available
See Also:   RSSItem.addAuthor
See Also:   RSSItem.clearAuthors
See Also:   RSSItem.setAuthors



getCategories
abstract public Collection<String> getCategories()(Code)
Get the categories the item belongs to. a Collection of category strings (Stringobjects) or null if not applicable
See Also:   RSSItem.setCategories



getContent
public String getContent(String mimeType)(Code)
Get the item's content, if available. Some feed types (e.g., Atom) support multiple content sections, each with its own MIME type; the mimeType parameter specifies the caller's desired MIME type.
Parameters:
  mimeType - the desired MIME type the content (or the default content), or null if no contentof the desired MIME type is available
See Also:   RSSItem.clearContent
See Also:   RSSItem.getFirstContentOfType
See Also:   RSSItem.setContent



getContent
abstract protected Collection<RSSContent> getContent()(Code)
Get all content associated with this item. a Collection of RSSContent objects



getFirstContentOfType
final public String getFirstContentOfType(String... mimeTypes)(Code)
Get the first content item that matches one of a list of MIME types.
Parameters:
  mimeTypes - an array of MIME types to match, in order the first matching content string, or null if none was found.Returns the default content (if set), if there's no exactmatch.
See Also:   RSSItem.getContent
See Also:   RSSItem.clearContent
See Also:   RSSItem.setContent



getID
abstract public String getID()(Code)
Get the item's ID field, if any. the ID field, or null if not set
See Also:   RSSItem.setID



getLinks
abstract public Collection<RSSLink> getLinks()(Code)
Get the item's published links. the collection of links, or an empty collection
See Also:   RSSItem.setLinks



getParentChannel
abstract public RSSChannel getParentChannel()(Code)
Get the parent channel the parent channel



getPublicationDate
abstract public Date getPublicationDate()(Code)
Get the item's publication date. the date, or null if not available
See Also:   RSSItem.getPublicationDate



getSummary
abstract public String getSummary()(Code)
Get the item's summary (also sometimes called the description or synopsis). the summary, or null if not available
See Also:   RSSItem.setSummary



getTitle
abstract public String getTitle()(Code)
Get the item's title the item's title, or null if there isn't one
See Also:   RSSItem.setTitle



hashCode
public int hashCode()(Code)
Generate a hash code for this item. the hash code



makeCopy
public RSSItem makeCopy(RSSChannel parentChannel)(Code)
Make a deep copy of this RSSItem object.
Parameters:
  parentChannel - the parent channel to assign to the new instance the copy



newInstance
abstract public RSSItem newInstance(RSSChannel channel)(Code)
Create a new, empty instance of the underlying concrete class.
Parameters:
  channel - the parent channel the new instance



setCategories
abstract public void setCategories(Collection<String> categories)(Code)
Set the categories the item belongs to.
Parameters:
  categories - a Collection of category stringsor null if not applicable
See Also:   RSSItem.getCategories



setContent
public void setContent(String content, String mimeType)(Code)
Set the content for a specific MIME type. If the isDefault flag is true, then this content is served up as the default whenever content for a specific MIME type is requested but isn't available.
Parameters:
  content - the content string
Parameters:
  mimeType - the MIME type to associate with the content
See Also:   RSSItem.getContent
See Also:   RSSItem.getFirstContentOfType
See Also:   RSSItem.clearContent



setID
abstract public void setID(String id)(Code)
Set the item's ID field, if any.
Parameters:
  id - the ID field, or null



setLinks
abstract public void setLinks(Collection<RSSLink> links)(Code)
Set the item's published links.
Parameters:
  links - the collection of links, or an empty collection (or null)
See Also:   RSSItem.getLinks



setPublicationDate
abstract public void setPublicationDate(Date date)(Code)
Set the item's publication date.
Parameters:
  date - the new date, or null to clear
See Also:   RSSItem.getPublicationDate



setSummary
abstract public void setSummary(String newSummary)(Code)
Set the item's summary (also sometimes called the description or synopsis).
Parameters:
  newSummary - the summary, or null if not available
See Also:   RSSItem.getSummary



setTitle
abstract public void setTitle(String newTitle)(Code)
Set the item's title
Parameters:
  newTitle - the item's title, or null if there isn't one
See Also:   RSSItem.getTitle



toString
public String toString()(Code)
Return the string value of the item (which, right now, is its title). the title



Methods inherited from org.clapper.curn.parser.RSSElement
abstract public void addAuthor(String author)(Code)(Java Doc)
abstract public void clearAuthors()(Code)(Java Doc)
final public String getAuthor()(Code)(Java Doc)
abstract public Collection<String> getAuthors()(Code)(Java Doc)
public String getID()(Code)(Java Doc)
final public RSSLink getLink(String mimeType, RSSLink.Type... linkTypes)(Code)(Java Doc)
final public RSSLink getLink(RSSLink.Type linkType)(Code)(Java Doc)
final public RSSLink getLink(String mimeType)(Code)(Java Doc)
final public RSSLink getLinkWithFallback(String mimeType)(Code)(Java Doc)
abstract public Collection<RSSLink> getLinks()(Code)(Java Doc)
final public RSSLink getURL()(Code)(Java Doc)
final public void setAuthor(String newAuthor)(Code)(Java Doc)
final public void setAuthors(Collection<String> newAuthors)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.