Examples of Namespace


Examples of org.apache.tapestry5.clojure.Namespace

    public <T> T build(final Class<T> interfaceType)
    {
        assert interfaceType != null;
        assert interfaceType.isInterface();

        Namespace annotation = interfaceType.getAnnotation(Namespace.class);

        if (annotation == null)
        {
            throw new IllegalArgumentException(String.format("Interface type %s does not have the Namespace annotation.",
                    interfaceType.getName()));
        }

        final String namespace = annotation.value();

        ClassInstantiator<T> instantiator = proxyFactory.createProxy(interfaceType, new PlasticClassTransformer()
        {
            @Override
            public void transform(PlasticClass plasticClass)
View Full Code Here

Examples of org.apache.torque.generator.qname.Namespace

        else if (variableName != null
                && sourceElementName == null
                && optionName == null
                && presetValue == null)
        {
            Namespace namespace
                    = controllerState.getOutlet().getName().getNamespace();
            QualifiedName variableQualifiedName = new QualifiedName(
                    variableName,
                    namespace);
            Variable variable
View Full Code Here

Examples of org.apache.xalan.xpath.xml.NameSpace

    {
      m_namespaces = new StringToStringTable();
      int n = m_stylesheet.m_namespaces.size();
      for(int i = (n-1); i >= 0; i--)
      {
        NameSpace ns = (NameSpace)m_stylesheet.m_namespaces.elementAt(i);
        for(;null != ns; ns = ns.m_next)
        {
          if(ns == m_stylesheet.m_emptyNamespace)
            continue;
         
View Full Code Here

Examples of org.apache.xml.utils.NameSpace

  {

    if (null == m_namespaces)
      m_namespaces = new Vector();

    NameSpace ns = new NameSpace(prefix, uri);

    m_namespaces.addElement(ns);
  }
View Full Code Here

Examples of org.castor.xmlctf.xmldiff.xml.nodes.Namespace

        _currentNode.addChild(element);

        // Add all current namespaces to this element
        for (Iterator i = _prefixes.entrySet().iterator(); i.hasNext(); ) {
            Map.Entry me = (Map.Entry) i.next();
            element.addNamespace(new Namespace((String)me.getKey(), (String) me.getValue()));
        }

        // Then add all attributes
        if (atts != null && atts.getLength() > 0) {
            for (int i = 0; i < atts.getLength(); i++) {
View Full Code Here

Examples of org.codehaus.spice.jndikit.Namespace

{

    protected Context getRoot() throws Exception
    {
        final DefaultNameParser parser = new DefaultNameParser();
        final Namespace namespace = new StandardNamespace( parser );

        Hashtable environment = new Hashtable();
        environment.put( Context.STATE_FACTORIES,
                         TestStateFactory.class.getName() );
View Full Code Here

Examples of org.dom4j.Namespace

    protected void marshalElement(Element element)
        throws JiBXException, IOException {
       
        // accumulate all needed namespace declarations
        int size = element.nodeCount();
        Namespace ns = element.getNamespace();
        int nsi = findNamespaceIndex(ns);
        ArrayList nss = null;
        boolean hascontent = false;
        int defind = -1;
        String defuri = null;
        for (int i = 0; i < size; i++) {
            Node node = element.node(i);
            if (node instanceof Namespace) {
                Namespace dns = (Namespace)node;
                if (findNamespaceIndex(dns) < 0) {
                    if (nss == null) {
                        nss = new ArrayList();
                    }
                    nss.add(dns);
                    String prefix = dns.getPrefix();
                    if (prefix == null || prefix.length() == 0) {
                        defind = nss.size() - 1;
                        defuri = dns.getURI();
                    }
                }
            } else {
                hascontent = true;
            }
        }
       
        // check for namespace declarations required
        String[] uris = null;
        if (nss == null) {
            m_xmlWriter.startTagOpen(nsi, element.getName());
        } else {
            int base = getNextNamespaceIndex();
            if (defind >= 0) {
                m_defaultNamespaceIndex = base + defind;
                m_defaultNamespaceURI = defuri;
            }
            uris = new String[nss.size()];
            int[] nums = new int[nss.size()];
            String[] prefs = new String[nss.size()];
            for (int i = 0; i < uris.length; i++) {
                Namespace addns = (Namespace)nss.get(i);
                uris[i] = addns.getURI();
                nums[i] = base + i;
                prefs[i] = addns.getPrefix();
                if (nsi < 0 && ns.equals(addns)) {
                    nsi = base + i;
                }
            }
            m_xmlWriter.pushExtensionNamespaces(uris);
View Full Code Here

Examples of org.dom4j.Namespace

   *
   * @param prefix DOCUMENT ME!
   * @return the URI for the given prefix or null if it could not be found.
   */
  public String getURI(String prefix) {
    Namespace namespace = getNamespaceForPrefix(prefix);

    return (namespace != null) ? namespace.getURI() : null;
  }
View Full Code Here

Examples of org.dom4j.Namespace

   * @param namespace DOCUMENT ME!
   * @return true if the given prefix is in the stack.
   */
  public boolean contains(Namespace namespace) {
    String prefix = namespace.getPrefix();
    Namespace current = null;

    if ((prefix == null) || (prefix.length() == 0)) {
      current = getDefaultNamespace();
    } else {
      current = getNamespaceForPrefix(prefix);
    }

    if (current == null) {
      return false;
    }

    if (current == namespace) {
      return true;
    }

    return namespace.getURI().equals(current.getURI());
  }
View Full Code Here

Examples of org.dom4j.Namespace

      }
    } else if (localName.trim().length() == 0) {
      localName = qualifiedName;
    }

    Namespace namespace = createNamespace(prefix, namespaceURI);

    return pushQName(localName, qualifiedName, namespace, prefix);
  }
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.