org.opensaml.xml.schema.XSAny.getUnknownAttributes()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(104)

本文整理了Java中org.opensaml.xml.schema.XSAny.getUnknownAttributes()方法的一些代码示例,展示了XSAny.getUnknownAttributes()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSAny.getUnknownAttributes()方法的具体详情如下:
包路径:org.opensaml.xml.schema.XSAny
类名称:XSAny
方法名:getUnknownAttributes

XSAny.getUnknownAttributes介绍

暂无

代码示例

代码示例来源:origin: org.opensaml/xmltooling

/** {@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());
}

代码示例来源:origin: io.apigee.opensaml/xmltooling

/** {@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());
}

代码示例来源:origin: org.opensaml/xmltooling

/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
  XSAny xsAny = (XSAny) xmlObject;
  Attr attribute;
  for (Entry<QName, String> entry : xsAny.getUnknownAttributes().entrySet()) {
    attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
    attribute.setValue(entry.getValue());
    domElement.setAttributeNodeNS(attribute);
    if (Configuration.isIDAttribute(entry.getKey())
        || xsAny.getUnknownAttributes().isIDAttribute(entry.getKey())) {
      attribute.getOwnerElement().setIdAttributeNode(attribute, true);
    }
  }
}

代码示例来源:origin: io.apigee.opensaml/xmltooling

/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
  XSAny xsAny = (XSAny) xmlObject;
  Attr attribute;
  for (Entry<QName, String> entry : xsAny.getUnknownAttributes().entrySet()) {
    attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
    attribute.setValue(entry.getValue());
    domElement.setAttributeNodeNS(attribute);
    if (Configuration.isIDAttribute(entry.getKey())
        || xsAny.getUnknownAttributes().isIDAttribute(entry.getKey())) {
      attribute.getOwnerElement().setIdAttributeNode(attribute, true);
    }
  }
}

代码示例来源:origin: usnistgov/iheos-toolkit2

public static XSAny createAttributeValue(String value, String type) {
  XSAny ep = createAttributeValue();
  ep.setTextContent(String.valueOf(value));
  ep.getUnknownAttributes().put(XSI_TYPE_ATTRIBUTE_NAME, type);
  
  ep.addNamespace(new Namespace(XMLConstants.XSI_NS, XMLConstants.XSI_PREFIX));
  return ep;
}

代码示例来源:origin: edu.internet2.middleware/shibboleth-common

} else if (xmlObj instanceof XSAny) {
  final XSAny wc = (XSAny) xmlObj;
  if (wc.getUnknownAttributes().isEmpty() && wc.getUnknownXMLObjects().isEmpty()) {
    toMatch = wc.getTextContent();

相关文章

微信公众号

最新文章

更多