Search in sources :

Example 1 with PushOMDataSource

use of org.apache.axiom.ts.om.sourcedelement.util.PushOMDataSource in project webservices-axiom by apache.

the class TestDocument method createOMSourcedElement.

OMSourcedElement createOMSourcedElement(OMFactory factory, boolean push, boolean destructive) {
    OMNamespace ns = factory.createOMNamespace(qname.getNamespaceURI(), qname.getPrefix());
    OMDataSource ds;
    if (push) {
        ds = new PushOMDataSource(factory, getContent(), destructive);
    } else {
        ds = new PullOMDataSource(getContent(), destructive);
    }
    return factory.createOMElement(ds, qname.getLocalPart(), ns);
}
Also used : OMNamespace(org.apache.axiom.om.OMNamespace) PushOMDataSource(org.apache.axiom.ts.om.sourcedelement.util.PushOMDataSource) PullOMDataSource(org.apache.axiom.ts.om.sourcedelement.util.PullOMDataSource) PullOMDataSource(org.apache.axiom.ts.om.sourcedelement.util.PullOMDataSource) PushOMDataSource(org.apache.axiom.ts.om.sourcedelement.util.PushOMDataSource) OMDataSource(org.apache.axiom.om.OMDataSource)

Aggregations

OMDataSource (org.apache.axiom.om.OMDataSource)1 OMNamespace (org.apache.axiom.om.OMNamespace)1 PullOMDataSource (org.apache.axiom.ts.om.sourcedelement.util.PullOMDataSource)1 PushOMDataSource (org.apache.axiom.ts.om.sourcedelement.util.PushOMDataSource)1