org.varienaja.comments
Class CommentElement

java.lang.Object
  extended by org.varienaja.comments.CommentElement
All Implemented Interfaces:
java.io.Serializable

public class CommentElement
extends java.lang.Object
implements java.io.Serializable

Class representing an element of a Comment. An element is either normal text, a Band, a Song, a Keyword, a Playlist or an Artist. The special elementtypes can be used to create hyperlinks, pointing to a page with more information.

Version:
$Id: CommentElement.java,v 1.1 2010/03/16 18:55:42 varienaja Exp $
Author:
Varienaja
See Also:
Serialized Form

Constructor Summary
CommentElement()
          Creates a CommentElement of type 'T' with an empty string as text and an id of -1.
 
Method Summary
 long getId()
           
 java.lang.Object[] getInfo()
          Returns the contents of this Item as a pair of [id,name]
 java.lang.String getText()
           
protected  java.lang.String getType()
           
 boolean isArtist()
           
 boolean isBand()
           
 boolean isKeyword()
           
 boolean isPlaylist()
           
 boolean isSong()
           
 boolean isText()
           
 void setId(long id)
           
 void setText(java.lang.String text)
           
 void setType(char type)
          Sets the type of the reviewelement.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommentElement

public CommentElement()
Creates a CommentElement of type 'T' with an empty string as text and an id of -1.

Method Detail

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

getId

public long getId()

setId

public void setId(long id)

setType

public void setType(char type)
Sets the type of the reviewelement. This can be any of the values:

Parameters:
type -

isText

public boolean isText()

isBand

public boolean isBand()

isPlaylist

public boolean isPlaylist()

isSong

public boolean isSong()

isArtist

public boolean isArtist()

isKeyword

public boolean isKeyword()

getInfo

public java.lang.Object[] getInfo()
Returns the contents of this Item as a pair of [id,name]

Returns:
A pair of [id,name]

getType

protected java.lang.String getType()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010 A.J.V.. All Rights Reserved.