Examples of toNextToken()


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

        try {
            XmlObject webservicesDocumentUntyped = XmlObject.Factory.parse(wsDDUrl);
            XmlCursor cursor = webservicesDocumentUntyped.newCursor();
            try {
                if (cursor.currentTokenType() != XmlCursor.TokenType.START) {
                    while(cursor.toNextToken()  != XmlCursor.TokenType.START) {}
                }
                QName qname = cursor.getName();
                if (WebservicesDocument.type.getDocumentElementName().equals(qname)) {
                    return getJ2EEWebServices(webservicesDocumentUntyped);
                } else if (org.apache.geronimo.xbeans.javaee.WebservicesDocument.type.getDocumentElementName().equals(qname)) {
View Full Code Here

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

   */
  private void appendChartElement(CTGraphicalObjectData data, String id) {
    String r_namespaceUri = STRelationshipId.type.getName().getNamespaceURI();
    String c_namespaceUri = XSSFDrawing.NAMESPACE_C;
    XmlCursor cursor = data.newCursor();
    cursor.toNextToken();
    cursor.beginElement(new QName(c_namespaceUri, "chart", "c"));
    cursor.insertAttributeWithValue(new QName(r_namespaceUri, "id", "r"), id);
    cursor.dispose();
    data.setUri(c_namespaceUri);
  }
View Full Code Here

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

     */
    static void preserveSpaces(XmlString xs) {
        String text = xs.getStringValue();
        if (text != null && (text.startsWith(" ") || text.endsWith(" "))) {
            XmlCursor c = xs.newCursor();
            c.toNextToken();
            c.insertAttributeWithValue(new QName("http://www.w3.org/XML/1998/namespace", "space"), "preserve");
            c.dispose();
        }
    }

View Full Code Here

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

        }
        // Copy the content into the XmlAttributeType
        XmlCursor loginCursor = lcDoc.newCursor();
        loginCursor.toFirstContentToken();
        XmlCursor destination = config.newCursor();
        destination.toNextToken();
        loginCursor.moveXml(destination);
        loginCursor.dispose();
        destination.dispose();
        config.setName("LoginModuleConfiguration");
        root.setServiceArray(new AbstractServiceType[]{realm});
View Full Code Here

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

        } finally {
            cursor.dispose();
        }
        xmlObject = xmlObject.copy();
        cursor = xmlObject.newCursor();
        cursor.toNextToken();
        try {
            for (Object o : ns.entrySet()) {
                Map.Entry entry = (Map.Entry) o;
                cursor.insertNamespace((String) entry.getKey(), (String) entry.getValue());
            }
View Full Code Here

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

      }
    }
    public void setForceFileStagingToWorkDir(Boolean force){
      setupMethod();
      XmlCursor cursor = getServiceDescriptionType().getPortType().getMethod().newCursor();
      cursor.toNextToken();
    if (!cursor.setAttributeText(new QName("http://airavata.apache.org/schemas/gfac/2012/12","forceFileStagingToWorkDir"),force.toString())){
      cursor.insertAttributeWithValue("forceFileStagingToWorkDir",force.toString());
    }
    cursor.dispose();
    }
View Full Code Here

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

    }
   
    public Boolean getForceFileStagingToWorkDir(){
      setupMethod();
      XmlCursor cursor = getServiceDescriptionType().getPortType().getMethod().newCursor();     
      cursor.toNextToken();
    String value = cursor.getAttributeText(new QName("forceFileStagingToWorkDir"));
    cursor.dispose();
    if (value==null){
      return false;
    }else{
View Full Code Here

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

            if (!actualChars.equals(expectedChars)) {
                problems.add("Different elements at elementCount: " + elementCount + ", test: " + actualChars + ", expected: " + expectedChars);
                similar = false;
            }
            test.toNextToken();
            expected.toNextToken();
        }
        return similar;
    }

    private boolean toNextStartToken(XmlCursor cursor) {
View Full Code Here

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

            String expectedChars = expected.getName().getLocalPart();
            if (!actualChars.equals(expectedChars)) {
                problems.add("Different elements at elementCount: " + elementCount + ", test: " + actualChars + ", expected: " + expectedChars);
                similar = false;
            }
            test.toNextToken();
            expected.toNextToken();
        }
        return similar;
    }
View Full Code Here

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

     */
    protected static void preserveSpaces(STXstring xs) {
        String text = xs.getStringValue();
        if (text != null && (text.startsWith(" ") || text.endsWith(" "))) {
            XmlCursor c = xs.newCursor();
            c.toNextToken();
            c.insertAttributeWithValue(new QName("http://www.w3.org/XML/1998/namespace", "space"), "preserve");
            c.dispose();
        }
    }

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.