public class Library {
protected File baseDir;
protected boolean localSpeed;
+ protected Map<MetaData, File> stories;
- private Map<MetaData, File> stories;
private int lastId;
private OutputType text;
private OutputType image;
*
* @return the stories
*/
- public synchronized List<MetaData> getListByType(String type) {
- if (type != null) {
- // convert the type to dir name
- type = getExpectedDir(type).getName();
- }
-
+ public synchronized List<MetaData> getListBySource(String type) {
List<MetaData> list = new ArrayList<MetaData>();
- for (Entry<MetaData, File> entry : getStories(null).entrySet()) {
- String storyType = entry.getValue().getParentFile().getName();
+ for (MetaData meta : getStories(null).keySet()) {
+ String storyType = meta.getSource();
if (type == null || type.equalsIgnoreCase(storyType)) {
- list.add(entry.getKey());
+ list.add(meta);
}
}