Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMDataSource


    private OMElement getInputOMElement(final Object[] inputObjects,
                                        final Operation operation,
                                        final JavaObjectSerializer javaObjectSerializer,
                                        OMFactory omFactory) {
        OMDataSource omDataSource = new RMIDataSource() {

            public void serialize(MTOMAwareXMLStreamWriter xmlWriter) throws XMLStreamException {
                try {
                    javaObjectSerializer.serializeInputElement(inputObjects,
                            operation.getInputElement(),
View Full Code Here


            parameter.generateSchema(configurator, processedSchemaMap);

            final JavaObjectSerializer javaObjectSerializer =
                    new JavaObjectSerializer(processedSchemaMap, configurator, processedSchemaMap);

            OMDataSource omDataSource = new RMIDataSource() {

                public void serialize(MTOMAwareXMLStreamWriter xmlWriter) throws XMLStreamException {
                    try {
                        javaObjectSerializer.serializeParameter(value, parameter, xmlWriter, new NamespacePrefix());
                    } catch (XmlSerializingException e) {
View Full Code Here

    void next() throws XMLStreamException {
        if (nextNode()) {
            if (node instanceof OMSourcedElement) {
                OMSourcedElement element = (OMSourcedElement)node;
                if (!element.isExpanded()) {
                    OMDataSource ds = element.getDataSource();
                    if (ds != null) {
                        if (serializer.isDataSourceALeaf()) {
                            this.ds = ds;
                            currentEvent = -1;
                            // Mark the node as visited so that we continue with the next sibling
                            visited = true;
                            return;
                        }
                        if (!(OMDataSourceUtil.isPushDataSource(ds)
                            || (cache && OMDataSourceUtil.isDestructiveRead(ds)))) {
                            XMLStreamReader reader = ds.getReader();
                            while (reader.next() != START_ELEMENT) {
                                // Just loop
                            }
                            serializer.pushState(new IncludeWrapper(serializer, reader));
                            visited = true;
View Full Code Here

     * @param key
     * @return requested OMDataSourceExt property or null
     */
    protected boolean hasOMDataSourceProperty(String key) {
        if (!this.isExpanded()) {
            OMDataSource ds = this.getDataSource();
            if (ds instanceof OMDataSourceExt) {
                return ((OMDataSourceExt)ds).hasProperty(key);
            }
        }
        return false;
View Full Code Here

    }

    OMNode clone(OMCloneOptions options, OMContainer targetParent) {
        // If already expanded or this is not an OMDataSourceExt, then
        // create a copy of the OM Tree
        OMDataSource ds = getDataSource();
        if (!options.isCopyOMDataSources() ||
            ds == null ||
            isExpanded() ||
            !(ds instanceof OMDataSourceExt)) {
            return super.clone(options, targetParent);
View Full Code Here

    /**
     * setOMDataSource
     */
    public OMDataSource setDataSource(OMDataSource dataSource) {
        if (!isExpanded()) {
            OMDataSource oldDS = this.dataSource;
            this.dataSource = dataSource;
            return oldDS;  // Caller is responsible for closing the data source
        } else {
            // TODO
            // Remove the entire subtree and replace with
            // new datasource.  There maybe a more performant way to do this.
            OMDataSource oldDS = this.dataSource;
            Iterator it = getChildren();
            while(it.hasNext()) {
                it.next();
                it.remove();
            }
View Full Code Here

        if (getEventType() != XMLStreamReader.START_ELEMENT ||
                !(state == this.NAVIGABLE ||
                  state == this.SWITCH_AT_NEXT)) {
            return null;
        }
        OMDataSource ds = null;
        if (lastNode != null &&
            lastNode instanceof OMSourcedElement) {
            try {
                ds = ((OMSourcedElement) lastNode).getDataSource();
            } catch (UnsupportedOperationException e) {
View Full Code Here

    public OMElement getOMElement(
            final javax.xml.namespace.QName parentQName,
            final OMFactory factory) throws ADBException {


        OMDataSource dataSource = new ADBDataSource(this, parentQName);
        return factory.createOMElement(dataSource,parentQName);

    }
View Full Code Here

    private static void copyOMSourcedElement(SOAPFactory factory,
                                             OMContainer targetParent,
                                             OMSourcedElement sourceOMSE) {
        // If already expanded or this is not an OMDataSourceExt, then
        // create a copy of the OM Tree
        OMDataSource ds = sourceOMSE.getDataSource();
        if (ds == null ||
            sourceOMSE.isExpanded() ||
            !(ds instanceof OMDataSourceExt)) {
            copyOMElement(factory, targetParent, sourceOMSE);
            return;
View Full Code Here

    private static void copySOAPHeaderBlock(SOAPFactory factory,
                                            OMContainer targetParent,
                                            SOAPHeaderBlock sourceSHB) {
        // If already expanded or this is not an OMDataSourceExt, then
        // create a copy of the OM Tree
        OMDataSource ds = sourceSHB.getDataSource();
        if (ds == null ||
            sourceSHB.isExpanded() ||
            !(ds instanceof OMDataSourceExt)) {
            copySOAPHeaderBlock_NoDataSource(factory, targetParent, sourceSHB);
            return;
View Full Code Here

TOP

Related Classes of org.apache.axiom.om.OMDataSource

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.