Filter.java |
1 /** 2 * Distribution License: 3 * JSword is free software; you can redistribute it and/or modify it under 4 * the terms of the GNU Lesser General Public License, version 2.1 or later 5 * as published by the Free Software Foundation. This program is distributed 6 * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 7 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8 * See the GNU Lesser General Public License for more details. 9 * 10 * The License is available on the internet at: 11 * http://www.gnu.org/copyleft/lgpl.html 12 * or by writing to: 13 * Free Software Foundation, Inc. 14 * 59 Temple Place - Suite 330 15 * Boston, MA 02111-1307, USA 16 * 17 * Copyright: 2005-2013 18 * The copyright to this program is held by its authors. 19 * 20 */ 21 package org.crosswire.jsword.book.filter; 22 23 import java.util.List; 24 25 import org.crosswire.jsword.book.Book; 26 import org.crosswire.jsword.passage.Key; 27 import org.jdom2.Content; 28 29 /** 30 * A generic interface for things that can convert a String into OSIS data. 31 * 32 * @see gnu.lgpl.License The GNU Lesser General Public License for details. 33 * @author Joe Walker 34 */ 35 public interface Filter extends Cloneable { 36 /** 37 * Converter from plain (encoded) text to OSIS data 38 * 39 * @param book the book 40 * @param key 41 * The key for the text 42 * @param plain 43 * The encoded text 44 * @return a List of OSIS Elements 45 */ 46 List<Content> toOSIS(Book book, Key key, String plain); 47 48 /** 49 * This needs to be declared here so that it is visible as a method on a 50 * derived Filter. 51 * 52 * @return A complete copy of ourselves 53 */ 54 Filter clone(); 55 } 56