Class Transcription

java.lang.Object
  extended by Transcription

public class Transcription
extends java.lang.Object

This class represents a transcription of the contents of a language sound file. The transcription may be in any character set. A Transcription is on of the data fields of a Record of information about a language sound file. Other data fields in this Record are the set of Translations and the Cognates


Field Summary
private  java.lang.String characterSet
          The character set in which the transcription is written
static java.lang.String CODE
          The text which indicates that this field is a transcription This could or should be read from a properties file by the Record or DataFile object
static java.lang.String SEPARATOR
          The string which separates the field name from the value.
private  java.lang.String transcription
          A set of words representing the textual equivalent of some segment of sound
 
Constructor Summary
Transcription()
           
Transcription(java.lang.String sDataString)
           
 
Method Summary
 java.lang.String getCharacterSet()
          return the character set in which the transcription is written
 java.lang.String getTranscription()
           
static void main(java.lang.String[] args)
           
 void parseDataString(java.lang.String sDataString)
           
 java.lang.String print()
          provide a textual representation of the data contained by the Transcription object.
 java.lang.String toString()
          over-ride the default Object class method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

transcription

private java.lang.String transcription
A set of words representing the textual equivalent of some segment of sound


characterSet

private java.lang.String characterSet
The character set in which the transcription is written


CODE

public static java.lang.String CODE
The text which indicates that this field is a transcription This could or should be read from a properties file by the Record or DataFile object


SEPARATOR

public static java.lang.String SEPARATOR
The string which separates the field name from the value. This should probably be the same for the whole data file and therefore should be set by the DataFile object possibly by reading from a properties file. For the time being I am hard coding it here

Constructor Detail

Transcription

public Transcription()

Transcription

public Transcription(java.lang.String sDataString)
Method Detail

parseDataString

public void parseDataString(java.lang.String sDataString)

getTranscription

public java.lang.String getTranscription()

getCharacterSet

public java.lang.String getCharacterSet()
return the character set in which the transcription is written


print

public java.lang.String print()
provide a textual representation of the data contained by the Transcription object. The format of this textual representation will depend on the intended use of the string. Another design pattern would be to have only two string output formats: one suitable for the toString method of the object and one suitable for transorming to other formats, such as xml. Another set of classes would handle the transformation to diffent formats. This would reduce the clutter in this class and be more flexible when changing string output formats across several classes. However such an appoach may be overkill.


toString

public java.lang.String toString()
over-ride the default Object class method.

Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Hosted by www.Geocities.ws

1