Examples of NamespaceBinding


Examples of gwt.mosaic.client.beans.NamespaceBinding

          return Orientation.HORIZONTAL;
        }
      }
    };

    NamespaceBinding b = new NamespaceBinding(
        BeanAdapterFactory.createFor(this), "box1.orientation",
        "box2.orientation", bindMapping);
    b.bind();

    // ----

    RootLayoutPanel.get().add(w);
  }
View Full Code Here

Examples of net.sf.saxon.om.NamespaceBinding

        matcher.addEndElement();
    }

    public boolean processStartElement(XdmNode node) throws SaxonApiException {
        NodeInfo inode = node.getUnderlyingNode();
        NamespaceBinding inscopeNS[] = inode.getDeclaredNamespaces(null);
        NamespaceBinding newNS[] = null;

        if ("attributes".equals(applyTo)) {
            matcher.addStartElement(new NameOfNode(inode), inode.getSchemaType(), inscopeNS);
        } else {
            if (inscopeNS.length > 0) {
                int countNS = 0;

                for (int pos = 0; pos < inscopeNS.length; pos++) {
                    NamespaceBinding ns = inscopeNS[pos];
                    String uri = ns.getURI();
                    if (!from.equals(uri) || !"".equals(to)) {
                        countNS++;
                    }
                }

                newNS = new NamespaceBinding[countNS];
                int newPos = 0;
                for (int pos = 0; pos < inscopeNS.length; pos++) {
                    NamespaceBinding ns = inscopeNS[pos];
                    String pfx = ns.getPrefix();
                    String uri = ns.getURI();
                    if (from.equals(uri)) {
                        if ("".equals(to)) {
                            // Nevermind, we're throwing the namespace away
                        } else {
                            NamespaceBinding newns = new NamespaceBinding(pfx,to);
                            newNS[newPos++] = newns;
                        }
                    } else {
                        newNS[newPos++] = ns;
                    }
View Full Code Here

Examples of org.apache.pivot.beans.NamespaceBinding

public class PropertyBinding extends Window implements Bindable {
    @Override
    public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
        // Bind list button selection to label text
        NamespaceBinding namespaceBinding1 = new NamespaceBinding(namespace,
            "listButton.selectedItem", "listButtonLabel1.text");

        namespaceBinding1.bind();

        // Bind list button selection to label text with bind mapping
        NamespaceBinding namespaceBinding2 = new NamespaceBinding(namespace,
            "listButton.selectedItem", "listButtonLabel2.text", new NamespaceBinding.BindMapping() {
            @Override
            public Object evaluate(Object value) {
                return value.toString().toUpperCase();
            }
        });

        namespaceBinding2.bind();
    }
View Full Code Here

Examples of org.jboss.xb.binding.metadata.unmarshalling.NamespaceBinding

   }

   private static String getDefaultClassName(BasicElementBinding element)
   {
      QName elementName = element.getName();
      NamespaceBinding ns = element.getDocument().getNamespace(elementName.getNamespaceURI());
      return ns.getJavaPackage() + "." + Util.xmlNameToClassName(elementName.getLocalPart(), true);
   }
View Full Code Here

Examples of org.jboss.xb.binding.metadata.unmarshalling.NamespaceBinding

         {
            nsStack = new NamespaceBindingStack(this, namespaceUri);
            for(int i = 0; i < stack.size(); ++i)
            {
               AbstractDocumentBinding doc = (AbstractDocumentBinding)stack.get(i);
               NamespaceBinding local = doc.getNamespaceLocal(namespaceUri);
               if(local != null)
               {
                  nsStack.push(local);
               }
            }
View Full Code Here

Examples of org.jboss.xb.binding.metadata.unmarshalling.NamespaceBinding

         {
            javaType = SimpleTypeBindings.classForType(typeDef.getName());
         }
         else if(typeDef.getName() != null)
         {
            NamespaceBinding ns = doc.getNamespace(typeDef.getNamespace());
            typeBasedClsName = ns.getJavaPackage() + "." + Util.xmlNameToClassName(typeDef.getName(), true);
            try
            {
               javaType = Thread.currentThread().getContextClassLoader().loadClass(typeBasedClsName);
            }
            catch(ClassNotFoundException e)
            {
            }
         }

         String elBasedClsName = Util.xmlNameToClassName(elementDecl.getName(), true);
         if(javaType == null)
         {
            NamespaceBinding ns = doc.getNamespace(elementDecl.getNamespace());
            // using type didn't help, let's try element's name
            // note: here we use element's namespace, not type's one
            try
            {
               javaType =
                  Thread.currentThread().getContextClassLoader().loadClass(ns.getJavaPackage() + "." + elBasedClsName);
            }
            catch(ClassNotFoundException e1)
            {
               // this also didn't work
            }
View Full Code Here

Examples of org.jboss.xb.binding.metadata.unmarshalling.NamespaceBinding

         {
            javaType = SimpleTypeBindings.classForType(typeDef.getName());
         }
         else if(typeDef.getName() != null)
         {
            NamespaceBinding ns = doc.getNamespace(typeDef.getNamespace());
            typeBasedClsName = ns.getJavaPackage() + "." + Util.xmlNameToClassName(typeDef.getName(), true);
            try
            {
               javaType = Thread.currentThread().getContextClassLoader().loadClass(typeBasedClsName);
            }
            catch(ClassNotFoundException e)
            {
            }
         }

         if(javaType == null)
         {
            // using type didn't help, let's try element's name
            // note: here we use element's namespace, not type's one
            NamespaceBinding ns = doc.getNamespace(elementDecl.getNamespace());
            String elBasedClsName = ns.getJavaPackage() + "." + Util.xmlNameToClassName(elementDecl.getName(), true);
            try
            {
               javaType = Thread.currentThread().getContextClassLoader().loadClass(elBasedClsName);
            }
            catch(ClassNotFoundException e1)
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.