1 /* 2 * This file is part of *** M y C o R e *** 3 * See http://www.mycore.de/ for details. 4 * 5 * MyCoRe is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * MyCoRe is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with MyCoRe. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 package org.mycore.datamodel.metadata.validator; 20 21 import org.jdom2.Element; 22 23 /** 24 * Validates the output of the Editor framework. 25 * Implementors have to be thread safe. 26 * @author Thomas Scheffler (yagee) 27 * @version $Revision: 1 $ $Date: 08.05.2009 11:51:35 $ 28 */ 29 public interface MCREditorMetadataValidator { 30 31 /** 32 * Gives hints to the editor form developer. 33 * 34 * If an element is not valid it is removed from the JDOM document. 35 * The returned String then can give a hint to the form developer, why it is removed. 36 * This method may throw a {@link RuntimeException} in which case the whole validation process will fail. 37 * @return 38 * null, everything is OK 39 * validation error message 40 */ 41 String checkDataSubTag(Element datasubtag); 42 }