gpt4 book ai didi

javax.xml.crypto.dsig.XMLObject.getId()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 06:35:05 27 4
gpt4 key购买 nike

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

XMLObject.getId介绍

[英]Returns the Id of this XMLObject.
[中]返回此XMLObject的Id。

代码示例

代码示例来源:origin: be.fedict.eid-applet/eid-applet-service-signer

@SuppressWarnings("unchecked")
private XMLObject findObject(XMLSignature xmlSignature, String objectId) {
  List<XMLObject> objects = xmlSignature.getObjects();
  for (XMLObject object : objects) {
    if (objectId.equals(object.getId())) {
      LOG.debug("Found \"" + objectId + "\" ds:object");
      return object;
    }
  }
  return null;
}

代码示例来源:origin: org.apache.santuario/xmlsec

@Override
public boolean equals(Object o) {
  if (this == o) {
    return true;
  }
  if (!(o instanceof XMLObject)) {
    return false;
  }
  XMLObject oxo = (XMLObject)o;
  boolean idsEqual = id == null ? oxo.getId() == null
                  : id.equals(oxo.getId());
  boolean encodingsEqual =
    encoding == null ? oxo.getEncoding() == null
             : encoding.equals(oxo.getEncoding());
  boolean mimeTypesEqual =
    mimeType == null ? oxo.getMimeType() == null
             : mimeType.equals(oxo.getMimeType());
  return idsEqual && encodingsEqual && mimeTypesEqual &&
      equalsContent(getXmlObjectContent(oxo));
}

代码示例来源:origin: be.fedict.eid-applet/eid-applet-service-signer

XMLObject idPackageObject = null;
for (XMLObject object : objects) {
  if ("idPackageObject".equals(object.getId())) {
    idPackageObject = object;
    break;

代码示例来源:origin: org.apache.santuario/xmlsec

public static void marshal(XmlWriter xwriter, XMLObject xmlObj, String dsPrefix, XMLCryptoContext context)
  throws MarshalException {
  xwriter.writeStartElement(dsPrefix, "Object", XMLSignature.XMLNS);
  // set attributes
  xwriter.writeIdAttribute("", "", "Id", xmlObj.getId());
  xwriter.writeAttribute("", "", "MimeType", xmlObj.getMimeType());
  xwriter.writeAttribute("", "", "Encoding", xmlObj.getEncoding());
  // create and append any elements and mixed content, if necessary
  @SuppressWarnings("unchecked")
  List<XMLStructure> content = xmlObj.getContent();
  for (XMLStructure object : content) {
    xwriter.marshalStructure(object, dsPrefix, context);
  }
  xwriter.writeEndElement(); // "Object"
}

代码示例来源:origin: org.apache.santuario/xmlsec

signatureIdMap.put(obj.getId(), obj);
List<XMLStructure> content = DOMXMLObject.getXmlObjectContent(obj);
for (XMLStructure xs : content) {

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com