Examples of toFirstChild()


Examples of org.apache.xmlbeans.XmlCursor.toFirstChild()

    private XmlObject parse(String xmlString) throws XmlException {
        XmlObject xmlObject = XmlObject.Factory.parse(xmlString);
        XmlCursor xmlCursor = xmlObject.newCursor();
        try {
            xmlCursor.toFirstChild();
            return xmlCursor.getObject();
        } finally {
            xmlCursor.dispose();
        }
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toFirstChild()

  public static SPMDApplicationType getSPMDApplication(JobDefinitionType value) {
    if (value != null &&
        value.getJobDescription() != null &&
        value.getJobDescription().isSetApplication() ) {
      XmlCursor acursor = value.getJobDescription().getApplication().newCursor();
      if (acursor.toFirstChild()) {
        do {
          if(acursor.getName().equals(SPMD_APPLICATION)) {
            XmlObject result = acursor.getObject();
            acursor.dispose();
            return (SPMDApplicationType) result;
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toFirstChild()

  public static POSIXApplicationType getPOSIXApplication(JobDefinitionType value) {
    if (value != null &&
        value.getJobDescription() != null &&
        value.getJobDescription().isSetApplication() ) {
      XmlCursor acursor = value.getJobDescription().getApplication().newCursor();
      if (acursor.toFirstChild()) {
        do {
          if(acursor.getName().equals(POSIX_APPLICATION)) {
            XmlObject result = acursor.getObject();
            acursor.dispose();
            return (POSIXApplicationType) result;
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toFirstChild()

  public static HPCProfileApplicationType getHPCProfileApplication(JobDefinitionType value) {
    if (value != null &&
        value.getJobDescription() != null &&
        value.getJobDescription().isSetApplication() ) {
      XmlCursor acursor = value.getJobDescription().getApplication().newCursor();
      if (acursor.toFirstChild()) {
        do {
          if(acursor.getName().equals(HPC_PROFILE_APPLICATION)) {
            XmlObject result = acursor.getObject();
            acursor.dispose();
            return (HPCProfileApplicationType) result;
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toFirstChild()

                    GerConnectiondefinitionInstanceType[] connectiondefinitionInstances = connectionDefinition.getConnectiondefinitionInstanceArray();
                    for (int k = 0; k < connectiondefinitionInstances.length; k++) {
                        GerConnectiondefinitionInstanceType connectiondefinitionInstance = connectiondefinitionInstances[k];
                        cursor = connectiondefinitionInstance.newCursor();
                        try {
                            if (cursor.toFirstChild()) {
                                if (cursor.toNextSibling(GLOBAL_JNDI_NAME_QNAME)) {
                                    cursor.removeXml();
                                    updated = true;
                                }
                                if (cursor.toNextSibling(CREDENTIAL_INTERFACE_QNAME)) {
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toFirstChild()

        }
        XmlCursor xmlCursor = loginConfig.newCursor();
        ObjectName nextName = null;
        try {
            boolean atStart = true;
            while ((atStart && xmlCursor.toFirstChild()) || (!atStart && xmlCursor.toNextSibling())) {
                atStart = false;
                XmlObject child = xmlCursor.getObject();
                GerAbstractLoginModuleType abstractLoginModule = (GerAbstractLoginModuleType) child;
                String controlFlag = abstractLoginModule.getControlFlag().toString();
                ObjectName loginModuleName;
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toFirstChild()

        try {
        XmlObject xmlObject = XmlBeansUtil.parse(is);
            XmlCursor c = xmlObject.newCursor();
            try {
                c.toStartDoc();
                c.toFirstChild();
                docBean = new DDBeanImpl(this, "/" + c.getName().getLocalPart(), c);
            } finally {
                c.dispose();
            }
        } finally {
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toFirstChild()

            return (WebAppDocument) xmlObject;
        }
        XmlCursor cursor = xmlObject.newCursor();
        try {
            cursor.toStartDoc();
            cursor.toFirstChild();
            if ("http://java.sun.com/xml/ns/j2ee".equals(cursor.getName().getNamespaceURI())) {
                XmlObject result = xmlObject.changeType(WebAppDocument.type);
                validateDD(result);
                return (WebAppDocument) result;
            }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toFirstChild()

            if ("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN".equals(publicId) ||
                    "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN".equals(publicId)) {
                XmlCursor moveable = xmlObject.newCursor();
                try {
                    moveable.toStartDoc();
                    moveable.toFirstChild();
                    String schemaLocationURL = "http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
                    String version = "2.4";
                    convertToSchema(cursor, J2EE_NAMESPACE, schemaLocationURL, version);
                    cursor.toStartDoc();
                    cursor.toChild(J2EE_NAMESPACE, "web-app");
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.toFirstChild()

        File ConvertedPlan = new File(basedir, "src/test-resources/plans/plan4-converted.xml");
        assertTrue(ConvertedPlan.exists());
        XmlObject converted = XmlBeansUtil.parse(ConvertedPlan.toURL());
        XmlCursor c = converted.newCursor();
        SchemaConversionUtils.findNestedElement(c, "web-app");
        c.toFirstChild();
        ArrayList problems = new ArrayList();
        compareXmlObjects(webPlan, c, problems);
        assertEquals("problems: " + problems, 0, problems.size());
    }
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.