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


Java ElementProxy.createElementForFamily方法代码示例

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


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

示例1: toElement

import com.sun.org.apache.xml.internal.security.utils.ElementProxy; //导入方法依赖的package包/类
/**
 * @return the XML Element form of that Reference
 */
public Element toElement() {
    String tagName = getType();
    Element result =
        ElementProxy.createElementForFamily(
            contextDocument,
            EncryptionConstants.EncryptionSpecNS,
            tagName
        );
    result.setAttribute(EncryptionConstants._ATT_URI, uri);

    // TODO: Need to martial referenceInformation
    // Figure out how to make this work..
    // <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>

    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:XMLCipher.java

示例2: toElement

import com.sun.org.apache.xml.internal.security.utils.ElementProxy; //导入方法依赖的package包/类
Element toElement() {
    Element result = ElementProxy.createElementForFamily(
        _contextDocument, EncryptionConstants.EncryptionSpecNS,
        EncryptionConstants._TAG_ENCRYPTIONPROPERTY);
    if (null != target) {
        result.setAttributeNS(null, EncryptionConstants._ATT_TARGET,
            target);
    }
    if (null != id) {
        result.setAttributeNS(null, EncryptionConstants._ATT_ID,
            id);
    }
    // TODO: figure out the anyAttribyte stuff...
    // TODO: figure out the any stuff...

    return (result);
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:18,代码来源:XMLCipher.java

示例3: toElement

import com.sun.org.apache.xml.internal.security.utils.ElementProxy; //导入方法依赖的package包/类
Element toElement() {
    Element result = ElementProxy.createElementForFamily(
        _contextDocument,
        EncryptionConstants.EncryptionSpecNS,
        EncryptionConstants._TAG_CIPHERDATA);
    if (cipherType == VALUE_TYPE) {
        result.appendChild(
            ((CipherValueImpl) cipherValue).toElement());
    } else if (cipherType == REFERENCE_TYPE) {
        result.appendChild(
            ((CipherReferenceImpl) cipherReference).toElement());
    } else {
        // complain
    }

    return (result);
}
 
开发者ID:aducode,项目名称:openjdk-source-code-learn,代码行数:18,代码来源:XMLCipher.java

示例4: toElement

import com.sun.org.apache.xml.internal.security.utils.ElementProxy; //导入方法依赖的package包/类
Element toElement() {
    Element result = ElementProxy.createElementForFamily(
        _contextDocument,
        EncryptionConstants.EncryptionSpecNS,
        EncryptionConstants._TAG_CIPHERREFERENCE);
    result.setAttributeNS(
        null, EncryptionConstants._ATT_URI, referenceURI);
    if (null != referenceTransforms) {
        result.appendChild(
            ((TransformsImpl) referenceTransforms).toElement());
    }

    return (result);
}
 
开发者ID:greghaskins,项目名称:openjdk-jdk7u-jdk,代码行数:15,代码来源:XMLCipher.java

示例5: toElement

import com.sun.org.apache.xml.internal.security.utils.ElementProxy; //导入方法依赖的package包/类
Element toElement() {
    Element result =
        ElementProxy.createElementForFamily(
            contextDocument,
            EncryptionConstants.EncryptionSpecNS,
            EncryptionConstants._TAG_REFERENCELIST
        );
    Iterator<Reference> eachReference = references.iterator();
    while (eachReference.hasNext()) {
        Reference reference = eachReference.next();
        result.appendChild(((ReferenceImpl) reference).toElement());
    }
    return result;
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:15,代码来源:XMLCipher.java

示例6: XPathFilterCHGPContainer

import com.sun.org.apache.xml.internal.security.utils.ElementProxy; //导入方法依赖的package包/类
/**
 * Constructor XPathFilterCHGPContainer
 *
 * @param doc
 * @param includeSlashPolicy
 * @param includeButSearch
 * @param excludeButSearch
 * @param exclude
 */
private XPathFilterCHGPContainer(
    Document doc, boolean includeSlashPolicy, String includeButSearch,
    String excludeButSearch, String exclude
) {
    super(doc);

    if (includeSlashPolicy) {
        this.constructionElement.setAttributeNS(
            null, XPathFilterCHGPContainer._ATT_INCLUDESLASH, "true"
        );
    } else {
        this.constructionElement.setAttributeNS(
            null, XPathFilterCHGPContainer._ATT_INCLUDESLASH, "false"
        );
    }

    if ((includeButSearch != null) && (includeButSearch.trim().length() > 0)) {
        Element includeButSearchElem =
            ElementProxy.createElementForFamily(
                doc, this.getBaseNamespace(), XPathFilterCHGPContainer._TAG_INCLUDE_BUT_SEARCH
            );

        includeButSearchElem.appendChild(
            this.doc.createTextNode(indentXPathText(includeButSearch))
        );
        XMLUtils.addReturnToElement(this.constructionElement);
        this.constructionElement.appendChild(includeButSearchElem);
    }

    if ((excludeButSearch != null) && (excludeButSearch.trim().length() > 0)) {
        Element excludeButSearchElem =
            ElementProxy.createElementForFamily(
                doc, this.getBaseNamespace(), XPathFilterCHGPContainer._TAG_EXCLUDE_BUT_SEARCH
            );

        excludeButSearchElem.appendChild(
            this.doc.createTextNode(indentXPathText(excludeButSearch)));

        XMLUtils.addReturnToElement(this.constructionElement);
        this.constructionElement.appendChild(excludeButSearchElem);
    }

    if ((exclude != null) && (exclude.trim().length() > 0)) {
        Element excludeElem =
            ElementProxy.createElementForFamily(
               doc, this.getBaseNamespace(), XPathFilterCHGPContainer._TAG_EXCLUDE);

        excludeElem.appendChild(this.doc.createTextNode(indentXPathText(exclude)));
        XMLUtils.addReturnToElement(this.constructionElement);
        this.constructionElement.appendChild(excludeElem);
    }

    XMLUtils.addReturnToElement(this.constructionElement);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:64,代码来源:XPathFilterCHGPContainer.java

示例7: XPathFilterCHGPContainer

import com.sun.org.apache.xml.internal.security.utils.ElementProxy; //导入方法依赖的package包/类
/**
 * Constructor XPathFilterCHGPContainer
 *
 * @param doc
 * @param includeSlashPolicy
 * @param includeButSearch
 * @param excludeButSearch
 * @param exclude
 */
private XPathFilterCHGPContainer(Document doc, boolean includeSlashPolicy,
                                 String includeButSearch,
                                 String excludeButSearch, String exclude) {

   super(doc);

   if (includeSlashPolicy) {
      this._constructionElement
         .setAttributeNS(null, XPathFilterCHGPContainer._ATT_INCLUDESLASH, "true");
   } else {
      this._constructionElement
         .setAttributeNS(null, XPathFilterCHGPContainer._ATT_INCLUDESLASH, "false");
   }

   if ((includeButSearch != null)
           && (includeButSearch.trim().length() > 0)) {
      Element includeButSearchElem =
         ElementProxy.createElementForFamily(doc, this.getBaseNamespace(),
                                     XPathFilterCHGPContainer
                                        ._TAG_INCLUDE_BUT_SEARCH);

      includeButSearchElem
         .appendChild(this._doc
            .createTextNode(indentXPathText(includeButSearch)));
      XMLUtils.addReturnToElement(this._constructionElement);
      this._constructionElement.appendChild(includeButSearchElem);
   }

   if ((excludeButSearch != null)
           && (excludeButSearch.trim().length() > 0)) {
      Element excludeButSearchElem =
      ElementProxy.createElementForFamily(doc, this.getBaseNamespace(),
                                     XPathFilterCHGPContainer
                                        ._TAG_EXCLUDE_BUT_SEARCH);

      excludeButSearchElem
         .appendChild(this._doc
            .createTextNode(indentXPathText(excludeButSearch)));
      XMLUtils.addReturnToElement(this._constructionElement);
      this._constructionElement.appendChild(excludeButSearchElem);
   }

   if ((exclude != null) && (exclude.trim().length() > 0)) {
      Element excludeElem = ElementProxy.createElementForFamily(doc,
                               this.getBaseNamespace(),
                               XPathFilterCHGPContainer._TAG_EXCLUDE);

      excludeElem
         .appendChild(this._doc.createTextNode(indentXPathText(exclude)));
      XMLUtils.addReturnToElement(this._constructionElement);
      this._constructionElement.appendChild(excludeElem);
   }

   XMLUtils.addReturnToElement(this._constructionElement);
}
 
开发者ID:aducode,项目名称:openjdk-source-code-learn,代码行数:65,代码来源:XPathFilterCHGPContainer.java


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