/*
 * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.b2international.snowowl.snomed.datastore.id;

import com.b2international.snowowl.snomed.datastore.ComponentNature;

/**
 * SNOMED CT Identifier service interface. It is capable of generating valid SNOMED CT Identifiers according to the Technical Implementation Guide.
 * 
 * IDs are generated by defining the {@link ComponentNature} (the component type we need ID for), and an optional namespace parameter. The returned
 * SNOMED CT ID will have a valid check-digit, partition-identifier, and the optional namespace identifier.
 * 
 * @since 4.0
 * @see www.snomed.org/tig?t=trg_app_sctid
 */
public interface ISnomedIdentifierService {

	/**
	 * Generates a single SNOMED CT ID for the defined {@link ComponentNature} without extension namespace.
	 * 
	 * @param component
	 *            - the component type to generate ID for
	 * @return a valid SNOMED CT identifier
	 */
	String generateId(ComponentNature component);

	/**
	 * Generates a single SNOMED CT ID for the defined {@link ComponentNature} with the defined extension namespace.
	 * 
	 * @param component
	 *            - the component type to generate ID for
	 * @param namespace
	 *            - the extension namespace to use when generating the ID
	 * @return a valid SNOMED CT identifier
	 */
	String generateId(ComponentNature component, String namespace);

}

@@ -1491,24 +1491,53 @@
 erate ID for
+, cannot be %3Ccode%3Enull%3C/code%3E
 %0D%0A%09 * @retur
@@ -1558,32 +1558,57 @@
 ED CT identifier
+, never %3Ccode%3Enull%3C/code%3E
 %0D%0A%09 */%0D%0A%09String 
@@ -1852,16 +1852,45 @@
 e ID for
+, cannot be %3Ccode%3Enull%3C/code%3E
 %0D%0A%09 * @p
@@ -1975,16 +1975,42 @@
 g the ID
+, may be %3Ccode%3Enull%3C/code%3E
 %0D%0A%09 * @r
@@ -2043,16 +2043,41 @@
 entifier
+, never %3Ccode%3Enull%3C/code%3E
 %0D%0A%09 */%0D%0A

update javadoc of ISnomedIdentifierService