org.blinkenlights.jid3.v2
Class ContentType

java.lang.Object
  extended byorg.blinkenlights.jid3.v2.ContentType

public class ContentType
extends java.lang.Object


Nested Class Summary
static class ContentType.Genre
          A class representing the predefined genres.
 
Constructor Summary
ContentType()
          Creates a new instance of ContentType
 
Method Summary
 boolean equals(java.lang.Object oOther)
          Compare ContentTypes for equality by genre and refinement values.
 ContentType.Genre[] getGenres()
          Get all of the set genres in this content type.
 java.lang.String getRefinement()
          Get the current refinement, if set, for this content type.
 boolean isCover()
          Check whether or not this content type describes a recording which is a cover.
 boolean isRemix()
          Check whether or not this content type describes a recording which is a remix.
 boolean isSet(ContentType.Genre oGenre)
          Check whether a given genre is set.
 boolean setGenre(ContentType.Genre oGenre)
          Set a given genre for this recording.
 void setIsCover(boolean bIsCover)
          Toggle whether or not the recording described by this content type is a cover.
 void setIsRemix(boolean bIsRemix)
          Toggle whether or not the recording described by this content type is a remix.
 void setRefinement(java.lang.String sRefinement)
          Set a refinement for the genre of the recording repesented by this content type.
 java.lang.String toString()
          Get the string representation of this content type.
 boolean unsetGenre(ContentType.Genre oGenre)
          Unset a given genre for this recording.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContentType

public ContentType()
Creates a new instance of ContentType

Method Detail

equals

public boolean equals(java.lang.Object oOther)
Compare ContentTypes for equality by genre and refinement values.

Parameters:
oOther - object to check against
Returns:
true if equal, false otherwise

setRefinement

public void setRefinement(java.lang.String sRefinement)
Set a refinement for the genre of the recording repesented by this content type. Refinements are free-form text, and can be used where no existing genre accurately describes the content.

Parameters:
sRefinement - a refinement description for this content type

getRefinement

public java.lang.String getRefinement()
Get the current refinement, if set, for this content type.

Returns:
the refinement currently specified, or null if no refinement has been set

setIsRemix

public void setIsRemix(boolean bIsRemix)
Toggle whether or not the recording described by this content type is a remix.

Parameters:
bIsRemix - whether this is a remix or not

isRemix

public boolean isRemix()
Check whether or not this content type describes a recording which is a remix.

Returns:
true if the recording is a remix, false otherwise

setIsCover

public void setIsCover(boolean bIsCover)
Toggle whether or not the recording described by this content type is a cover.

Parameters:
bIsCover - whether this is a cover or not

isCover

public boolean isCover()
Check whether or not this content type describes a recording which is a cover.

Returns:
true if the recording is a cover, false otherwise

setGenre

public boolean setGenre(ContentType.Genre oGenre)
Set a given genre for this recording. More than one genre can be set independently.

Parameters:
oGenre - the genre to be set
Returns:
true if this genre was not already set, false otherwise

unsetGenre

public boolean unsetGenre(ContentType.Genre oGenre)
Unset a given genre for this recording.

Parameters:
oGenre - the genre to be unset
Returns:
true if this genre was previously set, false otherwise

isSet

public boolean isSet(ContentType.Genre oGenre)
Check whether a given genre is set.

Parameters:
oGenre - the genre to check
Returns:
true if the genre is set, false otherwise

getGenres

public ContentType.Genre[] getGenres()
Get all of the set genres in this content type.

Returns:
an array of all of the set genres

toString

public java.lang.String toString()
Get the string representation of this content type.

Returns:
a string representing the content type, as it is stored in the frame