Package org.apache.axis2.om.impl.dom.factory

Examples of org.apache.axis2.om.impl.dom.factory.OMDOMFactory


  public TextImplTest(String name) {
    super(name);
  }

  public void testSetText() {
    OMDOMFactory factory = new OMDOMFactory();
    String localName = "TestLocalName";
    String namespace = "http://ws.apache.org/axis2/ns";
    String prefix = "axis2";
    String tempText = "The quick brown fox jumps over the lazy dog";

    OMElement elem = factory.createOMElement(localName, namespace, prefix);
    OMText textNode = factory.createText(elem, tempText);

    assertEquals("Text value mismatch", tempText, textNode.getText());
  }
View Full Code Here


    assertEquals("Text value mismatch", tempText, textNode.getText());
  }

  public void testAppendText() {
    OMDOMFactory factory = new OMDOMFactory();
    String localName = "TestLocalName";
    String namespace = "http://ws.apache.org/axis2/ns";
    String prefix = "axis2";
    String tempText = "The quick brown fox jumps over the lazy dog";
    String textToAppend = " followed by another fox";

    OMElement elem = factory.createOMElement(localName, namespace, prefix);
    OMText textNode = factory.createText(elem, tempText);

    ((Text) textNode).appendData(textToAppend);

    assertEquals("Text value mismatch", tempText + textToAppend, textNode
        .getText());
View Full Code Here

  }

  public void testSplitText() {
    String textValue = "temp text value";

        OMDOMFactory fac = new OMDOMFactory();
        DocumentImpl doc = new DocumentImpl(fac);

    Text txt = doc.createTextNode(textValue);
    txt.splitText(3);
View Full Code Here

import org.apache.ws.commons.soap.SOAPFactory;

public class DOOMAbstractFactory {

    public static OMFactory getOMFactory() {
        return new OMDOMFactory();
    }
View Full Code Here

    }

    public Document parse(InputSource inputSource) throws SAXException,
            IOException {
        try {
            OMDOMFactory factory = new OMDOMFactory();
            // Not really sure whether this will work :-?
            XMLStreamReader reader = XMLInputFactory.newInstance()
                    .createXMLStreamReader(inputSource.getCharacterStream());
            StAXOMBuilder builder = new StAXOMBuilder(factory, reader);
            DocumentImpl doc = (DocumentImpl) builder.getDocument();
View Full Code Here

    /**
     * @see javax.xml.parsers.DocumentBuilder#parse(java.io.InputStream)
     */
    public Document parse(InputStream is) throws SAXException, IOException {
        try {
            OMDOMFactory factory = new OMDOMFactory();
            XMLStreamReader reader = XMLInputFactory.newInstance()
                    .createXMLStreamReader(is);
            StAXOMBuilder builder = new StAXOMBuilder(factory, reader);
            return (DocumentImpl) builder.getDocument();
        } catch (XMLStreamException e) {
View Full Code Here

    /**
     * @see javax.xml.parsers.DocumentBuilder#parse(java.io.File)
     */
    public Document parse(File file) throws SAXException, IOException {
        try {
            OMDOMFactory factory = new OMDOMFactory();
            XMLStreamReader reader = XMLInputFactory.newInstance()
                    .createXMLStreamReader(new FileInputStream(file));
            StAXOMBuilder builder = new StAXOMBuilder(factory, reader);
            return (DocumentImpl) builder.getDocument();
        } catch (XMLStreamException e) {
View Full Code Here

import org.apache.axis2.soap.impl.dom.soap12.SOAP12Factory;

public class DOOMAbstractFactory {

  public static OMFactory getOMFactory() {
    return new OMDOMFactory();
  }
View Full Code Here

     * Creates a clone which belongs to a new document.
     *
     * @see org.apache.axis2.om.OMElement#cloneOMElement()
     */
    public OMElement cloneOMElement() {
        ElementImpl elem = (ElementImpl) (new StAXOMBuilder(new OMDOMFactory(),
                this.getXMLStreamReader(true))).getDocumentElement();
        return elem;
    }
View Full Code Here

        params = getListenerParameters();


        param = transportIn.getParameter(NhttpConstants.ENDPOINTS_CONFIGURATION);
        if (param != null && param.getValue() != null) {
            endpoints = new URLEndpointsConfigurationFactory().create(param.getValue().toString());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.om.impl.dom.factory.OMDOMFactory

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.