Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlString


             */
            HostDescription globus = new HostDescription(GlobusHostType.type);
            globus.getType().setHostName(hostId2);
            globus.getType().setHostAddress(address);
           
            XmlString point = ((GlobusHostType)globus.getType()).addNewGridFTPEndPoint();
            point.setStringValue("xxxxxxx");          

            jcrRegistry.saveHostDescription(globus);

            HostDescription hg = jcrRegistry.getHostDescription(hostId2);

View Full Code Here


        // set stack trace if present
        if (trace != null) {
            final StringWriter sw = new StringWriter();
            trace.printStackTrace(new PrintWriter(sw));

            XmlString traceXmlStr = XmlString.Factory.newInstance();
            traceXmlStr.setStringValue(sw.toString());
            activityType.addNewFailure().addNewTrace().set(traceXmlStr);
        }
        sendNotification(wtcontext, activity, descriptionAndAnnotation, "[Service failed]");
    }
View Full Code Here

        // set stack trace if present
        if (trace != null) {
            final StringWriter sw = new StringWriter();
            trace.printStackTrace(new PrintWriter(sw));

            XmlString traceXmlStr = XmlString.Factory.newInstance();
            traceXmlStr.setStringValue(sw.toString());
            activityType.addNewFailure().addNewTrace().set(traceXmlStr);
        }

        sendNotification(wtcontext, activity, descriptionAndAnnotation, "[Unable to send result of invocation]");
    }
View Full Code Here

             */
            HostDescription globus = new HostDescription(GlobusHostType.type);
            globus.getType().setHostName(hostId2);
            globus.getType().setHostAddress(address);
           
            XmlString point = ((GlobusHostType)globus.getType()).addNewGridFTPEndPoint();
            point.setStringValue("xxxxxxx");          

            jcrRegistry.saveHostDescription(globus);

            HostDescription hg = jcrRegistry.getHostDescription(hostId2);

View Full Code Here

    */
   public ResourceProperty refreshProperty( ResourceProperty prop )
   {
      try
      {
         XmlString metric = (XmlString) prop.get( 0 );
         metric.setStringValue( m_instance.getHostName(  ) );
      }
      catch ( Exception re )
      {
         re.printStackTrace(  );
      }
View Full Code Here

    private String getFCCID(ResourceStub resource)
            throws FaultException
    {
        XmlObject fccIdPropElem = getSingleProperty(resource, WeatherstationPropertyQNames.FCCID);
        assertTrue("FCCID was not an xs:String", fccIdPropElem instanceof XmlString);
        XmlString fccId = (XmlString) fccIdPropElem;
        return fccId.getStringValue();
    }
View Full Code Here

    }

    public void insertProperty( Object[] propElems )
    {
        // Comment prop has cardinality of 1, so passed array will always have exactly one element
        XmlString xString = (XmlString) propElems[0];
        m_fileSystem.setComment( xString.getStringValue() );
    }
View Full Code Here

        insertProperty( prop );
    }

    public ResourceProperty refreshProperty( ResourceProperty prop )
    {
        XmlString xString = (XmlString) prop.get( 0 );
        xString.setStringValue( m_fileSystem.getComment() );
        return prop;
    }
View Full Code Here

        RootDocument doc1 = RootDocument.Factory.parse(xml1);
        RootDocument.Root root = doc1.getRoot();
        assertTrue(doc1.validate());

        XmlString a = root.xgetAArray(0);
        assertTrue(a.schemaType().equals(XmlString.type));
        assertEquals("\ta\ta\t", a.stringValue());

        XmlString b = root.xgetAArray(1);
        assertTrue(b.schemaType().equals(XmlNormalizedString.type));
        assertEquals(" b b ", b.stringValue());

        XmlString c = root.xgetAArray(2);
        assertTrue(c.schemaType().equals(XmlToken.type));
        assertEquals("c c", c.stringValue());

        root.insertA(2, "d d");
        assertEquals("d d", root.getAArray(2));
        assertEquals(4, root.sizeOfAArray());
        root.removeA(2);
View Full Code Here

        String xml1 = "<A xmlns='http://openuri.org/sgs'>\ta\ta\t</A>";
        String xml2 = "<B xmlns='http://openuri.org/sgs'>\tb\tb\t</B>";
        String xml3 = "<C xmlns='http://openuri.org/sgs'>\tc\tc\t</C>";

        ADocument d1 = ADocument.Factory.parse(xml1);
        XmlString a = d1.xgetA();
        assertTrue(a.schemaType().equals(XmlString.type));
        assertEquals("\ta\ta\t", a.stringValue());

        ADocument d2 = ADocument.Factory.parse(xml2);
        XmlString b = d2.xgetA();
        assertTrue(d2.schemaType().equals(BDocument.type));
        assertTrue(b.schemaType().equals(XmlNormalizedString.type));
        assertEquals(" b b ", b.stringValue());

        ADocument d3 = ADocument.Factory.parse(xml3);
        XmlString c = d3.xgetA();
        assertTrue(d3.schemaType().equals(CDocument.type));
        assertTrue(c.schemaType().equals(XmlToken.type));
        assertEquals("c c", c.stringValue());
    }
View Full Code Here

TOP

Related Classes of org.apache.xmlbeans.XmlString

Copyright © 2018 www.massapicom. 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.