Examples of addNamespace()


Examples of org.teiid.query.mapping.xml.MappingElement.addNamespace()

       
        MappingElement item = items.addChildElement(new MappingElement("Item", namespace)); //$NON-NLS-1$
        item.setSource("xmltest.group.items"); //$NON-NLS-1$
        item.setMaxOccurrs(-1);
        item.addNamespace(namespace2);
        item.addNamespace(namespace3);

        item.addAttribute(new MappingAttribute("ItemID", "xmltest.group.items.itemNum")); //$NON-NLS-1$ //$NON-NLS-2$
        item.addChildElement(new MappingElement("Name", "xmltest.group.items.itemName")); //$NON-NLS-1$ //$NON-NLS-2$
        item.addChildElement(new MappingElement("Quantity", "xmltest.group.items.itemQuantity")); //$NON-NLS-1$ //$NON-NLS-2$
        return doc;                             
View Full Code Here

Examples of org.teiid.query.mapping.xml.MappingElement.addNamespace()

            // get the first visual node on the document.
            MappingElement rootElement = doc.getTagRootElement();
           
            Properties namespaces = rootElement.getNamespacesAsProperties();
            if (namespaces == null || !namespaces.containsKey(MappingNodeConstants.INSTANCES_NAMESPACE_PREFIX)) {
                rootElement.addNamespace(new Namespace(MappingNodeConstants.INSTANCES_NAMESPACE_PREFIX, MappingNodeConstants.INSTANCES_NAMESPACE));
            }
           
            // now exit; we are done
            setAbort(true);
        }
View Full Code Here

Examples of org.teiid.query.mapping.xml.MappingElement.addNamespace()

        Namespace namespace = new Namespace("foo", "protocol://someuri"); //$NON-NLS-1$ //$NON-NLS-2$
        element = new MappingElement("Test", namespace); //$NON-NLS-1$
        assertEquals("foo", element.getNamespacePrefix()); //$NON-NLS-1$
        assertEquals(element.getNamespaces().length, 0);
       
        element.addNamespace(namespace);
        assertEquals(element.getNamespaces().length, 1);
       
        element.addNamespace(new Namespace("ns1", "http://mm.com")); //$NON-NLS-1$ //$NON-NLS-2$
        assertEquals(element.getNamespaces().length, 2);
       
View Full Code Here

Examples of org.teiid.query.mapping.xml.MappingElement.addNamespace()

        assertEquals(element.getNamespaces().length, 0);
       
        element.addNamespace(namespace);
        assertEquals(element.getNamespaces().length, 1);
       
        element.addNamespace(new Namespace("ns1", "http://mm.com")); //$NON-NLS-1$ //$NON-NLS-2$
        assertEquals(element.getNamespaces().length, 2);
       
        // they may be switch some times, need a better way to test this?
        assertEquals("ns1", element.getNamespaces()[0].getPrefix()); //$NON-NLS-1$
        assertEquals("foo", element.getNamespaces()[1].getPrefix()); //$NON-NLS-1$
View Full Code Here

Examples of org.vfny.geoserver.config.DataConfig.addNameSpace()

        config = getUserContainer(request).getNamespaceConfig();
       
        config.setPrefix(prefix);
        config.setUri(URI);

        dataConfig.addNameSpace(prefix, config);
        getApplicationState().notifyConfigChanged();

        return mapping.findForward("config.data.namespace");
    }
}
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.