Examples of Binding


Examples of org.jvnet.staxex.NamespaceContextEx.Binding

                StAXC14nCanonicalizerImpl exc14n = new StAXEXC14nCanonicalizerImpl();
                //((StAXEXC14nCanonicalizerImpl)exc14n).setInclusivePrefixList(new ArrayList());
                NamespaceContextEx nsEx = ((StreamWriterData)data).getNamespaceContext();
                Iterator<Binding> iter = nsEx.iterator();
                while(iter.hasNext()){
                    Binding binding = iter.next();
                    exc14n.writeNamespace(binding.getPrefix(),binding.getNamespaceURI());
                }
                if(logger.isLoggable(Level.FINEST)){
                    exc14n.setStream(new ByteArrayOutputStream());
                }else{
                    exc14n.setStream(cos);
View Full Code Here

Examples of org.milyn.flatfile.Binding

    public void test_10() throws SmooksException, IOException, SAXException {
        Smooks smooks = new Smooks();

        smooks.setReaderConfig(new CSVRecordParserConfigurator("firstname,lastname,$ignore$,gender,age,country")
                .setBinding(new Binding("people", Person.class, BindingType.LIST)));

        JavaResult result = new JavaResult();
        smooks.filterSource(new StreamSource(getClass().getResourceAsStream("input-message-05.csv")), result);

        List<Person> people = (List<Person>) result.getBean("people");
View Full Code Here

Examples of org.objectstyle.wolips.bindings.api.Binding

      public void widgetSelected(SelectionEvent e) {
        try {
          ApiEditor apiEditor = (ApiEditor) page.getEditor();
          String newBindingName = StringUtils.findUnusedName("newBinding", apiEditor.getModel().getWo(), "getBinding");
          Binding newBinding = apiEditor.getModel().getWo().createBinding(newBindingName);
          viewer.refresh();
          viewer.editElement(newBinding, 0);
          managedForm.dirtyStateChanged();
        } catch (Throwable tx) {
          throw new RuntimeException("Failed to open .api file.", tx);
        }
      }

      public void widgetDefaultSelected(SelectionEvent e) {
        // nothing to do
      }

    });

    Button removeButton = toolkit.createButton(buttonsGroup, "Remove", SWT.PUSH);
    removeButton.addSelectionListener(new SelectionListener() {

      public void widgetSelected(SelectionEvent e) {
        try {
          IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
          if (!selection.isEmpty()) {
            Iterator iterator = selection.iterator();
            ApiEditor apiEditor = (ApiEditor) page.getEditor();
            while (iterator.hasNext()) {
              Binding binding = (Binding) iterator.next();
              apiEditor.getModel().getWo().removeBinding(binding);
              viewer.remove(binding);
            }
            managedForm.dirtyStateChanged();
          }
        } catch (Throwable tx) {
          throw new RuntimeException("Failed to open .api file.", tx);
        }
      }

      public void widgetDefaultSelected(SelectionEvent e) {
        // nothing to do
      }

    });

    bindingsSection.setClient(bindingsClient);
    final SectionPart spart = new SectionPart(bindingsSection) {
      @Override
      public boolean isDirty() {
        try {
          return ((ApiEditor) page.getEditor()).getModel().isDirty();
        } catch (ApiModelException e) {
          return false;
        }
      }
    };
    managedForm.addPart(spart);
    viewer = new TableViewer(bindingsTable);
    viewer.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        managedForm.fireSelectionChanged(spart, event.getSelection());
      }
    });
    viewer.setContentProvider(new MasterContentProvider());
    viewer.setSorter(new ViewerSorter());
    viewer.setLabelProvider(new MasterLabelProvider() {

      public String getColumnText(Object obj, int index) {
        if (obj instanceof Binding) {
          Binding binding = (Binding) obj;
          return binding.getName();
        }
        return super.getColumnText(obj, index);
      }

    });
View Full Code Here

Examples of org.ocpsoft.rewrite.bind.Binding

      // run subsequent handler to enrich the parameter and wrap the binding
      chain.proceed();

      // add the enriched binding to the parameter
      Binding enrichedBinding = (Binding) context.get(Binding.class);
      Assert.notNull(enrichedBinding, "Binding was removed from the context");
      parameterBuilder.bindsTo(enrichedBinding);
   }
View Full Code Here

Examples of org.omg.CosNaming.Binding

      for (int i = 0; i < base.length; i++)
         name[i] = base[i];

      while (iterHolder.value.next_one(bindingHolder))
      {
         Binding binding = bindingHolder.value;
         name[name.length - 1] = binding.binding_name[0];
         try
         {
            String stringName = namingService.to_string(name);
            buf.append(stringName);
View Full Code Here

Examples of org.openrdf.query.Binding

  }

  @Override
  public boolean equals(Object o) {
    if (o instanceof Binding) {
      Binding other = (Binding)o;

      return name.equals(other.getName()) && value.equals(other.getValue());
    }

    return false;
  }
View Full Code Here

Examples of org.pentaho.ui.xul.binding.Binding

   */
  public void setBindings()
  {
    // update the gui based on the selection
    getBindingFactory().setBindingType(Binding.Type.ONE_WAY);
    final Binding typeBinding = getBindingFactory().createBinding(NEW_WIZARD_FILE_RB_ID, SELECTED_PROPERTY_NAME, SELECT_LOOK_AND_FEEL_DECK_ID, SELECTED_INDEX_PROPERTY_NAME, new BooleanToIntegerBindingConverter());
    final Binding templatesBinding = getBindingFactory().createBinding(this, TEMPLATES_PROPERTY_NAME, AVAILABLE_TEMPLATES_LB_ID, ELEMENTS_PROPERTY_NAME);
    getBindingFactory().createBinding(this, SELECTED_TEMPLATE_PROPERTY_NAME, TEMPLATE_IMAGE_ID, SOURCE_PROPERTY_NAME, new SelectedTemplateToImageConverter());
   
    // update both the gui and the model
    getBindingFactory().setBindingType(Binding.Type.BI_DIRECTIONAL);
    final Binding selectedTemplateBinding = getBindingFactory().createBinding(AVAILABLE_TEMPLATES_LB_ID, SELECTED_INDEX_PROPERTY_NAME, this, SELECTED_TEMPLATE_PROPERTY_NAME);
    getBindingFactory().createBinding(this, START_FROM_FILE_PROPERTY_NAME, NEW_WIZARD_FILE_RB_ID, NOT_SELECTED_PROPERTY_NAME);
    getBindingFactory().createBinding(this, FILENAME_PROPERTY_NAME, WIZARD_FILENAME_TB_ID, VALUE_PROPERTY_NAME);
    try
    {
      typeBinding.fireSourceChanged();
      templatesBinding.fireSourceChanged();
      selectedTemplateBinding.fireSourceChanged();
    }
    catch (Exception e)
    {
      if (getDesignTimeContext() != null) {
        getDesignTimeContext().error(e);
View Full Code Here

Examples of org.skife.jdbi.v2.Binding

    private void addDeleteById(JDefinedClass classDefinition, Table table, Class clazz) {
        JMethod method = classDefinition.method(JMod.ABSTRACT, Integer.class, "delete" + clazz.getSimpleName());
        JAnnotationUse deleteAnnotation = method.annotate(SqlUpdate.class);
        SqlDeleteByPk sqlDeleteById = new SqlDeleteByPk(table);
        deleteAnnotation.param("value", sqlDeleteById.generate(new Binding()));
        for (Column column : table.getPrimaryKeyColumns()) {
            JVar param = method.param(column.getField().getType(), uncapitalize(column.getFieldName()));
            JAnnotationUse bind = param.annotate(Bind.class);
            bind.param("value", uncapitalize(column.getFieldName()));
        }
View Full Code Here

Examples of org.spout.api.input.Binding

      case CLIENT:

        final Client client = (Client) getEngine();
        //Setup client input
        final InputManager input = client.getInputManager();
        input.bind(new Binding("quickbar_left", Mouse.SCROLL_UP));
        input.bind(new Binding("quickbar_right", Mouse.SCROLL_DOWN));
        for (int i = 1; i < 10; i++) {
          input.bind(new Binding("quickbar_" + i, Keyboard.valueOf("KEY_" + i)));
        }

        CommandManager cm = Spout.getCommandManager();
        final QuickbarCommandExecutor exe = new QuickbarCommandExecutor();
        final PlayerFilter filter = new PlayerFilter();
View Full Code Here

Examples of org.springframework.amqp.core.Binding

  @RequestMapping(value="/binding", method=RequestMethod.POST)
  @ResponseBody
  public Binding addBinding(@RequestParam String routingKey) {
    try {
      admin.removeBinding(binding);
      Binding binding = BindingBuilder.bind(logQueue).to(exchange).with(routingKey);
      admin.declareBinding(binding);
      this.binding = binding;
    } catch (RuntimeException e) {
      // TODO: create a new BindingResult object to carry back error message
      logger.error("Failed to declare queue or bind it with exchage", e);
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.