package in.cdac.medinfo.csnotk.csnolib.ecl.constraint;

import org.snomed.langauges.ecl.domain.refinement.SubRefinement;

//Changes
import in.cdac.medinfo.csnotk.csnolib.model.Concept;
import java.util.Set;

public class SSubRefinement extends SubRefinement implements SConstraint {

	@Override
	public Set<Concept> addQuery() {
		if (getEclRefinement() != null) {
			return getEclRefinement().addQuery();
		} else {
			return getEclAttributeSet().addQuery();
		}
	}

	@Override
	public SEclRefinement getEclRefinement() {
		return (SEclRefinement) super.getEclRefinement();
	}

	@Override
	public SEclAttributeSet getEclAttributeSet() {
		return (SEclAttributeSet) super.getEclAttributeSet();
	}

	@Override
	public Set<String> getConceptIds() {
		if (eclAttributeSet != null) {
			return ((SEclAttributeSet) eclAttributeSet).getConceptIds();
		} else {
			return ((SEclRefinement) eclRefinement).getConceptIds();
		}
	}
}
