public AttributeKey<?> findAttribute(QName id) { return delegate().findAttribute(id); }
public AttributeKey<?> findAttribute(QName id) { return delegate().findAttribute(id); }
public AttributeKey<?> findAttribute(QName id) { return delegate().findAttribute(id); }
/** * Conditionally adds a new attribute path step. For absolute paths, it will * be added if the {@link QName} matches a valid child attribute type for * the current selected element. If the path is relative a new * {@link ElementKey} step corresponding to the name will be unconditionally * added. * * @param id qualified name of child attribute step to add * @return {@code true} if added successfully, {@code false} otherwise. * @throws PathException if this path is an attribute path. Once a path has * an attribute key no more steps may be added. */ public boolean addIfAttribute(QName id) { AttributeKey<?> attrKey; if (selectedElement != null) { attrKey = selectedElement.findAttribute(id); if (attrKey == null) { return false; } selectedAttribute = selectedElement.bindAttribute(attrKey); } else { attrKey = AttributeKey.of(id); } addToStepList(attrKey); return true; }
/** * Conditionally adds a new attribute path step. For absolute paths, it will * be added if the {@link QName} matches a valid child attribute type for * the current selected element. If the path is relative a new * {@link ElementKey} step corresponding to the name will be unconditionally * added. * * @param id qualified name of child attribute step to add * @return {@code true} if added successfully, {@code false} otherwise. * @throws PathException if this path is an attribute path. Once a path has * an attribute key no more steps may be added. */ public boolean addIfAttribute(QName id) { AttributeKey<?> attrKey; if (selectedElement != null) { attrKey = selectedElement.findAttribute(id); if (attrKey == null) { return false; } selectedAttribute = selectedElement.bindAttribute(attrKey); } else { attrKey = AttributeKey.of(id); } addToStepList(attrKey); return true; }
/** * Conditionally adds a new attribute path step. For absolute paths, it will * be added if the {@link QName} matches a valid child attribute type for * the current selected element. If the path is relative a new * {@link ElementKey} step corresponding to the name will be unconditionally * added. * * @param id qualified name of child attribute step to add * @return {@code true} if added successfully, {@code false} otherwise. * @throws PathException if this path is an attribute path. Once a path has * an attribute key no more steps may be added. */ public boolean addIfAttribute(QName id) { AttributeKey<?> attrKey; if (selectedElement != null) { attrKey = selectedElement.findAttribute(id); if (attrKey == null) { return false; } selectedAttribute = selectedElement.bindAttribute(attrKey); } else { attrKey = AttributeKey.of(id); } addToStepList(attrKey); return true; }
@Override public void processAttribute(QName qn, String value) throws ParseException { if (element.hasAttribute(qn)) { throw new ParseException( CoreErrorDomain.ERR.duplicateAttributeValue.withInternalReason( "Duplicate value for attribute " + qn)); } AttributeKey<?> attKey = (metadata == null) ? null : metadata.findAttribute(qn); if (attKey != null) { element.setAttributeValue(attKey, ObjectConverter.getValue(value, attKey.getDatatype())); } else { element.setAttributeValue(qn, value); } }
@Override public void processAttribute(QName qn, String value) throws ParseException { if (element.hasAttribute(qn)) { throw new ParseException( CoreErrorDomain.ERR.duplicateAttributeValue.withInternalReason( "Duplicate value for attribute " + qn)); } AttributeKey<?> attKey = (metadata == null) ? null : metadata.findAttribute(qn); if (attKey != null) { element.setAttributeValue(attKey, ObjectConverter.getValue(value, attKey.getDatatype())); } else { element.setAttributeValue(qn, value); } }
@Override public void processAttribute(QName qn, String value) throws ParseException { if (element.hasAttribute(qn)) { throw new ParseException( CoreErrorDomain.ERR.duplicateAttributeValue.withInternalReason( "Duplicate value for attribute " + qn)); } AttributeKey<?> attKey = (metadata == null) ? null : metadata.findAttribute(qn); if (attKey != null) { element.setAttributeValue(attKey, ObjectConverter.getValue(value, attKey.getDatatype())); } else { element.setAttributeValue(qn, value); } }