org.rometools.feed.opml
Class Outline

java.lang.Object
  extended by org.rometools.feed.opml.Outline
All Implemented Interfaces:
Serializable, Cloneable

public class Outline
extends Object
implements Cloneable, Serializable

This class represents an OPML outline element.

Author:
Robert "kebernet" Cooper
See Also:
Serialized Form

Constructor Summary
Outline()
          Creates a new instance of Outline
Outline(String type, String text)
          Creates a new outline with the specified type and text values.
Outline(String title, URL xmlUrl, URL htmlUrl)
          Creates an outline with the given title, xmlUrl and htmlUrl.
 
Method Summary
 Object clone()
           
 boolean equals(Object obj)
           
 List getAttributes()
          List of attributes on this outline excluding the "common types" for the specification.
 String getAttributeValue(String name)
          Returns the value of an attribute on the outline or null.
 List getCategories()
          (OPML 2) A List of Strings indicating values in the category attribute.
 List getChildren()
          A list of sub-outlines for this entry.
 Date getCreated()
          (OPML 2) created is the date-time that the outline node was created.
 String getHtmlUrl()
          A convenience method to return the value of the htmlUrl attribute.
 List getModules()
           
 String getText()
          The "text" attribute of the outline.
 String getTitle()
          The "title" attribute of the outline.
 String getType()
          The "type" attribute of the outline.
 String getUrl()
          A convenience method to return the value of the url attribute.
 String getXmlUrl()
          A convenience method to return the value of the xmlUrl attribute.
 int hashCode()
           
 boolean isBreakpoint()
          isBreakpoint is a string, either "true" or "false", indicating whether a breakpoint is set on this outline.
 boolean isComment()
          isComment is a string, either "true" or "false", indicating whether the outline is commented or not.
 void setAttributes(List attributes)
          List of attributes on this outline excluding the "common types" for the specification.
 void setBreakpoint(boolean breakpoint)
          isBreakpoint is a string, either "true" or "false", indicating whether a breakpoint is set on this outline.
 void setCategories(List categories)
          (OPML 2) A List of Strings indicating values in the category attribute.
 void setChildren(List children)
          A list of sub-outlines for this entry.
 void setComment(boolean comment)
          isComment is a string, either "true" or "false", indicating whether the outline is commented or not.
 void setCreated(Date created)
          (OPML 2) created is the date-time that the outline node was created.
 void setModules(List modules)
           
 void setText(String text)
          The "text" attribute of the outline.
 void setTitle(String title)
          The "title" attribute of the outline.
 void setType(String type)
          The "type" attribute of the outline.
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Outline

public Outline()
Creates a new instance of Outline


Outline

public Outline(String type,
               String text)
Creates a new outline with the specified type and text values.

Parameters:
type - type attribute value/
text - text attribute value

Outline

public Outline(String title,
               URL xmlUrl,
               URL htmlUrl)
Creates an outline with the given title, xmlUrl and htmlUrl. This is traditionally used for aggregator feed lists and will get a type of "rss".

Parameters:
title - Title of the entry.
xmlUrl - link to XML file.
htmlUrl - link to html page.
Method Detail

setAttributes

public void setAttributes(List attributes)
List of attributes on this outline excluding the "common types" for the specification.

Parameters:
attributes - List of attributes on this outline.

getAttributes

public List getAttributes()
List of attributes on this outline excluding the "common types" for the specification.

Returns:
List of attributes on this outline.

setBreakpoint

public void setBreakpoint(boolean breakpoint)
isBreakpoint is a string, either "true" or "false", indicating whether a breakpoint is set on this outline. This attribute is mainly necessary for outlines used to edit scripts. If it's not present, the value is false.

Parameters:
breakpoint - whether a breakpoint is set on this outline.

isBreakpoint

public boolean isBreakpoint()
isBreakpoint is a string, either "true" or "false", indicating whether a breakpoint is set on this outline. This attribute is mainly necessary for outlines used to edit scripts. If it's not present, the value is false.

Returns:
whether a breakpoint is set on this outline

setCategories

public void setCategories(List categories)
(OPML 2) A List of Strings indicating values in the category attribute.

Parameters:
categories - (OPML 2) A List of Strings indicating values in the category attribute.

getCategories

public List getCategories()
(OPML 2) A List of Strings indicating values in the category attribute.

Returns:
(OPML 2) A List of Strings indicating values in the category attribute.

setChildren

public void setChildren(List children)
A list of sub-outlines for this entry.

Parameters:
children - A list of sub-outlines for this entry.

getChildren

public List getChildren()
A list of sub-outlines for this entry.

Returns:
A list of sub-outlines for this entry.

setComment

public void setComment(boolean comment)
isComment is a string, either "true" or "false", indicating whether the outline is commented or not. By convention if an outline is commented, all subordinate outlines are considered to also be commented. If it's not present, the value is false.

Parameters:
comment - whether the outline is commented

isComment

public boolean isComment()
isComment is a string, either "true" or "false", indicating whether the outline is commented or not. By convention if an outline is commented, all subordinate outlines are considered to also be commented. If it's not present, the value is false.

Returns:
whether the outline is commented

setCreated

public void setCreated(Date created)
(OPML 2) created is the date-time that the outline node was created.

Parameters:
created - date-time that the outline node was created.

getCreated

public Date getCreated()
(OPML 2) created is the date-time that the outline node was created.

Returns:
date-time that the outline node was created.

getUrl

public String getUrl()
A convenience method to return the value of the url attribute.

Returns:
value of the htmlUrl attribute.

getHtmlUrl

public String getHtmlUrl()
A convenience method to return the value of the htmlUrl attribute.

Returns:
value of the htmlUrl attribute.

setModules

public void setModules(List modules)

getModules

public List getModules()

setText

public void setText(String text)
The "text" attribute of the outline.

Parameters:
text - The "text" attribute of the outline.

getText

public String getText()
The "text" attribute of the outline.

Returns:
The "text" attribute of the outline.

setTitle

public void setTitle(String title)
The "title" attribute of the outline.

Parameters:
title - The "title" attribute of the outline.

getTitle

public String getTitle()
The "title" attribute of the outline.

Returns:
The "title" attribute of the outline.

setType

public void setType(String type)
The "type" attribute of the outline.

Parameters:
type - The "type" attribute of the outline.

getType

public String getType()
The "type" attribute of the outline.

Returns:
The "type" attribute of the outline.

getXmlUrl

public String getXmlUrl()
A convenience method to return the value of the xmlUrl attribute.

Returns:
value of the xmlUrl attribute.

getAttributeValue

public String getAttributeValue(String name)
Returns the value of an attribute on the outline or null.

Parameters:
name - name of the attribute.

clone

public Object clone()
Overrides:
clone in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 ROME Project. All Rights Reserved.