class SeParameterFactory {

    public static StringParameter createStringParameter(JAXBElement<?> expr) throws InvalidStyle {
        if (expr == null){
            return null;
        }

        if (expr.getDeclaredType() == FormatNumberType.class) {
            return new Number2String((JAXBElement<FormatNumberType>) expr);
        } else if (expr.getDeclaredType() == String.class) {
            return new StringAttribute((JAXBElement<String>) expr);

        } else if (expr.getDeclaredType() == LiteralType.class) {
            return new StringLiteral((JAXBElement<LiteralType>) expr);

        } else if (expr.getDeclaredType() == net.opengis.se._2_0.core.CategorizeType.class) {
            return new Categorize2String((JAXBElement<CategorizeType>) expr);

        } else if (expr.getDeclaredType() == net.opengis.se._2_0.core.RecodeType.class) {
            return new Recode2String((JAXBElement<RecodeType>) expr);
        } else if (expr.getDeclaredType() == ConcatenateType.class){
            return new StringConcatenate((JAXBElement<ConcatenateType>) expr);
        }

        return null;

    }

    private  SeParameterFactory();

}