/*
 * 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.refset.core.automap;

import static com.google.common.base.Preconditions.checkNotNull;

import java.io.Serializable;

import com.b2international.snowowl.snomed.snomedrefset.SnomedRefSetType;

/**
 * Represents automap target reference set type.
 * @since 3.1
 */
public abstract class AbstractAutomapRefsetType implements Serializable {

	private static final long serialVersionUID = 6854380124508640329L;

	private static final String SIMLE_MAP_HUMAN_READABLE = "Simple Map type Reference Set";
	private static final String COMPLEX_MAP_HUMAN_READABLE = "Complex Map type Reference Set";

	private SnomedRefSetType snomedRefSetType;
	
	public AbstractAutomapRefsetType(SnomedRefSetType refsetType) {
		this.snomedRefSetType = checkNotNull(refsetType, "SNOMED CT Reference Set type must be specified");
	}

	/**
	 * @return the unique ID of the automap target reference set type. Used to lookup {@link IAutomapService} by automap target type.
	 */
	public abstract String getId();

	/**
	 * @return the human readable form of the target reference set type.
	 */
	public abstract String getLabel();

	/**
	 * @return the human readable form of the <code>snomedRefSetType</code> field.
	 */
	protected String getHumanReadableRefSetType() {
		switch (snomedRefSetType) {
			case SIMPLE_MAP:
				return SIMLE_MAP_HUMAN_READABLE;
			case COMPLEX_MAP:
				return COMPLEX_MAP_HUMAN_READABLE;
			default:
				throw new IllegalArgumentException("Cannot get a human readable form for: " + snomedRefSetType);
		}
	}
	
	public SnomedRefSetType getSnomedRefSetType() {
		return snomedRefSetType;
	}
	
}
@@ -1135,25 +1135,25 @@
 %22Simple 
-M
+m
 ap type 
 Referenc
@@ -1136,33 +1136,33 @@
 Simple map type 
-R
+r
 eference Set%22;%0A%09
@@ -1150,25 +1150,25 @@
 e reference 
-S
+s
 et%22;%0A%09privat
@@ -1231,17 +1231,17 @@
 lex 
-M
+m
 ap type 
 Refe
@@ -1236,17 +1236,17 @@
 ap type 
-R
+r
 eference
@@ -1246,17 +1246,17 @@
 ference 
-S
+s
 et%22;%0A%0A%09p

Fix title of editor