org.apache.abdera.model.Element.setParentElement()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(287)

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

Element.setParentElement介绍

[英]Set this Element's parent element
[中]设置此元素的父元素

代码示例

代码示例来源:origin: org.apache.abdera/abdera-core

  1. public <T extends Element> T setParentElement(Element parent) {
  2. internal.setParentElement(parent);
  3. return (T)this;
  4. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.abdera

  1. public <T extends Element>T setParentElement(Element parent) {
  2. internal.setParentElement(parent);
  3. return (T)this;
  4. }

代码示例来源:origin: rackerlabs/atom-hopper

  1. public Feed addArchiveNode( Feed feed ) {
  2. Factory factory = feed.getFactory();
  3. Element root = feed.getDocument().getRoot();
  4. Element elementArchive = factory.newExtensionElement( new QName( ARCHIVE_NS, ARCHIVE, ARCHIVE_PREFIX ), root );
  5. elementArchive.setParentElement( root );
  6. return feed;
  7. }
  8. }

代码示例来源:origin: org.apache.abdera/abdera-parser

  1. public <T extends ExtensibleElement> T addExtension(Element extension, Element before) {
  2. complete();
  3. extension = getInternal(extension);
  4. before = getInternal(before);
  5. if (before instanceof ElementWrapper) {
  6. ElementWrapper wrapper = (ElementWrapper)before;
  7. before = wrapper.getInternal();
  8. }
  9. if (before == null) {
  10. addExtension(extension);
  11. } else {
  12. extension.setParentElement(this);
  13. ((OMElement)before).insertSiblingBefore((OMElement)extension);
  14. }
  15. return (T)this;
  16. }

相关文章