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;
18 * In order to have possibility of several different layouts per directory.
19 * Universal interface is defined.
21 * Layout implementation is responsible for actual HTML generation.
24 public interface Layout {
29 public void enlistDirectory(AbstractFile directory);
34 public void enlistFile(AbstractFile file);
39 public void enlistImage(AbstractFile picture);
42 * Enlist video in OGV format.
44 * @throws UnsupportedEncodingException
46 public void enlistOgv(AbstractFile file)
47 throws UnsupportedEncodingException;
50 * Return layout specific suffix that will be appended between
51 * index(suffix).html of generated file. This way multiple layouts can
52 * coexist in the same directory, each residing in its own HTML file.
54 public String getFileNameSuffix();
57 * After necessary files have been enlisted for particular directory, use
58 * this method to retrieve generated HTML result.
60 public String getHtml(final boolean showTitle,
61 final boolean doHtmlHeaderAndFooter);
64 * Initialize layout for particular directory.
66 public void init(String galleryTitle, List<String> path,
67 final AbstractIndexer indexer, IndexingContext context);