Package org.mmisw.orrclient.gwt.client.vocabulary

Examples of org.mmisw.orrclient.gwt.client.vocabulary.Option


    listBox.addChangeListener(new ChangeListener () {
      public void onChange(Widget sender) {
        String value = listBox.getValue(listBox.getSelectedIndex());
        textBox.setText(value);
       
        Option option = options.get(listBox.getSelectedIndex());
        optionSelected(option);

        _onChange();

        popup.hide();
      }
    });
   
    /////////////////////////////////////////////////////////
    // Use a SuggestBox with a MultiWordSuggestOracle.
    //
    // A map from a suggestion to its corresponding Option:
    final Map<String,Option> suggestions = new HashMap<String,Option>();
    MultiWordSuggestOracle oracle = new MultiWordSuggestOracle("/ :-");
    for ( Option option : options ) {
      String suggestion = option.getName()+ " - " +option.getUri();
      suggestions.put(suggestion, option);
      oracle.add(suggestion);

    }
    final SuggestBox suggestBox = new SuggestBox(oracle);
    suggestBox.setWidth(width);
    suggestBox.addEventHandler(new SuggestionHandler() {
      public void onSuggestionSelected(SuggestionEvent event) {
        String suggestion = event.getSelectedSuggestion().getReplacementString();
        Option option = suggestions.get(suggestion);
        textBox.setText(option.getName());
        optionSelected(option);
       
        _onChange();
       
        popup.hide();
View Full Code Here


      });
    }
    catch (Exception e) {
      log.debug("Error trying to read: " +authorityClassUri+ ": " +e.getMessage(), e);
      authorityAttrDef.addOption(
          new Option("dummy", "dummy: (" +e.getMessage()+ ")")
      );
    }
  }
View Full Code Here

      });
    }
    catch (Exception e) {
      log.debug("Error trying to read: " +resourceTypeClassUri+ ": " +e.getMessage(), e);
      resourceTypeAttrDef.addOption(
          new Option("dummy", "dummy: (" +e.getMessage()+ ")")
      );
    }
  }
View Full Code Here

      String idvName = idv.getLocalName();
      String idvUri = idv.getURI();
     
      String label = idvName+ " - " +idvUri;
     
      Option option = new Option(idvName, label);
      option.setUri(idvUri);
     
      // TODO: provide more information for each option
      list.add(option);
    }
   
View Full Code Here

                "producing this data product (but does not necessarily produce it themselves) <br/>" +
                "IP Negotiator: the person/organization that handles intellectual property, " +
                "including this vocabulary or ontology <br/>" +
                "Other: specify if none of these fit.")
            .setExample("content manager")
            .addOption(new Option("--choose one--"))
            .addOption(new Option("content manager"))
            .addOption(new Option("ontology producer"))
            .addOption(new Option("organizational manager"))
            .addOption(new Option("IP negotiator"))
            .addOption(new Option("other"))
          ,
         
          // TODO createAttrDef(OmvMmi.accessStatus),
         
          // TODO createAttrDef(OmvMmi.accessStatusDate),
 
          // TODO createAttrDef(OmvMmi.licenseCode),
          // TODO createAttrDef(OmvMmi.licenseReference),
          // TODO createAttrDef(OmvMmi.licenseAsOfDate),
         
          createAttrDef(OmvMmi.temporaryMmiRole)
            .setLabel("Temporary MMI role")
            .setTooltip("Until an agreement is reached on MMI's role, what role is MMI currently playing: <br/>" +
                "Content Manager: MMI actively manages this vocabulary content and is responsible (with the community) for its creation <br/>" +
                "Ontology Producer: MMI accepts vocabulary content from the community and turns it into a served ontology <br/>" +
                "Ontology Republisher: MMI accepts an ontology, caches it, and produces its own copy of the ontology " +
                "in order to provide additional services (URI generation, revision history maintenance and tracking, and so on).")
            .setExample("ontology producer")
            .addOption(new Option("--choose one--"))
            .addOption(new Option("content manager"))
            .addOption(new Option("ontology producer"))
            .addOption(new Option("ontology republisher"))
            .addOption(new Option("other"))
          ,
         
          // TODO createAttrDef(OmvMmi.agreedMmiRole),
         
          createAttrDef(OmvMmi.creditRequired)
            .setLabel("Author credit required")
            .setTooltip("Specifies whether users of the ontology have to provide credit to its creator. " +
                "Please choose whatever applies ('no' is a very helpful selection), and enter the next " +
                "field if the select here is 'yes' or 'conditional'. Leave blank if you aren't sure.")
            .setExample("yes")
            .addOption(new Option("not specified"))
            .addOption(new Option("yes"))
            .addOption(new Option("no"))
            .addOption(new Option("conditional"))
          ,
         
          // TODO createAttrDef(OmvMmi.creditConditions),
         
          createAttrDef(OmvMmi.creditCitation)
View Full Code Here

TOP

Related Classes of org.mmisw.orrclient.gwt.client.vocabulary.Option

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.