List of usage examples for org.apache.commons.jxpath.ri QName toString
public String toString()
From source file:org.eclipse.e4.emf.internal.xpath.EObjectAttributeIterator.java
/** * Create a new BeanAttributeIterator./*from w w w . j a va 2s. co m*/ * @param parent parent pointer * @param name name of this bean */ public EObjectAttributeIterator(EStructuralFeatureOwnerPointer parent, QName name) { super(parent, (name.getPrefix() == null && (name.getName() == null || name.getName().equals("*"))) ? null : name.toString(), false, null); this.parent = parent; includeXmlLang = (name.getPrefix() != null && name.getPrefix().equals("xml")) && (name.getName().equals("lang") || name.getName().equals("*")); }
From source file:org.eclipse.e4.emf.internal.xpath.EStructuralFeatureOwnerPointer.java
@Override public NodeIterator childIterator(NodeTest test, boolean reverse, NodePointer startWith) { if (test == null) { return createNodeIterator(null, reverse, startWith); }/* w w w . ja v a 2s. c om*/ if (test instanceof NodeNameTest) { NodeNameTest nodeNameTest = (NodeNameTest) test; QName testName = nodeNameTest.getNodeName(); if (isValidProperty(testName)) { return createNodeIterator(nodeNameTest.isWildcard() ? null : testName.toString(), reverse, startWith); } return null; } return test instanceof NodeTypeTest && ((NodeTypeTest) test).getNodeType() == Compiler.NODE_TYPE_NODE ? createNodeIterator(null, reverse, startWith) : null; }
From source file:org.eclipse.e4.emf.internal.xpath.EStructuralFeaturePointer.java
@Override public NodePointer createChild(JXPathContext context, QName name, int index, Object value) { EStructuralFeaturePointer prop = (EStructuralFeaturePointer) clone(); if (name != null) { prop.setPropertyName(name.toString()); }//from w ww. j a va 2s. c om prop.setIndex(index); return prop.createPath(context, value); }
From source file:org.eclipse.e4.emf.internal.xpath.EStructuralFeaturePointer.java
@Override public NodePointer createChild(JXPathContext context, QName name, int index) { EStructuralFeaturePointer prop = (EStructuralFeaturePointer) clone(); if (name != null) { prop.setPropertyName(name.toString()); }/*from ww w. ja v a 2s .c o m*/ prop.setIndex(index); return prop.createPath(context); }
From source file:org.firesoa.common.jxpath.model.dom4j.Dom4JNodePointer.java
public NodePointer createChild(JXPathContext context, QName name, int index) { if (index == WHOLE_COLLECTION) { index = 0;/* ww w . ja va 2 s.c o m*/ } boolean success = getAbstractFactory(context).createObject(context, this, node, name.toString(), index); if (success) { NodeTest nodeTest; String prefix = name.getPrefix(); String namespaceURI = prefix == null ? null : context.getNamespaceURI(prefix); nodeTest = new NodeNameTest(name, namespaceURI); NodeIterator it = childIterator(nodeTest, false, null); if (it != null && it.setPosition(index + 1)) { return it.getNodePointer(); } } throw new JXPathAbstractFactoryException("Factory could not create " + "a child node for path: " + asPath() + "/" + name + "[" + (index + 1) + "]"); }