entagged.audioformats.asf.data
Class ExtendedContentDescription

java.lang.Object
  extended by entagged.audioformats.asf.data.Chunk
      extended by entagged.audioformats.asf.data.ExtendedContentDescription

public class ExtendedContentDescription
extends Chunk

This structure represents the data of a chunk, wich contains extended content description.
These properties are simply represented by ContentDescriptor

Author:
Christian Laireiter

Field Summary
 
Fields inherited from class entagged.audioformats.asf.data.Chunk
chunkLength, guid, position
 
Constructor Summary
ExtendedContentDescription()
          Creates an instance.
ExtendedContentDescription(long pos, BigInteger chunkLen)
          Creates an instance.
 
Method Summary
 void addDescriptor(ContentDescriptor toAdd)
          This method inserts the given ContentDescriptor.
 void addOrReplace(ContentDescriptor descriptor)
          This method adds or replaces an existing content descriptor.
 String getAlbum()
          Returns the album entered in the content descriptor chunk.
 String getArtist()
          Returns the "WM/AlbumArtist" entered in the extended content description.
 byte[] getBytes()
          This method creates a byte array which can be written to asf files.
 ContentDescriptor getDescriptor(String name)
          Returns a previously inserted content descriptor.
 long getDescriptorCount()
           
 Collection getDescriptors()
          Returns a collection of all ContentDescriptorobjects stored in this extended content description.
 String getGenre()
          Returns the Genre entered in the content descriptor chunk.
 String getTrack()
          Returns the Track entered in the content descriptor chunk.
 String getYear()
          Returns the Year entered in the extended content descripion.
 String prettyPrint()
          This method creates a String containing the tag elements an their values for printing.
 ContentDescriptor remove(String id)
          This method removes the content descriptor with the given name.
 
Methods inherited from class entagged.audioformats.asf.data.Chunk
getChunckEnd, getChunkLength, getGuid, getPosition, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtendedContentDescription

public ExtendedContentDescription()
Creates an instance.


ExtendedContentDescription

public ExtendedContentDescription(long pos,
                                  BigInteger chunkLen)
Creates an instance.

Parameters:
pos - Position of header object within file or stream.
chunkLen - Length of the represented chunck.
Method Detail

addDescriptor

public void addDescriptor(ContentDescriptor toAdd)
This method inserts the given ContentDescriptor.

Parameters:
toAdd - ContentDescriptor to insert.

addOrReplace

public void addOrReplace(ContentDescriptor descriptor)
This method adds or replaces an existing content descriptor.

Parameters:
descriptor - Descriptor to be added or replaced.

getAlbum

public String getAlbum()
Returns the album entered in the content descriptor chunk.

Returns:
Album, "" if not defined.

getArtist

public String getArtist()
Returns the "WM/AlbumArtist" entered in the extended content description.

Returns:
Title, "" if not defined.

getBytes

public byte[] getBytes()
This method creates a byte array which can be written to asf files.

Returns:
asf file representation of the current object.

getDescriptor

public ContentDescriptor getDescriptor(String name)
Returns a previously inserted content descriptor.

Parameters:
name - name of the content descriptor.
Returns:
null if not present.

getDescriptorCount

public long getDescriptorCount()
Returns:
Returns the descriptorCount.

getDescriptors

public Collection getDescriptors()
Returns a collection of all ContentDescriptorobjects stored in this extended content description.

Returns:
An enumeration of ContentDescriptorobjects.

getGenre

public String getGenre()
Returns the Genre entered in the content descriptor chunk.

Returns:
Genre, "" if not defined.

getTrack

public String getTrack()
Returns the Track entered in the content descriptor chunk.

Returns:
Track, "" if not defined.

getYear

public String getYear()
Returns the Year entered in the extended content descripion.

Returns:
Year, "" if not defined.

prettyPrint

public String prettyPrint()
This method creates a String containing the tag elements an their values for printing.

Overrides:
prettyPrint in class Chunk
Returns:
nice string.

remove

public ContentDescriptor remove(String id)
This method removes the content descriptor with the given name.

Parameters:
id - The id (name) of the descriptor which should be removed.
Returns:
The descriptor which is removed. If not present null.


Copyright © 2007-2008. All Rights Reserved.