Examples of newCursor()


Examples of org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument.newCursor()

        XmlOptions xmlOptions = XmlBeansUtil.createXmlOptions(errors);
        SchemaDocument parsed = SchemaDocument.Factory.parse(element, xmlOptions);
        if (errors.size() != 0) {
            throw new XmlException(errors.toArray().toString());
        }
        XmlCursor cursor = parsed.newCursor();
        try {
            cursor.toFirstContentToken();
            for (Iterator namespaces = namespaceMap.entrySet().iterator(); namespaces.hasNext();) {
                Map.Entry entry = (Map.Entry) namespaces.next();
                cursor.insertNamespace((String) entry.getKey(), (String) entry.getValue());
View Full Code Here

Examples of org.apache.xmlbeans.impl.xb.xsdschema.SchemaDocument.newCursor()

        XmlOptions xmlOptions = XmlBeansUtil.createXmlOptions(errors);
        SchemaDocument parsed = SchemaDocument.Factory.parse(element, xmlOptions);
        if (errors.size() != 0) {
            throw new XmlException(errors.toArray().toString());
        }
        XmlCursor cursor = parsed.newCursor();
        try {
            cursor.toFirstContentToken();
            for (Iterator namespaces = namespaceMap.entrySet().iterator(); namespaces.hasNext();) {
                Map.Entry entry = (Map.Entry) namespaces.next();
                cursor.insertNamespace((String) entry.getKey(), (String) entry.getValue());
View Full Code Here

Examples of org.apache.xmlbeans.samples.any.StringelementDocument.newCursor()

        // Create a simple <stringelement> and move it into place
        // under <arrayofany>.
        StringelementDocument stringElementDoc =
            StringelementDocument.Factory.newInstance();       
        stringElementDoc.setStringelement("some text");
        XmlCursor childCursor = stringElementDoc.newCursor();
        childCursor.toFirstContentToken();

        // Add a cursor to mark the position at which the new child
        // XML will be moved.
        XmlCursor arrayCursor = arrayOfAny.newCursor();
View Full Code Here

Examples of org.apache.xmlbeans.samples.cursor.mixedcontent.DescriptionType.newCursor()

                DescriptionType description = items[j].getDescription();

                // Insert an XmlCursor instance and set it at
                // the beginning of the <&lt;description&gt; element's text,
                // just after the start tag.
                XmlCursor cursor = description.newCursor();
                cursor.toLastAttribute();
                cursor.toNextToken();

                // Get a String containing the characters to the
                // immediate right of the cursor, up to the next
View Full Code Here

Examples of org.ggf.schemas.jsdl.x2005.x11.jsdl.ApplicationType.newCursor()

      //TODO handle: not creating POSIX element if HPCProfile already exists
      return getPOSIXApplication(value);
    }
   
    if (getPOSIXApplication(value) == null) {
      XmlCursor acursor = application.newCursor();
      acursor.toEndToken();
      acursor.insertElement(POSIX_APPLICATION);
      acursor.dispose();
    }
    return getPOSIXApplication(value);
View Full Code Here

Examples of org.ggf.schemas.jsdl.x2005.x11.jsdl.ApplicationType.newCursor()

  public static SPMDApplicationType getOrCreateSPMDApplication(JobDefinitionType value) {
   
    ApplicationType application = getOrCreateApplication(value);
   
    if (getSPMDApplication(value) == null) {
      XmlCursor acursor = application.newCursor();
      acursor.toEndToken();
      acursor.insertElement(SPMD_APPLICATION);
      acursor.dispose();
    }
    return getSPMDApplication(value);
View Full Code Here

Examples of org.ggf.schemas.jsdl.x2005.x11.jsdl.ApplicationType.newCursor()

      //TODO handle: creating HPC element if POSIX already exists
      return getHPCProfileApplication(value);
    }
   
    if (getHPCProfileApplication(value) == null) {
      XmlCursor acursor = application.newCursor();
      acursor.toEndToken();
      acursor.insertElement(HPC_PROFILE_APPLICATION);
      acursor.dispose();
    }
    return getHPCProfileApplication(value);
View Full Code Here

Examples of org.oasisOpen.docs.wsbpel.x20.process.executable.TSequence.newCursor()

   
    //if the 2.transition is a SequenceTransition
    if (SequenceTransition.class.isInstance(tmp)){
      TSequence helpSequence = (TSequence)tmp.getBpelCode();
      XmlCursor cursSeq = iSeq.newCursor();
      XmlCursor cursSub = helpSequence.newCursor();
      cursSeq.toEndToken();
      cursSub.copyXmlContents(cursSeq);
    }
   
    else{
View Full Code Here

Examples of org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.TopicExpressionType.newCursor()

      //TODO multiple filters
      if ( tf != null )
      {
         TopicExpressionType te = s.addNewTopicExpression(  );
         XmlCursor           xc = te.newCursor(  );
         xc.toNextToken(  );
         xc.insertNamespace( "tns",
                             tf.getNameSpace(  ) );
         te.newCursor(  ).setTextValue( (String) tf.getExpression(  ) );
         te.setDialect( tf.getURI(  ).toString(  ) );
View Full Code Here

Examples of org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryExpressionType.newCursor()

    public void testSetValueAsQName()
    {
        QueryExpressionDocument queryExpressionDocument = QueryExpressionDocument.Factory.newInstance();
        QueryExpressionType queryExpressionType = queryExpressionDocument.addNewQueryExpression();
        XmlBeanUtils.setValueAsQName( queryExpressionType, SushiPropertyQNames.AKAGI );
        XmlCursor xCursor = queryExpressionType.newCursor();
        String prefix = xCursor.prefixForNamespace( SushiPropertyQNames.AKAGI.getNamespaceURI() );
        String value = xCursor.getTextValue();
        assertEquals( prefix + ":" + SushiPropertyQNames.AKAGI.getLocalPart(), value );
    }
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.