Package com.lyncode.xoai.dataprovider.xml.xoaiconfig.parameters

Examples of com.lyncode.xoai.dataprovider.xml.xoaiconfig.parameters.ParameterValue


        this.configuration = configuration;
    }

    private List<String> getFields() {
        if (this.fields == null) {
            ParameterValue fields = getConfiguration().get("fields");
            if (fields == null) fields = getConfiguration().get("field");

            if (fields instanceof SimpleType) {
                this.fields = new ArrayList<String>();
                this.fields.add(((SimpleType) fields).asString());
            } else {
                this.fields = new ArrayList<String>();
                for (ParameterValue val : fields.asParameterList().getValues())
                    this.fields.add(val.asSimpleType().asString());
            }

        }
        return fields;
View Full Code Here


        return field;
    }

    private List<String> getValues() {
        if (values == null) {
            ParameterValue parameterValue = getConfiguration().get("value");
            if (parameterValue == null) parameterValue = getConfiguration().get("values");

            if (parameterValue instanceof SimpleType) {
                values = new ArrayList<String>();
                values.add(((SimpleType) parameterValue).asString());
            } else if (parameterValue instanceof ParameterList) {
                values = new ListBuilder<ParameterValue>()
                        .add(parameterValue.asParameterList().getValues())
                        .build(new Function<ParameterValue, String>() {
                            @Override
                            public String apply(ParameterValue elem) {
                                return elem.asSimpleType().asString();
                            }
View Full Code Here

TOP

Related Classes of com.lyncode.xoai.dataprovider.xml.xoaiconfig.parameters.ParameterValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.