当前位置: 首页>>代码示例>>Java>>正文


Java XMLUtils.addReturnToElement方法代码示例

本文整理汇总了Java中com.sun.org.apache.xml.internal.security.utils.XMLUtils.addReturnToElement方法的典型用法代码示例。如果您正苦于以下问题:Java XMLUtils.addReturnToElement方法的具体用法?Java XMLUtils.addReturnToElement怎么用?Java XMLUtils.addReturnToElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.org.apache.xml.internal.security.utils.XMLUtils的用法示例。


在下文中一共展示了XMLUtils.addReturnToElement方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: XPath2FilterContainer04

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Constructor XPath2FilterContainer04
 *
 * @param doc
 * @param xpath2filter
 * @param filterType
 */
private XPath2FilterContainer04(Document doc, String xpath2filter, String filterType) {
    super(doc);

    this.constructionElement.setAttributeNS(
        null, XPath2FilterContainer04._ATT_FILTER, filterType);

    if ((xpath2filter.length() > 2)
        && (!Character.isWhitespace(xpath2filter.charAt(0)))) {
        XMLUtils.addReturnToElement(this.constructionElement);
        this.constructionElement.appendChild(doc.createTextNode(xpath2filter));
        XMLUtils.addReturnToElement(this.constructionElement);
    } else {
        this.constructionElement.appendChild(doc.createTextNode(xpath2filter));
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:XPath2FilterContainer04.java

示例2: DSAKeyValue

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Constructor DSAKeyValue
 *
 * @param doc
 * @param key
 * @throws IllegalArgumentException
 */
public DSAKeyValue(Document doc, Key key) throws IllegalArgumentException {
    super(doc);

    XMLUtils.addReturnToElement(this.constructionElement);

    if (key instanceof java.security.interfaces.DSAPublicKey) {
        this.addBigIntegerElement(((DSAPublicKey) key).getParams().getP(), Constants._TAG_P);
        this.addBigIntegerElement(((DSAPublicKey) key).getParams().getQ(), Constants._TAG_Q);
        this.addBigIntegerElement(((DSAPublicKey) key).getParams().getG(), Constants._TAG_G);
        this.addBigIntegerElement(((DSAPublicKey) key).getY(), Constants._TAG_Y);
    } else {
        Object exArgs[] = { Constants._TAG_DSAKEYVALUE, key.getClass().getName() };

        throw new IllegalArgumentException(I18n.translate("KeyValue.IllegalArgument", exArgs));
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:24,代码来源:DSAKeyValue.java

示例3: add

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Method addX509Data
 *
 * @param x509data
 */
public void add(X509Data x509data) {
    if (x509Datas == null) {
        x509Datas = new ArrayList<X509Data>();
    }
    x509Datas.add(x509data);
    this.constructionElement.appendChild(x509data.getElement());
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:KeyInfo.java

示例4: DSAKeyValue

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Constructor DSAKeyValue
 *
 * @param doc
 * @param P
 * @param Q
 * @param G
 * @param Y
 */
public DSAKeyValue(Document doc, BigInteger P, BigInteger Q, BigInteger G, BigInteger Y) {
    super(doc);

    XMLUtils.addReturnToElement(this.constructionElement);
    this.addBigIntegerElement(P, Constants._TAG_P);
    this.addBigIntegerElement(Q, Constants._TAG_Q);
    this.addBigIntegerElement(G, Constants._TAG_G);
    this.addBigIntegerElement(Y, Constants._TAG_Y);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:DSAKeyValue.java

示例5: KeyValue

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Constructor KeyValue
 *
 * @param doc
 * @param rsaKeyValue
 */
public KeyValue(Document doc, RSAKeyValue rsaKeyValue) {
    super(doc);

    XMLUtils.addReturnToElement(this.constructionElement);
    this.constructionElement.appendChild(rsaKeyValue.getElement());
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:KeyValue.java

示例6: RetrievalMethod

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Constructor RetrievalMethod
 *
 * @param doc
 * @param URI
 * @param transforms
 * @param Type
 */
public RetrievalMethod(Document doc, String URI, Transforms transforms, String Type) {
    super(doc);

    this.constructionElement.setAttributeNS(null, Constants._ATT_URI, URI);

    if (Type != null) {
        this.constructionElement.setAttributeNS(null, Constants._ATT_TYPE, Type);
    }

    if (transforms != null) {
        this.constructionElement.appendChild(transforms.getElement());
        XMLUtils.addReturnToElement(this.constructionElement);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:RetrievalMethod.java

示例7: XMLSignature

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Constructor XMLSignature
 *
 * @param doc
 * @param baseURI
 * @param signatureMethodURI
 * @param hmacOutputLength
 * @param canonicalizationMethodURI
 * @throws XMLSecurityException
 */
public XMLSignature(
    Document doc,
    String baseURI,
    String signatureMethodURI,
    int hmacOutputLength,
    String canonicalizationMethodURI
) throws XMLSecurityException {
    super(doc);

    String xmlnsDsPrefix = getDefaultPrefix(Constants.SignatureSpecNS);
    if (xmlnsDsPrefix == null || xmlnsDsPrefix.length() == 0) {
        this.constructionElement.setAttributeNS(
            Constants.NamespaceSpecNS, "xmlns", Constants.SignatureSpecNS
        );
    } else {
        this.constructionElement.setAttributeNS(
            Constants.NamespaceSpecNS, "xmlns:" + xmlnsDsPrefix, Constants.SignatureSpecNS
        );
    }
    XMLUtils.addReturnToElement(this.constructionElement);

    this.baseURI = baseURI;
    this.signedInfo =
        new SignedInfo(
            this.doc, signatureMethodURI, hmacOutputLength, canonicalizationMethodURI
        );

    this.constructionElement.appendChild(this.signedInfo.getElement());
    XMLUtils.addReturnToElement(this.constructionElement);

    // create an empty SignatureValue; this is filled by setSignatureValueElement
    signatureValueElement =
        XMLUtils.createElementInSignatureSpace(this.doc, Constants._TAG_SIGNATUREVALUE);

    this.constructionElement.appendChild(signatureValueElement);
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:48,代码来源:XMLSignature.java

示例8: getKeyInfo

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Returns the KeyInfo child. If we are in signing mode and the KeyInfo
 * does not exist yet, it is created on demand and added to the Signature.
 * <br>
 * This allows to add arbitrary content to the KeyInfo during signing.
 *
 * @return the KeyInfo object
 */
public KeyInfo getKeyInfo() {
    // check to see if we are signing and if we have to create a keyinfo
    if (this.state == MODE_SIGN && this.keyInfo == null) {

        // create the KeyInfo
        this.keyInfo = new KeyInfo(this.doc);

        // get the Element from KeyInfo
        Element keyInfoElement = this.keyInfo.getElement();
        Element firstObject =
            XMLUtils.selectDsNode(
                this.constructionElement.getFirstChild(), Constants._TAG_OBJECT, 0
            );

        if (firstObject != null) {
            // add it before the object
            this.constructionElement.insertBefore(keyInfoElement, firstObject);
            XMLUtils.addReturnBeforeChild(this.constructionElement, firstObject);
        } else {
            // add it as the last element to the signature
            this.constructionElement.appendChild(keyInfoElement);
            XMLUtils.addReturnToElement(this.constructionElement);
        }
    }

    return this.keyInfo;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:36,代码来源:XMLSignature.java

示例9: addTransform

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Adds a user-provided Transform step.
 *
 * @param transform {@link Transform} object
 */
private void addTransform(Transform transform) {
    if (log.isLoggable(java.util.logging.Level.FINE)) {
        log.log(java.util.logging.Level.FINE, "Transforms.addTransform(" + transform.getURI() + ")");
    }

    Element transformElement = transform.getElement();

    this.constructionElement.appendChild(transformElement);
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:16,代码来源:Transforms.java

示例10: KeyInfo

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Constructor KeyInfo
 * @param doc
 */
public KeyInfo(Document doc) {
    super(doc);

    XMLUtils.addReturnToElement(this.constructionElement);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:KeyInfo.java

示例11: add

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Method add
 *
 * @param xmlX509Certificate
 */
public void add(XMLX509Certificate xmlX509Certificate) {
    this.constructionElement.appendChild(xmlX509Certificate.getElement());
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:X509Data.java

示例12: addUnknownElement

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Method addUnknownElement
 *
 * @param element
 */
public void addUnknownElement(Element element) {
    this.constructionElement.appendChild(element);
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:KeyInfo.java

示例13: Transforms

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Constructs {@link Transforms}.
 *
 * @param doc the {@link Document} in which <code>XMLSignature</code> will
 * be placed
 */
public Transforms(Document doc) {
    super(doc);
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:11,代码来源:Transforms.java

示例14: add

import com.sun.org.apache.xml.internal.security.utils.XMLUtils; //导入方法依赖的package包/类
/**
 * Method add
 *
 * @param keyvalue
 */
public void add(KeyValue keyvalue) {
    this.constructionElement.appendChild(keyvalue.getElement());
    XMLUtils.addReturnToElement(this.constructionElement);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:10,代码来源:KeyInfo.java


注:本文中的com.sun.org.apache.xml.internal.security.utils.XMLUtils.addReturnToElement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。