|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectRecord
This class represents a data record of information about
a language sound file. The record contains information such as
the transcription of the words which are contained in the language
sound file. This transcription could be in a 'native' alphabet or
writing system as well as in other more widespread writing systems
such as the latin alplhabet. The record will also contain,
preferably, translations of the transcription into any number of
languages. The record may also contain cognates or a set of
cognate objects which will give information about words in other
languages which are derived from this word, have a common ancestor
as this word, or are the source of this word.
If the record does not contain some parts of this information it
doesnt really matter, but the record should contain at the very least
information to locate a sound resource on the internet.
This class is used by the DownloadManager class and also the
SoundDownload class in order to go about the business of actually
obtaining the sound resource. One design pattern idea would be to
make this class implement and 'data record' interface which would
consist just of one method, such as 'getDownloadableResourceIndicator'
although that is a mouthful. The idea of this interface would be to
allow the DownloadManager class to be able to work with different
sorts of data records and different types of resources (not just
sound resourced). The DownloadManager class should not really have
to worry about what sort of resource it is trying to get. Its job
is just to manage the getting process.
One possible format for the data file in text format is
= sound-url=http://www.somewhere.com/dir/sound.mp3 ts=marhaba fi tanger tr=[en]welcome to tanger tr=[fr]bienvenue a tanger cognates= =
| Constructor Summary | |
Record(java.lang.String dataString)
Create a new Record object by parsing a string containing data. |
|
| Method Summary | |
java.lang.String |
debug()
provides a string which is informative about the internal state of the object |
java.lang.String |
getSoundUrl()
|
static void |
main(java.lang.String[] args)
This method is just for testing. |
void |
parseDataString(java.lang.String sDataString)
populate internal data fields by parsing a string containin information about a sound file and its language content. |
java.lang.String |
print()
|
java.lang.String |
toString()
overrides the default Object toString method |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Record(java.lang.String dataString)
| Method Detail |
public void parseDataString(java.lang.String sDataString)
sDataString - string to parsepublic java.lang.String getSoundUrl()
public java.lang.String print()
public java.lang.String toString()
public java.lang.String debug()
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||