Examples of changeType()


Examples of org.apache.xmlbeans.XmlObject.changeType()

            }
            ModuleDocument moduleDoc;
            if (xmlObject instanceof ModuleDocument) {
                moduleDoc = (ModuleDocument) xmlObject;
            } else {
                moduleDoc = (ModuleDocument) xmlObject.changeType(ModuleDocument.type);
            }
            XmlBeansUtil.validateDD(moduleDoc);
            // If there's no artifact ID and we won't be able to figure one out later, use the plan file name.  Bit of a hack.
            if(jarFile == null && (moduleDoc.getModule().getEnvironment() == null ||
                        moduleDoc.getModule().getEnvironment().getModuleId() == null ||
View Full Code Here

Examples of org.apache.xmlbeans.XmlObject.changeType()

        XmlObject[] converted = new XmlObject[xmlObjects.length];
        for (int i = 0; i < xmlObjects.length; i++) {
            XmlObject xmlObject = xmlObjects[i].copy();
            if (xmlObject.schemaType() != type) {
                converter.convertElement(xmlObject);
                converted[i] = xmlObject.changeType(type);
            } else {
                converted[i] = xmlObject;
            }
            try {
                XmlBeansUtil.validateDD(converted[i]);
View Full Code Here

Examples of org.apache.xmlbeans.XmlObject.changeType()

            JettyWebAppType jettyWebApp;
            if (rawPlan != null) {
                XmlObject webPlan = new GenericToSpecificPlanConverter(GerJettyDocument.type.getDocumentElementName().getNamespaceURI(),
                        JettyWebAppDocument.type.getDocumentElementName().getNamespaceURI(), "jetty").convertToSpecificPlan(rawPlan);
                jettyWebApp = (JettyWebAppType) webPlan.changeType(JettyWebAppType.type);
                XmlBeansUtil.validateDD(jettyWebApp);
            } else {
                jettyWebApp = createDefaultPlan();
            }
            return jettyWebApp;
View Full Code Here

Examples of org.apache.xmlbeans.XmlObject.changeType()

    private ClassLoader classLoader = this.getClass().getClassLoader();

    public void testLoadGeronimoDeploymentDescriptor10() throws Exception {
        URL srcXml = classLoader.getResource("connector_1_0/geronimo-ra.xml");
        XmlObject plan = XmlBeansUtil.parse(srcXml, getClass().getClassLoader());
        GerConnectorDocument connectorDocument = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
        GerConnectorType connector = (GerConnectorType) SchemaConversionUtils.fixGeronimoSchema(connectorDocument, CONNECTOR_QNAME, GerConnectorType.type);
        XmlBeansUtil.validateDD(connector);
        assertEquals(1, connectorDocument.getConnector().getResourceadapterArray().length);
    }
    //TODO move to openejb-jee
View Full Code Here

Examples of org.apache.xmlbeans.XmlObject.changeType()

//    }

    public void testLoadGeronimoDeploymentDescriptor15() throws Exception {
        URL srcXml = classLoader.getResource("connector_1_6/geronimo-ra.xml");
        XmlObject plan = XmlBeansUtil.parse(srcXml, getClass().getClassLoader());
        GerConnectorDocument connectorDocument = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
        GerConnectorType connector = (GerConnectorType) SchemaConversionUtils.fixGeronimoSchema(connectorDocument, CONNECTOR_QNAME, GerConnectorType.type);
        assertEquals(1, connector.getResourceadapterArray().length);
    }

    public void testResourceAdapterNameUniqueness() throws Exception {
View Full Code Here

Examples of org.apache.xmlbeans.XmlObject.changeType()

    }

    public void testResourceAdapterNameUniqueness() throws Exception {
        URL srcXml = classLoader.getResource("data/dup-resourceadapter-name.xml");
        XmlObject plan = XmlBeansUtil.parse(srcXml, getClass().getClassLoader());
        GerConnectorDocument doc = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
        if (doc == null) {
            doc = (GerConnectorDocument) plan;
        }
        try {
            XmlBeansUtil.validateDD(doc);
View Full Code Here

Examples of org.apache.xmlbeans.XmlObject.changeType()

    }

    public void testConnectionFactoryNameUniqueness() throws Exception {
        URL srcXml = classLoader.getResource("data/dup-connectionfactoryinstance-name.xml");
        XmlObject plan = XmlBeansUtil.parse(srcXml, getClass().getClassLoader());
        GerConnectorDocument doc = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
        if (doc == null) {
            doc = (GerConnectorDocument) plan;
        }
        try {
            XmlBeansUtil.validateDD(doc);
View Full Code Here

Examples of org.apache.xmlbeans.XmlObject.changeType()

    }

    public void testAdminObjectNameUniqueness() throws Exception {
        URL srcXml = classLoader.getResource("data/dup-admin-object-name.xml");
        XmlObject plan = XmlBeansUtil.parse(srcXml, getClass().getClassLoader());
        GerConnectorDocument doc = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
        if (doc == null) {
            doc = (GerConnectorDocument) plan;
        }
        try {
            XmlBeansUtil.validateDD(doc);
View Full Code Here

Examples of org.apache.xmlbeans.XmlObject.changeType()

    }

    public void testRectifyPlan() throws Exception {
        URL srcXml = classLoader.getResource("data/old-schema-plan.xml");
        XmlObject plan = XmlBeansUtil.parse(srcXml, getClass().getClassLoader());
        GerConnectorDocument doc = (GerConnectorDocument) plan.changeType(GerConnectorDocument.type);
        if (doc == null) {
            doc = (GerConnectorDocument) plan;
        }
        GerConnectorType gerConnector = doc.getConnector();
        ConnectorPlanRectifier.rectifyPlan(gerConnector);
View Full Code Here

Examples of org.apache.xmlbeans.XmlObject.changeType()

            TomcatWebAppType tomcatWebApp;
            if (rawPlan != null) {
                XmlObject webPlan = new GenericToSpecificPlanConverter(GerTomcatDocument.type.getDocumentElementName().getNamespaceURI(),
                        TomcatWebAppDocument.type.getDocumentElementName().getNamespaceURI(), "tomcat").convertToSpecificPlan(rawPlan);
                tomcatWebApp = (TomcatWebAppType) webPlan.changeType(TomcatWebAppType.type);
                XmlBeansUtil.validateDD(tomcatWebApp, INGORED_ELEMENT_NAMES);
            } else {
                tomcatWebApp = createDefaultPlan();
            }
            return tomcatWebApp;
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.