Examples of OptionList


Examples of com.hlcl.rql.as.OptionList

    sourcePage.copyMediaValueTo("sourceTemplateElementName", targetMediaElement);
   
    // option list
    targetPage.copyOptionListValueFrom("templateElementName", sourcePage);
    sourcePage.copyOptionListValueTo("templateElementName", targetPage);
    OptionList targetOptionList = targetPage.getOptionList("listTemplateElementName");
    sourcePage.copyOptionListValueTo("sourceTemplateElementName", targetOptionList);
   
    // standard field date
    targetPage.copyStandardFieldDateValueFrom("templateElementName", sourcePage);
    sourcePage.copyStandardFieldDateValueTo("templateElementName", targetPage);
View Full Code Here

Examples of net.sourceforge.processdash.ui.OptionList

        DataRepository data = getDataRepository();
        if (data == null) return;

        TreeSet s = new TreeSet(DataComboBox.getAllDataNames(data));
        s.add("");
        OptionList opt = new OptionList(s);
        String html = opt.getAsHTML(BIZZARE_NAME);
        int pos = html.indexOf(BIZZARE_NAME);
        initialPart = html.substring(0, pos);
        finalPart = html.substring(pos+BIZZARE_NAME.length());
    }
View Full Code Here

Examples of net.sourceforge.processdash.ui.OptionList

    public DefaultTypeSelector(BoundMap map, Element xml) {
        this.form = (DefectImportForm) map;

        DefectTypeStandard dts = DefectTypeStandard.get(form.getSelectedPath(),
                form.getDashContext().getData());
        OptionList ol = new OptionList(dts);

        ol.options.insertElementAt(Defect.UNSPECIFIED, 0);

        if (ol.translations != null)
            ol.translations.put(Defect.UNSPECIFIED, Translator
                    .translate(Defect.UNSPECIFIED));

        if (ol.comments != null)
            ol.comments.put(Defect.UNSPECIFIED, DefectImportForm.resources
                    .getString("Unspecified_Type_Comment"));

        comboBox = ol.getAsComboBox();
        comboBox.setSelectedIndex(0);
        comboBox.addActionListener((ActionListener) EventHandler.create(
                ActionListener.class, this, "updateMapFromValue"));
        updateMapFromValue();
View Full Code Here

Examples of org.apache.drill.exec.server.options.OptionList

      DrillbitEndpoint b1 = DrillbitEndpoint.newBuilder().setAddress("localhost").setControlPort(1234+i).build();
      if(i ==0) localBit = b1;
      endpoints.add(b1);
    }

    QueryWorkUnit qwu = par.getFragments(new OptionList(), localBit, QueryId.getDefaultInstance(), endpoints, ppr, fragmentRoot, planningSet);
    System.out.println(String.format("=========ROOT FRAGMENT [%d:%d] =========", qwu.getRootFragment().getHandle().getMajorFragmentId(), qwu.getRootFragment().getHandle().getMinorFragmentId()));

    System.out.print(qwu.getRootFragment().getFragmentJson());

View Full Code Here

Examples of org.apache.drill.exec.server.options.OptionList

    this.queryStartTime = fragment.getQueryStartTime();
    this.rootFragmentTimeZone = fragment.getTimeZone();
    logger.debug("Getting initial memory allocation of {}", fragment.getMemInitial());
    logger.debug("Fragment max allocation: {}", fragment.getMemMax());
    try{
      OptionList list;
      if(!fragment.hasOptionsJson() || fragment.getOptionsJson().isEmpty()){
        list = new OptionList();
      }else{
        list = dbContext.getConfig().getMapper().readValue(fragment.getOptionsJson(), OptionList.class);
      }
      this.sessionOptions = new FragmentOptionsManager(context.getOptionManager(), list);
    }catch(Exception e){
View Full Code Here

Examples of org.apache.drill.exec.server.options.OptionList

    this.rootFragmentTimeZone = fragment.getTimeZone();
    this.credentials = fragment.getCredentials();
    logger.debug("Getting initial memory allocation of {}", fragment.getMemInitial());
    logger.debug("Fragment max allocation: {}", fragment.getMemMax());
    try {
      OptionList list;
      if (!fragment.hasOptionsJson() || fragment.getOptionsJson().isEmpty()) {
        list = new OptionList();
      } else {
        list = dbContext.getConfig().getMapper().readValue(fragment.getOptionsJson(), OptionList.class);
      }
      this.fragmentOptions = new FragmentOptionManager(context.getOptionManager(), list);
    } catch (Exception e) {
View Full Code Here

Examples of org.apache.drill.exec.server.options.OptionList

        localBit = b1;
      }
      endpoints.add(b1);
    }

    QueryWorkUnit qwu = par.getFragments(new OptionList(), localBit, QueryId.getDefaultInstance(), endpoints, ppr, fragmentRoot, planningSet,
        UserSession.Builder.newBuilder().withCredentials(UserBitShared.UserCredentials.newBuilder().setUserName("foo").build()).build());
    System.out.println(String.format("=========ROOT FRAGMENT [%d:%d] =========", qwu.getRootFragment().getHandle().getMajorFragmentId(), qwu.getRootFragment().getHandle().getMinorFragmentId()));

    System.out.print(qwu.getRootFragment().getFragmentJson());
View Full Code Here

Examples of org.apache.drill.exec.server.options.OptionList

    this.queryStartTime = fragment.getQueryStartTime();
    this.rootFragmentTimeZone = fragment.getTimeZone();
    logger.debug("Getting initial memory allocation of {}", fragment.getMemInitial());
    logger.debug("Fragment max allocation: {}", fragment.getMemMax());
    try{
      OptionList list;
      if(!fragment.hasOptionsJson() || fragment.getOptionsJson().isEmpty()){
        list = new OptionList();
      }else{
        list = dbContext.getConfig().getMapper().readValue(fragment.getOptionsJson(), OptionList.class);
      }
      this.fragmentOptions = new FragmentOptionManager(context.getOptionManager(), list);
    }catch(Exception e){
View Full Code Here

Examples of org.jboss.aesh.cl.OptionList

        ProcessedCommand processedCommand = new ProcessedCommand(command.name(), command.description(), command.validator());

        for(Field field : clazz.getDeclaredFields()) {
            Option o;
            OptionGroup og;
            OptionList ol;
            Arguments a;
            if((o = field.getAnnotation(Option.class)) != null) {
                OptionType optionType;
                if(o.hasValue())
                    optionType = OptionType.NORMAL;
                else
                    optionType = OptionType.BOOLEAN;
                if(o.name() == null || o.name().length() < 1) {
                    processedCommand.addOption(o.shortName(), field.getName(), o.description(),
                            o.argument(), o.required(), ',', o.defaultValue(),
                            field.getType(), field.getName(), optionType, o.converter(),
                            o.completer(), o.validator(), o.activator(), o.renderer(), o.overrideRequired());
                }
                else {
                    processedCommand.addOption(o.shortName(), o.name(), o.description(),
                            o.argument(), o.required(), ',', o.defaultValue(),
                            field.getType(), field.getName(), optionType, o.converter(),
                            o.completer(), o.validator(), o.activator(), o.renderer(), o.overrideRequired());
                }

            }
            else if((ol = field.getAnnotation(OptionList.class)) != null) {
                if(!Collection.class.isAssignableFrom(field.getType()))
                    throw new CommandLineParserException("OptionGroup field must be instance of Collection");
                Class type = Object.class;
                if(field.getGenericType() != null) {
                    ParameterizedType listType = (ParameterizedType) field.getGenericType();
                    type = (Class) listType.getActualTypeArguments()[0];
                }
                if(ol.name() == null || ol.name().length() < 1) {
                    processedCommand.addOption(ol.shortName(), field.getName(), ol.description(), "",
                            ol.required(), ol.valueSeparator(), ol.defaultValue(), type, field.getName(), OptionType.LIST,
                            ol.converter(), ol.completer(), ol.validator(), ol.activator(), ol.renderer());
                }
                else {
                    processedCommand.addOption(ol.shortName(), ol.name(), ol.description(), "",
                            ol.required(), ol.valueSeparator(), ol.defaultValue(), type, field.getName(), OptionType.LIST,
                            ol.converter(), ol.completer(), ol.validator(), ol.activator(), ol.renderer());
                }
            }
            else if((og = field.getAnnotation(OptionGroup.class)) != null) {
                if(!Map.class.isAssignableFrom(field.getType()))
                    throw new CommandLineParserException("OptionGroup field must be instance of Map");
View Full Code Here

Examples of org.jboss.aesh.cl.OptionList

        ProcessedCommand processedCommand = new ProcessedCommand(command.name(), command.description(), command.validator());

        for(Field field : clazz.getDeclaredFields()) {
            Option o;
            OptionGroup og;
            OptionList ol;
            Arguments a;
            if((o = field.getAnnotation(Option.class)) != null) {
                OptionType optionType;
                if(o.hasValue())
                    optionType = OptionType.NORMAL;
                else
                    optionType = OptionType.BOOLEAN;
                if(o.name() == null || o.name().length() < 1) {
                    processedCommand.addOption(o.shortName(), field.getName(), o.description(),
                            o.argument(), o.required(), ',', o.defaultValue(),
                            field.getType(), field.getName(), optionType, o.converter(),
                            o.completer(), o.validator(), o.activator(), o.renderer(), o.overrideRequired());
                }
                else {
                    processedCommand.addOption(o.shortName(), o.name(), o.description(),
                            o.argument(), o.required(), ',', o.defaultValue(),
                            field.getType(), field.getName(), optionType, o.converter(),
                            o.completer(), o.validator(), o.activator(), o.renderer(), o.overrideRequired());
                }

            }
            else if((ol = field.getAnnotation(OptionList.class)) != null) {
                if(!Collection.class.isAssignableFrom(field.getType()))
                    throw new CommandLineParserException("OptionGroup field must be instance of Collection");
                Class type = Object.class;
                if(field.getGenericType() != null) {
                    ParameterizedType listType = (ParameterizedType) field.getGenericType();
                    type = (Class) listType.getActualTypeArguments()[0];
                }
                if(ol.name() == null || ol.name().length() < 1) {
                    processedCommand.addOption(ol.shortName(), field.getName(), ol.description(), "",
                            ol.required(), ol.valueSeparator(), ol.defaultValue(), type, field.getName(), OptionType.LIST,
                            ol.converter(), ol.completer(), ol.validator(), ol.activator(), ol.renderer());
                }
                else {
                    processedCommand.addOption(ol.shortName(), ol.name(), ol.description(), "",
                            ol.required(), ol.valueSeparator(), ol.defaultValue(), type, field.getName(), OptionType.LIST,
                            ol.converter(), ol.completer(), ol.validator(), ol.activator(), ol.renderer());
                }
            }
            else if((og = field.getAnnotation(OptionGroup.class)) != null) {
                if(!Map.class.isAssignableFrom(field.getType()))
                    throw new CommandLineParserException("OptionGroup field must be instance of Map");
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.