Package org.jaxen.util

Examples of org.jaxen.util.SingletonList


                new ContextSupport(baseContextSupport.getNamespaceContext(),
                                   new SynapseXPathFunctionContext(baseContextSupport.getFunctionContext(), synCtx),
                                   new SynapseXPathVariableContext(baseContextSupport.getVariableContext(), synCtx),
                                   baseContextSupport.getNavigator());
            Context context = new Context(contextSupport);
            context.setNodeSet(new SingletonList(synCtx.getEnvelope()));
            return context;
        } else if (obj instanceof SOAPEnvelope) {
            SOAPEnvelope env = (SOAPEnvelope)obj;
            ContextSupport baseContextSupport = getContextSupport();
            ContextSupport contextSupport =
                new ContextSupport(baseContextSupport.getNamespaceContext(),
                                   baseContextSupport.getFunctionContext(),
                                   new SynapseXPathVariableContext(baseContextSupport.getVariableContext(), env),
                                   baseContextSupport.getNavigator());
            Context context = new Context(contextSupport);
            context.setNodeSet(new SingletonList(env));
            return context;
        } else {
            return super.getContext(obj);
        }
    }
View Full Code Here


                new ContextSupport(baseContextSupport.getNamespaceContext(),
                                   new SynapseXPathFunctionContext(baseContextSupport.getFunctionContext(), synCtx),
                                   new SynapseXPathVariableContext(baseContextSupport.getVariableContext(), synCtx),
                                   baseContextSupport.getNavigator());
            Context context = new Context(contextSupport);
            context.setNodeSet(new SingletonList(synCtx.getEnvelope()));
            return context;
        } else if (obj instanceof SOAPEnvelope) {
            SOAPEnvelope env = (SOAPEnvelope)obj;
            ContextSupport baseContextSupport = getContextSupport();
            ContextSupport contextSupport =
                new ContextSupport(baseContextSupport.getNamespaceContext(),
                                   baseContextSupport.getFunctionContext(),
                                   new SynapseXPathVariableContext(baseContextSupport.getVariableContext(), env),
                                   baseContextSupport.getNavigator());
            Context context = new Context(contextSupport);
            context.setNodeSet(new SingletonList(env));
            return context;
        } else if (obj instanceof ContextWrapper) {
            ContextWrapper wrapper = (ContextWrapper) obj;
            ContextSupport baseContextSupport = getContextSupport();
            ContextSupport contextSupport =
                new ContextSupport(baseContextSupport.getNamespaceContext(),
                                   baseContextSupport.getFunctionContext(),
                                   new SynapseXPathVariableContext(baseContextSupport.getVariableContext(), wrapper.getMessageCtxt(),
                                                                    wrapper.getEnvelope()),
                                   baseContextSupport.getNavigator());
            Context context = new Context(contextSupport);
            context.setNodeSet(new SingletonList(wrapper.getEnvelope()));
            return context;
        } else {
            return super.getContext(obj);
        }
    }
View Full Code Here

                new ContextSupport(baseContextSupport.getNamespaceContext(),
                                   new SynapseXPathFunctionContext(baseContextSupport.getFunctionContext(), synCtx),
                                   new SynapseXPathVariableContext(baseContextSupport.getVariableContext(), synCtx),
                                   baseContextSupport.getNavigator());
            Context context = new Context(contextSupport);
            context.setNodeSet(new SingletonList(synCtx.getEnvelope()));
            return context;
        } else if (obj instanceof SOAPEnvelope) {
            SOAPEnvelope env = (SOAPEnvelope)obj;
            ContextSupport baseContextSupport = getContextSupport();
            ContextSupport contextSupport =
                new ContextSupport(baseContextSupport.getNamespaceContext(),
                                   baseContextSupport.getFunctionContext(),
                                   new SynapseXPathVariableContext(baseContextSupport.getVariableContext(), env),
                                   baseContextSupport.getNavigator());
            Context context = new Context(contextSupport);
            context.setNodeSet(new SingletonList(env));
            return context;
        } else if (obj instanceof ContextWrapper) {
            ContextWrapper wrapper = (ContextWrapper) obj;
            ContextSupport baseContextSupport = getContextSupport();
            ContextSupport contextSupport =
                new ContextSupport(baseContextSupport.getNamespaceContext(),
                                   baseContextSupport.getFunctionContext(),
                                   new SynapseXPathVariableContext(baseContextSupport.getVariableContext(), wrapper.getMessageCtxt(),
                                                                    wrapper.getEnvelope()),
                                   baseContextSupport.getNavigator());
            Context context = new Context(contextSupport);
            context.setNodeSet(new SingletonList(wrapper.getEnvelope()));
            return context;
        } else {
            return super.getContext(obj);
        }
    }
View Full Code Here

public class SingletonListTest extends TestCase {

    public void testIndexOutOfBoundsException() {
    
        List list = new SingletonList(new Object());
        try {
            list.get(1);
            fail("Got element 1");
        }
        catch (IndexOutOfBoundsException ex) {
            assertNotNull(ex.getMessage());
        }
View Full Code Here

        {
            fullContext.setNodeSet( (List) node );
        }
        else
        {
            List list = new SingletonList(node);
            fullContext.setNodeSet( list );
        }

        return fullContext;
    }
View Full Code Here

            }
        }
       
        if (filters != null)
        {
            List list = new SingletonList(node);

            context.setNodeSet( list );
           
            // XXXX: filters aren't positional, so should we clone context?
View Full Code Here

        if ( docNode == null )
        {
            return Collections.EMPTY_LIST;
        }

        List list = new SingletonList(docNode);

        absContext.setNodeSet( list );

        return super.evaluate( absContext );
    }
View Full Code Here

        if ( obj instanceof List )
        {
            return (List) obj;
        }

        return new SingletonList(obj);
    }
View Full Code Here

            }
        }
       
        if (filters != null)
        {
            List list = new SingletonList(node);

            context.setNodeSet( list );
           
            // XXXX: filters aren't positional, so should we clone context?
View Full Code Here

        {
            fullContext.setNodeSet( (List) node );
        }
        else
        {
            List list = new SingletonList(node);
            fullContext.setNodeSet( list );
        }

        return fullContext;
    }
View Full Code Here

TOP

Related Classes of org.jaxen.util.SingletonList

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.