|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
API for StandardModel.
This API is fully synchronized and thread-safe.
| Field Summary | |
static StringID |
CURRENT_XML_FORMAT_CODE
The format code given to new song databases created by this factory. |
| Method Summary | |
SongDatabase |
createSimpleSongDatabase()
Create a simple SongDatabase implementation. |
Song |
createSong(SongID id,
Locale locale)
Create a standard Song implementation. |
SongIDResultSet |
createSongIDResultSet(SongDatabase database)
Create a standard SongIDResultSet implementation. |
StringID |
getDatabaseXMLFormatCode(SongDatabase database)
Return the format code for the given simple SongDatabase. |
StringID |
getSongVersion(Song song)
Get the version string for the given Song. |
StringID |
getSongXMLFormatCode(Song song)
Return the format code for the given standard model Song. |
boolean |
isSimpleSongDatabase(SongDatabase database)
Returns true if the given Song is a simple implementation of SongDatabase. |
boolean |
isStandardModelSong(Song song)
Returns true if the given Song is a StandardModel implementation of Song. |
SongDatabase |
parseSimpleSongDatabase(Reader reader,
ErrorHandler errorHandler,
boolean writable)
Parse a simple SongDatabase from the given XML document. |
Song |
parseSong(Reader reader,
SongID id,
ErrorHandler errorHandler)
Parse a Song from the given XML document. |
void |
setSongVersion(Song song,
StringID version)
Set the version string for the given Song. |
void |
unparseSimpleSongDatabase(SongDatabase database,
OutputStream stream,
String encodingName)
Unparse the given SongDatabase to an OutputStream as a standalone XML file. |
void |
unparseSimpleSongDatabase(SongDatabase database,
Writer writer,
String encodingName)
Unparse the given SongDatabase to an OutputStream as a standalone XML file. |
void |
unparseSong(Song song,
OutputStream stream,
String encodingName)
Unparse the given Song to an OutputStream as a standalone XML file. |
void |
unparseSong(Song song,
Writer writer,
String encodingName)
Unparse the given Song to an OutputStream as a standalone XML file. |
void |
unparseSongElement(Song song,
XMLUnparser unparser)
Unparse the given Song to an OutputStream as an element within a larger XML document. |
| Field Detail |
public static final StringID CURRENT_XML_FORMAT_CODE
| Method Detail |
public SongIDResultSet createSongIDResultSet(SongDatabase database)
database - database that owns the result set
public Song createSong(SongID id,
Locale locale)
id - SongID for the song, or null to create a standalone songlocale - Locale for the song, or null to use the default locale
public Song parseSong(Reader reader,
SongID id,
ErrorHandler errorHandler)
throws IOException,
SAXException
reader - Reader to parse fromid - SongID for the song, or null to parse a standalone songerrorHandler - handler for error messages
IOException - fatal i/o error
SAXException - fatal parse errorpublic boolean isStandardModelSong(Song song)
song - Song to test
public void unparseSong(Song song,
OutputStream stream,
String encodingName)
throws IOException
song - Song to unparsestream - OutputStream to write toencodingName - character encoding being used
IOException - i/o error
IllegalArgumentException - the song isn't a StandardModel song
public void unparseSong(Song song,
Writer writer,
String encodingName)
throws IOException
song - Song to unparsewriter - Writer to write toencodingName - character encoding being used
IOException - i/o error
IllegalArgumentException - the song isn't a StandardModel song
public void unparseSongElement(Song song,
XMLUnparser unparser)
throws IOException
song - Song to unparseunparser - XMLUnparser to use
IOException - i/o error
IllegalArgumentException - the song isn't a StandardModel songpublic StringID getSongXMLFormatCode(Song song)
song - Song to query
IllegalArgumentException - the song isn't a standardmodel Songpublic StringID getSongVersion(Song song)
song - Song to query
IllegalArgumentException - the song isn't a StandardModel song
public void setSongVersion(Song song,
StringID version)
song - Song to queryversion - version string
IllegalArgumentException - the song isn't a StandardModel songpublic SongDatabase createSimpleSongDatabase()
public SongDatabase parseSimpleSongDatabase(Reader reader,
ErrorHandler errorHandler,
boolean writable)
throws IOException,
SAXException
reader - Reader to parse fromerrorHandler - handler for error messageswritable - should the database be writable
IOException - fatal i/o error
SAXException - fatal parse errorpublic boolean isSimpleSongDatabase(SongDatabase database)
database - SongDatabase to test
public StringID getDatabaseXMLFormatCode(SongDatabase database)
database - SongDatabase to query
IllegalArgumentException - the database isn't a simple SongDatabase
public void unparseSimpleSongDatabase(SongDatabase database,
OutputStream stream,
String encodingName)
throws IOException
database - SongDatabase to unparsestream - OutputStream to write toencodingName - character encoding being used
IOException - i/o error
IllegalArgumentException - the song isn't a simple SongDatabase
public void unparseSimpleSongDatabase(SongDatabase database,
Writer writer,
String encodingName)
throws IOException
database - SongDatabase to unparsewriter - Writer to write toencodingName - character encoding being used
IOException - i/o error
IllegalArgumentException - the song isn't a simple SongDatabase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||