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;
14 import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.AbstractFile;
17 * In order to have possibility of several different layouts per directory.
18 * Universal interface is defined.
20 * Layout implementation is responsible for actual HTML generation.
23 public interface Layout {
28 public void enlistDirectory(AbstractFile directory);
33 public void enlistFile(AbstractFile file);
38 public void enlistImage(AbstractFile picture);
41 * Enlist video in OGV format.
43 * @throws UnsupportedEncodingException
45 public void enlistOgv(AbstractFile file)
46 throws UnsupportedEncodingException;
49 * Return layout specific suffix that will be appended between
50 * index(suffix).html of generated file. This way multiple layouts can
51 * coexist in the same directory, each residing in its own HTML file.
53 public String getFileNameSuffix();
56 * After necessary files have been enlisted for particular directory, use
57 * this method to retrieve generated HTML result.
59 public String getHtml();
62 * Initialize layout for particular directory.
64 public void init(String galleryTitle, String[] path,
65 final AbstractIndexer indexer, final String pathPrefix);