/** * Gets the QName for the given DOM node. * * @param domNode the DOM node * * @return the QName for the element or null if the element was null */ public static QName getNodeQName(Node domNode) { if (domNode != null) { return constructQName(domNode.getNamespaceURI(), domNode.getLocalName(), domNode.getPrefix()); } return null; }
/** * Gets the QName for the given DOM node. * * @param domNode the DOM node * * @return the QName for the element or null if the element was null */ public static QName getNodeQName(Node domNode) { if (domNode != null) { return constructQName(domNode.getNamespaceURI(), domNode.getLocalName(), domNode.getPrefix()); } return null; }
/** * Constructs a QName from a string (attribute or element content) value. * * @param qname the QName string * @param owningObject XMLObject, with cached DOM, owning the QName * * @return the QName respresented by the string */ public static QName constructQName(String qname, XMLObject owningObject) { return constructQName(qname, owningObject.getDOM()); }
/** * Constructs a QName from a string (attribute or element content) value. * * @param qname the QName string * @param owningObject XMLObject, with cached DOM, owning the QName * * @return the QName respresented by the string */ public static QName constructQName(String qname, XMLObject owningObject) { return constructQName(qname, owningObject.getDOM()); }
/** * Sets the element QName. * * @param elementQName the element's QName */ protected void setElementQName(QName elementQName) { this.elementQname = XMLHelper.constructQName(elementQName.getNamespaceURI(), elementQName.getLocalPart(), elementQName.getPrefix()); getNamespaceManager().registerElementName(this.elementQname); }
/** * Sets the element QName. * * @param elementQName the element's QName */ protected void setElementQName(QName elementQName) { this.elementQname = XMLHelper.constructQName(elementQName.getNamespaceURI(), elementQName.getLocalPart(), elementQName.getPrefix()); getNamespaceManager().registerElementName(this.elementQname); }
/** {@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 { 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); } }
/** {@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 { UsernameToken token = (UsernameToken) xmlObject; QName attribQName = XMLHelper.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 { XMLHelper.unmarshallToAttributeMap(token.getUnknownAttributes(), attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AuthnContextDecl authnCtcDecl = (AuthnContextDecl) xmlObject; QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute .getPrefix()); if (attribute.isId()) { authnCtcDecl.getUnknownAttributes().registerID(attribQName); } authnCtcDecl.getUnknownAttributes().put(attribQName, attribute.getValue()); }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { Detail detail = (Detail) xmlObject; QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute .getPrefix()); if (attribute.isId()) { detail.getUnknownAttributes().registerID(attribQName); } detail.getUnknownAttributes().put(attribQName, attribute.getValue()); }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { XSAny xsAny = (XSAny) xmlObject; QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute .getPrefix()); if (attribute.isId()) { xsAny.getUnknownAttributes().registerID(attribQName); } xsAny.getUnknownAttributes().put(attribQName, attribute.getValue()); }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { Body body = (Body) xmlObject; QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute .getPrefix()); if (attribute.isId()) { body.getUnknownAttributes().registerID(attribQName); } body.getUnknownAttributes().put(attribQName, attribute.getValue()); }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { Envelope envelope = (Envelope) xmlObject; QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute .getPrefix()); if (attribute.isId()) { envelope.getUnknownAttributes().registerID(attribQName); } envelope.getUnknownAttributes().put(attribQName, attribute.getValue()); }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { XSAny xsAny = (XSAny) xmlObject; QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute .getPrefix()); if (attribute.isId()) { xsAny.getUnknownAttributes().registerID(attribQName); } xsAny.getUnknownAttributes().put(attribQName, attribute.getValue()); }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { Header header = (Header) xmlObject; QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute .getPrefix()); if (attribute.isId()) { header.getUnknownAttributes().registerID(attribQName); } header.getUnknownAttributes().put(attribQName, attribute.getValue()); }
/** {@inheritDoc} */ protected void unmarshallTextContent(XMLObject xmlObject, Text content) throws UnmarshallingException { String textContent = DatatypeHelper.safeTrimOrNullString(content.getWholeText()); if (textContent != null) { XSQName qname = (XSQName) xmlObject; qname.setValue(XMLHelper.constructQName(textContent, XMLHelper.getElementAncestor(content))); } } }
/** {@inheritDoc} */ protected void unmarshallTextContent(XMLObject xmlObject, Text content) throws UnmarshallingException { String textContent = DatatypeHelper.safeTrimOrNullString(content.getWholeText()); if (textContent != null) { XSQName qname = (XSQName) xmlObject; qname.setValue(XMLHelper.constructQName(textContent, XMLHelper.getElementAncestor(content))); } } }