/** * Method registerElementById * * @param element the element to register * @param id the ID attribute */ public static void registerElementById(Element element, Attr id) { element.setIdAttributeNode(id, true); }
protected void setLocalIdAttribute(String attrName, String value) { if (value != null) { Attr attr = getDocument().createAttributeNS(null, attrName); attr.setValue(value); getElement().setAttributeNodeNS(attr); getElement().setIdAttributeNode(attr, true); } else { getElement().removeAttributeNS(null, attrName); } }
/** * Method registerElementById * * @param element the element to register * @param id the ID attribute */ public static void registerElementById(Element element, Attr id) { element.setIdAttributeNode(id, true); }
@Override public void writeIdAttribute(String prefix, String namespaceURI, String localName, String value) { if (value == null) { return; } Attr newAttr = writeAttribute(prefix, namespaceURI, localName, value); ( (Element)currentNode).setIdAttributeNode(newAttr, true); }
/** * @see org.w3c.dom.Element#setIdAttributeNode(org.w3c.dom.Attr, boolean) */ public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { getCurrentInternal().setIdAttributeNode(idAttr, isId); }
/** * @see org.w3c.dom.Element#setIdAttributeNode(org.w3c.dom.Attr, boolean) */ @Override public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { original.get().setIdAttributeNode(idAttr, isId); }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { KeyInfoType keyInfo = (KeyInfoType) xmlObject; if (attribute.getLocalName().equals(KeyInfoType.ID_ATTRIB_NAME)) { keyInfo.setID(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { ECKeyValue ec = (ECKeyValue) xmlObject; if (attribute.getLocalName().equals(ECKeyValue.ID_ATTRIB_NAME)) { ec.setID(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { KeyInfoType keyInfo = (KeyInfoType) xmlObject; if (attribute.getLocalName().equals(KeyInfoType.ID_ATTRIB_NAME)) { keyInfo.setID(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { EncryptionProperties ep = (EncryptionProperties) xmlObject; if (attribute.getLocalName().equals(EncryptionProperties.ID_ATTRIB_NAME)) { ep.setID(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { KeyInfoReference ref = (KeyInfoReference) xmlObject; if (attribute.getLocalName().equals(KeyInfoReference.ID_ATTRIB_NAME)) { ref.setID(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else if (attribute.getLocalName().equals(KeyInfoReference.URI_ATTRIB_NAME)) { ref.setURI(attribute.getValue()); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AttributedString attributedString = (AttributedString) xmlObject; QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix()); if (AttributedString.WSU_ID_ATTR_NAME.equals(attribQName)) { attributedString.setWSUId(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { XMLHelper.unmarshallToAttributeMap(attributedString.getUnknownAttributes(), attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AttributedString attributedString = (AttributedString) xmlObject; QName attribQName = QNameSupport.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix()); if (AttributedString.WSU_ID_ATTR_NAME.equals(attribQName)) { attributedString.setWSUId(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { XMLObjectSupport.unmarshallToAttributeMap(attributedString.getUnknownAttributes(), attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AttributedURI attributedURI = (AttributedURI) xmlObject; QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix()); if (AttributedURI.WSU_ID_ATTR_NAME.equals(attribQName)) { attributedURI.setWSUId(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { XMLHelper.unmarshallToAttributeMap(attributedURI.getUnknownAttributes(), attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AttributedURI attributedURI = (AttributedURI) xmlObject; QName attribQName = QNameSupport.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix()); if (AttributedURI.WSU_ID_ATTR_NAME.equals(attribQName)) { attributedURI.setWSUId(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { XMLObjectSupport.unmarshallToAttributeMap(attributedURI.getUnknownAttributes(), attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { UsernameToken token = (UsernameToken) xmlObject; QName attribQName = QNameSupport.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix()); if (UsernameToken.WSU_ID_ATTR_NAME.equals(attribQName)) { token.setWSUId(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { XMLObjectSupport.unmarshallToAttributeMap(token.getUnknownAttributes(), attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { Timestamp timestamp = (Timestamp) xmlObject; QName attrName = QNameSupport.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix()); if (Timestamp.WSU_ID_ATTR_NAME.equals(attrName)) { timestamp.setWSUId(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { XMLObjectSupport.unmarshallToAttributeMap(timestamp.getUnknownAttributes(), attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { Timestamp timestamp = (Timestamp) xmlObject; QName attrName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix()); if (Timestamp.WSU_ID_ATTR_NAME.equals(attrName)) { timestamp.setWSUId(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { XMLHelper.unmarshallToAttributeMap(timestamp.getUnknownAttributes(), attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AttributedDateTime dateTime = (AttributedDateTime) xmlObject; QName attrName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix()); if (AttributedDateTime.WSU_ID_ATTR_NAME.equals(attrName)) { dateTime.setWSUId(attribute.getValue()); attribute.getOwnerElement().setIdAttributeNode(attribute, true); } else { XMLHelper.unmarshallToAttributeMap(dateTime.getUnknownAttributes(), attribute); } }
protected void setLocalIdAttribute(String attrName, String value) { if (value != null) { Attr attr = getDocument().createAttributeNS(null, attrName); attr.setValue(value); getElement().setAttributeNodeNS(attr); getElement().setIdAttributeNode(attr, true); } else { getElement().removeAttributeNS(null, attrName); } }