/* * [DglossCustomiser.java] * * Summary: Search Darwin glossary for DT anchors and terms. * * Copyright: (c) 2007-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.0 2012-06-24 initial version. */ package com.mindprod.qf; import static com.mindprod.htmlmacros.macro.Global.configuration; /** * Search Darwin glossary for DT anchors and terms. * * @author Roedy Green, Canadian Mind Products * @version 1.0 2012-06-24 initial version. * @since 2012-06-24 */ public final class DglossCustomiser extends AbstractGlossCustomiser { /** * directory where we put the generated indexes. */ private static final String includeDirName; /** * directory where the files to scan are kept */ private static final String inputDirName; /** * root directory of website */ private static final String webrootDirname; static { // combine dirsWithMacros and dirsWithIncludes into dirsToProcess; webrootDirname = configuration.getLocalWebrootWithSlashes(); includeDirName = webrootDirname + "/religion/include/"; inputDirName = webrootDirname + "/religion/"; } /** * base name of glossary used to build other names. * * @return name of glossary */ public String getBaseName() { return "dgloss"; } /** * estimate of how many entries in the index. Will be a bit larger than the number of files. * * @return estimated number of index entries in this glossary */ public int getEstimatedIndexEntries() { return ( 100 ); } /** * get glossary enum associated with this embellisher * * @return glossary */ public Gloss getGlossEnum() { return Gloss.DGLOSS; } /** * directory where we put the generated indexes. Also where embellishments live * * @return directory when output files go files are, WITH TRAILING /. */ public String getIncludeDirName() { return includeDirName; } /** * Get directory where input files are, * * @return directory when input files are, with trailing /. */ public String getInputDirName() { return inputDirName; } /** * Get unqualified name of the next input file when scanning for anchors/terms. * Parse just one file. * * @return unqualified filename. Watch \ which must be doubled in Java Strings. Indicates has no more files to * process either by repeating the last filename, or by returning null. */ public String getNextInFilename() { return "dgloss.html"; } } // end DglossCustomiser