Examples of AbstractFactory


Examples of org.apache.commons.jxpath.AbstractFactory

        JXPathContext jxpc;
        if (!(objModel instanceof JXPathContext)) {
            jxpc = JXPathContext.newContext(objModel);
            jxpc.setLenient(true);

            AbstractFactory jxPathFactory;
            if (commonAtts.jxPathFactory != null)
                jxPathFactory = commonAtts.jxPathFactory;
            else
                jxPathFactory = new BindingJXPathFactory();
            jxpc.setFactory(jxPathFactory);
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

            if (nsDeclarationMap != null && nsDeclarationMap.values().contains(null))
                throw new BindingException("Error in binding file " + location
                                + "\nBinding doesn't support having namespace-declarations without explicit prefixes.");

            String jxPathFactoryName = bindingElm.getAttribute("jxpath-factory");
            AbstractFactory jxPathFactory = null;
            if (jxPathFactoryName != null && jxPathFactoryName.trim().length() > 0) {
                try {
                    Class jxPathFactoryClass = JXPathBindingBuilderBase.class.getClassLoader().loadClass(jxPathFactoryName);
                    jxPathFactory = (AbstractFactory)jxPathFactoryClass.newInstance();
                } catch (Exception e) {
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

     
      String direction = existing.direction;
      if(extra.direction!=null) // was defined
        direction = extra.direction;

        AbstractFactory jxPathFactory = existing.jxPathFactory;
        if (extra.jxPathFactory != null)
            jxPathFactory = extra.jxPathFactory;


        return new CommonAttributes(extra.location,direction,strLeniency,extra.nsDeclarations, jxPathFactory);
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

        JXPathContext jxpc;
        if (!(objModel instanceof JXPathContext)) {
            jxpc = JXPathContext.newContext(objModel);
            jxpc.setLenient(true);

            AbstractFactory jxPathFactory;
            if (commonAtts.jxPathFactory != null)
                jxPathFactory = commonAtts.jxPathFactory;
            else
                jxPathFactory = new BindingJXPathFactory();
            jxpc.setFactory(jxPathFactory);
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

            if (nsDeclarationMap != null && nsDeclarationMap.values().contains(null))
                throw new BindingException("Error in binding file " + location
                                + "\nBinding doesn't support having namespace-declarations without explicit prefixes.");

            String jxPathFactoryName = bindingElm.getAttribute("jxpath-factory");
            AbstractFactory jxPathFactory = null;
            if (jxPathFactoryName != null && jxPathFactoryName.trim().length() > 0) {
                try {
                    Class jxPathFactoryClass = JXPathBindingBuilderBase.class.getClassLoader().loadClass(jxPathFactoryName);
                    jxPathFactory = (AbstractFactory)jxPathFactoryClass.newInstance();
                } catch (Exception e) {
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

        String direction = existing.direction;
        if (extra.direction != null) // was defined
            direction = extra.direction;

        AbstractFactory jxPathFactory = existing.jxPathFactory;
        if (extra.jxPathFactory != null)
            jxPathFactory = extra.jxPathFactory;

        return new CommonAttributes(extra.location, direction, strLeniency, extra.nsDeclarations, jxPathFactory);
    }
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

        JXPathContext jxpc;
        if (!(objModel instanceof JXPathContext)) {
            jxpc = JXPathContext.newContext(objModel);
            jxpc.setLenient(true);

            AbstractFactory jxPathFactory;
            if (commonAtts.jxPathFactory != null)
                jxPathFactory = commonAtts.jxPathFactory;
            else
                jxPathFactory = new BindingJXPathFactory();
            jxpc.setFactory(jxPathFactory);
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

    private JXPathContext context;

    public void setUp() {
        context = JXPathContext.newContext(new HashMap());
        context.setFactory(new AbstractFactory() {
            public boolean createObject(JXPathContext context, Pointer pointer, Object parent, String name, int index) {
                ((Map) parent).put(name, null);
                return true;
            }
        });
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

     * The factory will inserts a clone of the 'template' DocumentFragment
     * inside this object into the target objectmodel.
     */
    public void saveFormToModel(Widget frmModel, JXPathContext jxpc) {

        jxpc.setFactory(new AbstractFactory() {
            public boolean createObject(JXPathContext context, Pointer pointer,
                Object parent, String name, int index) {

                Node parentNode = (Node) parent;
                Document targetDoc = parentNode.getOwnerDocument();
View Full Code Here

Examples of org.apache.commons.jxpath.AbstractFactory

     * <p>
     * The factory will insert a new instance of the specified bean (classname)
     * inside this object into the target objectmodel.
     */
    public void saveFormToModel(Widget frmModel, JXPathContext jxpc) throws BindingException {
        jxpc.setFactory(new AbstractFactory() {
            public boolean createObject(JXPathContext context, Pointer pointer,
                                        Object parent, String name, int index) {
                try {
                    Object[] args = new Object[1];
                    Class[] argTypes = new Class[1];
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.