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

import org.snomed.langauges.ecl.ECLObjectFactory;
import org.snomed.langauges.ecl.domain.expressionconstraint.CompoundExpressionConstraint;
import org.snomed.langauges.ecl.domain.expressionconstraint.DottedExpressionConstraint;
import org.snomed.langauges.ecl.domain.expressionconstraint.RefinedExpressionConstraint;
import org.snomed.langauges.ecl.domain.expressionconstraint.SubExpressionConstraint;
import org.snomed.langauges.ecl.domain.filter.*;
import org.snomed.langauges.ecl.domain.refinement.*;
import in.cdac.medinfo.csnotk.csnolib.ecl.constraint.*;

import in.cdac.medinfo.csnotk.csnolib.ecl.util.throwEclFeatureNotSupportedException;

public class SECLObjectFactory extends ECLObjectFactory {

    @Override
    protected SubExpressionConstraint getSubExpressionConstraint(Operator operator) {
        return new SSubExpressionConstraint(operator);
    }

    @Override
    protected CompoundExpressionConstraint getCompoundExpressionConstraint() {
        return new SCompoundExpressionConstraint();
    }

    @Override
    protected RefinedExpressionConstraint getRefinedExpressionConstraint(SubExpressionConstraint subExpressionConstraint, EclRefinement eclRefinement) {
        return new SRefinedExpressionConstraint(subExpressionConstraint, eclRefinement);
    }

    @Override
    protected EclRefinement getRefinement() {
        return new SEclRefinement();
    }

    @Override
    protected SubRefinement getSubRefinement() {
        return new SSubRefinement();
    }

    @Override
    protected EclAttributeSet getEclAttributeSet() {
        return new SEclAttributeSet();
    }

    @Override
    protected SubAttributeSet getSubAttributeSet() {
        return new SSubAttributeSet();
    }

    @Override
    protected EclAttributeGroup getAttributeGroup() {
        throw new throwEclFeatureNotSupportedException("Attribute group");
    }

    @Override
    protected EclAttribute getAttribute() {
        return new SEclAttribute();
    }

    @Override
    protected DottedExpressionConstraint getDottedExpressionConstraint(SubExpressionConstraint subExpressionConstraint) {
        throw new throwEclFeatureNotSupportedException("Dotted expression constraint");
    }

    @Override
    public HistorySupplement getHistorySupplement() {
        return super.getHistorySupplement();
    }

    @Override
    public ConceptFilterConstraint getConceptFilterConstraint() {
        throw new throwEclFeatureNotSupportedException("Concept filter");
    }

    @Override
    public DescriptionFilterConstraint getDescriptionFilterConstraint() {
        throw new throwEclFeatureNotSupportedException("Description filter");
    }

    @Override
    public MemberFilterConstraint getMemberFilterConstraint() {
        throw new throwEclFeatureNotSupportedException("Member filter");
    }

    @Override
    public MemberFieldFilter getMemberFieldFilter(String fieldName) {
        throw new throwEclFeatureNotSupportedException("Member field filter");
    }

    @Override
    public FieldFilter getFieldFilter(String fieldName, boolean equals) {
        return super.getFieldFilter(fieldName, equals);
    }


}
