Examples of ListDataType


Examples of gri.data.ListDataType

   
    public static class AllTextWidgetFactory implements TypedWidgetFactory {
        public Widget createWidget(DataType type) {
            //list:
            if (type instanceof ListDataType) {
                ListDataType listType = (ListDataType)type;
                if (type.getRepresentationClass().isAssignableFrom(List.class)) {
                    DataType memberType = listType.getMemberType();
                    WidgetFactory memberWidgetFactory = new TypedWidgetFactoryWrapper(this, memberType);
                   
                    Widget widget = new WidgetList(memberWidgetFactory);
                    return widget;
                }
View Full Code Here

Examples of gri.data.ListDataType

    public void writeDataType(DataType type, Element elem) {
        elem.setAttribute("content", type.getContentType());
       
        //append memberType element for list data types:
        if (type instanceof ListDataType) {
            ListDataType listType = (ListDataType)type;
           
            Element memberTypeElem = new Element("memberType");
            writeDataType(listType.getMemberType(), memberTypeElem);
           
            elem.addContent(memberTypeElem);
        }
    }
View Full Code Here

Examples of gri.data.ListDataType

        String contentType = elem.getAttributeValue("content");
       
        if (contentType.equals(ListDataType.LIST_CONTENT)) {
            Element memberTypeElem = elem.getChild("memberType");
            DataType memberType = readDataType(memberTypeElem);
            return new ListDataType(List.class, memberType);
        }
        else    
            return typeMapping.getDefaultTypeForContent(contentType);
       
    }
View Full Code Here

Examples of org.drools.process.core.datatype.impl.type.ListDataType

        person.setName("John");
        variable.setValue(person);
        variables.add(variable);       
        variable = new Variable();
        variable.setName("variable4");
        ListDataType listDataType = new ListDataType();
        listDataType.setType(new ObjectDataType("java.lang.Integer"));
        variable.setType(listDataType);
        List<Integer> list = new ArrayList<Integer>();
        list.add(10);
        list.add(20);
        variable.setValue(list);
View Full Code Here

Examples of org.drools.process.core.datatype.impl.type.ListDataType

        process.setName("ForEach Process");
       
        List<Variable> variables = new ArrayList<Variable>();
        Variable variable = new Variable();
        variable.setName("persons");
        ListDataType listDataType = new ListDataType();
        ObjectDataType personDataType = new ObjectDataType();
        personDataType.setClassName("org.drools.Person");
        listDataType.setType(personDataType);
        variable.setType(listDataType);
        variables.add(variable);
        process.getVariableScope().setVariables(variables);
       
        StartNode startNode = new StartNode();
View Full Code Here

Examples of org.drools.process.core.datatype.impl.type.ListDataType

        process.setName("ForEach Process");
       
        List<Variable> variables = new ArrayList<Variable>();
        Variable variable = new Variable();
        variable.setName("persons");
        ListDataType listDataType = new ListDataType();
        ObjectDataType personDataType = new ObjectDataType();
        personDataType.setClassName("org.drools.Person");
        listDataType.setType(personDataType);
        variable.setType(listDataType);
        variables.add(variable);
        process.getVariableScope().setVariables(variables);
       
        StartNode startNode = new StartNode();
View Full Code Here

Examples of org.drools.process.core.datatype.impl.type.ListDataType

        person.setName("John");
        variable.setValue(person);
        variables.add(variable);       
        variable = new Variable();
        variable.setName("variable4");
        ListDataType listDataType = new ListDataType();
        listDataType.setType(new ObjectDataType("java.lang.Integer"));
        variable.setType(listDataType);
        List<Integer> list = new ArrayList<Integer>();
        list.add(10);
        list.add(20);
        variable.setValue(list);
View Full Code Here

Examples of org.drools.process.core.datatype.impl.type.ListDataType

        person.setName("John");
        variable.setValue(person);
        variables.add(variable);       
        variable = new Variable();
        variable.setName("variable4");
        ListDataType listDataType = new ListDataType();
        listDataType.setType(new ObjectDataType("java.lang.Integer"));
        variable.setType(listDataType);
        List<Integer> list = new ArrayList<Integer>();
        list.add(10);
        list.add(20);
        variable.setValue(list);
View Full Code Here

Examples of org.drools.process.core.datatype.impl.type.ListDataType

        process.setName("ForEach Process");
       
        List<Variable> variables = new ArrayList<Variable>();
        Variable variable = new Variable();
        variable.setName("persons");
        ListDataType listDataType = new ListDataType();
        ObjectDataType personDataType = new ObjectDataType();
        personDataType.setClassName("org.drools.Person");
        listDataType.setType(personDataType);
        variable.setType(listDataType);
        variables.add(variable);
        process.getVariableScope().setVariables(variables);
       
        StartNode startNode = new StartNode();
View Full Code Here

Examples of org.drools.process.core.datatype.impl.type.ListDataType

        person.setName("John");
        variable.setValue(person);
        variables.add(variable);       
        variable = new Variable();
        variable.setName("variable4");
        ListDataType listDataType = new ListDataType();
        listDataType.setType(new ObjectDataType("java.lang.Integer"));
        variable.setType(listDataType);
        List<Integer> list = new ArrayList<Integer>();
        list.add(10);
        list.add(20);
        variable.setValue(list);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.