org.apache.poi.xwpf.usermodel.XWPFDocument.getHyperlinkByID()方法的使用及代码示例

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

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

XWPFDocument.getHyperlinkByID介绍

暂无

代码示例

代码示例来源:origin: org.apache.poi/poi-ooxml

/**
   * If this Hyperlink is an external reference hyperlink,
   * return the object for it.
   */
  public XWPFHyperlink getHyperlink(XWPFDocument document) {
    String id = getHyperlinkId();
    if (id == null)
      return null;

    return document.getHyperlinkByID(id);
  }
}

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

/**
   * If this Hyperlink is an external reference hyperlink,
   * return the object for it.
   */
  public XWPFHyperlink getHyperlink(XWPFDocument document) {
    String id = getHyperlinkId();
    if (id == null)
      return null;

    return document.getHyperlinkByID(id);
  }
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

/**
  * If this Hyperlink is an external reference hyperlink,
  *  return the object for it.
  */
  public XWPFHyperlink getHyperlink(XWPFDocument document) {
   String id = getHyperlinkId();
   if(id == null)
     return null;
   
   return document.getHyperlinkByID(id);
  }
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * @param prgrph The paragraph of text to work on
 * @param outputHyperlinkUrls Should we output the links too, or just the link text?
 */
public XWPFHyperlinkDecorator(XWPFParagraph prgrph, XWPFParagraphDecorator nextDecorator, boolean outputHyperlinkUrls) {
  super(prgrph, nextDecorator);
  
  hyperlinkText = new StringBuffer();
  
  // loop over hyperlink anchors
  for(CTHyperlink link : paragraph.getCTP().getHyperlinkList()){
    for (CTR r : link.getRList()) {
      // Loop over text runs
      for (CTText text : r.getTList()){
        hyperlinkText.append(text.getStringValue());
      }
    }
    if(outputHyperlinkUrls && paragraph.getDocument().getHyperlinkByID(link.getId()) != null) {
      hyperlinkText.append(" <"+paragraph.getDocument().getHyperlinkByID(link.getId()).getURL()+">");
    }
  }
}

代码示例来源:origin: com.github.livesense/org.liveSense.framework.xdocreport

if ( StringUtils.isNotEmpty( hyperlinkId ) )
  XWPFHyperlink hyperlink = document.getHyperlinkByID( hyperlinkId );
  href = hyperlink != null ? hyperlink.getURL() : null;

代码示例来源:origin: fr.opensagres.xdocreport/org.apache.poi.xwpf.converter.core

if ( StringUtils.isNotEmpty( hyperlinkId ) )
  XWPFHyperlink hyperlink = document.getHyperlinkByID( hyperlinkId );
  href = hyperlink != null ? hyperlink.getURL() : null;

代码示例来源:origin: fr.opensagres.xdocreport/org.apache.poi.xwpf.converter.core-gae

if ( StringUtils.isNotEmpty( hyperlinkId ) )
  XWPFHyperlink hyperlink = document.getHyperlinkByID( hyperlinkId );
  href = hyperlink != null ? hyperlink.getURL() : null;

相关文章

XWPFDocument类方法