2 * Meviz - Various tools collection to work with multimedia.
3 * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public License
7 * as published by the Free Software Foundation.
10 package eu.svjatoslav.meviz.htmlindexer;
12 import java.io.UnsupportedEncodingException;
13 import java.util.List;
15 import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.AbstractFile;
16 import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.Picture;
19 * In order to have possibility of several different layouts per directory.
20 * Universal interface is defined.
22 * Layout implementation is responsible for actual HTML generation.
25 public interface Layout {
30 public void enlistDirectory(AbstractFile directory);
35 public void enlistFile(AbstractFile file);
40 public void enlistImage(Picture picture);
43 * Enlist video in OGV format.
45 * @throws UnsupportedEncodingException
47 public void enlistOgv(AbstractFile file)
48 throws UnsupportedEncodingException;
51 * Return layout specific suffix that will be appended between
52 * index(suffix).html of generated file. This way multiple layouts can
53 * coexist in the same directory, each residing in its own HTML file.
55 public String getFileNameSuffix();
58 * After necessary files have been enlisted for particular directory, use
59 * this method to retrieve generated HTML result.
61 public String getHtml(final boolean showTitle,
62 final boolean doHtmlHeaderAndFooter);
65 * Initialize layout for particular directory.
67 public void init(String galleryTitle, List<String> path,
68 final AbstractIndexer indexer, IndexingContext context);