Package org.maltparserx.core.options.option

Examples of org.maltparserx.core.options.option.StringEnumOption


              cop.setDefaultValue(defaultValue);
              og.addOption(cop);
            }
          } else if (optiontype.equals("stringenum") ) {
            Option op = og.getOption(optionname);
            StringEnumOption ueop = null;
          if (op == null) {
            ueop = new StringEnumOption(og, optionname, shortdesctext, flag, usage);
          } else {
            if (op instanceof StringEnumOption) {
              ueop = (StringEnumOption)op;
            }
          }
         
            NodeList legalvalues = option.getElementsByTagName("legalvalue");
            Element legalvalue;
            for (int j = 0; j < legalvalues.getLength(); j++) {
              legalvalue = (Element)legalvalues.item(j);
              String legalvaluename = legalvalue.getAttribute("name").toLowerCase();
              String url = legalvalue.getAttribute("mapto");
              String legalvaluetext = legalvalue.getTextContent();
              ueop.addLegalValue(legalvaluename, legalvaluetext, url);
            }
            if (op == null) {
              ueop.setDefaultValue(defaultValue);
              og.addOption(ueop);
           
          } else {
            throw new OptionException("Illegal option type found in the setting file. ");
          }
View Full Code Here

TOP

Related Classes of org.maltparserx.core.options.option.StringEnumOption

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.