/*
 * 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);

}

/*
 * 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, cannot be <code>null</code>
	 * @return a valid SNOMED CT identifier, never <code>null</code>
	 */
	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, cannot be <code>null</code>
	 * @param namespace
	 *            - the extension namespace to use when generating the ID, may be <code>null</code>
	 * @return a valid SNOMED CT identifier, never <code>null</code>
	 */
	String generateId(ComponentNature component, String namespace);

}

update javadoc of ISnomedIdentifierService