001 /**
002 *
003 * $Revision: 13085 $ $Date: 2008-02-06 18:27:24 +0100 (Mi, 06 Feb 2008) $
004 *
005 * This file is part of ** M y C o R e **
006 * Visit our homepage at http://www.mycore.de/ for details.
007 *
008 * This program is free software; you can use it, redistribute it
009 * and / or modify it under the terms of the GNU General Public License
010 * (GPL) as published by the Free Software Foundation; either version 2
011 * of the License or (at your option) any later version.
012 *
013 * This program is distributed in the hope that it will be useful, but
014 * WITHOUT ANY WARRANTY; without even the implied warranty of
015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
016 * GNU General Public License for more details.
017 *
018 * You should have received a copy of the GNU General Public License
019 * along with this program, normally in the file license.txt.
020 * If not, write to the Free Software Foundation Inc.,
021 * 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
022 *
023 **/
024 package org.mycore.services.urn;
025
026 /**
027 * Implementations of this interface provide different strategies to generate a
028 * NISS (namespace specific string) for a new URN. Each subnamespace
029 * configuration can have its own instance. A NISS must be a unique ID within
030 * the subnamespace.
031 *
032 * MCR.URN.SubNamespace.[ConfigID].NISSBuilder=[Class], for example
033 * MCR.URN.SubNamespace.Essen.NISSBuilder=org.mycore.services.urn.MCRNISSBuilderDateCounter
034 *
035 * @author Frank Lützenkirchen
036 */
037 public interface MCRNISSBuilder {
038 /**
039 * Initializes this instance of a MCRNISSBuilder. This method is only called
040 * once for each instance before this builder is used.
041 *
042 * @param configID
043 * the ID of a subnamespace configuration in mycore.properties
044 */
045 public void init(String configID);
046
047 /**
048 * Builds a new NISS. No MCRNISSBuilder object must generate the same NISS
049 * twice, they must ensure the NISS is unique.
050 */
051 public String buildNISS();
052 }