/** * Creates a new QName object with the specified values * @param namespaceUri namespace uri value or null * @param localPart localPart (not null) * @param prefix prefix value or null (if null, an empty string will actually be used in the resulting QName) * @return The newly created QName object */ public static Object createQName(String namespaceUri, String localPart, String prefix) { return new org.eclipse.emf.ecore.xml.type.internal.QName(namespaceUri, localPart, prefix); }
@Override public Object getValue(String literal) { try { return new QName(literal); } catch (RuntimeException e) { return null; } }
public QName createQName(String namespaceURI, String localPart) { return new org.eclipse.emf.ecore.xml.type.internal.QName(namespaceURI, localPart, ""); }
public QName createQName(String namespaceURI, String localPart) { return new org.eclipse.emf.ecore.xml.type.internal.QName(namespaceURI, localPart, ""); }
/** * Creates a new QName object with the specified values * @param namespaceUri namespace uri value or null * @param localPart localPart (not null) * @param prefix prefix value or null (if null, an empty string will actually be used in the resulting QName) * @return The newly created QName object */ public static Object createQName(String namespaceUri, String localPart, String prefix) { return new org.eclipse.emf.ecore.xml.type.internal.QName(namespaceUri, localPart, prefix); }
@Override public Object getValue (String literal) { try { return new QName(literal); } catch (RuntimeException exception) { return null; } } }
public QName createQName(String namespaceURI, String localPart, String prefix) { return new org.eclipse.emf.ecore.xml.type.internal.QName(namespaceURI, localPart, prefix); }
public QName createQName(String namespaceURI, String localPart, String prefix) { return new org.eclipse.emf.ecore.xml.type.internal.QName(namespaceURI, localPart, prefix); }
@Override public Object getValue(String literal) { try { return new QName(literal); } catch (RuntimeException e) { return null; } } }
/** * Updates the QName's prefix, if possible, and returns either the updated result, * or a newly created QName with the new prefix, if the QName could not be directly updated. * @param qName the QName to be updated. * @param prefix the new prefix. * @return a QName with the same namespace URI and local part as the argument, but with the new prefix. */ public static QName setPrefix(QName qName, String prefix) { if (qName instanceof org.eclipse.emf.ecore.xml.type.internal.QName) { org.eclipse.emf.ecore.xml.type.internal.QName result = (org.eclipse.emf.ecore.xml.type.internal.QName)qName; result.setPrefix(prefix); return result; } else { return new org.eclipse.emf.ecore.xml.type.internal.QName(qName.getNamespaceURI(), qName.getLocalPart(), prefix); } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public QName createQName(String literal) { String normalizedLiteral = collapseWhiteSpace(literal); if (literal == null) { return null; } else { if (normalizedLiteral.startsWith("{")) // } { // { int index = normalizedLiteral.lastIndexOf('}'); if (index != -1) { return new org.eclipse.emf.ecore.xml.type.internal.QName(normalizedLiteral.substring(1, index), normalizedLiteral.substring(index + 1), ""); } } return new org.eclipse.emf.ecore.xml.type.internal.QName(normalizedLiteral); } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public QName createQName(String literal) { String normalizedLiteral = collapseWhiteSpace(literal); if (literal == null) { return null; } else { if (normalizedLiteral.startsWith("{")) // } { // { int index = normalizedLiteral.lastIndexOf('}'); if (index != -1) { return new org.eclipse.emf.ecore.xml.type.internal.QName(normalizedLiteral.substring(1, index), normalizedLiteral.substring(index + 1), ""); } } return new org.eclipse.emf.ecore.xml.type.internal.QName(normalizedLiteral); } }
/** * Updates the QName's prefix, if possible, and returns either the updated result, * or a newly created QName with the new prefix, if the QName could not be directly updated. * @param qName the QName to be updated. * @param prefix the new prefix. * @return a QName with the same namespace URI and local part as the argument, but with the new prefix. */ public static QName setPrefix(QName qName, String prefix) { if (qName instanceof org.eclipse.emf.ecore.xml.type.internal.QName) { org.eclipse.emf.ecore.xml.type.internal.QName result = (org.eclipse.emf.ecore.xml.type.internal.QName)qName; result.setPrefix(prefix); return result; } else { return new org.eclipse.emf.ecore.xml.type.internal.QName(qName.getNamespaceURI(), qName.getLocalPart(), prefix); } }
return new QName(namespace, localPart, prefix);
qName = new org.eclipse.emf.ecore.xml.type.internal.QName(namespace, qName.getLocalPart(), prefix); if (qName.getPrefix().length() > 0 && namespace == null)
qName = new org.eclipse.emf.ecore.xml.type.internal.QName(namespace, qName.getLocalPart(), prefix); if (qName.getPrefix().length() > 0 && namespace == null)