Use FFMpeg instead of Avconv
[meviz.git] / src / main / java / eu / svjatoslav / meviz / htmlindexer / Layout.java
1 /*
2  * Meviz - Various tools collection to work with multimedia.
3  * Copyright (C) 2012 -- 2019, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of version 3 of the GNU Lesser General Public License
7  * or later as published by the Free Software Foundation.
8 */
9
10 package eu.svjatoslav.meviz.htmlindexer;
11
12 import eu.svjatoslav.meviz.htmlindexer.metadata.DirectoryMetadata;
13 import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.AbstractFile;
14 import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.Picture;
15 import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.Video;
16
17 import java.util.List;
18
19 /**
20  * In order to have possibility of several different layouts per directory.
21  * Universal interface is defined.
22  * <p>
23  * Layout implementation is responsible for actual HTML generation.
24  */
25
26 public interface Layout {
27
28     /**
29      * Enlist directory.
30      */
31     void enlistDirectory(AbstractFile directory,
32                          DirectoryMetadata parentDirectoryMetadata);
33
34     /**
35      * Enlist simple file.
36      */
37     void enlistFile(AbstractFile file,
38                     DirectoryMetadata parentDirectoryMetadata);
39
40     /**
41      * Enlist image file.
42      */
43     void enlistImage(Picture picture,
44                      DirectoryMetadata parentDirectoryMetadata);
45
46     /**
47      * Enlist video file.
48      */
49     void enlistVideo(Video file);
50
51     /**
52      * Return layout specific suffix that will be appended between
53      * index(suffix).html of generated file. This way multiple layouts can
54      * coexist in the same directory, each residing in its own HTML file.
55      */
56     String getFileNameSuffix();
57
58     /**
59      * After necessary files have been enlisted for particular directory, use
60      * this method to retrieve generated HTML result.
61      */
62     String getHtml(final boolean showTitle,
63                    final boolean doHtmlHeaderAndFooter, DirectoryMetadata metadata)
64     ;
65
66     /**
67      * Initialize layout for particular directory.
68      */
69     void init(String galleryTitle, List<String> path,
70               final AbstractIndexer indexer, IndexingContext context);
71
72 }