- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.poi.xwpf.usermodel.XWPFRelation.getContentType()
方法的一些代码示例,展示了XWPFRelation.getContentType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XWPFRelation.getContentType()
方法的具体详情如下:
包路径:org.apache.poi.xwpf.usermodel.XWPFRelation
类名称:XWPFRelation
方法名:getContentType
暂无
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Create a new WordProcessingML package and setup the default minimal content
*/
protected static OPCPackage newPackage() {
try {
OPCPackage pkg = OPCPackage.create(new ByteArrayOutputStream()); // NOSONAR - we do not want to close this here
// Main part
PackagePartName corePartName = PackagingURIHelper.createPartName(XWPFRelation.DOCUMENT.getDefaultFileName());
// Create main part relationship
pkg.addRelationship(corePartName, TargetMode.INTERNAL, PackageRelationshipTypes.CORE_DOCUMENT);
// Create main document part
pkg.createPart(corePartName, XWPFRelation.DOCUMENT.getContentType());
pkg.getPackageProperties().setCreatorProperty(DOCUMENT_CREATOR);
return pkg;
} catch (Exception e) {
throw new POIXMLException(e);
}
}
代码示例来源:origin: org.apache.poi/poi-ooxml
PackagePart pp = getPackagePart();
if (pp.getContentType().equals(XWPFRelation.GLOSSARY_DOCUMENT.getContentType())) {
logger.log(POILogger.WARN,
"POI does not currently support template.main+xml (glossary) parts. " +
代码示例来源:origin: org.apache.poi/poi-ooxml
if ( rel.getContentType().equals( contentType ) ) {
return new XWPFWordExtractor(pkg);
代码示例来源:origin: apache/tika
/**
* This returns all items that might contain embedded objects:
* main document, headers, footers, comments, etc.
*/
@Override
protected List<PackagePart> getMainDocumentParts() {
List<PackagePart> mainStoryDocs = getStoryDocumentParts();
List<PackagePart> relatedParts = new ArrayList<>();
mainStoryDocs.addAll(
opcPackage.getPartsByContentType(
XWPFRelation.GLOSSARY_DOCUMENT.getContentType()));
for (PackagePart pp : mainStoryDocs) {
addRelatedParts(pp, relatedParts);
}
relatedParts.addAll(mainStoryDocs);
return relatedParts;
}
代码示例来源:origin: apache/tika
StringBuilder sb = new StringBuilder();
List<PackagePart> pps = container.getPartsByContentType(XWPFRelation.DOCUMENT.getContentType());
if (pps != null) {
for (PackagePart pp : pps) {
pps = container.getPartsByContentType(XWPFRelation.GLOSSARY_DOCUMENT.getContentType());
代码示例来源:origin: apache/tika
@Override
protected void buildXHTML(XHTMLContentHandler xhtml)
throws SAXException, XmlException, IOException {
//handle main document
List<PackagePart> pps = getStoryDocumentParts();
if (pps != null) {
for (PackagePart pp : pps) {
//likely only one, but why not...
handleDocumentPart(pp, xhtml);
}
}
//handle glossary document
pps = opcPackage.getPartsByContentType(XWPFRelation.GLOSSARY_DOCUMENT.getContentType());
if (pps != null) {
if (pps.size() > 0) {
xhtml.startElement("div", "class", "glossary");
for (PackagePart pp : pps) {
//likely only one, but why not...
handleDocumentPart(pp, xhtml);
}
xhtml.endElement("div");
}
}
}
代码示例来源:origin: apache/tika
private static POIXMLTextExtractor trySXWPF(OPCPackage pkg) throws XmlException, OpenXML4JException, IOException {
PackageRelationshipCollection packageRelationshipCollection = pkg.getRelationshipsByType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument");
if (packageRelationshipCollection.size() == 0) {
packageRelationshipCollection = pkg.getRelationshipsByType("http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument");
}
if (packageRelationshipCollection.size() == 0) {
return null;
}
PackagePart corePart = pkg.getPart(packageRelationshipCollection.getRelationship(0));
String targetContentType = corePart.getContentType();
for (XWPFRelation relation : XWPFWordExtractor.SUPPORTED_TYPES) {
if (targetContentType.equals(relation.getContentType())) {
return new XWPFEventBasedWordExtractor(pkg);
}
}
return null;
}
代码示例来源:origin: apache/tika
XWPFRelation.DOCUMENT.getContentType(),
xhtml, relationshipsManager, officeParserConfig));
XWPFRelation.FOOTNOTE.getContentType(),
xhtml, relationshipsManager, officeParserConfig));
XWPFRelation.HEADER.getContentType(),
xhtml, relationshipsManager, officeParserConfig));
XWPFRelation.FOOTER.getContentType(),
xhtml, relationshipsManager, officeParserConfig));
代码示例来源:origin: org.apache.tika/tika-parsers
/**
* This returns all items that might contain embedded objects:
* main document, headers, footers, comments, etc.
*/
@Override
protected List<PackagePart> getMainDocumentParts() {
List<PackagePart> mainStoryDocs = getStoryDocumentParts();
List<PackagePart> relatedParts = new ArrayList<>();
mainStoryDocs.addAll(
opcPackage.getPartsByContentType(
XWPFRelation.GLOSSARY_DOCUMENT.getContentType()));
for (PackagePart pp : mainStoryDocs) {
addRelatedParts(pp, relatedParts);
}
relatedParts.addAll(mainStoryDocs);
return relatedParts;
}
代码示例来源:origin: com.github.lafa.tikaNoExternal/tika-parsers
/**
* This returns all items that might contain embedded objects:
* main document, headers, footers, comments, etc.
*/
@Override
protected List<PackagePart> getMainDocumentParts() {
List<PackagePart> mainStoryDocs = getStoryDocumentParts();
List<PackagePart> relatedParts = new ArrayList<>();
mainStoryDocs.addAll(
opcPackage.getPartsByContentType(
XWPFRelation.GLOSSARY_DOCUMENT.getContentType()));
for (PackagePart pp : mainStoryDocs) {
addRelatedParts(pp, relatedParts);
}
relatedParts.addAll(mainStoryDocs);
return relatedParts;
}
代码示例来源:origin: org.apache.tika/tika-parsers
StringBuilder sb = new StringBuilder();
List<PackagePart> pps = container.getPartsByContentType(XWPFRelation.DOCUMENT.getContentType());
if (pps != null) {
for (PackagePart pp : pps) {
pps = container.getPartsByContentType(XWPFRelation.GLOSSARY_DOCUMENT.getContentType());
代码示例来源:origin: org.apache.tika/tika-parsers
@Override
protected void buildXHTML(XHTMLContentHandler xhtml)
throws SAXException, XmlException, IOException {
//handle main document
List<PackagePart> pps = getStoryDocumentParts();
if (pps != null) {
for (PackagePart pp : pps) {
//likely only one, but why not...
handleDocumentPart(pp, xhtml);
}
}
//handle glossary document
pps = opcPackage.getPartsByContentType(XWPFRelation.GLOSSARY_DOCUMENT.getContentType());
if (pps != null) {
if (pps.size() > 0) {
xhtml.startElement("div", "class", "glossary");
for (PackagePart pp : pps) {
//likely only one, but why not...
handleDocumentPart(pp, xhtml);
}
xhtml.endElement("div");
}
}
}
代码示例来源:origin: com.github.lafa.tikaNoExternal/tika-parsers
@Override
protected void buildXHTML(XHTMLContentHandler xhtml)
throws SAXException, XmlException, IOException {
//handle main document
List<PackagePart> pps = getStoryDocumentParts();
if (pps != null) {
for (PackagePart pp : pps) {
//likely only one, but why not...
handleDocumentPart(pp, xhtml);
}
}
//handle glossary document
pps = opcPackage.getPartsByContentType(XWPFRelation.GLOSSARY_DOCUMENT.getContentType());
if (pps != null) {
if (pps.size() > 0) {
xhtml.startElement("div", "class", "glossary");
for (PackagePart pp : pps) {
//likely only one, but why not...
handleDocumentPart(pp, xhtml);
}
xhtml.endElement("div");
}
}
}
代码示例来源:origin: org.apache.tika/tika-parsers
private static POIXMLTextExtractor trySXWPF(OPCPackage pkg) throws XmlException, OpenXML4JException, IOException {
PackageRelationshipCollection packageRelationshipCollection = pkg.getRelationshipsByType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument");
if (packageRelationshipCollection.size() == 0) {
packageRelationshipCollection = pkg.getRelationshipsByType("http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument");
}
if (packageRelationshipCollection.size() == 0) {
return null;
}
PackagePart corePart = pkg.getPart(packageRelationshipCollection.getRelationship(0));
String targetContentType = corePart.getContentType();
for (XWPFRelation relation : XWPFWordExtractor.SUPPORTED_TYPES) {
if (targetContentType.equals(relation.getContentType())) {
return new XWPFEventBasedWordExtractor(pkg);
}
}
return null;
}
代码示例来源:origin: com.github.lafa.tikaNoExternal/tika-parsers
private static POIXMLTextExtractor trySXWPF(OPCPackage pkg) throws XmlException, OpenXML4JException, IOException {
PackageRelationshipCollection packageRelationshipCollection = pkg.getRelationshipsByType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument");
if (packageRelationshipCollection.size() == 0) {
packageRelationshipCollection = pkg.getRelationshipsByType("http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument");
}
if (packageRelationshipCollection.size() == 0) {
return null;
}
PackagePart corePart = pkg.getPart(packageRelationshipCollection.getRelationship(0));
String targetContentType = corePart.getContentType();
for (XWPFRelation relation : XWPFWordExtractor.SUPPORTED_TYPES) {
if (targetContentType.equals(relation.getContentType())) {
return new XWPFEventBasedWordExtractor(pkg);
}
}
return null;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Create a new WordProcessingML package and setup the default minimal content
*/
protected static OPCPackage newPackage() {
try {
OPCPackage pkg = OPCPackage.create(new ByteArrayOutputStream()); // NOSONAR - we do not want to close this here
// Main part
PackagePartName corePartName = PackagingURIHelper.createPartName(XWPFRelation.DOCUMENT.getDefaultFileName());
// Create main part relationship
pkg.addRelationship(corePartName, TargetMode.INTERNAL, PackageRelationshipTypes.CORE_DOCUMENT);
// Create main document part
pkg.createPart(corePartName, XWPFRelation.DOCUMENT.getContentType());
pkg.getPackageProperties().setCreatorProperty(DOCUMENT_CREATOR);
return pkg;
} catch (Exception e) {
throw new POIXMLException(e);
}
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Create a new WordProcessingML package and setup the default minimal content
*/
protected static OPCPackage newPackage() {
try {
OPCPackage pkg = OPCPackage.create(new ByteArrayOutputStream());
// Main part
PackagePartName corePartName = PackagingURIHelper.createPartName(XWPFRelation.DOCUMENT.getDefaultFileName());
// Create main part relationship
pkg.addRelationship(corePartName, TargetMode.INTERNAL, PackageRelationshipTypes.CORE_DOCUMENT);
// Create main document part
pkg.createPart(corePartName, XWPFRelation.DOCUMENT.getContentType());
pkg.getPackageProperties().setCreatorProperty(DOCUMENT_CREATOR);
return pkg;
} catch (Exception e){
throw new POIXMLException(e);
}
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
if(corePart.getContentType().equals(rel.getContentType())) {
return new XWPFWordExtractor(pkg);
代码示例来源:origin: com.github.lafa.tikaNoExternal/tika-parsers
XWPFRelation.DOCUMENT.getContentType(),
xhtml, relationshipsManager, officeParserConfig));
XWPFRelation.FOOTNOTE.getContentType(),
xhtml, relationshipsManager, officeParserConfig));
XWPFRelation.HEADER.getContentType(),
xhtml, relationshipsManager, officeParserConfig));
XWPFRelation.FOOTER.getContentType(),
xhtml, relationshipsManager, officeParserConfig));
代码示例来源:origin: org.apache.tika/tika-parsers
XWPFRelation.DOCUMENT.getContentType(),
xhtml, relationshipsManager, officeParserConfig));
XWPFRelation.FOOTNOTE.getContentType(),
xhtml, relationshipsManager, officeParserConfig));
XWPFRelation.HEADER.getContentType(),
xhtml, relationshipsManager, officeParserConfig));
XWPFRelation.FOOTER.getContentType(),
xhtml, relationshipsManager, officeParserConfig));
我正在编写 java 代码来读取列名为“键”和“值”的 excel 文件。但是由于无法在这行代码中进行转换而出错, Row firstRow =(Row)sheet.getRow(0); 如何解决这个
在我使用 jasperreports-3.7.4 jar 以 Excel 格式下载 Jasper Reports 之前。现在我正在尝试升级到 jasperreports-6.3.1 jar。但它在调用
我在将报告导出为 XLS 时遇到了一些问题。导出为 PDF 效果很好。 所以我尝试更新到最新的 JasperReports 和 Apache POI 版本: JasperReports:5.5.0 兴
同一模型的其他函数工作正常,我只有其中两个有问题,它们都与数据库交互。在本地工作。 来自错误日志。 PHP fatal error :调用未定义的方法 UserModel::getScreens()
是否有可能在 django UserModel 的管理页面中创建自定义操作?我想自动将用户添加到组中(比如将他添加到员工中,设置一些额外的值等),当然还要创建操作来收回这些更改。 感谢您的帮助。 最佳
我想在包中输入提示用户模型。默认情况下,它是 App\User .在 channel 类(class)中,这没问题: class ChannelExample { public functio
这是我的代码: var user = UserModel.findOne({ _id: decodedToken.id, }, function (err, user) {
当我尝试在 Users 上使用 MongooseModel 时,出现以下错误 Nest can't resolve dependencies of the UserModel (?). Please
我对 Nodejs 和 mongoDB 还很陌生。我已经创建了注册和用户架构,但它无法识别this并发送以下错误: ReferenceError: userModel is not defined 当
我想使用 npoi 在 VS2012/2010 中操作 .xlsx 文件。为此,我应该导入 NPOI.XSSF.UserModel,但是当我添加 npoi.dll 并尝试导入它时,没有 XSSF 使用
本文整理了Java中org.apache.poi.xwpf.usermodel.XWPFHeaderFooter类的一些代码示例,展示了XWPFHeaderFooter类的具体用法。这些代码示例主要来
本文整理了Java中org.apache.poi.xssf.usermodel.XSSFHyperlink类的一些代码示例,展示了XSSFHyperlink类的具体用法。这些代码示例主要来源于Gith
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFSlideLayout类的一些代码示例,展示了XSLFSlideLayout类的具体用法。这些代码示例主要来源于
本文整理了Java中org.apache.poi.xwpf.usermodel.XWPFStyle类的一些代码示例,展示了XWPFStyle类的具体用法。这些代码示例主要来源于Github/Stack
本文整理了Java中org.apache.poi.xwpf.usermodel.XWPFRelation类的一些代码示例,展示了XWPFRelation类的具体用法。这些代码示例主要来源于Github
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFTextParagraph类的一些代码示例,展示了XSLFTextParagraph类的具体用法。这些代码示例主
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFTextRun类的一些代码示例,展示了XSLFTextRun类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFSlideMaster类的一些代码示例,展示了XSLFSlideMaster类的具体用法。这些代码示例主要来源于
本文整理了Java中org.apache.poi.xssf.usermodel.XSSFComment类的一些代码示例,展示了XSSFComment类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中org.apache.poi.xslf.usermodel.XSLFTableCell类的一些代码示例,展示了XSLFTableCell类的具体用法。这些代码示例主要来源于Gith
我是一名优秀的程序员,十分优秀!