Package org.geotools.validation.dto

Examples of org.geotools.validation.dto.ArgumentDTO


                } else {
                    Map m = new HashMap();
                    Iterator k = testArgs.keySet().iterator();

                    while (k.hasNext()) {
                        ArgumentDTO adto = (ArgumentDTO) testArgs.get(k.next());
                        m.put(adto.getName(), adto.getValue());
                    }

                    testArgs = m;
                }
View Full Code Here


                } else {
                    Map m = new HashMap();
                    Iterator k = testArgs.keySet().iterator();

                    while (k.hasNext()) {
                        ArgumentDTO adto = (ArgumentDTO) testArgs.get(k.next());
                        m.put(adto.getName(), adto.getValue());
                    }

                    testArgs = m;
                }
View Full Code Here

                dto.setArgs(m);

                for (int i = 0; i < nl.getLength(); i++) {
                    elem = (Element) nl.item(i);

                    ArgumentDTO adto = null;

                    try {
                        adto = loadArg(elem, dto);
                    } catch (ValidationException e) {
                        e.printStackTrace();

                        // error
                    }

                    m.put(adto.getName(), adto);
                }
            }
        } catch (IOException ioe) {
            throw new ValidationException("Cannot parse the inputSource: Cannot configure the parser.",
                ioe);
View Full Code Here

            dto.setArgs(m);

            for (int i = 0; i < nl.getLength(); i++) {
                elem = (Element) nl.item(i);

                ArgumentDTO adto = null;

                try {
                    adto = loadArg(elem, dto.getPlugIn());
                } catch (ValidationException e) {
                    e.printStackTrace();

                    // error
                }

                if ((adto == null) || !adto.isFinal()) {
                    m.put(adto.getName(), adto);
                }
            }
        }

        return dto;
View Full Code Here

        if (value == null) {
            throw new ValidationException("Invalid Argument \"" + dto.getName()
                + "\" for argument \"" + key + "\"");
        }

        ArgumentDTO adto = (ArgumentDTO) dto.getArgs().get(key);

        // elem whould have the value now
        Object val = ArgHelper.getArgumentInstance(value.getTagName().trim(),
                value);

        if (val == null) {
            throw new ValidationException(
                "Didn't find a real value for argument " + key);
        }

        if (adto == null) {
            adto = new ArgumentDTO();
        } else {
            adto = (ArgumentDTO) adto.clone();
        }

        adto.setName(key);
        adto.setValue(val);
        adto.setFinal(_fixed);

        return adto;
    }
View Full Code Here

                } else {
                    Map m = new HashMap();
                    Iterator k = testArgs.keySet().iterator();

                    while (k.hasNext()) {
                        ArgumentDTO adto = (ArgumentDTO) testArgs.get(k.next());
                        m.put(adto.getName(), adto.getValue());
                    }

                    testArgs = m;
                }
View Full Code Here

        return r;
    }

    public ArgumentDTO toDTO() {
        ArgumentDTO dto = new ArgumentDTO();
        dto.setFinal(_final);
        dto.setName(name);
        dto.setValue(value);

        return dto;
    }
View Full Code Here

                } else {
                    Map m = new HashMap();
                    Iterator k = testArgs.keySet().iterator();

                    while (k.hasNext()) {
                        ArgumentDTO adto = (ArgumentDTO) testArgs.get(k.next());
                        m.put(adto.getName(), adto.getValue());
                    }

                    testArgs = m;
                }
View Full Code Here

        return r;
    }

    public ArgumentDTO toDTO() {
        ArgumentDTO dto = new ArgumentDTO();
        dto.setFinal(_final);
        dto.setName(name);
        dto.setValue(value);

        return dto;
    }
View Full Code Here

          testArgs = new HashMap();
        }else{
          Map m = new HashMap();
          Iterator k = testArgs.keySet().iterator();
          while(k.hasNext()){
            ArgumentDTO adto = (ArgumentDTO)testArgs.get(k.next());
            m.put(adto.getName(),adto.getValue());
          }
          testArgs = m;
        }

        try {
View Full Code Here

TOP

Related Classes of org.geotools.validation.dto.ArgumentDTO

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.