|
|||||||||
| Home >> All >> com >> fm >> [ rss overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.fm.rss
Class fsChannelStorage

java.lang.Objectcom.fm.rss.fsChannelStorage
- All Implemented Interfaces:
- ChannelStorage
- public class fsChannelStorage
- extends java.lang.Object
- implements ChannelStorage
- extends java.lang.Object
File system channel storage.
Storage will save/load its state to/from the well formed XML document stored in the file specified by DESTINATION parameter. Load operation accepts remote resources if they are specified by correct URI.
Complete format of the storage file may discovered from the FM DTD,
here is the only brief schema:
| Field Summary | |
private java.util.HashMap |
categories
|
private static java.lang.String |
DEFAULT_SOURCE_NAME
|
private java.util.HashMap |
params
|
| Fields inherited from interface com.fm.rss.ChannelStorage |
DESTINATION, OUTPUT_FILTER, SOURCE |
| Constructor Summary | |
fsChannelStorage()
Default constructor |
|
| Method Summary | |
java.util.Map |
getCategories()
Return list of the channel categories |
java.util.Map |
getChannels()
Returns plain list of the channel entries reqtreived from existing categories |
java.lang.Object |
getDefaultSource()
Return name of the default file from which data should be loaded |
java.lang.Object |
getParamValue(java.lang.String param)
Return value of the configuration param. |
void |
load()
Loads state of the storage from the source. |
void |
save()
Saves state of the storage to disk. |
void |
setCategories(java.util.Map newCats)
Set list of the existing categories to given value |
void |
setParamValue(java.lang.String param,
java.lang.Object value)
Set configuration param. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
params
private java.util.HashMap params
categories
private java.util.HashMap categories
DEFAULT_SOURCE_NAME
private static final java.lang.String DEFAULT_SOURCE_NAME
- See Also:
- Constant Field Values
| Constructor Detail |
fsChannelStorage
public fsChannelStorage()
- Default constructor
| Method Detail |
getCategories
public java.util.Map getCategories()
- Return list of the channel categories
- Specified by:
getCategoriesin interfaceChannelStorage
getChannels
public java.util.Map getChannels()
- Returns plain list of the channel entries reqtreived from existing
categories
setCategories
public void setCategories(java.util.Map newCats)
- Set list of the existing categories to given value
- Specified by:
setCategoriesin interfaceChannelStorage
save
public void save()
throws java.io.IOException
- Saves state of the storage to disk.
The destination file must be specified using
setParamValue(), withChannelStorage.DESTINATIONas a parameter name.- Specified by:
savein interfaceChannelStorage
load
public void load()
throws java.io.IOException,
rssParseException
- Loads state of the storage from the source.
The source file(resource) must be specified using
setParamValue(), withChannelStorage.SOURCEas a parameter name. Note that for load operation the source may be a remote resource specified by URI as well.- Specified by:
loadin interfaceChannelStorage
setParamValue
public void setParamValue(java.lang.String param, java.lang.Object value)
- Set configuration param.
All unrecognized params are ignored.
- Specified by:
setParamValuein interfaceChannelStorage
getParamValue
public java.lang.Object getParamValue(java.lang.String param)
- Return value of the configuration param.
The
nullwill be returned if specified param doesn't exist.- Specified by:
getParamValuein interfaceChannelStorage
getDefaultSource
public java.lang.Object getDefaultSource()
- Return name of the default file from which data should be loaded
- Specified by:
getDefaultSourcein interfaceChannelStorage
|
|||||||||
| Home >> All >> com >> fm >> [ rss overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.fm.rss.fsChannelStorage