Example usage for org.apache.commons.jxpath.ri.model NodePointer setValue

List of usage examples for org.apache.commons.jxpath.ri.model NodePointer setValue

Introduction

In this page you can find the example usage for org.apache.commons.jxpath.ri.model NodePointer setValue.

Prototype

public abstract void setValue(Object value);

Source Link

Document

Converts the value to the required type and changes the corresponding object to that value.

Usage

From source file:org.eclipse.e4.emf.internal.xpath.CollectionPointer.java

@Override
public NodePointer createPath(JXPathContext context, Object value) {
    NodePointer ptr = createPath(context);
    ptr.setValue(value);
    return ptr;/*  w  w w .  j  a v  a 2s  .  c  o  m*/
}

From source file:org.eclipse.e4.emf.internal.xpath.NullEStructuralFeaturePointer.java

@Override
public NodePointer createPath(JXPathContext context, Object value) {
    NodePointer newParent = parent.createPath(context);
    if (isAttribute()) {
        NodePointer pointer = newParent.createAttribute(context, getName());
        pointer.setValue(value);
        return pointer;
    }/*from   w ww. j  a va 2  s.c o  m*/
    if (parent instanceof NullPointer && parent.equals(newParent)) {
        throw createBadFactoryException(context.getFactory());
    }
    if (newParent instanceof EStructuralFeatureOwnerPointer) {
        EStructuralFeatureOwnerPointer pop = (EStructuralFeatureOwnerPointer) newParent;
        newParent = pop.getPropertyPointer();
    }
    return newParent.createChild(context, getName(), index, value);
}

From source file:org.firesoa.common.jxpath.model.dom4j.Dom4JNodePointer.java

public NodePointer createChild(JXPathContext context, QName name, int index, Object value) {
    NodePointer ptr = createChild(context, name, index);
    ptr.setValue(value);
    return ptr;/*from  w w  w .  j ava 2s  .  com*/
}