org.farng.mp3.filename
Class FilenameParenthesis

java.lang.Object
  extended by org.farng.mp3.filename.AbstractFilenameComposite
      extended by org.farng.mp3.filename.FilenameDelimiter
          extended by org.farng.mp3.filename.FilenameParenthesis

public class FilenameParenthesis
extends FilenameDelimiter

This composite subclass is for parenthesis elements. It is different from the delimiter because it has three children. The middle child includes the items contained within the parenthesis themselves.

Version:
$Revision: 3 $
Author:
Eric Farng

Constructor Summary
FilenameParenthesis()
          Creates a new FilenameParenthesis object.
FilenameParenthesis(FilenameParenthesis copyObject)
          Creates a new FilenameParenthesis object.
 
Method Summary
 java.lang.String composeFilename()
          Reconstruct the filename that is represented by this composite.
 ID3v2_4 createId3Tag()
           
 AbstractFilenameComposite getMiddleComposite()
          Returnsthe composite that goes between the parenthesis
 java.lang.String getOpenDelimiter()
          Returns the opening parenthesis
 java.util.Iterator iterator()
          Returns an iterator through each FilenameToken in this composite in the correct order for the file name.
 void matchAgainstKeyword(java.lang.Class id3v2FrameBodyClass)
          Match all elements of this composite against the keywords for this class type found in TagOptionSingleton.
 void matchAgainstTag(AbstractMP3Tag matchTag)
          Match all elements of this composite against the given tag.
 void setFrame(AbstractID3v2Frame frame)
           
 void setMiddleComposite(AbstractFilenameComposite middleComposite)
          Sets the composite that goes between the parenthesis
 void setOpenDelimiter(java.lang.String openDelimiter)
          Sets the opening parenthesis
 
Methods inherited from class org.farng.mp3.filename.FilenameDelimiter
getAfterComposite, getBeforeComposite, getDelimiter, setAfterComposite, setBeforeComposite, setDelimiter
 
Methods inherited from class org.farng.mp3.filename.AbstractFilenameComposite
getOriginalToken, setOriginalToken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilenameParenthesis

public FilenameParenthesis()
Creates a new FilenameParenthesis object.


FilenameParenthesis

public FilenameParenthesis(FilenameParenthesis copyObject)
Creates a new FilenameParenthesis object.

Method Detail

setFrame

public void setFrame(AbstractID3v2Frame frame)
Overrides:
setFrame in class FilenameDelimiter

setMiddleComposite

public void setMiddleComposite(AbstractFilenameComposite middleComposite)
Sets the composite that goes between the parenthesis

Parameters:
middleComposite - the composite that goes between the parenthesis

getMiddleComposite

public AbstractFilenameComposite getMiddleComposite()
Returnsthe composite that goes between the parenthesis

Returns:
the composite that goes between the parenthesis

setOpenDelimiter

public void setOpenDelimiter(java.lang.String openDelimiter)
Sets the opening parenthesis

Parameters:
openDelimiter - the opening parenthesis

getOpenDelimiter

public java.lang.String getOpenDelimiter()
Returns the opening parenthesis

Returns:
the opening parenthesis

composeFilename

public java.lang.String composeFilename()
Reconstruct the filename that is represented by this composite.

Overrides:
composeFilename in class FilenameDelimiter
Returns:
the filename that is represented by this composite.

createId3Tag

public ID3v2_4 createId3Tag()
Overrides:
createId3Tag in class FilenameDelimiter

iterator

public java.util.Iterator iterator()
Returns an iterator through each FilenameToken in this composite in the correct order for the file name.

Overrides:
iterator in class FilenameDelimiter
Returns:
an iterator through each FilenameToken in this composite

matchAgainstKeyword

public void matchAgainstKeyword(java.lang.Class id3v2FrameBodyClass)
Match all elements of this composite against the keywords for this class type found in TagOptionSingleton. If the FilenameToken matches the keyword, the token's class is set.

Overrides:
matchAgainstKeyword in class FilenameDelimiter
Parameters:
id3v2FrameBodyClass - Class of keywords to match against.

matchAgainstTag

public void matchAgainstTag(AbstractMP3Tag matchTag)
Match all elements of this composite against the given tag. If any element of matchTag matches any element of this tag's composite, then this tag's composite leaf node's class is set.

Overrides:
matchAgainstTag in class FilenameDelimiter
Parameters:
matchTag - Tag to match against