mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
Compare commits
192 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfb713df29 | ||
|
|
44598bd030 | ||
|
|
23369586da | ||
|
|
9d9865c9b8 | ||
|
|
e9e9612a1f | ||
|
|
1594baf696 | ||
|
|
839ce4a0f4 | ||
|
|
260b22fb09 | ||
|
|
ac4e3c199e | ||
|
|
a1f6f2786f | ||
|
|
b923655b43 | ||
|
|
6b72a2dff3 | ||
|
|
c7976440c3 | ||
|
|
811eb4a4a8 | ||
|
|
6ba4a1b050 | ||
|
|
4efa2b7162 | ||
|
|
139321c5e9 | ||
|
|
6a9224385e | ||
|
|
df5604a1d7 | ||
|
|
eafd6c04b8 | ||
|
|
e340f313bc | ||
|
|
bc02ef0703 | ||
|
|
692caf0f36 | ||
|
|
e96c9e17c0 | ||
|
|
55c1608a2d | ||
|
|
5338b17a8f | ||
|
|
c92c533d7a | ||
|
|
8d53613bcf | ||
|
|
62ae400993 | ||
|
|
ae3ed57baa | ||
|
|
8f149f51d0 | ||
|
|
ab196a7441 | ||
|
|
da3d64d9e3 | ||
|
|
04f4c1fa74 | ||
|
|
513a805c25 | ||
|
|
0ae15edb2c | ||
|
|
5eba199642 | ||
|
|
0de8ecd6a0 | ||
|
|
d1f3f9489f | ||
|
|
d1f0a88ea1 | ||
|
|
beab88fb0e | ||
|
|
66109187d1 | ||
|
|
c9b37678cc | ||
|
|
e54ba888e2 | ||
|
|
8df367310c | ||
|
|
58ac8d05f0 | ||
|
|
372388b7ed | ||
|
|
e3e04a641f | ||
|
|
d72e3a608c | ||
|
|
1910fff53e | ||
|
|
22531fe638 | ||
|
|
9c2f487c98 | ||
|
|
b09bf904d7 | ||
|
|
2acb5cf66a | ||
|
|
d60edd21a3 | ||
|
|
fd4d143d44 | ||
|
|
df2d5d62d9 | ||
|
|
8cdcda2873 | ||
|
|
18ef01295d | ||
|
|
ac4295deac | ||
|
|
d93a29ae67 | ||
|
|
1fc4f9e3b7 | ||
|
|
b401b92aea | ||
|
|
a5f5f4294e | ||
|
|
ba04c61188 | ||
|
|
f8a8189230 | ||
|
|
95b2a1cf1d | ||
|
|
017ff5f8f8 | ||
|
|
cc8b6d7591 | ||
|
|
6670c48c30 | ||
|
|
aead782eb2 | ||
|
|
c94e795f35 | ||
|
|
e9b33c0b08 | ||
|
|
befc941dcf | ||
|
|
ac989335d7 | ||
|
|
0ec4434f59 | ||
|
|
c28aec61d4 | ||
|
|
b195a3b9ed | ||
|
|
ddf71d0984 | ||
|
|
fb75600872 | ||
|
|
4dadb9d6cc | ||
|
|
e7515ba5e6 | ||
|
|
c1fac56998 | ||
|
|
3a56bbd73b | ||
|
|
6d42ff955a | ||
|
|
528591ba11 | ||
|
|
c703d00300 | ||
|
|
9e1afbbab1 | ||
|
|
3ac160b57d | ||
|
|
f2c52141c7 | ||
|
|
fd66689944 | ||
|
|
97a97bd75c | ||
|
|
338882ac88 | ||
|
|
2dd124eb42 | ||
|
|
fe3359bd79 | ||
|
|
6762b5a9fb | ||
|
|
037a001719 | ||
|
|
3a69605f4c | ||
|
|
08e9bb00d4 | ||
|
|
4fb34ebeae | ||
|
|
f476c64179 | ||
|
|
a9bc28a4bb | ||
|
|
0eb7135f2b | ||
|
|
4b3c688d51 | ||
|
|
e4e4582689 | ||
|
|
027927bfad | ||
|
|
2098df7467 | ||
|
|
40ca9bd085 | ||
|
|
88836e1614 | ||
|
|
e7620b7ce7 | ||
|
|
6d6089eee5 | ||
|
|
57ffd3aa12 | ||
|
|
2428265d35 | ||
|
|
3d9c243943 | ||
|
|
236784371b | ||
|
|
47d0e956b8 | ||
|
|
74bdee9c0d | ||
|
|
e5336586a9 | ||
|
|
2805093da6 | ||
|
|
2a2e4f095e | ||
|
|
5d8d3e77bf | ||
|
|
006e49765c | ||
|
|
c953a8ff22 | ||
|
|
f44ece137f | ||
|
|
97cef0a3e3 | ||
|
|
73d1fc53f5 | ||
|
|
614d7c7002 | ||
|
|
c51dadf703 | ||
|
|
c5c2540abb | ||
|
|
97ea97b5a2 | ||
|
|
6b6735a3c4 | ||
|
|
1dbfba9225 | ||
|
|
c4e0cde59c | ||
|
|
32d7a45b50 | ||
|
|
528b72d347 | ||
|
|
ccacd1540c | ||
|
|
22ff9e34b6 | ||
|
|
775da74dee | ||
|
|
b4326363d6 | ||
|
|
ed156e63c6 | ||
|
|
5a7cd39393 | ||
|
|
8f1cfa2eb3 | ||
|
|
2cb8c4020e | ||
|
|
4b38ab5401 | ||
|
|
e7c0389865 | ||
|
|
d83039cca7 | ||
|
|
62e12fdb1b | ||
|
|
53ceff13b2 | ||
|
|
fa95a3e522 | ||
|
|
031793ddaf | ||
|
|
e73c419a37 | ||
|
|
540f0e5617 | ||
|
|
9fb2c4b03e | ||
|
|
cb520e8046 | ||
|
|
ae0a17765e | ||
|
|
71b4b62a6d | ||
|
|
a2ed8fda3a | ||
|
|
2f5ec43601 | ||
|
|
b45b7095c0 | ||
|
|
9b7938bf81 | ||
|
|
789fcc29bb | ||
|
|
1c4f68f262 | ||
|
|
7ec1fc01d4 | ||
|
|
ad925ac0d1 | ||
|
|
7a36dfe031 | ||
|
|
a5d43073a6 | ||
|
|
c840e660b7 | ||
|
|
f258b2b26d | ||
|
|
90e5d5d998 | ||
|
|
7631eae9b2 | ||
|
|
3116668737 | ||
|
|
b770a35aba | ||
|
|
59e595b844 | ||
|
|
c6a621edc6 | ||
|
|
f774a638cb | ||
|
|
73b904f16d | ||
|
|
cd22293975 | ||
|
|
d486e50822 | ||
|
|
89fa331beb | ||
|
|
1604c410d1 | ||
|
|
61203972a5 | ||
|
|
709bfd4305 | ||
|
|
3b69442907 | ||
|
|
1d4f5d34bd | ||
|
|
bc2b1b0422 | ||
|
|
7b5fe9c42b | ||
|
|
dd0d6deb81 | ||
|
|
16ecbc7d48 | ||
|
|
323b5c8c6b | ||
|
|
41f4570c8f | ||
|
|
58ee3f732b | ||
|
|
7ec830f892 |
@ -1,4 +1,4 @@
|
|||||||
# https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features
|
# https://github.com/apache/infrastructure-asfyaml/blob/main/README.md
|
||||||
|
|
||||||
github:
|
github:
|
||||||
description: "Mirror of Apache POI gitbox. The Java API for Microsoft Documents."
|
description: "Mirror of Apache POI gitbox. The Java API for Microsoft Documents."
|
||||||
@ -34,6 +34,8 @@ github:
|
|||||||
|
|
||||||
protected_branches:
|
protected_branches:
|
||||||
trunk: {}
|
trunk: {}
|
||||||
|
5.5.x: {}
|
||||||
|
asf-site: {}
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
commits: commits@poi.apache.org
|
commits: commits@poi.apache.org
|
||||||
|
|||||||
6
.github/workflows/test-gradle.yml
vendored
6
.github/workflows/test-gradle.yml
vendored
@ -5,9 +5,9 @@ name: Java CI with Gradle
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ trunk ]
|
branches: [ trunk, 5.5.x ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ trunk ]
|
branches: [ trunk, 5.5.x ]
|
||||||
|
|
||||||
permissions: {}
|
permissions: {}
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v5
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
|
# Apache POI™
|
||||||
Apache POI™
|
|
||||||
======================
|
|
||||||
|
|
||||||
A Java library for reading and writing Microsoft Office binary and OOXML file formats.
|
A Java library for reading and writing Microsoft Office binary and OOXML file formats.
|
||||||
|
|
||||||
@ -35,32 +33,43 @@ And lower-level, supporting components:
|
|||||||
| Components named H??F are for reading or writing OLE2 binary formats.
|
| Components named H??F are for reading or writing OLE2 binary formats.
|
||||||
| Components named X??F are for reading or writing OpenOffice XML (OOXML) formats.
|
| Components named X??F are for reading or writing OpenOffice XML (OOXML) formats.
|
||||||
|
|
||||||
Getting started
|
# Getting started
|
||||||
------------------
|
|
||||||
|
|
||||||
Website: https://poi.apache.org/
|
Website: https://poi.apache.org/
|
||||||
|
|
||||||
`Mailing lists`_:
|
[Mailing lists](https://poi.apache.org/mailinglists.html):
|
||||||
|
|
||||||
* `Developers`_
|
* [Developers](https://lists.apache.org/list.html?dev@poi.apache.org)
|
||||||
* `Users`_
|
* [Users](https://lists.apache.org/list.html?user@poi.apache.org) Including Announcements
|
||||||
* `General`_ (release announcements)
|
* [General](https://lists.apache.org/list.html?general@poi.apache.org)
|
||||||
|
|
||||||
Bug tracker:
|
## Bug trackers
|
||||||
|
|
||||||
* `Bugzilla`_
|
* [Bugzilla](https://bz.apache.org/bugzilla/buglist.cgi?product=POI)
|
||||||
* `GitHub pull requests`_
|
* [GitHub](https://github.com/apache/poi/issues)
|
||||||
|
|
||||||
Source code:
|
## Source code
|
||||||
|
|
||||||
* Official `Apache Git repo`_ at apache.org
|
* https://github.com/apache/poi
|
||||||
|
|
||||||
Requires Java 1.8 or later.
|
Requires Java 11 or later. `trunk` branch is used for 6.0.0 development. POI 4 and 5 releases require Java 8 or later.
|
||||||
|
|
||||||
Contributing
|
|
||||||
------------------
|
|
||||||
|
|
||||||
* Download and install git, Java JDK 1.8+, and Apache Ant 1.8+ or Gradle
|
## Jars
|
||||||
|
|
||||||
|
A good resource for finding the published jars and forming build tool dependency definitions is https://mvnrepository.com/artifact/org.apache.poi.
|
||||||
|
|
||||||
|
* poi - main jar, including shared interfaces
|
||||||
|
* poi-scratchpad - extra classes to support legacy MS file formats (`H**F`)
|
||||||
|
* poi-ooxml - support for newer OOXML file formats (`X**F`)
|
||||||
|
* poi-ooxml-lite - generated classes based on MS XSDs used by poi-ooxml (only includes the most commonly used classes)
|
||||||
|
* poi-ooxml-full - generated classes based on MS XSDs (can be used instead of poi-ooxml-lite if you need support for less commonly used features)
|
||||||
|
* poi-excelant - tools for working with Excel files in Apache Ant scripts
|
||||||
|
* poi-examples
|
||||||
|
|
||||||
|
# Contributing
|
||||||
|
|
||||||
|
* Download and install git, Java JDK 11+, and Apache Ant 1.8+ or Gradle
|
||||||
|
|
||||||
* Check out the code from git
|
* Check out the code from git
|
||||||
|
|
||||||
@ -80,23 +89,12 @@ Contributing
|
|||||||
* Scratchpad (Binary formats): poi-scratchpad/src/main/java/org/apache/poi/
|
* Scratchpad (Binary formats): poi-scratchpad/src/main/java/org/apache/poi/
|
||||||
* Examples: poi-examples/src/main/java/org/apache/poi/
|
* Examples: poi-examples/src/main/java/org/apache/poi/
|
||||||
|
|
||||||
* More info: `How To Build page`_ at apache.org
|
* More info: [How To Build page](https://poi.apache.org/devel/)
|
||||||
|
|
||||||
Building jar files
|
# Building jar files
|
||||||
------------------
|
|
||||||
|
|
||||||
To build the jar files for poi, poi-ooxml, poi-ooxml-lite, poi-ooxml-full and poi-examples::
|
To build the jar files for poi, poi-ooxml, poi-ooxml-lite, poi-ooxml-full and poi-examples::
|
||||||
|
|
||||||
./gradlew jar
|
./gradlew jar
|
||||||
|
|
||||||
gradlew jar
|
gradlew jar
|
||||||
|
|
||||||
.. _Mailing lists: https://poi.apache.org/mailinglists.html
|
|
||||||
.. _Developers: https://lists.apache.org/list.html?dev@poi.apache.org
|
|
||||||
.. _Users: https://lists.apache.org/list.html?user@poi.apache.org
|
|
||||||
.. _General: https://lists.apache.org/list.html?general@poi.apache.org
|
|
||||||
.. _Bugzilla: https://bz.apache.org/bugzilla/buglist.cgi?product=POI
|
|
||||||
.. _GitHub pull requests: https://github.com/apache/poi/pulls
|
|
||||||
|
|
||||||
.. _Apache Git repo: https://github.com/apache/poi
|
|
||||||
.. _How To Build page: http://poi.apache.org/devel/
|
|
||||||
95
build.gradle
95
build.gradle
@ -34,9 +34,16 @@ plugins {
|
|||||||
id 'com.dorongold.task-tree' version '4.0.1'
|
id 'com.dorongold.task-tree' version '4.0.1'
|
||||||
id 'org.nosphere.apache.rat' version '0.8.1'
|
id 'org.nosphere.apache.rat' version '0.8.1'
|
||||||
id 'distribution'
|
id 'distribution'
|
||||||
id 'com.github.spotbugs' version '6.1.13' // 6.2.0+ requires JDK 11
|
|
||||||
id 'de.thetaphi.forbiddenapis' version '3.9'
|
// 6.2.0+ requires JDK 11
|
||||||
id 'org.sonarqube' version '4.0.0.2929'
|
// this is the version of the Gradle plugin, it usually includes a
|
||||||
|
// different version of spotbugs itself
|
||||||
|
// Latest spotbugs: https://github.com/spotbugs/spotbugs
|
||||||
|
// Latest gradle plugin: https://plugins.gradle.org/plugin/com.github.spotbugs
|
||||||
|
id 'com.github.spotbugs' version '6.4.8'
|
||||||
|
|
||||||
|
id 'de.thetaphi.forbiddenapis' version '3.10'
|
||||||
|
id 'org.sonarqube' version '7.2.2.6593'
|
||||||
id 'org.cyclonedx.bom' version '2.4.1'
|
id 'org.cyclonedx.bom' version '2.4.1'
|
||||||
id 'com.adarshr.test-logger' version '4.0.0'
|
id 'com.adarshr.test-logger' version '4.0.0'
|
||||||
}
|
}
|
||||||
@ -89,7 +96,7 @@ allprojects {
|
|||||||
// apply plugin: 'eclipse'
|
// apply plugin: 'eclipse'
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
|
|
||||||
version = '5.5.0'
|
version = '6.0.0-SNAPSHOT'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -107,24 +114,24 @@ subprojects {
|
|||||||
apply plugin: 'com.adarshr.test-logger'
|
apply plugin: 'com.adarshr.test-logger'
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
bouncyCastleVersion = '1.82'
|
bouncyCastleVersion = '1.83'
|
||||||
commonsCodecVersion = '1.19.0'
|
commonsCodecVersion = '1.21.0'
|
||||||
commonsCompressVersion = '1.28.0'
|
commonsCompressVersion = '1.28.0'
|
||||||
commonsIoVersion = '2.20.0'
|
commonsIoVersion = '2.21.0'
|
||||||
commonsMathVersion = '3.6.1'
|
commonsMathVersion = '3.6.1'
|
||||||
junitVersion = '5.13.4'
|
junitVersion = '5.13.4'
|
||||||
log4jVersion = '2.24.3'
|
log4jVersion = '2.25.3'
|
||||||
mockitoVersion = '4.11.0'
|
mockitoVersion = '5.21.0'
|
||||||
hamcrestVersion = '3.0'
|
hamcrestVersion = '3.0'
|
||||||
xmlbeansVersion = '5.3.0'
|
xmlbeansVersion = '5.3.0'
|
||||||
batikVersion = '1.19'
|
batikVersion = '1.19'
|
||||||
graphics2dVersion = '3.0.5'
|
graphics2dVersion = '3.0.5'
|
||||||
pdfboxVersion = '3.0.5'
|
pdfboxVersion = '3.0.6'
|
||||||
saxonVersion = '12.9'
|
saxonVersion = '12.9'
|
||||||
xmlSecVersion = '3.0.6'
|
xmlSecVersion = '3.0.6'
|
||||||
apiGuardianVersion = '1.1.2'
|
apiGuardianVersion = '1.1.2'
|
||||||
|
|
||||||
jdkVersion = (project.properties['jdkVersion'] ?: '8') as int
|
jdkVersion = (project.properties['jdkVersion'] ?: '11') as int
|
||||||
// see https://github.com/gradle/gradle/blob/master/subprojects/jvm-services/src/main/java/org/gradle/internal/jvm/inspection/JvmVendor.java
|
// see https://github.com/gradle/gradle/blob/master/subprojects/jvm-services/src/main/java/org/gradle/internal/jvm/inspection/JvmVendor.java
|
||||||
jdkVendor = (project.properties['jdkVendor'] ?: '') as String
|
jdkVendor = (project.properties['jdkVendor'] ?: '') as String
|
||||||
|
|
||||||
@ -132,7 +139,7 @@ subprojects {
|
|||||||
JAVA9_OUT = layout.buildDirectory.dir('classes/java9/main/').get().asFile.absolutePath
|
JAVA9_OUT = layout.buildDirectory.dir('classes/java9/main/').get().asFile.absolutePath
|
||||||
TEST9_SRC = 'src/test/java9'
|
TEST9_SRC = 'src/test/java9'
|
||||||
TEST9_OUT = layout.buildDirectory.dir('classes/java9/test/').get().asFile.absolutePath
|
TEST9_OUT = layout.buildDirectory.dir('classes/java9/test/').get().asFile.absolutePath
|
||||||
VERSIONS9 = 'META-INF/versions/9'
|
VERSIONS9 = '/META-INF/versions/9'
|
||||||
|
|
||||||
NO_SCRATCHPAD = (findProperty("scratchpad.ignore") == "true")
|
NO_SCRATCHPAD = (findProperty("scratchpad.ignore") == "true")
|
||||||
SAXON_TEST = (findProperty("saxon.test") == "true")
|
SAXON_TEST = (findProperty("saxon.test") == "true")
|
||||||
@ -205,15 +212,15 @@ subprojects {
|
|||||||
|
|
||||||
doFirst {
|
doFirst {
|
||||||
options {
|
options {
|
||||||
if (jdkVersion > 8) addBooleanOption('html5', true)
|
addBooleanOption('html5', true)
|
||||||
addBooleanOption('Xdoclint:all,-missing', true)
|
addBooleanOption('Xdoclint:all,-missing', true)
|
||||||
links 'https://poi.apache.org/apidocs/dev/'
|
links 'https://poi.apache.org/apidocs/dev/'
|
||||||
if (jdkVersion >= 23) links 'https://docs.oracle.com/en/java/javase/23/docs/api/' else links 'https://docs.oracle.com/javase/8/docs/api/'
|
if (jdkVersion >= 23) links 'https://docs.oracle.com/en/java/javase/23/docs/api/' else links 'https://docs.oracle.com/en/java/javase/11/docs/api/'
|
||||||
links 'https://xmlbeans.apache.org/docs/5.0.0/'
|
links 'https://xmlbeans.apache.org/docs/5.0.0/'
|
||||||
links 'https://commons.apache.org/proper/commons-compress/apidocs/'
|
links 'https://www.javadocs.dev/org.apache.commons/commons-compress/1.28.0/'
|
||||||
use = true
|
use = true
|
||||||
splitIndex = true
|
splitIndex = true
|
||||||
source = "1.8"
|
source = "11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -227,14 +234,14 @@ subprojects {
|
|||||||
|
|
||||||
tasks.withType(Jar).configureEach {
|
tasks.withType(Jar).configureEach {
|
||||||
duplicatesStrategy = DuplicatesStrategy.FAIL
|
duplicatesStrategy = DuplicatesStrategy.FAIL
|
||||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
// make sure we do not have distribution jar-files with different versions
|
// make sure we do not have distribution jar-files with different versions
|
||||||
// in the build-dir as those lead to strange errors about "duplicate modules"
|
// in the build-dir as those lead to strange errors about "duplicate modules"
|
||||||
// when building java9 JPMS class files ("java9")
|
// when building java9 JPMS class files ("java9")
|
||||||
ant.delete(failOnError: true, verbose: true) {
|
ant.delete(failOnError: true, verbose: true) {
|
||||||
fileset(dir: "../build/dist/maven/${project.archivesBaseName}", erroronmissingdir: false) {
|
fileset(dir: "../build/dist/maven/${base.archivesName.get()}", erroronmissingdir: false) {
|
||||||
include(name: '*.jar')
|
include(name: '*.jar')
|
||||||
exclude(name: "*${version}.jar")
|
exclude(name: "*${version}.jar")
|
||||||
exclude(name: "*${version}-sources.jar")
|
exclude(name: "*${version}-sources.jar")
|
||||||
@ -260,7 +267,7 @@ subprojects {
|
|||||||
}
|
}
|
||||||
// use failOnError=false for -javadoc and -tests as not all modules create this directory
|
// use failOnError=false for -javadoc and -tests as not all modules create this directory
|
||||||
ant.delete(failOnError: false, verbose: true) {
|
ant.delete(failOnError: false, verbose: true) {
|
||||||
fileset(dir: "../build/dist/maven/${project.archivesBaseName}-javadoc", erroronmissingdir: false) {
|
fileset(dir: "../build/dist/maven/${base.archivesName.get()}-javadoc", erroronmissingdir: false) {
|
||||||
include(name: '*-javadoc.jar')
|
include(name: '*-javadoc.jar')
|
||||||
exclude(name: "*${version}-javadoc.jar")
|
exclude(name: "*${version}-javadoc.jar")
|
||||||
|
|
||||||
@ -275,7 +282,7 @@ subprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ant.delete(failOnError: false, verbose: true) {
|
ant.delete(failOnError: false, verbose: true) {
|
||||||
fileset(dir: "../build/dist/maven/${project.archivesBaseName}-tests", erroronmissingdir: false) {
|
fileset(dir: "../build/dist/maven/${base.archivesName.get()}-tests", erroronmissingdir: false) {
|
||||||
include(name: '*-tests.jar')
|
include(name: '*-tests.jar')
|
||||||
exclude(name: "*${version}-tests.jar")
|
exclude(name: "*${version}-tests.jar")
|
||||||
|
|
||||||
@ -290,8 +297,8 @@ subprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ant.checksum(file: it.archivePath, algorithm: 'SHA-256', fileext: '.sha256', format: 'MD5SUM')
|
ant.checksum(file: it.archiveFile.get().asFile, algorithm: 'SHA-256', fileext: '.sha256', format: 'MD5SUM')
|
||||||
ant.checksum(file: it.archivePath, algorithm: 'SHA-512', fileext: '.sha512', format: 'MD5SUM')
|
ant.checksum(file: it.archiveFile.get().asFile, algorithm: 'SHA-512', fileext: '.sha512', format: 'MD5SUM')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,11 +326,11 @@ subprojects {
|
|||||||
javadocJar {
|
javadocJar {
|
||||||
// if javadocs and binaries are in the same directory, JPMS complaints about duplicated modules
|
// if javadocs and binaries are in the same directory, JPMS complaints about duplicated modules
|
||||||
// in the module-path
|
// in the module-path
|
||||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-javadoc")
|
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}-javadoc")
|
||||||
}
|
}
|
||||||
|
|
||||||
sourcesJar {
|
sourcesJar {
|
||||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||||
exclude 'META-INF/services/**'
|
exclude 'META-INF/services/**'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -414,27 +421,25 @@ subprojects {
|
|||||||
systemProperties['java.locale.providers'] = 'JRE,CLDR'
|
systemProperties['java.locale.providers'] = 'JRE,CLDR'
|
||||||
|
|
||||||
doFirst {
|
doFirst {
|
||||||
if (jdkVersion > 8) {
|
// some options were removed in JDK 18
|
||||||
// some options were removed in JDK 18
|
if (jdkVersion < 18) {
|
||||||
if (jdkVersion < 18) {
|
|
||||||
jvmArgs += [
|
|
||||||
'--illegal-access=warn',
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
jvmArgs += [
|
jvmArgs += [
|
||||||
// see https://github.com/java9-modularity/gradle-modules-plugin/issues/97
|
'--illegal-access=warn',
|
||||||
// opposed to the recommendation there, it doesn't work to add ... to the dependencies
|
|
||||||
// testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.13.2'
|
|
||||||
// gradles gradle-worker.jar is still not a JPMS module and thus runs as unnamed module
|
|
||||||
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=org.apache.poi.poi',
|
|
||||||
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED',
|
|
||||||
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED',
|
|
||||||
|
|
||||||
'-Dsun.reflect.debugModuleAccessChecks=true',
|
|
||||||
'-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true',
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jvmArgs += [
|
||||||
|
// see https://github.com/java9-modularity/gradle-modules-plugin/issues/97
|
||||||
|
// opposed to the recommendation there, it doesn't work to add ... to the dependencies
|
||||||
|
// testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.13.2'
|
||||||
|
// gradles gradle-worker.jar is still not a JPMS module and thus runs as unnamed module
|
||||||
|
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=org.apache.poi.poi',
|
||||||
|
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED',
|
||||||
|
'--add-exports','org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED',
|
||||||
|
|
||||||
|
'-Dsun.reflect.debugModuleAccessChecks=true',
|
||||||
|
'-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true',
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
jacoco {
|
jacoco {
|
||||||
@ -505,8 +510,8 @@ subprojects {
|
|||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
POI(MavenPublication) {
|
POI(MavenPublication) {
|
||||||
groupId 'org.apache.poi'
|
groupId = 'org.apache.poi'
|
||||||
artifactId project.archivesBaseName
|
artifactId = base.archivesName.get()
|
||||||
|
|
||||||
from components.java
|
from components.java
|
||||||
|
|
||||||
@ -587,7 +592,7 @@ subprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
generatePomFileForPOIPublication.destination = "../build/dist/maven/${project.archivesBaseName}/${project.archivesBaseName}-${project.version}.pom"
|
generatePomFileForPOIPublication.destination = "../build/dist/maven/${base.archivesName.get()}/${base.archivesName.get()}-${project.version}.pom"
|
||||||
|
|
||||||
tasks.withType(GenerateModuleMetadata).configureEach {
|
tasks.withType(GenerateModuleMetadata).configureEach {
|
||||||
enabled = false
|
enabled = false
|
||||||
|
|||||||
85
build.xml
85
build.xml
@ -26,7 +26,7 @@ under the License.
|
|||||||
To build the documentation you will need to install forrest and set
|
To build the documentation you will need to install forrest and set
|
||||||
the FORREST_HOME environment variable.
|
the FORREST_HOME environment variable.
|
||||||
|
|
||||||
Since POI 4.0 you will need JDK 1.8 or newer to build and run POI.
|
Since POI 6.0 you will need JDK 11 or newer to build and run POI.
|
||||||
|
|
||||||
Some people may find the tests hang when run through Ant. If this
|
Some people may find the tests hang when run through Ant. If this
|
||||||
happens to you, try giving Ant some more memory when you run it, eg:
|
happens to you, try giving Ant some more memory when you run it, eg:
|
||||||
@ -42,7 +42,7 @@ under the License.
|
|||||||
|
|
||||||
<description>The Apache POI project Ant build.</description>
|
<description>The Apache POI project Ant build.</description>
|
||||||
|
|
||||||
<property name="version.id" value="5.5.0"/>
|
<property name="version.id" value="6.0.0-SNAPSHOT"/>
|
||||||
<property name="release.rc" value=""/>
|
<property name="release.rc" value=""/>
|
||||||
|
|
||||||
<property environment="env"/>
|
<property environment="env"/>
|
||||||
@ -60,8 +60,8 @@ under the License.
|
|||||||
|
|
||||||
|
|
||||||
<!-- compiler options -->
|
<!-- compiler options -->
|
||||||
<property name="jdk.version.source" value="1.8" description="JDK version of source code"/>
|
<property name="jdk.version.source" value="11" description="JDK version of source code"/>
|
||||||
<property name="jdk.version.class" value="1.8" description="JDK version of generated class files"/>
|
<property name="jdk.version.class" value="11" description="JDK version of generated class files"/>
|
||||||
<property name="compile.debug" value="true"/>
|
<property name="compile.debug" value="true"/>
|
||||||
|
|
||||||
<condition property="isIBMVM">
|
<condition property="isIBMVM">
|
||||||
@ -69,7 +69,7 @@ under the License.
|
|||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
<condition property="isJava8" else="false">
|
<condition property="isJava8" else="false">
|
||||||
<equals arg1="${ant.java.version}" arg2="1.8"/>
|
<equals arg1="${ant.java.version}" arg2="11"/>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
<!-- add addOpens parameter for Java 9 and higher -->
|
<!-- add addOpens parameter for Java 9 and higher -->
|
||||||
@ -268,7 +268,7 @@ under the License.
|
|||||||
<dependency prefix="main.commons-math3" artifact="org.apache.commons:commons-math3:3.6.1" usage="main"/>
|
<dependency prefix="main.commons-math3" artifact="org.apache.commons:commons-math3:3.6.1" usage="main"/>
|
||||||
<dependency prefix="main.commons-io" artifact="commons-io:commons-io:2.20.0" usage="main"/>
|
<dependency prefix="main.commons-io" artifact="commons-io:commons-io:2.20.0" usage="main"/>
|
||||||
<dependency prefix="main.com.zaxxer" artifact="com.zaxxer:SparseBitSet:1.3" usage="main"/>
|
<dependency prefix="main.com.zaxxer" artifact="com.zaxxer:SparseBitSet:1.3" usage="main"/>
|
||||||
<dependency prefix="main.log4j-api" artifact="org.apache.logging.log4j:log4j-api:2.24.3" usage="main"/>
|
<dependency prefix="main.log4j-api" artifact="org.apache.logging.log4j:log4j-api:2.25.3" usage="main"/>
|
||||||
|
|
||||||
<dependency prefix="main.junit-api" artifact="org.junit.jupiter:junit-jupiter-api:5.13.4" usage="main-tests"/>
|
<dependency prefix="main.junit-api" artifact="org.junit.jupiter:junit-jupiter-api:5.13.4" usage="main-tests"/>
|
||||||
<dependency prefix="main.junit-jengine" artifact="org.junit.jupiter:junit-jupiter-engine:5.13.4" usage="main-tests"/>
|
<dependency prefix="main.junit-jengine" artifact="org.junit.jupiter:junit-jupiter-engine:5.13.4" usage="main-tests"/>
|
||||||
@ -284,11 +284,11 @@ under the License.
|
|||||||
<dependency prefix="main.jmhAnnotation" artifact="org.openjdk.jmh:jmh-generator-annprocess:1.35" usage="main-tests"/>
|
<dependency prefix="main.jmhAnnotation" artifact="org.openjdk.jmh:jmh-generator-annprocess:1.35" usage="main-tests"/>
|
||||||
<dependency prefix="main.hamcrest" artifact="org.hamcrest:hamcrest:3.0" usage="main-tests"/>
|
<dependency prefix="main.hamcrest" artifact="org.hamcrest:hamcrest:3.0" usage="main-tests"/>
|
||||||
<dependency prefix="main.xmlunit" artifact="org.xmlunit:xmlunit-core:2.10.3" usage="main-tests"/>
|
<dependency prefix="main.xmlunit" artifact="org.xmlunit:xmlunit-core:2.10.3" usage="main-tests"/>
|
||||||
<dependency prefix="main.mockito" artifact="org.mockito:mockito-core:4.11.0" usage="main-tests"/>
|
<dependency prefix="main.mockito" artifact="org.mockito:mockito-core:5.20.0" usage="main-tests"/>
|
||||||
<dependency prefix="main.byte-buddy" artifact="net.bytebuddy:byte-buddy:1.17.5" usage="main-tests"/>
|
<dependency prefix="main.byte-buddy" artifact="net.bytebuddy:byte-buddy:1.17.5" usage="main-tests"/>
|
||||||
<dependency prefix="main.byte-buddy-agent" artifact="net.bytebuddy:byte-buddy-agent:1.17.5" usage="main-tests"/>
|
<dependency prefix="main.byte-buddy-agent" artifact="net.bytebuddy:byte-buddy-agent:1.17.5" usage="main-tests"/>
|
||||||
<dependency prefix="main.objenesis" artifact="org.objenesis:objenesis:3.1" usage="main-tests"/>
|
<dependency prefix="main.objenesis" artifact="org.objenesis:objenesis:3.1" usage="main-tests"/>
|
||||||
<dependency prefix="main.log4j-core" artifact="org.apache.logging.log4j:log4j-core:2.24.3" usage="main-tests"/>
|
<dependency prefix="main.log4j-core" artifact="org.apache.logging.log4j:log4j-core:2.25.3" usage="main-tests"/>
|
||||||
<dependency prefix="main.commons-logging" artifact="commons-logging:commons-logging:1.2" usage="main-tests"/>
|
<dependency prefix="main.commons-logging" artifact="commons-logging:commons-logging:1.2" usage="main-tests"/>
|
||||||
|
|
||||||
<dependency prefix="main.ant" artifact="org.apache.ant:ant:1.10.15" usage="excelant"/>
|
<dependency prefix="main.ant" artifact="org.apache.ant:ant:1.10.15" usage="excelant"/>
|
||||||
@ -296,11 +296,11 @@ under the License.
|
|||||||
|
|
||||||
<!-- xml signature libs - not part of the distribution -->
|
<!-- xml signature libs - not part of the distribution -->
|
||||||
<dependency prefix="dsig.xmlsec" artifact="org.apache.santuario:xmlsec:3.0.6" usage="ooxml-provided"/>
|
<dependency prefix="dsig.xmlsec" artifact="org.apache.santuario:xmlsec:3.0.6" usage="ooxml-provided"/>
|
||||||
<dependency prefix="dsig.bouncycastle-prov" artifact="org.bouncycastle:bcprov-jdk18on:1.81" usage="ooxml-provided"/>
|
<dependency prefix="dsig.bouncycastle-prov" artifact="org.bouncycastle:bcprov-jdk18on:1.82" usage="ooxml-provided"/>
|
||||||
<dependency prefix="dsig.bouncycastle-pkix" artifact="org.bouncycastle:bcpkix-jdk18on:1.81" usage="ooxml-provided"/>
|
<dependency prefix="dsig.bouncycastle-pkix" artifact="org.bouncycastle:bcpkix-jdk18on:1.82" usage="ooxml-provided"/>
|
||||||
<dependency prefix="dsig.bouncycastle-util" artifact="org.bouncycastle:bcutil-jdk18on:1.81" usage="ooxml-provided"/>
|
<dependency prefix="dsig.bouncycastle-util" artifact="org.bouncycastle:bcutil-jdk18on:1.82" usage="ooxml-provided"/>
|
||||||
<!-- only used for signing the release - not used with the ooxml signatures -->
|
<!-- only used for signing the release - not used with the ooxml signatures -->
|
||||||
<dependency prefix="dsig.bouncycastle-bcpg" artifact="org.bouncycastle:bcpg-jdk18on:1.81" usage="util"/>
|
<dependency prefix="dsig.bouncycastle-bcpg" artifact="org.bouncycastle:bcpg-jdk18on:1.82" usage="util"/>
|
||||||
<dependency prefix="ooxml.test.stax2" artifact="org.codehaus.woodstox:stax2-api:4.2.1" usage="ooxml-provided"/>
|
<dependency prefix="ooxml.test.stax2" artifact="org.codehaus.woodstox:stax2-api:4.2.1" usage="ooxml-provided"/>
|
||||||
|
|
||||||
<!-- svg/batik/pdf libs - not part of the distribution - move batik to its own directory because of JPMS module-path issues -->
|
<!-- svg/batik/pdf libs - not part of the distribution - move batik to its own directory because of JPMS module-path issues -->
|
||||||
@ -670,11 +670,7 @@ under the License.
|
|||||||
<fileset dir="${basedir}/lib/main-tests">
|
<fileset dir="${basedir}/lib/main-tests">
|
||||||
<include name="byte-buddy-*1.12*.jar"/>
|
<include name="byte-buddy-*1.12*.jar"/>
|
||||||
<include name="mockito-core-3*.jar"/>
|
<include name="mockito-core-3*.jar"/>
|
||||||
<include name="mockito-core-4.0*.jar"/>
|
<include name="mockito-core-4*.jar"/>
|
||||||
<include name="mockito-core-4.2*.jar"/>
|
|
||||||
<include name="mockito-core-4.5*.jar"/>
|
|
||||||
<include name="mockito-core-4.6*.jar"/>
|
|
||||||
<include name="mockito-core-4.8*.jar"/>
|
|
||||||
<include name="hamcrest-core*"/>
|
<include name="hamcrest-core*"/>
|
||||||
<include name="junit-4*.jar"/>
|
<include name="junit-4*.jar"/>
|
||||||
<include name="*slf4j*.jar"/>
|
<include name="*slf4j*.jar"/>
|
||||||
@ -987,7 +983,7 @@ under the License.
|
|||||||
</classpath>
|
</classpath>
|
||||||
</javac>
|
</javac>
|
||||||
|
|
||||||
<javac release="9"
|
<javac release="11"
|
||||||
srcdir="${basedir}/poi-ooxml-full/src/main/java9"
|
srcdir="${basedir}/poi-ooxml-full/src/main/java9"
|
||||||
destdir="${basedir}/poi-ooxml-full/src/main/java9"
|
destdir="${basedir}/poi-ooxml-full/src/main/java9"
|
||||||
includeantruntime="false"
|
includeantruntime="false"
|
||||||
@ -1087,7 +1083,7 @@ under the License.
|
|||||||
<echo message="Building java9+ classes for @{module}"/>
|
<echo message="Building java9+ classes for @{module}"/>
|
||||||
|
|
||||||
<!-- compile jigsaw files to sources, so we don't forget to update/provide them for Java 8 builds -->
|
<!-- compile jigsaw files to sources, so we don't forget to update/provide them for Java 8 builds -->
|
||||||
<javac release="9"
|
<javac release="11"
|
||||||
srcdir="${basedir}/@{module}/src/main/java9"
|
srcdir="${basedir}/@{module}/src/main/java9"
|
||||||
destdir="${basedir}/@{module}/src/main/java9"
|
destdir="${basedir}/@{module}/src/main/java9"
|
||||||
includeantruntime="false"
|
includeantruntime="false"
|
||||||
@ -1126,7 +1122,7 @@ under the License.
|
|||||||
</jar>
|
</jar>
|
||||||
|
|
||||||
<!-- compile the tests -->
|
<!-- compile the tests -->
|
||||||
<javac release="8"
|
<javac release="11"
|
||||||
target="${jdk.version.class}"
|
target="${jdk.version.class}"
|
||||||
source="${jdk.version.source}"
|
source="${jdk.version.source}"
|
||||||
destdir="@{test-classes}"
|
destdir="@{test-classes}"
|
||||||
@ -1148,7 +1144,7 @@ under the License.
|
|||||||
<path location="@{test-classes}"/>
|
<path location="@{test-classes}"/>
|
||||||
</pathconvert>
|
</pathconvert>
|
||||||
|
|
||||||
<javac release="9"
|
<javac release="11"
|
||||||
srcdir="${basedir}/@{module}/src/test/java9"
|
srcdir="${basedir}/@{module}/src/test/java9"
|
||||||
destdir="${basedir}/@{module}/src/test/java9"
|
destdir="${basedir}/@{module}/src/test/java9"
|
||||||
includeantruntime="false"
|
includeantruntime="false"
|
||||||
@ -1276,7 +1272,7 @@ under the License.
|
|||||||
|
|
||||||
<!-- create ooxml-lite-agent jar -->
|
<!-- create ooxml-lite-agent jar -->
|
||||||
<mkdir dir="${ooxml.lite.output.dir}"/>
|
<mkdir dir="${ooxml.lite.output.dir}"/>
|
||||||
<javac release="8"
|
<javac release="11"
|
||||||
srcdir="${basedir}/poi-ooxml-lite-agent/src/main/java"
|
srcdir="${basedir}/poi-ooxml-lite-agent/src/main/java"
|
||||||
destdir="${ooxml.lite.output.dir}"
|
destdir="${ooxml.lite.output.dir}"
|
||||||
includeantruntime="false"
|
includeantruntime="false"
|
||||||
@ -1287,7 +1283,7 @@ under the License.
|
|||||||
</classpath>
|
</classpath>
|
||||||
</javac>
|
</javac>
|
||||||
|
|
||||||
<javac release="9"
|
<javac release="11"
|
||||||
srcdir="${basedir}/poi-ooxml-lite-agent/src/main/java9"
|
srcdir="${basedir}/poi-ooxml-lite-agent/src/main/java9"
|
||||||
destdir="${basedir}/poi-ooxml-lite-agent/src/main/java9"
|
destdir="${basedir}/poi-ooxml-lite-agent/src/main/java9"
|
||||||
includeantruntime="false"
|
includeantruntime="false"
|
||||||
@ -1495,7 +1491,7 @@ under the License.
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="compile-integration" depends="compile-scratchpad, compile-main, compile-ooxml, compile-examples">
|
<target name="compile-integration" depends="compile-scratchpad, compile-main, compile-ooxml, compile-examples">
|
||||||
<javac release="8"
|
<javac release="11"
|
||||||
target="${jdk.version.class}"
|
target="${jdk.version.class}"
|
||||||
source="${jdk.version.source}"
|
source="${jdk.version.source}"
|
||||||
destdir="${integration.output.test.dir}"
|
destdir="${integration.output.test.dir}"
|
||||||
@ -1522,7 +1518,7 @@ under the License.
|
|||||||
|
|
||||||
<mkdir dir="${integration.output.test.dir}/META-INF/versions/9"/>
|
<mkdir dir="${integration.output.test.dir}/META-INF/versions/9"/>
|
||||||
|
|
||||||
<javac release="9"
|
<javac release="11"
|
||||||
srcdir="${basedir}/poi-integration/src/test/java9"
|
srcdir="${basedir}/poi-integration/src/test/java9"
|
||||||
destdir="${integration.output.test.dir}/META-INF/versions/9"
|
destdir="${integration.output.test.dir}/META-INF/versions/9"
|
||||||
includeantruntime="false"
|
includeantruntime="false"
|
||||||
@ -1896,7 +1892,7 @@ under the License.
|
|||||||
|
|
||||||
<echo output="${basedir}/poi-ooxml-lite/src/main/java9/module-info.java">${full.schema}${lite.exports}}</echo>
|
<echo output="${basedir}/poi-ooxml-lite/src/main/java9/module-info.java">${full.schema}${lite.exports}}</echo>
|
||||||
|
|
||||||
<javac release="9"
|
<javac release="11"
|
||||||
srcdir="${basedir}/poi-ooxml-lite/src/main/java9"
|
srcdir="${basedir}/poi-ooxml-lite/src/main/java9"
|
||||||
destdir="${basedir}/poi-ooxml-lite/src/main/java9"
|
destdir="${basedir}/poi-ooxml-lite/src/main/java9"
|
||||||
includeantruntime="false"
|
includeantruntime="false"
|
||||||
@ -2101,6 +2097,7 @@ under the License.
|
|||||||
|
|
||||||
<!-- Generates the latest/development API documentation. -->
|
<!-- Generates the latest/development API documentation. -->
|
||||||
<target name="javadocs"
|
<target name="javadocs"
|
||||||
|
depends="compile-ooxml"
|
||||||
description="Generates the API documentation">
|
description="Generates the API documentation">
|
||||||
<echo message="Generating latest Javadocs in ${javadocs.report.dir}"/>
|
<echo message="Generating latest Javadocs in ${javadocs.report.dir}"/>
|
||||||
<javadoc verbose="false" author="true" destdir="${javadocs.report.dir}"
|
<javadoc verbose="false" author="true" destdir="${javadocs.report.dir}"
|
||||||
@ -2249,7 +2246,7 @@ under the License.
|
|||||||
|
|
||||||
<echo message="Building maven-jar for @{module}, module-name: ${module-name} with isJava8: ${isJava8} and src: @{src}"/>
|
<echo message="Building maven-jar for @{module}, module-name: ${module-name} with isJava8: ${isJava8} and src: @{src}"/>
|
||||||
|
|
||||||
<javac release="9"
|
<javac release="11"
|
||||||
srcdir="${basedir}/@{module}/src/main/java9"
|
srcdir="${basedir}/@{module}/src/main/java9"
|
||||||
destdir="@{src}/META-INF/versions/9"
|
destdir="@{src}/META-INF/versions/9"
|
||||||
includeantruntime="false"
|
includeantruntime="false"
|
||||||
@ -2576,29 +2573,30 @@ under the License.
|
|||||||
|
|
||||||
<!-- findbugs successor, spotbugs ... need to use the dependencies used in the spotbugs release. -->
|
<!-- findbugs successor, spotbugs ... need to use the dependencies used in the spotbugs release. -->
|
||||||
<!-- compare with the entries found in the MANIFEST.MF of spotbugs.jar -->
|
<!-- compare with the entries found in the MANIFEST.MF of spotbugs.jar -->
|
||||||
<dependency prefix="spotbugs" artifact="com.github.spotbugs:spotbugs:4.8.6" usage="${spotbugs.lib}" target="spotbugs.jar"/>
|
<dependency prefix="spotbugs" artifact="com.github.spotbugs:spotbugs:4.9.8" usage="${spotbugs.lib}" target="spotbugs.jar"/>
|
||||||
<dependency prefix="spotbugs-ant" artifact="com.github.spotbugs:spotbugs-ant:4.8.6" usage="${spotbugs.lib}" target="spotbugs-ant.jar"/>
|
<dependency prefix="spotbugs-ant" artifact="com.github.spotbugs:spotbugs-ant:4.9.8" usage="${spotbugs.lib}" target="spotbugs-ant.jar"/>
|
||||||
<dependency prefix="spotbugs-anno" artifact="com.github.spotbugs:spotbugs-annotations:4.8.6" usage="${spotbugs.lib}" target="spotbugs-annotations.jar"/>
|
<dependency prefix="spotbugs-anno" artifact="com.github.spotbugs:spotbugs-annotations:4.9.8" usage="${spotbugs.lib}" target="spotbugs-annotations.jar"/>
|
||||||
<dependency prefix="spotbugs.asm" artifact="org.ow2.asm:asm:9.7" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.asm" artifact="org.ow2.asm:asm:9.9" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.asm-analysis" artifact="org.ow2.asm:asm-analysis:9.7" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.asm-analysis" artifact="org.ow2.asm:asm-analysis:9.9" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.asm-commons" artifact="org.ow2.asm:asm-commons:9.7" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.asm-commons" artifact="org.ow2.asm:asm-commons:9.9" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.asm-tree" artifact="org.ow2.asm:asm-tree:9.7" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.asm-tree" artifact="org.ow2.asm:asm-tree:9.9" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.asm-util" artifact="org.ow2.asm:asm-util:9.7" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.asm-util" artifact="org.ow2.asm:asm-util:9.9" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.jsr305" artifact="com.google.code.findbugs:jsr305:3.0.2" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.jsr305" artifact="com.google.code.findbugs:jsr305:3.0.2" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.dom4j" artifact="org.dom4j:dom4j:2.1.4" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.dom4j" artifact="org.dom4j:dom4j:2.2.0" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.jaxen" artifact="jaxen:jaxen:2.0.0" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.jaxen" artifact="jaxen:jaxen:2.0.0" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.bcel" artifact="org.apache.bcel:bcel:6.9.0" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.bcel" artifact="org.apache.bcel:bcel:6.11.0" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.slf4j-api" artifact="org.slf4j:slf4j-api:2.0.17" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.slf4j-api" artifact="org.slf4j:slf4j-api:2.0.17" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.commons-lang" artifact="org.apache.commons:commons-lang3:3.14.0" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.commons-lang" artifact="org.apache.commons:commons-lang3:3.19.0" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.commons-text" artifact="org.apache.commons:commons-text:1.10.0" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.commons-text" artifact="org.apache.commons:commons-text:1.14.0" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.commons-codec" artifact="commons-codec:commons-codec:1.15" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.commons-codec" artifact="commons-codec:commons-codec:1.15" usage="${spotbugs.lib}"/>
|
||||||
|
<dependency prefix="spotbugs.commons-io" artifact="commons-io:commons-io:2.20.0" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.commons-logging" artifact="commons-logging:commons-logging:1.2" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.commons-logging" artifact="commons-logging:commons-logging:1.2" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.jcip-annotations" artifact="net.jcip:jcip-annotations:1.0" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.jcip-annotations" artifact="net.jcip:jcip-annotations:1.0" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.icu4j" artifact="com.ibm.icu:icu4j:68.2" usage="${spotbugs.lib}" target="icu4j-68.2.jar"/>
|
<dependency prefix="spotbugs.icu4j" artifact="com.ibm.icu:icu4j:68.2" usage="${spotbugs.lib}" target="icu4j-68.2.jar"/>
|
||||||
<dependency prefix="spotbugs.log4j-api" artifact="org.apache.logging.log4j:log4j-api:2.24.3" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.log4j-api" artifact="org.apache.logging.log4j:log4j-api:2.25.2" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.log4j-core" artifact="org.apache.logging.log4j:log4j-core:2.24.3" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.log4j-core" artifact="org.apache.logging.log4j:log4j-core:2.25.2" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.log4j-slf4j18-impl" artifact="org.apache.logging.log4j:log4j-slf4j2-impl:2.24.3" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.log4j-slf4j18-impl" artifact="org.apache.logging.log4j:log4j-slf4j2-impl:2.25.2" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.saxon" artifact="net.sf.saxon:Saxon-HE:12.4" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.saxon" artifact="net.sf.saxon:Saxon-HE:12.9" usage="${spotbugs.lib}"/>
|
||||||
<dependency prefix="spotbugs.xmlresolver" artifact="org.xmlresolver:xmlresolver:5.2.2" usage="${spotbugs.lib}"/>
|
<dependency prefix="spotbugs.xmlresolver" artifact="org.xmlresolver:xmlresolver:5.2.2" usage="${spotbugs.lib}"/>
|
||||||
|
|
||||||
<mkdir dir="${basedir}${spotbugs.lib}/config"/>
|
<mkdir dir="${basedir}${spotbugs.lib}/config"/>
|
||||||
@ -2613,6 +2611,7 @@ under the License.
|
|||||||
<downloadfile src="${spotbugs.commons-lang.url}" dest="${spotbugs.commons-lang.jar}"/>
|
<downloadfile src="${spotbugs.commons-lang.url}" dest="${spotbugs.commons-lang.jar}"/>
|
||||||
<downloadfile src="${spotbugs.commons-text.url}" dest="${spotbugs.commons-text.jar}"/>
|
<downloadfile src="${spotbugs.commons-text.url}" dest="${spotbugs.commons-text.jar}"/>
|
||||||
<downloadfile src="${spotbugs.commons-codec.url}" dest="${spotbugs.commons-codec.jar}"/>
|
<downloadfile src="${spotbugs.commons-codec.url}" dest="${spotbugs.commons-codec.jar}"/>
|
||||||
|
<downloadfile src="${spotbugs.commons-io.url}" dest="${spotbugs.commons-io.jar}"/>
|
||||||
<downloadfile src="${spotbugs.commons-logging.url}" dest="${spotbugs.commons-logging.jar}"/>
|
<downloadfile src="${spotbugs.commons-logging.url}" dest="${spotbugs.commons-logging.jar}"/>
|
||||||
<downloadfile src="${spotbugs.jcip-annotations.url}" dest="${spotbugs.jcip-annotations.jar}"/>
|
<downloadfile src="${spotbugs.jcip-annotations.url}" dest="${spotbugs.jcip-annotations.jar}"/>
|
||||||
<downloadfile src="${spotbugs.jsr305.url}" dest="${spotbugs.jsr305.jar}"/>
|
<downloadfile src="${spotbugs.jsr305.url}" dest="${spotbugs.jsr305.jar}"/>
|
||||||
|
|||||||
14
doap_POI.rdf
14
doap_POI.rdf
@ -35,6 +35,20 @@
|
|||||||
<programming-language>Java</programming-language>
|
<programming-language>Java</programming-language>
|
||||||
<category rdf:resource="https://projects.apache.org/category/content" />
|
<category rdf:resource="https://projects.apache.org/category/content" />
|
||||||
<category rdf:resource="https://projects.apache.org/category/library" />
|
<category rdf:resource="https://projects.apache.org/category/library" />
|
||||||
|
<release>
|
||||||
|
<Version>
|
||||||
|
<name>Apache POI 5.5.1</name>
|
||||||
|
<created>2025-11-30</created>
|
||||||
|
<revision>5.5.1</revision>
|
||||||
|
</Version>
|
||||||
|
</release>
|
||||||
|
<release>
|
||||||
|
<Version>
|
||||||
|
<name>Apache POI 5.5.0</name>
|
||||||
|
<created>2025-11-15</created>
|
||||||
|
<revision>5.5.0</revision>
|
||||||
|
</Version>
|
||||||
|
</release>
|
||||||
<release>
|
<release>
|
||||||
<Version>
|
<Version>
|
||||||
<name>Apache POI 5.4.1</name>
|
<name>Apache POI 5.4.1</name>
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
9
gradlew
vendored
9
gradlew
vendored
@ -86,8 +86,7 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||||
' "$PWD" ) || exit
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
@ -115,7 +114,7 @@ case "$( uname )" in #(
|
|||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH="\\\"\\\""
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
@ -206,7 +205,7 @@ fi
|
|||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
# Collect all arguments for the java command:
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
# and any embedded shellness will be escaped.
|
# and any embedded shellness will be escaped.
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
# treated as '${Hostname}' itself on the command line.
|
# treated as '${Hostname}' itself on the command line.
|
||||||
@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
-classpath "$CLASSPATH" \
|
-classpath "$CLASSPATH" \
|
||||||
org.gradle.wrapper.GradleWrapperMain \
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
# Stop when "xargs" is not available.
|
||||||
|
|||||||
188
gradlew.bat
vendored
188
gradlew.bat
vendored
@ -1,94 +1,94 @@
|
|||||||
@rem
|
@rem
|
||||||
@rem Copyright 2015 the original author or authors.
|
@rem Copyright 2015 the original author or authors.
|
||||||
@rem
|
@rem
|
||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@rem you may not use this file except in compliance with the License.
|
@rem you may not use this file except in compliance with the License.
|
||||||
@rem You may obtain a copy of the License at
|
@rem You may obtain a copy of the License at
|
||||||
@rem
|
@rem
|
||||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
@rem
|
@rem
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
@rem SPDX-License-Identifier: Apache-2.0
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
@rem
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@rem
|
@rem
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|
||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%"=="" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
@rem This is normally unused
|
@rem This is normally unused
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo. 1>&2
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
echo. 1>&2
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation. 1>&2
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:findJavaFromJavaHome
|
:findJavaFromJavaHome
|
||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo. 1>&2
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
echo. 1>&2
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation. 1>&2
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
set EXIT_CODE=%ERRORLEVEL%
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
exit /b %EXIT_CODE%
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
:omega
|
:omega
|
||||||
|
|||||||
@ -1,3 +1,20 @@
|
|||||||
|
/* ====================================================================
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
==================================================================== */
|
||||||
|
|
||||||
// This script is used as input to the Jenkins Job DSL plugin to create all the build-jobs that
|
// This script is used as input to the Jenkins Job DSL plugin to create all the build-jobs that
|
||||||
// Apache POI uses on the public Jenkins instance at https://ci-builds.apache.org/job/POI/
|
// Apache POI uses on the public Jenkins instance at https://ci-builds.apache.org/job/POI/
|
||||||
//
|
//
|
||||||
@ -14,15 +31,17 @@ def xercesUrl = 'https://repo1.maven.org/maven2/xerces/xercesImpl/2.6.1/xercesIm
|
|||||||
def xercesLib = './xercesImpl-2.6.1.jar'
|
def xercesLib = './xercesImpl-2.6.1.jar'
|
||||||
|
|
||||||
def poijobs = [
|
def poijobs = [
|
||||||
[ name: 'POI-DSL-1.8', trigger: 'H */12 * * *', jenkinsLite: true
|
[ name: 'POI-DSL-1.8',
|
||||||
],
|
jdk: '1.8',
|
||||||
[ name: 'POI-DSL-OpenJDK', jdk: 'OpenJDK 1.8', trigger: 'H */12 * * *',
|
trigger: 'H */12 * * *',
|
||||||
// only a limited set of nodes still have OpenJDK 8 (on Ubuntu) installed
|
jenkinsLite: true,
|
||||||
slaves: 'ubuntu',
|
disabled: true // JDK 8 is no longer supported by POI 6
|
||||||
skipcigame: true,
|
],
|
||||||
|
[ name: 'POI-DSL-1.8-branch-5.5.x',
|
||||||
|
jdk: '1.8',
|
||||||
|
branch: '5.5.x',
|
||||||
|
trigger: 'H */12 * * *',
|
||||||
jenkinsLite: true,
|
jenkinsLite: true,
|
||||||
// OpenJDK 1.8 is not available on the Apache CI any more
|
|
||||||
disabled: true
|
|
||||||
],
|
],
|
||||||
[ name: 'POI-DSL-1.11', jdk: '1.11', trigger: triggerSundays, skipcigame: true
|
[ name: 'POI-DSL-1.11', jdk: '1.11', trigger: triggerSundays, skipcigame: true
|
||||||
],
|
],
|
||||||
@ -30,10 +49,6 @@ def poijobs = [
|
|||||||
],
|
],
|
||||||
[ name: 'POI-DSL-1.21', jdk: '1.21', trigger: 'H */12 * * *', skipcigame: true
|
[ name: 'POI-DSL-1.21', jdk: '1.21', trigger: 'H */12 * * *', skipcigame: true
|
||||||
],
|
],
|
||||||
[ name: 'POI-DSL-1.23', jdk: '1.23', trigger: triggerSundays, skipcigame: true,
|
|
||||||
// let's save some CPU cycles here, 23 is not an LTS and JDK 24 is out
|
|
||||||
disabled: true
|
|
||||||
],
|
|
||||||
[ name: 'POI-DSL-1.24', jdk: '1.24', trigger: triggerSundays, skipcigame: true,
|
[ name: 'POI-DSL-1.24', jdk: '1.24', trigger: triggerSundays, skipcigame: true,
|
||||||
],
|
],
|
||||||
[ name: 'POI-DSL-1.25', jdk: '1.25', trigger: triggerSundays, skipcigame: true, skipSpotbugs: true,
|
[ name: 'POI-DSL-1.25', jdk: '1.25', trigger: triggerSundays, skipcigame: true, skipSpotbugs: true,
|
||||||
@ -51,17 +66,11 @@ def poijobs = [
|
|||||||
// the property triggers using Xerces as XML Parser and previously showed some exception that can occur
|
// the property triggers using Xerces as XML Parser and previously showed some exception that can occur
|
||||||
properties: ["-Dadditionaljar=${xercesLib}"]
|
properties: ["-Dadditionaljar=${xercesLib}"]
|
||||||
],
|
],
|
||||||
// [ name: 'POI-DSL-Maven', trigger: 'H */4 * * *', maven: true,
|
|
||||||
// // not needed any more now that we use Gradle for SonarQube
|
|
||||||
// disabled: true
|
|
||||||
// ],
|
|
||||||
[ name: 'POI-DSL-regenerate-javadoc', trigger: triggerSundays, javadoc: true
|
[ name: 'POI-DSL-regenerate-javadoc', trigger: triggerSundays, javadoc: true
|
||||||
],
|
],
|
||||||
// it was impossible to make this run stable in Gradle, thus disabling this for now
|
// it was impossible to make this run stable in Gradle, thus disabling this for now
|
||||||
[ name: 'POI-DSL-API-Check', trigger: '@daily', apicheck: true, disabled: true, useAnt: true
|
[ name: 'POI-DSL-API-Check', trigger: '@daily', apicheck: true, disabled: true, useAnt: true
|
||||||
],
|
],
|
||||||
// [ name: 'POI-DSL-Gradle', trigger: triggerSundays, email: 'centic@apache.org'
|
|
||||||
// ],
|
|
||||||
[ name: 'POI-DSL-no-scratchpad', trigger: triggerSundays, noScratchpad: true
|
[ name: 'POI-DSL-no-scratchpad', trigger: triggerSundays, noScratchpad: true
|
||||||
],
|
],
|
||||||
[ name: 'POI-DSL-saxon-test', trigger: triggerSundays, saxonTest: true
|
[ name: 'POI-DSL-saxon-test', trigger: triggerSundays, saxonTest: true
|
||||||
@ -73,7 +82,12 @@ def poijobs = [
|
|||||||
// ],
|
// ],
|
||||||
[ name: 'POI-DSL-SonarQube-Gradle', jdk: '1.17', trigger: 'H 7 * * *', sonar: true, skipcigame: true
|
[ name: 'POI-DSL-SonarQube-Gradle', jdk: '1.17', trigger: 'H 7 * * *', sonar: true, skipcigame: true
|
||||||
],
|
],
|
||||||
[ name: 'POI-DSL-Windows-1.8', trigger: 'H */12 * * *', windows: true, slaves: 'Windows', jenkinsLite: true
|
[ name: 'POI-DSL-Windows-1.8',
|
||||||
|
trigger: 'H */12 * * *',
|
||||||
|
windows: true,
|
||||||
|
slaves: 'Windows',
|
||||||
|
jenkinsLite: true,
|
||||||
|
disabled: true // JDK 8 is no longer supported by POI 6
|
||||||
],
|
],
|
||||||
[ name: 'POI-DSL-Windows-1.11', jdk: '1.11', trigger: triggerSundays, windows: true, slaves: 'Windows',
|
[ name: 'POI-DSL-Windows-1.11', jdk: '1.11', trigger: triggerSundays, windows: true, slaves: 'Windows',
|
||||||
jenkinsLite: true
|
jenkinsLite: true
|
||||||
@ -82,10 +96,6 @@ def poijobs = [
|
|||||||
],
|
],
|
||||||
[ name: 'POI-DSL-Windows-1.21', jdk: '1.21', trigger: 'H */12 * * *', windows: true, slaves: 'Windows', skipcigame: true
|
[ name: 'POI-DSL-Windows-1.21', jdk: '1.21', trigger: 'H */12 * * *', windows: true, slaves: 'Windows', skipcigame: true
|
||||||
],
|
],
|
||||||
[ name: 'POI-DSL-Windows-1.23', jdk: '1.23', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
|
|
||||||
// let's save some CPU cycles here, 23 is not an LTS and JDK 24 is out
|
|
||||||
disabled: true
|
|
||||||
],
|
|
||||||
[ name: 'POI-DSL-Windows-1.24', jdk: '1.24', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
|
[ name: 'POI-DSL-Windows-1.24', jdk: '1.24', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
|
||||||
],
|
],
|
||||||
[ name: 'POI-DSL-Windows-1.25', jdk: '1.25', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
|
[ name: 'POI-DSL-Windows-1.25', jdk: '1.25', trigger: triggerSundays, windows: true, slaves: 'Windows', skipcigame: true,
|
||||||
@ -108,10 +118,8 @@ def xmlbeansjobs = [
|
|||||||
],
|
],
|
||||||
[ name: 'POI-XMLBeans-DSL-1.21', jdk: '1.21', trigger: 'H */12 * * *', skipcigame: true,
|
[ name: 'POI-XMLBeans-DSL-1.21', jdk: '1.21', trigger: 'H */12 * * *', skipcigame: true,
|
||||||
],
|
],
|
||||||
[ name: 'POI-XMLBeans-DSL-1.23', jdk: '1.23', trigger: triggerSundays, skipcigame: true,
|
|
||||||
disabled: true
|
|
||||||
],
|
|
||||||
[ name: 'POI-XMLBeans-DSL-1.24', jdk: '1.24', trigger: triggerSundays, skipcigame: true,
|
[ name: 'POI-XMLBeans-DSL-1.24', jdk: '1.24', trigger: triggerSundays, skipcigame: true,
|
||||||
|
disabled: true
|
||||||
],
|
],
|
||||||
[ name: 'POI-XMLBeans-DSL-1.25', jdk: '1.25', trigger: triggerSundays, skipcigame: true,
|
[ name: 'POI-XMLBeans-DSL-1.25', jdk: '1.25', trigger: triggerSundays, skipcigame: true,
|
||||||
],
|
],
|
||||||
@ -123,7 +131,8 @@ def xmlbeansjobs = [
|
|||||||
def gitBase = 'https://github.com/apache/poi.git'
|
def gitBase = 'https://github.com/apache/poi.git'
|
||||||
def xmlbeansGitBase = 'https://github.com/apache/xmlbeans.git'
|
def xmlbeansGitBase = 'https://github.com/apache/xmlbeans.git'
|
||||||
|
|
||||||
def defaultJdk = '1.8'
|
def defaultJdk = '1.11'
|
||||||
|
def defaultBranch = 'trunk'
|
||||||
def defaultTrigger = 'H/15 * * * *' // check SCM every 60/15 = 4 minutes
|
def defaultTrigger = 'H/15 * * * *' // check SCM every 60/15 = 4 minutes
|
||||||
def defaultEmail = 'dev@poi.apache.org'
|
def defaultEmail = 'dev@poi.apache.org'
|
||||||
def defaultAnt = 'ant_1.10_latest'
|
def defaultAnt = 'ant_1.10_latest'
|
||||||
@ -137,11 +146,10 @@ def jdkMapping = [
|
|||||||
'1.11': [ jenkinsJdk: 'jdk_11_latest', jdkVersion: 11, jdkVendor: '' ],
|
'1.11': [ jenkinsJdk: 'jdk_11_latest', jdkVersion: 11, jdkVendor: '' ],
|
||||||
'1.17': [ jenkinsJdk: 'jdk_17_latest', jdkVersion: 17, jdkVendor: '' ],
|
'1.17': [ jenkinsJdk: 'jdk_17_latest', jdkVersion: 17, jdkVendor: '' ],
|
||||||
'1.21': [ jenkinsJdk: 'jdk_21_latest', jdkVersion: 21, jdkVendor: '' ],
|
'1.21': [ jenkinsJdk: 'jdk_21_latest', jdkVersion: 21, jdkVendor: '' ],
|
||||||
'1.23': [ jenkinsJdk: 'jdk_23_latest', jdkVersion: 23, jdkVendor: '' ],
|
|
||||||
'1.24': [ jenkinsJdk: 'jdk_24_latest', jdkVersion: 24, jdkVendor: '' ],
|
'1.24': [ jenkinsJdk: 'jdk_24_latest', jdkVersion: 24, jdkVendor: '' ],
|
||||||
'1.25': [ jenkinsJdk: 'jdk_25_latest', jdkVersion: 25, jdkVendor: '' ],
|
'1.25': [ jenkinsJdk: 'jdk_25_latest', jdkVersion: 25, jdkVendor: '' ],
|
||||||
'OpenJDK 1.8': [ jenkinsJdk: 'adoptopenjdk_hotspot_8u282', jdkVersion: 8, jdkVendor: 'adoptopenjdk' ],
|
// one of the few IBM JDKs that is still supported on ci-builds.apache.org
|
||||||
'IBMJDK': [ jenkinsJdk: 'ibmjdk_1.8.0_261', jdkVersion: 8, jdkVendor: 'ibm' ]
|
'IBMJDK': [ jenkinsJdk: 'ibm_semeru_21.0.2_13', jdkVersion: 21, jdkVendor: 'ibm' ]
|
||||||
]
|
]
|
||||||
|
|
||||||
static def shellEx(def context, String cmd, def poijob) {
|
static def shellEx(def context, String cmd, def poijob) {
|
||||||
@ -244,6 +252,7 @@ poijobs.each { poijob ->
|
|||||||
def email = poijob.email ?: defaultEmail
|
def email = poijob.email ?: defaultEmail
|
||||||
def slaves = poijob.slaves ?: defaultSlaves + (poijob.slaveAdd ?: '')
|
def slaves = poijob.slaves ?: defaultSlaves + (poijob.slaveAdd ?: '')
|
||||||
def antRT = poijob.windows ? defaultAntWindows : defaultAnt
|
def antRT = poijob.windows ? defaultAntWindows : defaultAnt
|
||||||
|
def checkoutBranch = poijob.branch ?: defaultBranch
|
||||||
|
|
||||||
job('POI/' + poijob.name) {
|
job('POI/' + poijob.name) {
|
||||||
if (poijob.disabled) {
|
if (poijob.disabled) {
|
||||||
@ -292,7 +301,7 @@ poijobs.each { poijob ->
|
|||||||
remote {
|
remote {
|
||||||
url(gitBase)
|
url(gitBase)
|
||||||
}
|
}
|
||||||
branch('*/trunk')
|
branch("*/${checkoutBranch}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
checkoutRetryCount(3)
|
checkoutRetryCount(3)
|
||||||
@ -602,7 +611,7 @@ Unfortunately we often see builds break because of changes/new machines...''')
|
|||||||
}
|
}
|
||||||
axes {
|
axes {
|
||||||
jdk(
|
jdk(
|
||||||
'jdk_1.8_latest',
|
'jdk_8_latest',
|
||||||
'jdk_11_latest',
|
'jdk_11_latest',
|
||||||
'jdk_17_latest',
|
'jdk_17_latest',
|
||||||
'jdk_21_latest',
|
'jdk_21_latest',
|
||||||
@ -610,8 +619,7 @@ Unfortunately we often see builds break because of changes/new machines...''')
|
|||||||
'jdk_24_latest',
|
'jdk_24_latest',
|
||||||
'jdk_25_latest',
|
'jdk_25_latest',
|
||||||
'jdk_26_latest',
|
'jdk_26_latest',
|
||||||
'adoptopenjdk_hotspot_8u282',
|
'ibm_semeru_21.0.2_13'
|
||||||
'ibmjdk_1.8.0_261'
|
|
||||||
)
|
)
|
||||||
// Note H50 is reserved according to its node-description
|
// Note H50 is reserved according to its node-description
|
||||||
label('Nodes','builds22','builds23','builds24','builds25','builds26','builds27','builds28','builds29','builds30','builds31','builds32','builds33','builds34','builds35','builds36','builds37','builds38','builds39','builds40','builds50','builds56','builds57','builds58','builds59','builds60',
|
label('Nodes','builds22','builds23','builds24','builds25','builds26','builds27','builds28','builds29','builds30','builds31','builds32','builds33','builds34','builds35','builds36','builds37','builds38','builds39','builds40','builds50','builds56','builds57','builds58','builds59','builds60',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
Apache POI
|
Apache POI
|
||||||
Copyright 2003-2025 The Apache Software Foundation
|
Copyright 2003-2026 The Apache Software Foundation
|
||||||
|
|
||||||
This product includes software developed at
|
This product includes software developed at
|
||||||
The Apache Software Foundation (https://www.apache.org/).
|
The Apache Software Foundation (https://www.apache.org/).
|
||||||
|
|||||||
@ -29,7 +29,7 @@ These are required to sign or validate signed Office documents. The OSGi bundles
|
|||||||
|
|
||||||
- XML Commons Resolver: https://mvnrepository.com/artifact/xml-resolver/xml-resolver/1.2-osgi
|
- XML Commons Resolver: https://mvnrepository.com/artifact/xml-resolver/xml-resolver/1.2-osgi
|
||||||
|
|
||||||
- Bouncy Castle: https://mvnrepository.com/artifact/org.bouncycastle/bcprov-ext-jdk18on/1.81, https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk18on/1.81
|
- Bouncy Castle: https://mvnrepository.com/artifact/org.bouncycastle/bcprov-ext-jdk18on/1.82, https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk18on/1.82
|
||||||
4. PDFBox and PDFBox Graphics2D
|
4. PDFBox and PDFBox Graphics2D
|
||||||
Required to render to PDF documents.
|
Required to render to PDF documents.
|
||||||
The required jars can be downloaded from:
|
The required jars can be downloaded from:
|
||||||
|
|||||||
10
osgi/pom.xml
10
osgi/pom.xml
@ -24,12 +24,12 @@
|
|||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi-bundle</artifactId>
|
<artifactId>poi-bundle</artifactId>
|
||||||
<packaging>bundle</packaging>
|
<packaging>bundle</packaging>
|
||||||
<version>5.5.0</version>
|
<version>6.0.0-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>Apache POI OSGi bundle</name>
|
<name>Apache POI OSGi bundle</name>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<poi.version>5.5.0</poi.version>
|
<poi.version>6.0.0-SNAPSHOT</poi.version>
|
||||||
<pax.exam.version>4.14.0</pax.exam.version>
|
<pax.exam.version>4.14.0</pax.exam.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
@ -39,8 +39,8 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.0</version>
|
<version>3.8.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>11</source>
|
||||||
<target>1.8</target>
|
<target>11</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
@ -231,7 +231,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<artifactId>log4j-core</artifactId>
|
<artifactId>log4j-core</artifactId>
|
||||||
<version>2.24.3</version>
|
<version>2.25.3</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
@ -53,8 +53,8 @@ tasks.register('compileJava9', JavaCompile) {
|
|||||||
javaCompiler = javaToolchains.compilerFor {
|
javaCompiler = javaToolchains.compilerFor {
|
||||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||||
}
|
}
|
||||||
sourceCompatibility = 1.9
|
sourceCompatibility = 11
|
||||||
targetCompatibility = 1.9
|
targetCompatibility = 11
|
||||||
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
||||||
source = file(JAVA9_SRC)
|
source = file(JAVA9_SRC)
|
||||||
classpath = files()
|
classpath = files()
|
||||||
@ -67,7 +67,7 @@ tasks.register('compileJava9', JavaCompile) {
|
|||||||
jar {
|
jar {
|
||||||
dependsOn compileJava9
|
dependsOn compileJava9
|
||||||
|
|
||||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||||
|
|
||||||
manifest {
|
manifest {
|
||||||
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
|
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
|
||||||
|
|||||||
@ -21,7 +21,7 @@ package org.apache.poi.examples.crypt;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Path;
|
||||||
import java.security.GeneralSecurityException;
|
import java.security.GeneralSecurityException;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
@ -72,7 +72,7 @@ public final class OOXMLPasswordsTry {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Try each password in turn, reporting progress
|
// Try each password in turn, reporting progress
|
||||||
try (Stream<String> lines = Files.lines(Paths.get(words))) {
|
try (Stream<String> lines = Files.lines(Path.of(words))) {
|
||||||
Optional<String> found = lines.filter(counter).filter(w -> isValid(d, w)).findFirst();
|
Optional<String> found = lines.filter(counter).filter(w -> isValid(d, w)).findFirst();
|
||||||
System.out.println(found.map(s -> "Password found: " + s).orElse("Error - No password matched"));
|
System.out.println(found.map(s -> "Password found: " + s).orElse("Error - No password matched"));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,30 +0,0 @@
|
|||||||
/* ====================================================================
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
==================================================================== */
|
|
||||||
|
|
||||||
|
|
||||||
package org.apache.poi.examples.hssf.usermodel;
|
|
||||||
|
|
||||||
import org.apache.poi.util.Removal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Placeholder Class - this is now handled in the Common SS example
|
|
||||||
* @deprecated in 5.1.0 - use {@link org.apache.poi.examples.ss.AddDimensionedImage}
|
|
||||||
*/
|
|
||||||
@Removal(version="6.0.0")
|
|
||||||
@Deprecated
|
|
||||||
public class AddDimensionedImage extends org.apache.poi.examples.ss.AddDimensionedImage {
|
|
||||||
}
|
|
||||||
@ -22,7 +22,7 @@ package org.apache.poi.examples.ss;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Path;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||||
@ -95,7 +95,7 @@ public final class ConditionalFormats {
|
|||||||
if (wb instanceof XSSFWorkbook) {
|
if (wb instanceof XSSFWorkbook) {
|
||||||
file += "x";
|
file += "x";
|
||||||
}
|
}
|
||||||
try (OutputStream out = Files.newOutputStream(Paths.get(file))) {
|
try (OutputStream out = Files.newOutputStream(Path.of(file))) {
|
||||||
wb.write(out);
|
wb.write(out);
|
||||||
}
|
}
|
||||||
System.out.println("Generated: " + file);
|
System.out.println("Generated: " + file);
|
||||||
|
|||||||
@ -23,7 +23,7 @@ import org.apache.poi.util.DefaultTempFileCreationStrategy;
|
|||||||
import org.apache.poi.util.TempFile;
|
import org.apache.poi.util.TempFile;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Path;
|
||||||
|
|
||||||
public final class TempFileUtils {
|
public final class TempFileUtils {
|
||||||
private TempFileUtils() {
|
private TempFileUtils() {
|
||||||
@ -31,7 +31,7 @@ public final class TempFileUtils {
|
|||||||
|
|
||||||
@SuppressWarnings("java:S106")
|
@SuppressWarnings("java:S106")
|
||||||
public static void checkTempFiles() {
|
public static void checkTempFiles() {
|
||||||
File tempDir = Paths.get(System.getProperty(TempFile.JAVA_IO_TMPDIR), DefaultTempFileCreationStrategy.POIFILES).toFile();
|
File tempDir = Path.of(System.getProperty(TempFile.JAVA_IO_TMPDIR), DefaultTempFileCreationStrategy.POIFILES).toFile();
|
||||||
if(tempDir.exists()) {
|
if(tempDir.exists()) {
|
||||||
String[] tempFiles = tempDir.list();
|
String[] tempFiles = tempDir.list();
|
||||||
if(tempFiles != null && tempFiles.length > 0) {
|
if(tempFiles != null && tempFiles.length > 0) {
|
||||||
|
|||||||
@ -1,251 +1,251 @@
|
|||||||
/*
|
/*
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* contributor license agreements. See the NOTICE file distributed with
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
* this work for additional information regarding copyright ownership.
|
* this work for additional information regarding copyright ownership.
|
||||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
* (the "License"); you may not use this file except in compliance with
|
* (the "License"); you may not use this file except in compliance with
|
||||||
* the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.apache.poi.xslf.usermodel;
|
package org.apache.poi.xslf.usermodel;
|
||||||
|
|
||||||
import java.awt.Rectangle;
|
import java.awt.Rectangle;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import javax.xml.namespace.QName;
|
import javax.xml.namespace.QName;
|
||||||
|
|
||||||
import org.apache.poi.openxml4j.opc.PackagePart;
|
import org.apache.poi.openxml4j.opc.PackagePart;
|
||||||
import org.apache.poi.openxml4j.opc.PackagePartName;
|
import org.apache.poi.openxml4j.opc.PackagePartName;
|
||||||
import org.apache.poi.openxml4j.opc.PackageRelationship;
|
import org.apache.poi.openxml4j.opc.PackageRelationship;
|
||||||
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
|
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
|
||||||
import org.apache.poi.openxml4j.opc.TargetMode;
|
import org.apache.poi.openxml4j.opc.TargetMode;
|
||||||
import org.apache.poi.sl.usermodel.PictureData.PictureType;
|
import org.apache.poi.sl.usermodel.PictureData.PictureType;
|
||||||
import org.apache.xmlbeans.XmlCursor;
|
import org.apache.xmlbeans.XmlCursor;
|
||||||
import org.openxmlformats.schemas.drawingml.x2006.main.CTHyperlink;
|
import org.openxmlformats.schemas.drawingml.x2006.main.CTHyperlink;
|
||||||
import org.openxmlformats.schemas.officeDocument.x2006.relationships.STRelationshipId;
|
import org.openxmlformats.schemas.officeDocument.x2006.relationships.STRelationshipId;
|
||||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTApplicationNonVisualDrawingProps;
|
import org.openxmlformats.schemas.presentationml.x2006.main.CTApplicationNonVisualDrawingProps;
|
||||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTExtension;
|
import org.openxmlformats.schemas.presentationml.x2006.main.CTExtension;
|
||||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTPicture;
|
import org.openxmlformats.schemas.presentationml.x2006.main.CTPicture;
|
||||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTSlide;
|
import org.openxmlformats.schemas.presentationml.x2006.main.CTSlide;
|
||||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonMediaNodeData;
|
import org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonMediaNodeData;
|
||||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonTimeNodeData;
|
import org.openxmlformats.schemas.presentationml.x2006.main.CTTLCommonTimeNodeData;
|
||||||
import org.openxmlformats.schemas.presentationml.x2006.main.CTTimeNodeList;
|
import org.openxmlformats.schemas.presentationml.x2006.main.CTTimeNodeList;
|
||||||
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeIndefinite;
|
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeIndefinite;
|
||||||
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeFillType;
|
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeFillType;
|
||||||
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeRestartType;
|
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeRestartType;
|
||||||
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeType;
|
import org.openxmlformats.schemas.presentationml.x2006.main.STTLTimeNodeType;
|
||||||
|
|
||||||
import com.xuggle.mediatool.IMediaReader;
|
import com.xuggle.mediatool.IMediaReader;
|
||||||
import com.xuggle.mediatool.MediaListenerAdapter;
|
import com.xuggle.mediatool.MediaListenerAdapter;
|
||||||
import com.xuggle.mediatool.ToolFactory;
|
import com.xuggle.mediatool.ToolFactory;
|
||||||
import com.xuggle.mediatool.event.IVideoPictureEvent;
|
import com.xuggle.mediatool.event.IVideoPictureEvent;
|
||||||
import com.xuggle.xuggler.Global;
|
import com.xuggle.xuggler.Global;
|
||||||
import com.xuggle.xuggler.IContainer;
|
import com.xuggle.xuggler.IContainer;
|
||||||
import com.xuggle.xuggler.io.InputOutputStreamHandler;
|
import com.xuggle.xuggler.io.InputOutputStreamHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adding multiple videos to a slide
|
* Adding multiple videos to a slide
|
||||||
*
|
*
|
||||||
* need the Xuggler 5.4 jars:
|
* need the Xuggler 5.4 jars:
|
||||||
* <repositories>
|
* <repositories>
|
||||||
* <repository>
|
* <repository>
|
||||||
* <id>xuggle repo</id>
|
* <id>xuggle repo</id>
|
||||||
* <url>http://xuggle.googlecode.com/svn/trunk/repo/share/java/</url>
|
* <url>http://xuggle.googlecode.com/svn/trunk/repo/share/java/</url>
|
||||||
* </repository>
|
* </repository>
|
||||||
* </repositories>
|
* </repositories>
|
||||||
* ...
|
* ...
|
||||||
* <dependency>
|
* <dependency>
|
||||||
* <groupId>xuggle</groupId>
|
* <groupId>xuggle</groupId>
|
||||||
* <artifactId>xuggle-xuggler</artifactId>
|
* <artifactId>xuggle-xuggler</artifactId>
|
||||||
* <version>5.4</version>
|
* <version>5.4</version>
|
||||||
* </dependency>
|
* </dependency>
|
||||||
*
|
*
|
||||||
* @see <a href="http://stackoverflow.com/questions/15197300/apache-poi-xslf-adding-movie-to-the-slide">Apache POI XSLF Adding movie to the slide</a>
|
* @see <a href="http://stackoverflow.com/questions/15197300/apache-poi-xslf-adding-movie-to-the-slide">Apache POI XSLF Adding movie to the slide</a>
|
||||||
* @see <a href="http://apache-poi.1045710.n5.nabble.com/Question-about-embedded-video-in-PPTX-files-tt5718461.html">Question about embedded video in PPTX files</a>
|
* @see <a href="http://apache-poi.1045710.n5.nabble.com/Question-about-embedded-video-in-PPTX-files-tt5718461.html">Question about embedded video in PPTX files</a>
|
||||||
*/
|
*/
|
||||||
public class AddVideoToPptx {
|
public class AddVideoToPptx {
|
||||||
static DecimalFormat df_time = new DecimalFormat("0.####");
|
static DecimalFormat df_time = new DecimalFormat("0.####");
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
URL video = new URL("http://archive.org/download/test-mpeg/test-mpeg.mpg");
|
URL video = new URL("http://archive.org/download/test-mpeg/test-mpeg.mpg");
|
||||||
// URL video = new URL("file:test-mpeg.mpg");
|
// URL video = new URL("file:test-mpeg.mpg");
|
||||||
|
|
||||||
XMLSlideShow pptx = new XMLSlideShow();
|
XMLSlideShow pptx = new XMLSlideShow();
|
||||||
|
|
||||||
// add video file
|
// add video file
|
||||||
String videoFileName = video.getPath().substring(video.getPath().lastIndexOf('/')+1);
|
String videoFileName = video.getPath().substring(video.getPath().lastIndexOf('/')+1);
|
||||||
PackagePartName partName = PackagingURIHelper.createPartName("/ppt/media/"+videoFileName);
|
PackagePartName partName = PackagingURIHelper.createPartName("/ppt/media/"+videoFileName);
|
||||||
PackagePart part = pptx.getPackage().createPart(partName, "video/mpeg");
|
PackagePart part = pptx.getPackage().createPart(partName, "video/mpeg");
|
||||||
OutputStream partOs = part.getOutputStream();
|
OutputStream partOs = part.getOutputStream();
|
||||||
InputStream fis = video.openStream();
|
InputStream fis = video.openStream();
|
||||||
byte buf[] = new byte[1024];
|
byte buf[] = new byte[1024];
|
||||||
for (int readBytes; (readBytes = fis.read(buf)) != -1; partOs.write(buf, 0, readBytes));
|
for (int readBytes; (readBytes = fis.read(buf)) != -1; partOs.write(buf, 0, readBytes));
|
||||||
fis.close();
|
fis.close();
|
||||||
partOs.close();
|
partOs.close();
|
||||||
|
|
||||||
XSLFSlide slide1 = pptx.createSlide();
|
XSLFSlide slide1 = pptx.createSlide();
|
||||||
XSLFPictureShape pv1 = addPreview(pptx, slide1, part, 5, 50, 50);
|
XSLFPictureShape pv1 = addPreview(pptx, slide1, part, 5, 50, 50);
|
||||||
addVideo(pptx, slide1, part, pv1, 5);
|
addVideo(pptx, slide1, part, pv1, 5);
|
||||||
addTimingInfo(slide1, pv1);
|
addTimingInfo(slide1, pv1);
|
||||||
XSLFPictureShape pv2 = addPreview(pptx, slide1, part, 9, 50, 250);
|
XSLFPictureShape pv2 = addPreview(pptx, slide1, part, 9, 50, 250);
|
||||||
addVideo(pptx, slide1, part, pv2, 9);
|
addVideo(pptx, slide1, part, pv2, 9);
|
||||||
addTimingInfo(slide1, pv2);
|
addTimingInfo(slide1, pv2);
|
||||||
|
|
||||||
FileOutputStream fos = new FileOutputStream("pptx-with-video.pptx");
|
FileOutputStream fos = new FileOutputStream("pptx-with-video.pptx");
|
||||||
pptx.write(fos);
|
pptx.write(fos);
|
||||||
fos.close();
|
fos.close();
|
||||||
|
|
||||||
pptx.close();
|
pptx.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
static XSLFPictureShape addPreview(XMLSlideShow pptx, XSLFSlide slide1, PackagePart videoPart, double seconds, int x, int y) throws IOException {
|
static XSLFPictureShape addPreview(XMLSlideShow pptx, XSLFSlide slide1, PackagePart videoPart, double seconds, int x, int y) throws IOException {
|
||||||
// get preview after 5 sec.
|
// get preview after 5 sec.
|
||||||
IContainer ic = IContainer.make();
|
IContainer ic = IContainer.make();
|
||||||
InputOutputStreamHandler iosh = new InputOutputStreamHandler(videoPart.getInputStream());
|
InputOutputStreamHandler iosh = new InputOutputStreamHandler(videoPart.getInputStream());
|
||||||
if (ic.open(iosh, IContainer.Type.READ, null) < 0) return null;
|
if (ic.open(iosh, IContainer.Type.READ, null) < 0) return null;
|
||||||
|
|
||||||
IMediaReader mediaReader = ToolFactory.makeReader(ic);
|
IMediaReader mediaReader = ToolFactory.makeReader(ic);
|
||||||
|
|
||||||
// stipulate that we want BufferedImages created in BGR 24bit color space
|
// stipulate that we want BufferedImages created in BGR 24bit color space
|
||||||
mediaReader.setBufferedImageTypeToGenerate(BufferedImage.TYPE_3BYTE_BGR);
|
mediaReader.setBufferedImageTypeToGenerate(BufferedImage.TYPE_3BYTE_BGR);
|
||||||
|
|
||||||
ImageSnapListener isl = new ImageSnapListener(seconds);
|
ImageSnapListener isl = new ImageSnapListener(seconds);
|
||||||
mediaReader.addListener(isl);
|
mediaReader.addListener(isl);
|
||||||
|
|
||||||
// read out the contents of the media file and
|
// read out the contents of the media file and
|
||||||
// dispatch events to the attached listener
|
// dispatch events to the attached listener
|
||||||
while (!isl.hasFired && mediaReader.readPacket() == null) ;
|
while (!isl.hasFired && mediaReader.readPacket() == null) ;
|
||||||
|
|
||||||
mediaReader.close();
|
mediaReader.close();
|
||||||
ic.close();
|
ic.close();
|
||||||
|
|
||||||
// add snapshot
|
// add snapshot
|
||||||
BufferedImage image1 = isl.image;
|
BufferedImage image1 = isl.image;
|
||||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||||
ImageIO.write(image1, "jpeg", bos);
|
ImageIO.write(image1, "jpeg", bos);
|
||||||
XSLFPictureData snap = pptx.addPicture(bos.toByteArray(), PictureType.JPEG);
|
XSLFPictureData snap = pptx.addPicture(bos.toByteArray(), PictureType.JPEG);
|
||||||
XSLFPictureShape pic1 = slide1.createPicture(snap);
|
XSLFPictureShape pic1 = slide1.createPicture(snap);
|
||||||
pic1.setAnchor(new Rectangle(x, y, image1.getWidth(), image1.getHeight()));
|
pic1.setAnchor(new Rectangle(x, y, image1.getWidth(), image1.getHeight()));
|
||||||
return pic1;
|
return pic1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void addVideo(XMLSlideShow pptx, XSLFSlide slide1, PackagePart videoPart, XSLFPictureShape pic1, double seconds) throws IOException {
|
static void addVideo(XMLSlideShow pptx, XSLFSlide slide1, PackagePart videoPart, XSLFPictureShape pic1, double seconds) throws IOException {
|
||||||
|
|
||||||
// add video shape
|
// add video shape
|
||||||
PackagePartName partName = videoPart.getPartName();
|
PackagePartName partName = videoPart.getPartName();
|
||||||
PackageRelationship prsEmbed1 = slide1.getPackagePart().addRelationship(partName, TargetMode.INTERNAL, "http://schemas.microsoft.com/office/2007/relationships/media");
|
PackageRelationship prsEmbed1 = slide1.getPackagePart().addRelationship(partName, TargetMode.INTERNAL, "http://schemas.microsoft.com/office/2007/relationships/media");
|
||||||
PackageRelationship prsExec1 = slide1.getPackagePart().addRelationship(partName, TargetMode.INTERNAL, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/video");
|
PackageRelationship prsExec1 = slide1.getPackagePart().addRelationship(partName, TargetMode.INTERNAL, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/video");
|
||||||
CTPicture xpic1 = (CTPicture)pic1.getXmlObject();
|
CTPicture xpic1 = (CTPicture)pic1.getXmlObject();
|
||||||
CTHyperlink link1 = xpic1.getNvPicPr().getCNvPr().addNewHlinkClick();
|
CTHyperlink link1 = xpic1.getNvPicPr().getCNvPr().addNewHlinkClick();
|
||||||
link1.setId("");
|
link1.setId("");
|
||||||
link1.setAction("ppaction://media");
|
link1.setAction("ppaction://media");
|
||||||
|
|
||||||
// add video relation
|
// add video relation
|
||||||
CTApplicationNonVisualDrawingProps nvPr = xpic1.getNvPicPr().getNvPr();
|
CTApplicationNonVisualDrawingProps nvPr = xpic1.getNvPicPr().getNvPr();
|
||||||
nvPr.addNewVideoFile().setLink(prsExec1.getId());
|
nvPr.addNewVideoFile().setLink(prsExec1.getId());
|
||||||
CTExtension ext = nvPr.addNewExtLst().addNewExt();
|
CTExtension ext = nvPr.addNewExtLst().addNewExt();
|
||||||
// see http://msdn.microsoft.com/en-us/library/dd950140(v=office.12).aspx
|
// see http://msdn.microsoft.com/en-us/library/dd950140(v=office.12).aspx
|
||||||
ext.setUri("{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}");
|
ext.setUri("{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}");
|
||||||
String p14Ns = "http://schemas.microsoft.com/office/powerpoint/2010/main";
|
String p14Ns = "http://schemas.microsoft.com/office/powerpoint/2010/main";
|
||||||
|
|
||||||
try (XmlCursor cur = ext.newCursor()) {
|
try (XmlCursor cur = ext.newCursor()) {
|
||||||
cur.toEndToken();
|
cur.toEndToken();
|
||||||
cur.beginElement(new QName(p14Ns, "media", "p14"));
|
cur.beginElement(new QName(p14Ns, "media", "p14"));
|
||||||
cur.insertNamespace("p14", p14Ns);
|
cur.insertNamespace("p14", p14Ns);
|
||||||
cur.insertAttributeWithValue(new QName(STRelationshipId.type.getName().getNamespaceURI(), "embed"), prsEmbed1.getId());
|
cur.insertAttributeWithValue(new QName(STRelationshipId.type.getName().getNamespaceURI(), "embed"), prsEmbed1.getId());
|
||||||
cur.beginElement(new QName(p14Ns, "trim", "p14"));
|
cur.beginElement(new QName(p14Ns, "trim", "p14"));
|
||||||
cur.insertAttributeWithValue("st", df_time.format(seconds*1000.0));
|
cur.insertAttributeWithValue("st", df_time.format(seconds*1000.0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void addTimingInfo(XSLFSlide slide1, XSLFPictureShape pic1) {
|
static void addTimingInfo(XSLFSlide slide1, XSLFPictureShape pic1) {
|
||||||
// add slide timing information, so video can be controlled
|
// add slide timing information, so video can be controlled
|
||||||
CTSlide xslide = slide1.getXmlObject();
|
CTSlide xslide = slide1.getXmlObject();
|
||||||
CTTimeNodeList ctnl;
|
CTTimeNodeList ctnl;
|
||||||
if (!xslide.isSetTiming()) {
|
if (!xslide.isSetTiming()) {
|
||||||
CTTLCommonTimeNodeData ctn = xslide.addNewTiming().addNewTnLst().addNewPar().addNewCTn();
|
CTTLCommonTimeNodeData ctn = xslide.addNewTiming().addNewTnLst().addNewPar().addNewCTn();
|
||||||
ctn.setDur(STTLTimeIndefinite.INDEFINITE);
|
ctn.setDur(STTLTimeIndefinite.INDEFINITE);
|
||||||
ctn.setRestart(STTLTimeNodeRestartType.NEVER);
|
ctn.setRestart(STTLTimeNodeRestartType.NEVER);
|
||||||
ctn.setNodeType(STTLTimeNodeType.TM_ROOT);
|
ctn.setNodeType(STTLTimeNodeType.TM_ROOT);
|
||||||
ctnl = ctn.addNewChildTnLst();
|
ctnl = ctn.addNewChildTnLst();
|
||||||
} else {
|
} else {
|
||||||
ctnl = xslide.getTiming().getTnLst().getParArray(0).getCTn().getChildTnLst();
|
ctnl = xslide.getTiming().getTnLst().getParArray(0).getCTn().getChildTnLst();
|
||||||
}
|
}
|
||||||
|
|
||||||
CTTLCommonMediaNodeData cmedia = ctnl.addNewVideo().addNewCMediaNode();
|
CTTLCommonMediaNodeData cmedia = ctnl.addNewVideo().addNewCMediaNode();
|
||||||
cmedia.setVol(80000);
|
cmedia.setVol(80000);
|
||||||
CTTLCommonTimeNodeData ctn = cmedia.addNewCTn();
|
CTTLCommonTimeNodeData ctn = cmedia.addNewCTn();
|
||||||
ctn.setFill(STTLTimeNodeFillType.HOLD);
|
ctn.setFill(STTLTimeNodeFillType.HOLD);
|
||||||
ctn.setDisplay(false);
|
ctn.setDisplay(false);
|
||||||
ctn.addNewStCondLst().addNewCond().setDelay(STTLTimeIndefinite.INDEFINITE);
|
ctn.addNewStCondLst().addNewCond().setDelay(STTLTimeIndefinite.INDEFINITE);
|
||||||
cmedia.addNewTgtEl().addNewSpTgt().setSpid(""+pic1.getShapeId());
|
cmedia.addNewTgtEl().addNewSpTgt().setSpid(""+pic1.getShapeId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static class ImageSnapListener extends MediaListenerAdapter {
|
static class ImageSnapListener extends MediaListenerAdapter {
|
||||||
final double SECONDS_BETWEEN_FRAMES;
|
final double SECONDS_BETWEEN_FRAMES;
|
||||||
final long MICRO_SECONDS_BETWEEN_FRAMES;
|
final long MICRO_SECONDS_BETWEEN_FRAMES;
|
||||||
boolean hasFired = false;
|
boolean hasFired = false;
|
||||||
BufferedImage image = null;
|
BufferedImage image = null;
|
||||||
|
|
||||||
// The video stream index, used to ensure we display frames from one and
|
// The video stream index, used to ensure we display frames from one and
|
||||||
// only one video stream from the media container.
|
// only one video stream from the media container.
|
||||||
int mVideoStreamIndex = -1;
|
int mVideoStreamIndex = -1;
|
||||||
|
|
||||||
// Time of last frame write
|
// Time of last frame write
|
||||||
long mLastPtsWrite = Global.NO_PTS;
|
long mLastPtsWrite = Global.NO_PTS;
|
||||||
|
|
||||||
public ImageSnapListener(double seconds) {
|
public ImageSnapListener(double seconds) {
|
||||||
SECONDS_BETWEEN_FRAMES = seconds;
|
SECONDS_BETWEEN_FRAMES = seconds;
|
||||||
MICRO_SECONDS_BETWEEN_FRAMES =
|
MICRO_SECONDS_BETWEEN_FRAMES =
|
||||||
(long)(Global.DEFAULT_PTS_PER_SECOND * SECONDS_BETWEEN_FRAMES);
|
(long)(Global.DEFAULT_PTS_PER_SECOND * SECONDS_BETWEEN_FRAMES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onVideoPicture(IVideoPictureEvent event) {
|
public void onVideoPicture(IVideoPictureEvent event) {
|
||||||
|
|
||||||
if (event.getStreamIndex() != mVideoStreamIndex) {
|
if (event.getStreamIndex() != mVideoStreamIndex) {
|
||||||
// if the selected video stream id is not yet set, go ahead an
|
// if the selected video stream id is not yet set, go ahead an
|
||||||
// select this lucky video stream
|
// select this lucky video stream
|
||||||
if (mVideoStreamIndex != -1) return;
|
if (mVideoStreamIndex != -1) return;
|
||||||
mVideoStreamIndex = event.getStreamIndex();
|
mVideoStreamIndex = event.getStreamIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
long evtTS = event.getTimeStamp();
|
long evtTS = event.getTimeStamp();
|
||||||
|
|
||||||
// if uninitialized, back date mLastPtsWrite to get the very first frame
|
// if uninitialized, back date mLastPtsWrite to get the very first frame
|
||||||
if (mLastPtsWrite == Global.NO_PTS)
|
if (mLastPtsWrite == Global.NO_PTS)
|
||||||
mLastPtsWrite = Math.max(0, evtTS - MICRO_SECONDS_BETWEEN_FRAMES);
|
mLastPtsWrite = Math.max(0, evtTS - MICRO_SECONDS_BETWEEN_FRAMES);
|
||||||
|
|
||||||
// if its time to write the next frame
|
// if its time to write the next frame
|
||||||
if (evtTS - mLastPtsWrite >= MICRO_SECONDS_BETWEEN_FRAMES) {
|
if (evtTS - mLastPtsWrite >= MICRO_SECONDS_BETWEEN_FRAMES) {
|
||||||
if (!hasFired) {
|
if (!hasFired) {
|
||||||
image = event.getImage();
|
image = event.getImage();
|
||||||
hasFired = true;
|
hasFired = true;
|
||||||
}
|
}
|
||||||
// update last write time
|
// update last write time
|
||||||
mLastPtsWrite += MICRO_SECONDS_BETWEEN_FRAMES;
|
mLastPtsWrite += MICRO_SECONDS_BETWEEN_FRAMES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,7 @@ import java.io.FileOutputStream;
|
|||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Path;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ public final class BarChartDemo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (FileInputStream argIS = new FileInputStream(args[0]);
|
try (FileInputStream argIS = new FileInputStream(args[0]);
|
||||||
BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[1]), StandardCharsets.UTF_8)) {
|
BufferedReader modelReader = Files.newBufferedReader(Path.of(args[1]), StandardCharsets.UTF_8)) {
|
||||||
|
|
||||||
String chartTitle = modelReader.readLine(); // first line is chart title
|
String chartTitle = modelReader.readLine(); // first line is chart title
|
||||||
String seriesText = modelReader.readLine();
|
String seriesText = modelReader.readLine();
|
||||||
|
|||||||
@ -26,7 +26,7 @@ import java.io.FileOutputStream;
|
|||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Path;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ public final class ChartFromScratch {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try (BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[0]), StandardCharsets.UTF_8)) {
|
try (BufferedReader modelReader = Files.newBufferedReader(Path.of(args[0]), StandardCharsets.UTF_8)) {
|
||||||
|
|
||||||
String chartTitle = modelReader.readLine(); // first line is chart title
|
String chartTitle = modelReader.readLine(); // first line is chart title
|
||||||
String seriesText = modelReader.readLine();
|
String seriesText = modelReader.readLine();
|
||||||
|
|||||||
@ -41,7 +41,7 @@ import java.io.FileOutputStream;
|
|||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Path;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ public final class DoughnutChartFromScratch {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try (BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[0]), StandardCharsets.UTF_8)) {
|
try (BufferedReader modelReader = Files.newBufferedReader(Path.of(args[0]), StandardCharsets.UTF_8)) {
|
||||||
|
|
||||||
String chartTitle = modelReader.readLine(); // first line is chart title
|
String chartTitle = modelReader.readLine(); // first line is chart title
|
||||||
String seriesText = modelReader.readLine();
|
String seriesText = modelReader.readLine();
|
||||||
|
|||||||
@ -25,7 +25,7 @@ import java.io.FileOutputStream;
|
|||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Path;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ public final class PieChartDemo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (FileInputStream argIS = new FileInputStream(args[0]);
|
try (FileInputStream argIS = new FileInputStream(args[0]);
|
||||||
BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[1]), StandardCharsets.UTF_8)) {
|
BufferedReader modelReader = Files.newBufferedReader(Path.of(args[1]), StandardCharsets.UTF_8)) {
|
||||||
String chartTitle = modelReader.readLine(); // first line is chart title
|
String chartTitle = modelReader.readLine(); // first line is chart title
|
||||||
|
|
||||||
try (XMLSlideShow pptx = new XMLSlideShow(argIS)) {
|
try (XMLSlideShow pptx = new XMLSlideShow(argIS)) {
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
10 languages with most speakers as first language
|
10 languages with most speakers as first language
|
||||||
countries,speakers,language
|
countries,speakers,language
|
||||||
58,315,العربية
|
58,315,العربية
|
||||||
4,243,বাংলা
|
4,243,বাংলা
|
||||||
38,1299,中文
|
38,1299,中文
|
||||||
118,378,English
|
118,378,English
|
||||||
4,260,हिन्दी
|
4,260,हिन्दी
|
||||||
2,128,日本語
|
2,128,日本語
|
||||||
15,223,português
|
15,223,português
|
||||||
6,119,ਪੰਜਾਬੀ
|
6,119,ਪੰਜਾਬੀ
|
||||||
18,154,Русский язык
|
18,154,Русский язык
|
||||||
31,442,español
|
31,442,español
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
My Chart
|
My Chart
|
||||||
First 1.0
|
First 1.0
|
||||||
Second 3.0
|
Second 3.0
|
||||||
Third 4.0
|
Third 4.0
|
||||||
@ -26,7 +26,7 @@ import java.io.FileOutputStream;
|
|||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Path;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ public final class BarChartExample {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try (FileInputStream argIS = new FileInputStream(args[0]);
|
try (FileInputStream argIS = new FileInputStream(args[0]);
|
||||||
BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[1]), StandardCharsets.UTF_8)) {
|
BufferedReader modelReader = Files.newBufferedReader(Path.of(args[1]), StandardCharsets.UTF_8)) {
|
||||||
|
|
||||||
String chartTitle = modelReader.readLine(); // first line is chart title
|
String chartTitle = modelReader.readLine(); // first line is chart title
|
||||||
String seriesText = modelReader.readLine();
|
String seriesText = modelReader.readLine();
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import java.io.FileOutputStream;
|
|||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Path;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ public final class ChartFromScratch {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try (BufferedReader modelReader = Files.newBufferedReader(Paths.get(args[0]), StandardCharsets.UTF_8)) {
|
try (BufferedReader modelReader = Files.newBufferedReader(Path.of(args[0]), StandardCharsets.UTF_8)) {
|
||||||
|
|
||||||
String chartTitle = modelReader.readLine(); // first line is chart title
|
String chartTitle = modelReader.readLine(); // first line is chart title
|
||||||
String seriesText = modelReader.readLine();
|
String seriesText = modelReader.readLine();
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
10 languages with most speakers as first language
|
10 languages with most speakers as first language
|
||||||
countries,speakers,language
|
countries,speakers,language
|
||||||
58,315,العربية
|
58,315,العربية
|
||||||
4,243,বাংলা
|
4,243,বাংলা
|
||||||
38,1299,中文
|
38,1299,中文
|
||||||
118,378,English
|
118,378,English
|
||||||
4,260,हिन्दी
|
4,260,हिन्दी
|
||||||
2,128,日本語
|
2,128,日本語
|
||||||
15,223,português
|
15,223,português
|
||||||
6,119,ਪੰਜਾਬੀ
|
6,119,ਪੰਜਾਬੀ
|
||||||
18,154,Русский язык
|
18,154,Русский язык
|
||||||
31,442,español
|
31,442,español
|
||||||
|
|||||||
@ -63,8 +63,8 @@ tasks.register('compileJava9', JavaCompile) {
|
|||||||
javaCompiler = javaToolchains.compilerFor {
|
javaCompiler = javaToolchains.compilerFor {
|
||||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||||
}
|
}
|
||||||
sourceCompatibility = 1.9
|
sourceCompatibility = 11
|
||||||
targetCompatibility = 1.9
|
targetCompatibility = 11
|
||||||
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
||||||
source = file(JAVA9_SRC)
|
source = file(JAVA9_SRC)
|
||||||
classpath = files()
|
classpath = files()
|
||||||
@ -80,8 +80,8 @@ tasks.register('compileTest9', JavaCompile) {
|
|||||||
javaCompiler = javaToolchains.compilerFor {
|
javaCompiler = javaToolchains.compilerFor {
|
||||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||||
}
|
}
|
||||||
sourceCompatibility = 1.9
|
sourceCompatibility = 11
|
||||||
targetCompatibility = 1.9
|
targetCompatibility = 11
|
||||||
destinationDirectory = file(TEST9_OUT + VERSIONS9)
|
destinationDirectory = file(TEST9_OUT + VERSIONS9)
|
||||||
source = file(TEST9_SRC)
|
source = file(TEST9_SRC)
|
||||||
options.compilerArgs = [
|
options.compilerArgs = [
|
||||||
@ -95,7 +95,7 @@ tasks.register('compileTest9', JavaCompile) {
|
|||||||
jar {
|
jar {
|
||||||
dependsOn compileJava9
|
dependsOn compileJava9
|
||||||
|
|
||||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||||
|
|
||||||
manifest {
|
manifest {
|
||||||
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
|
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
|
||||||
@ -119,7 +119,7 @@ sourcesJar {
|
|||||||
// Create a separate jar for test-code to depend on it in other projects
|
// Create a separate jar for test-code to depend on it in other projects
|
||||||
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency
|
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency
|
||||||
task testJar(type: Jar, dependsOn: [ testClasses, compileTest9 ] ) {
|
task testJar(type: Jar, dependsOn: [ testClasses, compileTest9 ] ) {
|
||||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests")
|
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}-tests")
|
||||||
|
|
||||||
setArchiveClassifier 'tests'
|
setArchiveClassifier 'tests'
|
||||||
// ignore second module-info.class from main
|
// ignore second module-info.class from main
|
||||||
@ -142,13 +142,9 @@ test {
|
|||||||
doFirst {
|
doFirst {
|
||||||
jvmArgs += [
|
jvmArgs += [
|
||||||
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}",
|
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}",
|
||||||
|
'--add-modules', MODULE_NAME,
|
||||||
|
'--module-path', '../build/dist/maven/poi-excelant-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath,
|
||||||
]
|
]
|
||||||
if (jdkVersion > 8) {
|
|
||||||
jvmArgs += [
|
|
||||||
'--add-modules', MODULE_NAME,
|
|
||||||
'--module-path', '../build/dist/maven/poi-excelant-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath,
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -96,8 +96,8 @@ tasks.register('compileTest9', JavaCompile) {
|
|||||||
javaCompiler = javaToolchains.compilerFor {
|
javaCompiler = javaToolchains.compilerFor {
|
||||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||||
}
|
}
|
||||||
sourceCompatibility = 1.9
|
sourceCompatibility = 11
|
||||||
targetCompatibility = 1.9
|
targetCompatibility = 11
|
||||||
destinationDirectory = file(TEST9_OUT + VERSIONS9)
|
destinationDirectory = file(TEST9_OUT + VERSIONS9)
|
||||||
source = file(TEST9_SRC)
|
source = file(TEST9_SRC)
|
||||||
options.compilerArgs = [
|
options.compilerArgs = [
|
||||||
@ -109,7 +109,7 @@ tasks.register('compileTest9', JavaCompile) {
|
|||||||
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||||
|
|
||||||
manifest {
|
manifest {
|
||||||
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
|
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
|
||||||
@ -119,7 +119,7 @@ jar {
|
|||||||
// Create a separate jar for test-code to depend on it in other projects
|
// Create a separate jar for test-code to depend on it in other projects
|
||||||
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency
|
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency
|
||||||
task testJar(type: Jar, dependsOn: [ testClasses, compileTest9 ] ) {
|
task testJar(type: Jar, dependsOn: [ testClasses, compileTest9 ] ) {
|
||||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests")
|
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}-tests")
|
||||||
|
|
||||||
setArchiveClassifier 'tests'
|
setArchiveClassifier 'tests'
|
||||||
// ignore second module-info.class from main
|
// ignore second module-info.class from main
|
||||||
@ -143,29 +143,26 @@ test {
|
|||||||
dependsOn { testJar }
|
dependsOn { testJar }
|
||||||
|
|
||||||
systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true'
|
systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true'
|
||||||
if (jdkVersion == 8) {
|
|
||||||
systemProperties['sun.java2d.renderer'] = 'sun.java2d.marlin.MarlinRenderingEngine'
|
|
||||||
}
|
|
||||||
|
|
||||||
doFirst {
|
doFirst {
|
||||||
jvmArgs += [
|
jvmArgs += [
|
||||||
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}",
|
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}",
|
||||||
|
'--add-modules', MODULE_NAME,
|
||||||
|
'--module-path', '../build/dist/maven/poi-integration-tests' + File.pathSeparator + files(MODULE_RUNTIME_PATH).asPath,
|
||||||
]
|
]
|
||||||
if (jdkVersion > 8) {
|
|
||||||
jvmArgs += [
|
|
||||||
'--add-modules', MODULE_NAME,
|
|
||||||
'--module-path', '../build/dist/maven/poi-integration-tests' + File.pathSeparator + files(MODULE_RUNTIME_PATH).asPath,
|
|
||||||
]
|
|
||||||
}
|
|
||||||
if (NO_SCRATCHPAD) {
|
if (NO_SCRATCHPAD) {
|
||||||
systemProperty 'scratchpad.ignore', 'true'
|
systemProperty 'scratchpad.ignore', 'true'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
javadoc { enabled(false) }
|
javadoc {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
sourcesJar { enabled(false) }
|
sourcesJar {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
generateMetadataFileForPOIPublication.enabled = false
|
generateMetadataFileForPOIPublication.enabled = false
|
||||||
publishPOIPublicationToMavenLocal.enabled = false
|
publishPOIPublicationToMavenLocal.enabled = false
|
||||||
|
|||||||
@ -94,9 +94,9 @@ Before running this, you should execute the "jar" target in the main build.gradl
|
|||||||
<sort>
|
<sort>
|
||||||
<resources>
|
<resources>
|
||||||
<fileset dir="${dist}">
|
<fileset dir="${dist}">
|
||||||
<include name="**/poi-5.*.jar"/>
|
<include name="**/poi-6.*.jar"/>
|
||||||
<include name="**/poi-ooxml-5.*.jar"/>
|
<include name="**/poi-ooxml-6.*.jar"/>
|
||||||
<include name="**/poi-ooxml-lite-5.*.jar"/>
|
<include name="**/poi-ooxml-lite-6.*.jar"/>
|
||||||
<exclude name="**/*-javadoc*"/>
|
<exclude name="**/*-javadoc*"/>
|
||||||
<exclude name="**/*-sources*"/>
|
<exclude name="**/*-sources*"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
@ -126,7 +126,7 @@ Before running this, you should execute the "jar" target in the main build.gradl
|
|||||||
|
|
||||||
<echo message="Compiling examples without linking to scratchpad.jar to ensure that only some specific ones require this jar"/>
|
<echo message="Compiling examples without linking to scratchpad.jar to ensure that only some specific ones require this jar"/>
|
||||||
<javac srcdir="../poi-examples/src/main/java" destdir="${build}"
|
<javac srcdir="../poi-examples/src/main/java" destdir="${build}"
|
||||||
target="1.8" source="1.8" debug="true"
|
target="11" source="11" debug="true"
|
||||||
encoding="ASCII" fork="yes" includeantruntime="false"
|
encoding="ASCII" fork="yes" includeantruntime="false"
|
||||||
excludes="org/apache/poi/examples/hslf/**,org/apache/poi/examples/hsmf/**,org/apache/poi/examples/hwmf/**,**/EmbeddedObjects.java,**/EmeddedObjects.java,**/LoadEmbedded.java,**/Word2Forrest.java"
|
excludes="org/apache/poi/examples/hslf/**,org/apache/poi/examples/hsmf/**,org/apache/poi/examples/hwmf/**,**/EmbeddedObjects.java,**/EmeddedObjects.java,**/LoadEmbedded.java,**/Word2Forrest.java"
|
||||||
classpath="${jarpackage}" classpathref="libs">
|
classpath="${jarpackage}" classpathref="libs">
|
||||||
@ -137,10 +137,10 @@ Before running this, you should execute the "jar" target in the main build.gradl
|
|||||||
<sort>
|
<sort>
|
||||||
<resources>
|
<resources>
|
||||||
<fileset dir="${dist}">
|
<fileset dir="${dist}">
|
||||||
<include name="**/poi-5.*.jar"/>
|
<include name="**/poi-6.*.jar"/>
|
||||||
<include name="**/poi-ooxml-5.*.jar"/>
|
<include name="**/poi-ooxml-6.*.jar"/>
|
||||||
<include name="**/poi-ooxml-lite-5.*.jar"/>
|
<include name="**/poi-ooxml-lite-6.*.jar"/>
|
||||||
<include name="**/poi-scratchpad-5.*.jar"/>
|
<include name="**/poi-scratchpad-6.*.jar"/>
|
||||||
<exclude name="**/*-javadoc*"/>
|
<exclude name="**/*-javadoc*"/>
|
||||||
<exclude name="**/*-sources*"/>
|
<exclude name="**/*-sources*"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
@ -150,7 +150,7 @@ Before running this, you should execute the "jar" target in the main build.gradl
|
|||||||
|
|
||||||
<echo message="Compiling all examples with the additional scratchpad.jar"/>
|
<echo message="Compiling all examples with the additional scratchpad.jar"/>
|
||||||
<javac srcdir="../poi-examples/src/main/java" destdir="${build}"
|
<javac srcdir="../poi-examples/src/main/java" destdir="${build}"
|
||||||
target="1.8" source="1.8" debug="true"
|
target="11" source="11" debug="true"
|
||||||
encoding="ASCII" fork="yes" includeantruntime="false"
|
encoding="ASCII" fork="yes" includeantruntime="false"
|
||||||
classpath="${jarpackagescratchpad}" classpathref="libs">
|
classpath="${jarpackagescratchpad}" classpathref="libs">
|
||||||
</javac>
|
</javac>
|
||||||
|
|||||||
@ -29,6 +29,8 @@ public enum FileHandlerKnown {
|
|||||||
HSLF,
|
HSLF,
|
||||||
HSMF,
|
HSMF,
|
||||||
HSSF,
|
HSSF,
|
||||||
|
HEMF,
|
||||||
|
HWMF,
|
||||||
HWPF,
|
HWPF,
|
||||||
OPC,
|
OPC,
|
||||||
POIFS,
|
POIFS,
|
||||||
|
|||||||
@ -0,0 +1,85 @@
|
|||||||
|
/* ====================================================================
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
==================================================================== */
|
||||||
|
package org.apache.poi.stress;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
|
||||||
|
|
||||||
|
import java.awt.geom.Rectangle2D;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.BufferedInputStream;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
|
import org.apache.poi.hemf.record.emf.HemfRecord;
|
||||||
|
import org.apache.poi.hemf.record.emf.HemfRecordType;
|
||||||
|
import org.apache.poi.hemf.record.emf.HemfText;
|
||||||
|
import org.apache.poi.hemf.usermodel.HemfPicture;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
public class HEMFFileHandler implements FileHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleExtracting(File file) throws Exception {
|
||||||
|
try (InputStream stream = new BufferedInputStream(new FileInputStream(file))) {
|
||||||
|
HemfPicture picture = new HemfPicture(stream);
|
||||||
|
|
||||||
|
// mimic a bit what e.g. Tika does to extract some information from .emf files
|
||||||
|
for (HemfRecord record : picture.getRecords()) {
|
||||||
|
if (record.getEmfRecordType().equals(HemfRecordType.extTextOutW)) {
|
||||||
|
assertInstanceOf(HemfText.EmfExtTextOutW.class, record);
|
||||||
|
HemfText.EmfExtTextOutW textOut = (HemfText.EmfExtTextOutW) record;
|
||||||
|
textOut.getText(StandardCharsets.UTF_16LE);
|
||||||
|
} else if (record.getEmfRecordType().equals(HemfRecordType.extTextOutA)) {
|
||||||
|
assertInstanceOf(HemfText.EmfExtTextOutA.class, record);
|
||||||
|
HemfText.EmfExtTextOutA textOut = (HemfText.EmfExtTextOutA) record;
|
||||||
|
textOut.getText(StandardCharsets.UTF_8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleAdditional(File file) throws Exception {
|
||||||
|
// no additional checks for now
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleFile(InputStream stream, String path) throws Exception {
|
||||||
|
HemfPicture picture = new HemfPicture(stream);
|
||||||
|
|
||||||
|
for (HemfRecord record : picture.getRecords()) {
|
||||||
|
record.getEmfRecordType();
|
||||||
|
record.getGenericRecordType();
|
||||||
|
}
|
||||||
|
|
||||||
|
BufferedImage dest = new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB);
|
||||||
|
picture.draw(dest.createGraphics(), new Rectangle2D.Double(0, 0, 256, 256));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void test() throws Exception {
|
||||||
|
String file = "test-data/slideshow/wrench.emf";
|
||||||
|
|
||||||
|
try (InputStream stream = new BufferedInputStream(new FileInputStream(file))) {
|
||||||
|
handleFile(stream, file);
|
||||||
|
}
|
||||||
|
|
||||||
|
handleExtracting(new File(file));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,93 @@
|
|||||||
|
/* ====================================================================
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
==================================================================== */
|
||||||
|
package org.apache.poi.stress;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
|
||||||
|
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.BufferedInputStream;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
|
|
||||||
|
import org.apache.poi.hwmf.record.HwmfFont;
|
||||||
|
import org.apache.poi.hwmf.record.HwmfRecord;
|
||||||
|
import org.apache.poi.hwmf.record.HwmfRecordType;
|
||||||
|
import org.apache.poi.hwmf.record.HwmfText;
|
||||||
|
import org.apache.poi.hwmf.usermodel.HwmfPicture;
|
||||||
|
import org.apache.poi.util.LocaleUtil;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
public class HWMFFileHandler implements FileHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleExtracting(File file) throws Exception {
|
||||||
|
try (InputStream stream = new BufferedInputStream(new FileInputStream(file))) {
|
||||||
|
HwmfPicture picture = new HwmfPicture(stream);
|
||||||
|
Charset charset = LocaleUtil.CHARSET_1252;
|
||||||
|
|
||||||
|
// mimic a bit what e.g. Tika does to extract some information from .wmf files
|
||||||
|
for (HwmfRecord record : picture.getRecords()) {
|
||||||
|
if (record.getWmfRecordType().equals(HwmfRecordType.createFontIndirect)) {
|
||||||
|
HwmfFont font = ((HwmfText.WmfCreateFontIndirect) record).getFont();
|
||||||
|
charset = (font.getCharset() == null || font.getCharset().getCharset() == null) ?
|
||||||
|
LocaleUtil.CHARSET_1252 : font.getCharset().getCharset();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (record.getWmfRecordType().equals(HwmfRecordType.extTextOut)) {
|
||||||
|
assertInstanceOf(HwmfText.WmfExtTextOut.class, record);
|
||||||
|
HwmfText.WmfExtTextOut textOut = (HwmfText.WmfExtTextOut) record;
|
||||||
|
textOut.getText(charset);
|
||||||
|
} else if (record.getWmfRecordType().equals(HwmfRecordType.textOut)) {
|
||||||
|
assertInstanceOf(HwmfText.WmfTextOut.class, record);
|
||||||
|
HwmfText.WmfTextOut textOut = (HwmfText.WmfTextOut) record;
|
||||||
|
textOut.getText(charset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleAdditional(File file) throws Exception {
|
||||||
|
// no additional checks for now
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleFile(InputStream stream, String path) throws Exception {
|
||||||
|
HwmfPicture picture = new HwmfPicture(stream);
|
||||||
|
|
||||||
|
for (HwmfRecord record : picture.getRecords()) {
|
||||||
|
record.getWmfRecordType();
|
||||||
|
record.getGenericRecordType();
|
||||||
|
}
|
||||||
|
|
||||||
|
BufferedImage dest = new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB);
|
||||||
|
picture.draw(dest.createGraphics());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void test() throws Exception {
|
||||||
|
String file = "test-data/slideshow/santa.wmf";
|
||||||
|
|
||||||
|
try (InputStream stream = new BufferedInputStream(new FileInputStream(file))) {
|
||||||
|
handleFile(stream, file);
|
||||||
|
}
|
||||||
|
|
||||||
|
handleExtracting(new File(file));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -29,6 +29,7 @@ import java.lang.ref.WeakReference;
|
|||||||
import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream;
|
import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream;
|
||||||
import org.apache.poi.sl.draw.Drawable;
|
import org.apache.poi.sl.draw.Drawable;
|
||||||
import org.apache.poi.sl.usermodel.GroupShape;
|
import org.apache.poi.sl.usermodel.GroupShape;
|
||||||
|
import org.apache.poi.sl.usermodel.MasterSheet;
|
||||||
import org.apache.poi.sl.usermodel.Notes;
|
import org.apache.poi.sl.usermodel.Notes;
|
||||||
import org.apache.poi.sl.usermodel.PictureData;
|
import org.apache.poi.sl.usermodel.PictureData;
|
||||||
import org.apache.poi.sl.usermodel.Shape;
|
import org.apache.poi.sl.usermodel.Shape;
|
||||||
@ -76,8 +77,11 @@ public abstract class SlideShowHandler extends POIFSFileHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Shape<?,?> shape : s.getMasterSheet()) {
|
MasterSheet<?, ?> masterSheet = s.getMasterSheet();
|
||||||
readShapes(shape);
|
if (masterSheet != null) {
|
||||||
|
for (Shape<?,?> shape : masterSheet) {
|
||||||
|
readShapes(shape);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,6 +37,8 @@ public abstract class SpreadsheetHandler extends AbstractFileHandler {
|
|||||||
// try to access some of the content
|
// try to access some of the content
|
||||||
readContent(wb);
|
readContent(wb);
|
||||||
|
|
||||||
|
extractEmbedded(wb);
|
||||||
|
|
||||||
// write out the file
|
// write out the file
|
||||||
writeToArray(wb);
|
writeToArray(wb);
|
||||||
|
|
||||||
|
|||||||
@ -144,8 +144,14 @@ public class TestAllFiles {
|
|||||||
"document/clusterfuzz-testcase-POIHWPFFuzzer-5696094627495936.doc",
|
"document/clusterfuzz-testcase-POIHWPFFuzzer-5696094627495936.doc",
|
||||||
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-4657005060816896.xls",
|
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-4657005060816896.xls",
|
||||||
"diagram/clusterfuzz-testcase-minimized-POIHDGFFuzzer-4913778037489664.vsd",
|
"diagram/clusterfuzz-testcase-minimized-POIHDGFFuzzer-4913778037489664.vsd",
|
||||||
"diagram/clusterfuzz-testcase-minimized-POIHDGFFuzzer-6478389109981184.vsd"
|
"diagram/clusterfuzz-testcase-minimized-POIHDGFFuzzer-6478389109981184.vsd",
|
||||||
});
|
"publisher/clusterfuzz-testcase-minimized-POIHPBFFuzzer-4918886059278336.pub",
|
||||||
|
"publisher/clusterfuzz-testcase-minimized-POIHPBFFuzzer-4918886059278336.pub",
|
||||||
|
"publisher/clusterfuzz-testcase-minimized-POIHPBFFuzzer-6325615354773504.pub",
|
||||||
|
"spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-4734163573080064.xls",
|
||||||
|
"spreadsheet/rde.imf.ru_sites_default_files_rde_documents_vodootvedenie_2020.xlsb.xls",
|
||||||
|
"publisher/clusterfuzz-testcase-minimized-POIHPBFFuzzer-6325615354773504.pub",
|
||||||
|
});
|
||||||
|
|
||||||
private static final Set<String> EXPECTED_FAILURES = StressTestUtils.unmodifiableHashSet(
|
private static final Set<String> EXPECTED_FAILURES = StressTestUtils.unmodifiableHashSet(
|
||||||
"document/truncated62886.docx",
|
"document/truncated62886.docx",
|
||||||
|
|||||||
@ -78,7 +78,7 @@ public class XSSFBFileHandler extends AbstractFileHandler {
|
|||||||
XSSFBEventBasedExcelExtractor ex = new XSSFBEventBasedExcelExtractor(pkg);
|
XSSFBEventBasedExcelExtractor ex = new XSSFBEventBasedExcelExtractor(pkg);
|
||||||
String txt = ex.getText();
|
String txt = ex.getText();
|
||||||
if (txt.length() < 1) {
|
if (txt.length() < 1) {
|
||||||
throw new RuntimeException("Should have gotten some text.");
|
throw new IllegalArgumentException("Should have gotten some text.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -60,8 +60,8 @@ tasks.register('compileJava9', JavaCompile) {
|
|||||||
javaCompiler = javaToolchains.compilerFor {
|
javaCompiler = javaToolchains.compilerFor {
|
||||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||||
}
|
}
|
||||||
sourceCompatibility = 1.9
|
sourceCompatibility = 11
|
||||||
targetCompatibility = 1.9
|
targetCompatibility = 11
|
||||||
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
||||||
source = file(JAVA9_SRC)
|
source = file(JAVA9_SRC)
|
||||||
classpath = files()
|
classpath = files()
|
||||||
|
|||||||
@ -1,39 +1,39 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
====================================================================
|
====================================================================
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
this work for additional information regarding copyright ownership.
|
this work for additional information regarding copyright ownership.
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
(the "License"); you may not use this file except in compliance with
|
(the "License"); you may not use this file except in compliance with
|
||||||
the License. You may obtain a copy of the License at
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
====================================================================
|
====================================================================
|
||||||
-->
|
-->
|
||||||
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:e="http://schemas.microsoft.com/office/2006/encryption" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:e="http://schemas.microsoft.com/office/2006/encryption" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||||
<xs:import namespace="http://schemas.microsoft.com/office/2006/encryption" schemaLocation="encryptionInfo.xsd"/>
|
<xs:import namespace="http://schemas.microsoft.com/office/2006/encryption" schemaLocation="encryptionInfo.xsd"/>
|
||||||
<xs:simpleType name="ST_PasswordKeyEncryptorUri">
|
<xs:simpleType name="ST_PasswordKeyEncryptorUri">
|
||||||
<xs:restriction base="xs:token">
|
<xs:restriction base="xs:token">
|
||||||
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate"/>
|
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:complexType name="CT_CertificateKeyEncryptor">
|
<xs:complexType name="CT_CertificateKeyEncryptor">
|
||||||
<xs:attribute name="encryptedKeyValue" type="xs:base64Binary" use="required">
|
<xs:attribute name="encryptedKeyValue" type="xs:base64Binary" use="required">
|
||||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted form of the intermediate key, which is encrypted with the public key contained within the X509Certificate attribute.</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted form of the intermediate key, which is encrypted with the public key contained within the X509Certificate attribute.</xs:documentation></xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="X509Certificate" type="xs:base64Binary" use="required">
|
<xs:attribute name="X509Certificate" type="xs:base64Binary" use="required">
|
||||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies a DER-encoded X.509 certificate (1) used to encrypt the intermediate key. The certificate (1) MUST contain only the public portion of the public-private key pair.</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>A base64-encoded value that specifies a DER-encoded X.509 certificate (1) used to encrypt the intermediate key. The certificate (1) MUST contain only the public portion of the public-private key pair.</xs:documentation></xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="certVerifier" type="xs:base64Binary" use="required">
|
<xs:attribute name="certVerifier" type="xs:base64Binary" use="required">
|
||||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies the HMAC of the binary data obtained by base64-decoding the X509Certificate attribute. The hashing algorithm used to derive the HMAC MUST be the hashing algorithm specified for the Encryption.keyData element. The secret key used to derive the HMAC MUST be the intermediate key. If the intermediate key is reset, any CertificateKeyEncryptor elements are also reset to contain the new intermediate key, except that the certVerifier attribute MUST match the value calculated using the current intermediate key, to verify that the CertificateKeyEncryptor element actually encrypted the current intermediate key. If a CertificateKeyEncryptor element does not have a correct certVerifier attribute, it MUST be discarded.</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>A base64-encoded value that specifies the HMAC of the binary data obtained by base64-decoding the X509Certificate attribute. The hashing algorithm used to derive the HMAC MUST be the hashing algorithm specified for the Encryption.keyData element. The secret key used to derive the HMAC MUST be the intermediate key. If the intermediate key is reset, any CertificateKeyEncryptor elements are also reset to contain the new intermediate key, except that the certVerifier attribute MUST match the value calculated using the current intermediate key, to verify that the CertificateKeyEncryptor element actually encrypted the current intermediate key. If a CertificateKeyEncryptor element does not have a correct certVerifier attribute, it MUST be discarded.</xs:documentation></xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:element name="encryptedKey" type="CT_CertificateKeyEncryptor"/>
|
<xs:element name="encryptedKey" type="CT_CertificateKeyEncryptor"/>
|
||||||
</xs:schema>
|
</xs:schema>
|
||||||
|
|||||||
@ -1,24 +1,24 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
====================================================================
|
====================================================================
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
this work for additional information regarding copyright ownership.
|
this work for additional information regarding copyright ownership.
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
(the "License"); you may not use this file except in compliance with
|
(the "License"); you may not use this file except in compliance with
|
||||||
the License. You may obtain a copy of the License at
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
====================================================================
|
====================================================================
|
||||||
-->
|
-->
|
||||||
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate">
|
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate">
|
||||||
|
|
||||||
<xb:qname name="c:encryptedKey" javaname="EncryptedCertificateKey"/>
|
<xb:qname name="c:encryptedKey" javaname="EncryptedCertificateKey"/>
|
||||||
|
|
||||||
</xb:config>
|
</xb:config>
|
||||||
@ -1,259 +1,259 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
====================================================================
|
====================================================================
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
this work for additional information regarding copyright ownership.
|
this work for additional information regarding copyright ownership.
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
(the "License"); you may not use this file except in compliance with
|
(the "License"); you may not use this file except in compliance with
|
||||||
the License. You may obtain a copy of the License at
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
====================================================================
|
====================================================================
|
||||||
-->
|
-->
|
||||||
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/encryption" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/encryption" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/encryption" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/encryption" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||||
<xs:import namespace="http://schemas.microsoft.com/office/2006/keyEncryptor/password" schemaLocation="encryptionPassword.xsd"/>
|
<xs:import namespace="http://schemas.microsoft.com/office/2006/keyEncryptor/password" schemaLocation="encryptionPassword.xsd"/>
|
||||||
<xs:import namespace="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" schemaLocation="encryptionCertificate.xsd"/>
|
<xs:import namespace="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" schemaLocation="encryptionCertificate.xsd"/>
|
||||||
<xs:simpleType name="ST_SaltSize">
|
<xs:simpleType name="ST_SaltSize">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>An unsigned integer that specifies the number of bytes used by a salt. It MUST be at least 1 and no greater than 65,536.</xs:documentation>
|
<xs:documentation>An unsigned integer that specifies the number of bytes used by a salt. It MUST be at least 1 and no greater than 65,536.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:restriction base="xs:unsignedInt">
|
<xs:restriction base="xs:unsignedInt">
|
||||||
<xs:minInclusive value="1"/>
|
<xs:minInclusive value="1"/>
|
||||||
<xs:maxInclusive value="65536"/>
|
<xs:maxInclusive value="65536"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="ST_BlockSize">
|
<xs:simpleType name="ST_BlockSize">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>An unsigned integer that specifies the number of bytes used to encrypt one block of data. It MUST be at least 2, no greater than 4096, and a multiple of 2.</xs:documentation>
|
<xs:documentation>An unsigned integer that specifies the number of bytes used to encrypt one block of data. It MUST be at least 2, no greater than 4096, and a multiple of 2.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:restriction base="xs:unsignedInt">
|
<xs:restriction base="xs:unsignedInt">
|
||||||
<xs:minInclusive value="2"/>
|
<xs:minInclusive value="2"/>
|
||||||
<xs:maxInclusive value="4096"/>
|
<xs:maxInclusive value="4096"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="ST_KeyBits">
|
<xs:simpleType name="ST_KeyBits">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>An unsigned integer that specifies the number of bits used by an encryption algorithm. It MUST be at least 8 and a multiple of 8.</xs:documentation>
|
<xs:documentation>An unsigned integer that specifies the number of bits used by an encryption algorithm. It MUST be at least 8 and a multiple of 8.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:restriction base="xs:unsignedInt">
|
<xs:restriction base="xs:unsignedInt">
|
||||||
<xs:minInclusive value="8"/>
|
<xs:minInclusive value="8"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="ST_HashSize">
|
<xs:simpleType name="ST_HashSize">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>An unsigned integer that specifies the number of bytes used by a hash value. It MUST be at least 1, no greater than 65,536, and the same number of bytes as the hash algorithm emits.</xs:documentation>
|
<xs:documentation>An unsigned integer that specifies the number of bytes used by a hash value. It MUST be at least 1, no greater than 65,536, and the same number of bytes as the hash algorithm emits.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:restriction base="xs:unsignedInt">
|
<xs:restriction base="xs:unsignedInt">
|
||||||
<xs:minInclusive value="1"/>
|
<xs:minInclusive value="1"/>
|
||||||
<xs:maxInclusive value="65536"/>
|
<xs:maxInclusive value="65536"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="ST_SpinCount">
|
<xs:simpleType name="ST_SpinCount">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>An unsigned integer that specifies the number of times to iterate on a hash of a password. It MUST NOT be greater than 10,000,000.</xs:documentation>
|
<xs:documentation>An unsigned integer that specifies the number of times to iterate on a hash of a password. It MUST NOT be greater than 10,000,000.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:restriction base="xs:unsignedInt">
|
<xs:restriction base="xs:unsignedInt">
|
||||||
<xs:minInclusive value="0"/>
|
<xs:minInclusive value="0"/>
|
||||||
<xs:maxInclusive value="10000000"/>
|
<xs:maxInclusive value="10000000"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="ST_CipherAlgorithm">
|
<xs:simpleType name="ST_CipherAlgorithm">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:appinfo>modified for poi - list is restricted to given list in [ms-offcrypto]</xs:appinfo>
|
<xs:appinfo>modified for poi - list is restricted to given list in [ms-offcrypto]</xs:appinfo>
|
||||||
<xs:documentation>A string that specifies the cipher algorithm. Values that are not defined MAY be used, and a compliant implementation is not required to support all defined values. Any algorithm that can be resolved by name by the underlying operating system can be used for hashing or encryption. Only block algorithms are supported for encryption. AES-128 is the default encryption algorithm, and SHA-1 is the default hashing algorithm if no other algorithms have been configured.</xs:documentation>
|
<xs:documentation>A string that specifies the cipher algorithm. Values that are not defined MAY be used, and a compliant implementation is not required to support all defined values. Any algorithm that can be resolved by name by the underlying operating system can be used for hashing or encryption. Only block algorithms are supported for encryption. AES-128 is the default encryption algorithm, and SHA-1 is the default hashing algorithm if no other algorithms have been configured.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:restriction base="xs:token">
|
<xs:restriction base="xs:token">
|
||||||
<xs:enumeration value="AES">
|
<xs:enumeration value="AES">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>MUST conform to the AES algorithm.</xs:documentation>
|
<xs:documentation>MUST conform to the AES algorithm.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="RC2">
|
<xs:enumeration value="RC2">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>MUST conform to the algorithm as specified in [RFC2268] (http://tools.ietf.org/html/rfc2268). The use of RC2 is not recommended. If RC2 is used with a key length of less than 128 bits, documents could interoperate incorrectly across different versions of Windows.</xs:documentation>
|
<xs:documentation>MUST conform to the algorithm as specified in [RFC2268] (http://tools.ietf.org/html/rfc2268). The use of RC2 is not recommended. If RC2 is used with a key length of less than 128 bits, documents could interoperate incorrectly across different versions of Windows.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="RC4">
|
<xs:enumeration value="RC4">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>MUST NOT be used.</xs:documentation>
|
<xs:documentation>MUST NOT be used.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="DES">
|
<xs:enumeration value="DES">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>MUST conform to the DES algorithm. The use of DES is not recommended. If DES is used, the key length specified in the KeyBits element is required to be set to 64 for 56-bit encryption, and the key decrypted from encryptedKeyValue of KeyEncryptor is required to include the DES parity bits.</xs:documentation>
|
<xs:documentation>MUST conform to the DES algorithm. The use of DES is not recommended. If DES is used, the key length specified in the KeyBits element is required to be set to 64 for 56-bit encryption, and the key decrypted from encryptedKeyValue of KeyEncryptor is required to include the DES parity bits.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="DESX">
|
<xs:enumeration value="DESX">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>MUST conform to the algorithm as specified in [DRAFT-DESX] (http://tools.ietf.org/html/draft-ietf-ipsec-ciph-desx-00). The use of DESX is not recommended. If DESX is used, documents could interoperate incorrectly across different versions of Windows.</xs:documentation>
|
<xs:documentation>MUST conform to the algorithm as specified in [DRAFT-DESX] (http://tools.ietf.org/html/draft-ietf-ipsec-ciph-desx-00). The use of DESX is not recommended. If DESX is used, documents could interoperate incorrectly across different versions of Windows.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="3DES">
|
<xs:enumeration value="3DES">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>MUST conform to the algorithm as specified in [RFC1851] (http://tools.ietf.org/html/rfc1851). If 3DES or 3DES_112 is used, the key length specified in the KeyBits element is required to be set to 192 for 168-bit encryption and 128 for 112-bit encryption, and the key decrypted from encryptedKeyValue of KeyEncryptor is required to include the DES parity bits.</xs:documentation>
|
<xs:documentation>MUST conform to the algorithm as specified in [RFC1851] (http://tools.ietf.org/html/rfc1851). If 3DES or 3DES_112 is used, the key length specified in the KeyBits element is required to be set to 192 for 168-bit encryption and 128 for 112-bit encryption, and the key decrypted from encryptedKeyValue of KeyEncryptor is required to include the DES parity bits.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="3DES_112">
|
<xs:enumeration value="3DES_112">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>see 3DES</xs:documentation>
|
<xs:documentation>see 3DES</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="ST_CipherChaining">
|
<xs:simpleType name="ST_CipherChaining">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>A string that specifies the chaining mode used by CipherAlgorithm. For more details about chaining modes, see [BCMO800-38A] (http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf).</xs:documentation>
|
<xs:documentation>A string that specifies the chaining mode used by CipherAlgorithm. For more details about chaining modes, see [BCMO800-38A] (http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf).</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:restriction base="xs:token">
|
<xs:restriction base="xs:token">
|
||||||
<xs:enumeration value="ChainingModeCBC">
|
<xs:enumeration value="ChainingModeCBC">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>block chaining (CBC)</xs:documentation>
|
<xs:documentation>block chaining (CBC)</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="ChainingModeCFB">
|
<xs:enumeration value="ChainingModeCFB">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Cipher feedback chaining (CFB), with an 8-bit window</xs:documentation>
|
<xs:documentation>Cipher feedback chaining (CFB), with an 8-bit window</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="ST_HashAlgorithm">
|
<xs:simpleType name="ST_HashAlgorithm">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:appinfo>modified for poi - list is restricted to given list in [ms-offcrypto]</xs:appinfo>
|
<xs:appinfo>modified for poi - list is restricted to given list in [ms-offcrypto]</xs:appinfo>
|
||||||
<xs:documentation>A string specifying a hashing algorithm. Values that are not defined MAY be used, and a compliant implementation is not required to support all defined values.</xs:documentation>
|
<xs:documentation>A string specifying a hashing algorithm. Values that are not defined MAY be used, and a compliant implementation is not required to support all defined values.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:restriction base="xs:token">
|
<xs:restriction base="xs:token">
|
||||||
<xs:enumeration value="SHA1">
|
<xs:enumeration value="SHA1">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>MUST conform to the algorithm as specified in [RFC4634] (http://tools.ietf.org/html/rfc4634).</xs:documentation>
|
<xs:documentation>MUST conform to the algorithm as specified in [RFC4634] (http://tools.ietf.org/html/rfc4634).</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="SHA256">
|
<xs:enumeration value="SHA256">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>see SHA1</xs:documentation>
|
<xs:documentation>see SHA1</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="SHA384">
|
<xs:enumeration value="SHA384">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>see SHA1</xs:documentation>
|
<xs:documentation>see SHA1</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="SHA512">
|
<xs:enumeration value="SHA512">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>see SHA1</xs:documentation>
|
<xs:documentation>see SHA1</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="MD5">
|
<xs:enumeration value="MD5">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>MUST conform to MD5.</xs:documentation>
|
<xs:documentation>MUST conform to MD5.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="MD4">
|
<xs:enumeration value="MD4">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>MUST conform to the algorithm as specified in [RFC1320] (http://tools.ietf.org/html/rfc1320).</xs:documentation>
|
<xs:documentation>MUST conform to the algorithm as specified in [RFC1320] (http://tools.ietf.org/html/rfc1320).</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="MD2">
|
<xs:enumeration value="MD2">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>MUST conform to the algorithm as specified in [RFC1319] (http://tools.ietf.org/html/rfc1319).</xs:documentation>
|
<xs:documentation>MUST conform to the algorithm as specified in [RFC1319] (http://tools.ietf.org/html/rfc1319).</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="RIPEMD-128">
|
<xs:enumeration value="RIPEMD-128">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>MUST conform to the hash functions specified in [ISO/IEC 10118]. (https://en.wikipedia.org/wiki/RIPEMD)</xs:documentation>
|
<xs:documentation>MUST conform to the hash functions specified in [ISO/IEC 10118]. (https://en.wikipedia.org/wiki/RIPEMD)</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="RIPEMD-160">
|
<xs:enumeration value="RIPEMD-160">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>see RIPEMD-128 (https://en.wikipedia.org/wiki/RIPEMD)</xs:documentation>
|
<xs:documentation>see RIPEMD-128 (https://en.wikipedia.org/wiki/RIPEMD)</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
<xs:enumeration value="WHIRLPOOL">
|
<xs:enumeration value="WHIRLPOOL">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>see RIPEMD-128 (https://en.wikipedia.org/wiki/ISO/IEC_10118-3)</xs:documentation>
|
<xs:documentation>see RIPEMD-128 (https://en.wikipedia.org/wiki/ISO/IEC_10118-3)</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:enumeration>
|
</xs:enumeration>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:complexType name="CT_KeyData">
|
<xs:complexType name="CT_KeyData">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>A complex type that specifies the encryption used within this element. The saltValue attribute is a base64-encoded binary value that is randomly generated. The number of bytes required to decode the saltValue attribute MUST be equal to the value of the saltSize attribute.</xs:documentation>
|
<xs:documentation>A complex type that specifies the encryption used within this element. The saltValue attribute is a base64-encoded binary value that is randomly generated. The number of bytes required to decode the saltValue attribute MUST be equal to the value of the saltSize attribute.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:attribute name="saltSize" type="ST_SaltSize" use="required"/>
|
<xs:attribute name="saltSize" type="ST_SaltSize" use="required"/>
|
||||||
<xs:attribute name="blockSize" type="ST_BlockSize" use="required"/>
|
<xs:attribute name="blockSize" type="ST_BlockSize" use="required"/>
|
||||||
<xs:attribute name="keyBits" type="ST_KeyBits" use="required"/>
|
<xs:attribute name="keyBits" type="ST_KeyBits" use="required"/>
|
||||||
<xs:attribute name="hashSize" type="ST_HashSize" use="required"/>
|
<xs:attribute name="hashSize" type="ST_HashSize" use="required"/>
|
||||||
<xs:attribute name="cipherAlgorithm" type="ST_CipherAlgorithm" use="required"/>
|
<xs:attribute name="cipherAlgorithm" type="ST_CipherAlgorithm" use="required"/>
|
||||||
<xs:attribute name="cipherChaining" type="ST_CipherChaining" use="required"/>
|
<xs:attribute name="cipherChaining" type="ST_CipherChaining" use="required"/>
|
||||||
<xs:attribute name="hashAlgorithm" type="ST_HashAlgorithm" use="required"/>
|
<xs:attribute name="hashAlgorithm" type="ST_HashAlgorithm" use="required"/>
|
||||||
<xs:attribute name="saltValue" type="xs:base64Binary" use="required"/>
|
<xs:attribute name="saltValue" type="xs:base64Binary" use="required"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:complexType name="CT_DataIntegrity">
|
<xs:complexType name="CT_DataIntegrity">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>A complex type that specifies data used to verify whether the encrypted data passes an integrity check. It MUST be generated using the method specified in section 2.3.4.14 (http://msdn.microsoft.com/en-us/library/dd924068(v=office.12).aspx).</xs:documentation>
|
<xs:documentation>A complex type that specifies data used to verify whether the encrypted data passes an integrity check. It MUST be generated using the method specified in section 2.3.4.14 (http://msdn.microsoft.com/en-us/library/dd924068(v=office.12).aspx).</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:attribute name="encryptedHmacKey" type="xs:base64Binary" use="required">
|
<xs:attribute name="encryptedHmacKey" type="xs:base64Binary" use="required">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>A base64-encoded value that specifies an encrypted key used in calculating the encryptedHmacValue.</xs:documentation>
|
<xs:documentation>A base64-encoded value that specifies an encrypted key used in calculating the encryptedHmacValue.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="encryptedHmacValue" type="xs:base64Binary" use="required">
|
<xs:attribute name="encryptedHmacValue" type="xs:base64Binary" use="required">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>A base64-encoded value that specifies an HMAC derived from encryptedHmacKey and the encrypted data.</xs:documentation>
|
<xs:documentation>A base64-encoded value that specifies an HMAC derived from encryptedHmacKey and the encrypted data.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:complexType name="CT_KeyEncryptor">
|
<xs:complexType name="CT_KeyEncryptor">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:appinfo>modified for POI</xs:appinfo>
|
<xs:appinfo>modified for POI</xs:appinfo>
|
||||||
<xs:documentation>A complex type that specifies the parameters used to encrypt an intermediate key, which is used to perform the final encryption of the document. To ensure extensibility, arbitrary elements can be defined to encrypt the intermediate key. The intermediate key MUST be the same for all KeyEncryptor elements.</xs:documentation>
|
<xs:documentation>A complex type that specifies the parameters used to encrypt an intermediate key, which is used to perform the final encryption of the document. To ensure extensibility, arbitrary elements can be defined to encrypt the intermediate key. The intermediate key MUST be the same for all KeyEncryptor elements.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:choice>
|
<xs:choice>
|
||||||
<xs:element ref="p:encryptedKey"/>
|
<xs:element ref="p:encryptedKey"/>
|
||||||
<xs:element ref="c:encryptedKey"/>
|
<xs:element ref="c:encryptedKey"/>
|
||||||
</xs:choice>
|
</xs:choice>
|
||||||
<xs:attribute name="uri">
|
<xs:attribute name="uri">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:appinfo>modified for POI</xs:appinfo>
|
<xs:appinfo>modified for POI</xs:appinfo>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:simpleType>
|
<xs:simpleType>
|
||||||
<xs:restriction base="xs:token">
|
<xs:restriction base="xs:token">
|
||||||
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/password"/>
|
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/password"/>
|
||||||
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate"/>
|
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:complexType name="CT_KeyEncryptors">
|
<xs:complexType name="CT_KeyEncryptors">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>A sequence of KeyEncryptor elements. Exactly one KeyEncryptors element MUST be present, and the KeyEncryptors element MUST contain at least one KeyEncryptor.</xs:documentation>
|
<xs:documentation>A sequence of KeyEncryptor elements. Exactly one KeyEncryptors element MUST be present, and the KeyEncryptors element MUST contain at least one KeyEncryptor.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="keyEncryptor" type="CT_KeyEncryptor" maxOccurs="unbounded"/>
|
<xs:element name="keyEncryptor" type="CT_KeyEncryptor" maxOccurs="unbounded"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:complexType name="CT_Encryption">
|
<xs:complexType name="CT_Encryption">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="keyData" type="CT_KeyData"/>
|
<xs:element name="keyData" type="CT_KeyData"/>
|
||||||
<xs:element name="dataIntegrity" type="CT_DataIntegrity">
|
<xs:element name="dataIntegrity" type="CT_DataIntegrity">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:appinfo>modified for POI</xs:appinfo>
|
<xs:appinfo>modified for POI</xs:appinfo>
|
||||||
<xs:documentation>All ECMA-376 documents [ECMA-376] encrypted by Microsoft Office using agile encryption will have a DataIntegrity element present. The schema allows for a DataIntegrity element to not be present because the encryption schema can be used by applications that do not create ECMA-376 documents [ECMA-376].</xs:documentation>
|
<xs:documentation>All ECMA-376 documents [ECMA-376] encrypted by Microsoft Office using agile encryption will have a DataIntegrity element present. The schema allows for a DataIntegrity element to not be present because the encryption schema can be used by applications that do not create ECMA-376 documents [ECMA-376].</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="keyEncryptors" type="CT_KeyEncryptors">
|
<xs:element name="keyEncryptors" type="CT_KeyEncryptors">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>The KeyEncryptor element, which MUST be used when encrypting password-protected agile encryption documents, is either a PasswordKeyEncryptor or a CertificateKeyEncryptor. Exactly one PasswordKeyEncryptor MUST be present. Zero or more CertificateKeyEncryptor elements are contained within the KeyEncryptors element.</xs:documentation>
|
<xs:documentation>The KeyEncryptor element, which MUST be used when encrypting password-protected agile encryption documents, is either a PasswordKeyEncryptor or a CertificateKeyEncryptor. Exactly one PasswordKeyEncryptor MUST be present. Zero or more CertificateKeyEncryptor elements are contained within the KeyEncryptors element.</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:element name="encryption" type="CT_Encryption"/>
|
<xs:element name="encryption" type="CT_Encryption"/>
|
||||||
</xs:schema>
|
</xs:schema>
|
||||||
|
|||||||
@ -1,25 +1,25 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
====================================================================
|
====================================================================
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
this work for additional information regarding copyright ownership.
|
this work for additional information regarding copyright ownership.
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
(the "License"); you may not use this file except in compliance with
|
(the "License"); you may not use this file except in compliance with
|
||||||
the License. You may obtain a copy of the License at
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
====================================================================
|
====================================================================
|
||||||
-->
|
-->
|
||||||
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password">
|
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:c="http://schemas.microsoft.com/office/2006/keyEncryptor/certificate" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password">
|
||||||
|
|
||||||
<xb:qname name="c:encryptedKey" javaname="EncryptedCertificateKey"/>
|
<xb:qname name="c:encryptedKey" javaname="EncryptedCertificateKey"/>
|
||||||
<xb:qname name="p:encryptedKey" javaname="EncryptedPasswordKey"/>
|
<xb:qname name="p:encryptedKey" javaname="EncryptedPasswordKey"/>
|
||||||
|
|
||||||
</xb:config>
|
</xb:config>
|
||||||
@ -1,66 +1,66 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
====================================================================
|
====================================================================
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
this work for additional information regarding copyright ownership.
|
this work for additional information regarding copyright ownership.
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
(the "License"); you may not use this file except in compliance with
|
(the "License"); you may not use this file except in compliance with
|
||||||
the License. You may obtain a copy of the License at
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
====================================================================
|
====================================================================
|
||||||
-->
|
-->
|
||||||
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/keyEncryptor/password" xmlns:e="http://schemas.microsoft.com/office/2006/encryption" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/keyEncryptor/password" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
<xs:schema xmlns="http://schemas.microsoft.com/office/2006/keyEncryptor/password" xmlns:e="http://schemas.microsoft.com/office/2006/encryption" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/office/2006/keyEncryptor/password" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||||
<xs:import namespace="http://schemas.microsoft.com/office/2006/encryption" schemaLocation="encryptionInfo.xsd"/>
|
<xs:import namespace="http://schemas.microsoft.com/office/2006/encryption" schemaLocation="encryptionInfo.xsd"/>
|
||||||
<xs:simpleType name="ST_PasswordKeyEncryptorUri">
|
<xs:simpleType name="ST_PasswordKeyEncryptorUri">
|
||||||
<xs:restriction base="xs:token">
|
<xs:restriction base="xs:token">
|
||||||
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/password"/>
|
<xs:enumeration value="http://schemas.microsoft.com/office/2006/keyEncryptor/password"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:complexType name="CT_PasswordKeyEncryptor">
|
<xs:complexType name="CT_PasswordKeyEncryptor">
|
||||||
<xs:attribute name="saltSize" type="e:ST_SaltSize" use="required">
|
<xs:attribute name="saltSize" type="e:ST_SaltSize" use="required">
|
||||||
<xs:annotation><xs:documentation>A SaltSize that specifies the size of the salt for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>A SaltSize that specifies the size of the salt for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="blockSize" type="e:ST_BlockSize" use="required">
|
<xs:attribute name="blockSize" type="e:ST_BlockSize" use="required">
|
||||||
<xs:annotation><xs:documentation>A BlockSize that specifies the block size for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>A BlockSize that specifies the block size for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="keyBits" type="e:ST_KeyBits" use="required">
|
<xs:attribute name="keyBits" type="e:ST_KeyBits" use="required">
|
||||||
<xs:annotation><xs:documentation>A KeyBits that specifies the number of bits for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>A KeyBits that specifies the number of bits for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="hashSize" type="e:ST_HashSize" use="required">
|
<xs:attribute name="hashSize" type="e:ST_HashSize" use="required">
|
||||||
<xs:annotation><xs:documentation>A HashSize that specifies the size of the binary form of the hash for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>A HashSize that specifies the size of the binary form of the hash for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="cipherAlgorithm" type="e:ST_CipherAlgorithm" use="required">
|
<xs:attribute name="cipherAlgorithm" type="e:ST_CipherAlgorithm" use="required">
|
||||||
<xs:annotation><xs:documentation>A CipherAlgorithm that specifies the cipher algorithm for a PasswordKeyEncryptor. The cipher algorithm specified MUST be the same as the cipher algorithm specified for the Encryption.keyData element.</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>A CipherAlgorithm that specifies the cipher algorithm for a PasswordKeyEncryptor. The cipher algorithm specified MUST be the same as the cipher algorithm specified for the Encryption.keyData element.</xs:documentation></xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="cipherChaining" type="e:ST_CipherChaining" use="required">
|
<xs:attribute name="cipherChaining" type="e:ST_CipherChaining" use="required">
|
||||||
<xs:annotation><xs:documentation>A CipherChaining that specifies the cipher chaining mode for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>A CipherChaining that specifies the cipher chaining mode for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="hashAlgorithm" type="e:ST_HashAlgorithm" use="required">
|
<xs:attribute name="hashAlgorithm" type="e:ST_HashAlgorithm" use="required">
|
||||||
<xs:annotation><xs:documentation>A HashAlgorithm that specifies the hashing algorithm for a PasswordKeyEncryptor. The hashing algorithm specified MUST be the same as the hashing algorithm specified for the Encryption.keyData element.</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>A HashAlgorithm that specifies the hashing algorithm for a PasswordKeyEncryptor. The hashing algorithm specified MUST be the same as the hashing algorithm specified for the Encryption.keyData element.</xs:documentation></xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="saltValue" type="xs:base64Binary" use="required">
|
<xs:attribute name="saltValue" type="xs:base64Binary" use="required">
|
||||||
<xs:annotation><xs:documentation>A base64-encoded binary byte array that specifies the salt value for a PasswordKeyEncryptor. The number of bytes required by the decoded form of this element MUST be saltSize.</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>A base64-encoded binary byte array that specifies the salt value for a PasswordKeyEncryptor. The number of bytes required by the decoded form of this element MUST be saltSize.</xs:documentation></xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="spinCount" type="e:ST_SpinCount" use="required">
|
<xs:attribute name="spinCount" type="e:ST_SpinCount" use="required">
|
||||||
<xs:annotation><xs:documentation>A SpinCount that specifies the spin count for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>A SpinCount that specifies the spin count for a PasswordKeyEncryptor.</xs:documentation></xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="encryptedVerifierHashInput" type="xs:base64Binary" use="required">
|
<xs:attribute name="encryptedVerifierHashInput" type="xs:base64Binary" use="required">
|
||||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted verifier hash input for a PasswordKeyEncryptor used in password verification.</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted verifier hash input for a PasswordKeyEncryptor used in password verification.</xs:documentation></xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="encryptedVerifierHashValue" type="xs:base64Binary" use="required">
|
<xs:attribute name="encryptedVerifierHashValue" type="xs:base64Binary" use="required">
|
||||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted verifier hash value for a PasswordKeyEncryptor used in password verification.</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted verifier hash value for a PasswordKeyEncryptor used in password verification.</xs:documentation></xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
<xs:attribute name="encryptedKeyValue" type="xs:base64Binary" use="required">
|
<xs:attribute name="encryptedKeyValue" type="xs:base64Binary" use="required">
|
||||||
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted form of the intermediate key.</xs:documentation></xs:annotation>
|
<xs:annotation><xs:documentation>A base64-encoded value that specifies the encrypted form of the intermediate key.</xs:documentation></xs:annotation>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:element name="encryptedKey" type="CT_PasswordKeyEncryptor"/>
|
<xs:element name="encryptedKey" type="CT_PasswordKeyEncryptor"/>
|
||||||
</xs:schema>
|
</xs:schema>
|
||||||
|
|||||||
@ -1,24 +1,24 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
====================================================================
|
====================================================================
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
this work for additional information regarding copyright ownership.
|
this work for additional information regarding copyright ownership.
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
(the "License"); you may not use this file except in compliance with
|
(the "License"); you may not use this file except in compliance with
|
||||||
the License. You may obtain a copy of the License at
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
====================================================================
|
====================================================================
|
||||||
-->
|
-->
|
||||||
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password">
|
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config" xmlns:p="http://schemas.microsoft.com/office/2006/keyEncryptor/password">
|
||||||
|
|
||||||
<xb:qname name="p:encryptedKey" javaname="EncryptedPasswordKey"/>
|
<xb:qname name="p:encryptedKey" javaname="EncryptedPasswordKey"/>
|
||||||
|
|
||||||
</xb:config>
|
</xb:config>
|
||||||
@ -1,103 +1,103 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
====================================================================
|
====================================================================
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
this work for additional information regarding copyright ownership.
|
this work for additional information regarding copyright ownership.
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
(the "License"); you may not use this file except in compliance with
|
(the "License"); you may not use this file except in compliance with
|
||||||
the License. You may obtain a copy of the License at
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
====================================================================
|
====================================================================
|
||||||
-->
|
-->
|
||||||
<xsd:schema targetNamespace="http://schemas.microsoft.com/office/2006/digsig" elementFormDefault="qualified" xmlns="http://schemas.microsoft.com/office/2006/digsig" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
<xsd:schema targetNamespace="http://schemas.microsoft.com/office/2006/digsig" elementFormDefault="qualified" xmlns="http://schemas.microsoft.com/office/2006/digsig" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
<xsd:simpleType name="ST_PositiveInteger">
|
<xsd:simpleType name="ST_PositiveInteger">
|
||||||
<xsd:restriction base="xsd:int">
|
<xsd:restriction base="xsd:int">
|
||||||
<xsd:minExclusive value="0"/>
|
<xsd:minExclusive value="0"/>
|
||||||
</xsd:restriction>
|
</xsd:restriction>
|
||||||
</xsd:simpleType>
|
</xsd:simpleType>
|
||||||
<xsd:simpleType name="ST_SignatureComments">
|
<xsd:simpleType name="ST_SignatureComments">
|
||||||
<xsd:restriction base="xsd:string">
|
<xsd:restriction base="xsd:string">
|
||||||
<xsd:maxLength value="255"/>
|
<xsd:maxLength value="255"/>
|
||||||
</xsd:restriction>
|
</xsd:restriction>
|
||||||
</xsd:simpleType>
|
</xsd:simpleType>
|
||||||
<xsd:simpleType name="ST_SignatureProviderUrl">
|
<xsd:simpleType name="ST_SignatureProviderUrl">
|
||||||
<xsd:restriction base="xsd:string">
|
<xsd:restriction base="xsd:string">
|
||||||
<xsd:maxLength value="2083"/>
|
<xsd:maxLength value="2083"/>
|
||||||
</xsd:restriction>
|
</xsd:restriction>
|
||||||
</xsd:simpleType>
|
</xsd:simpleType>
|
||||||
<xsd:simpleType name="ST_SignatureText">
|
<xsd:simpleType name="ST_SignatureText">
|
||||||
<xsd:restriction base="xsd:string">
|
<xsd:restriction base="xsd:string">
|
||||||
<xsd:maxLength value="100"/>
|
<xsd:maxLength value="100"/>
|
||||||
</xsd:restriction>
|
</xsd:restriction>
|
||||||
</xsd:simpleType>
|
</xsd:simpleType>
|
||||||
<xsd:simpleType name="ST_SignatureType">
|
<xsd:simpleType name="ST_SignatureType">
|
||||||
<xsd:restriction base="xsd:int">
|
<xsd:restriction base="xsd:int">
|
||||||
<xsd:enumeration value="1"/>
|
<xsd:enumeration value="1"/>
|
||||||
<xsd:enumeration value="2"/>
|
<xsd:enumeration value="2"/>
|
||||||
</xsd:restriction>
|
</xsd:restriction>
|
||||||
</xsd:simpleType>
|
</xsd:simpleType>
|
||||||
<xsd:simpleType name="ST_Version">
|
<xsd:simpleType name="ST_Version">
|
||||||
<xsd:restriction base="xsd:string">
|
<xsd:restriction base="xsd:string">
|
||||||
<xsd:maxLength value="64"/>
|
<xsd:maxLength value="64"/>
|
||||||
</xsd:restriction>
|
</xsd:restriction>
|
||||||
</xsd:simpleType>
|
</xsd:simpleType>
|
||||||
<xsd:simpleType name="ST_UniqueIdentifierWithBraces">
|
<xsd:simpleType name="ST_UniqueIdentifierWithBraces">
|
||||||
<xsd:restriction base="xsd:string">
|
<xsd:restriction base="xsd:string">
|
||||||
<xsd:pattern value="\{[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}\}|"/>
|
<xsd:pattern value="\{[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}\}|"/>
|
||||||
</xsd:restriction>
|
</xsd:restriction>
|
||||||
</xsd:simpleType>
|
</xsd:simpleType>
|
||||||
<xsd:group name="EG_RequiredChildren">
|
<xsd:group name="EG_RequiredChildren">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="SetupID" type="ST_UniqueIdentifierWithBraces"/>
|
<xsd:element name="SetupID" type="ST_UniqueIdentifierWithBraces"/>
|
||||||
<xsd:element name="SignatureText" type="ST_SignatureText"/>
|
<xsd:element name="SignatureText" type="ST_SignatureText"/>
|
||||||
<xsd:element name="SignatureImage" type="xsd:base64Binary"/>
|
<xsd:element name="SignatureImage" type="xsd:base64Binary"/>
|
||||||
<xsd:element name="SignatureComments" type="ST_SignatureComments"/>
|
<xsd:element name="SignatureComments" type="ST_SignatureComments"/>
|
||||||
<xsd:element name="WindowsVersion" type="ST_Version"/>
|
<xsd:element name="WindowsVersion" type="ST_Version"/>
|
||||||
<xsd:element name="OfficeVersion" type="ST_Version"/>
|
<xsd:element name="OfficeVersion" type="ST_Version"/>
|
||||||
<xsd:element name="ApplicationVersion" type="ST_Version"/>
|
<xsd:element name="ApplicationVersion" type="ST_Version"/>
|
||||||
<xsd:element name="Monitors" type="ST_PositiveInteger"/>
|
<xsd:element name="Monitors" type="ST_PositiveInteger"/>
|
||||||
<xsd:element name="HorizontalResolution" type="ST_PositiveInteger"/>
|
<xsd:element name="HorizontalResolution" type="ST_PositiveInteger"/>
|
||||||
<xsd:element name="VerticalResolution" type="ST_PositiveInteger"/>
|
<xsd:element name="VerticalResolution" type="ST_PositiveInteger"/>
|
||||||
<xsd:element name="ColorDepth" type="ST_PositiveInteger"/>
|
<xsd:element name="ColorDepth" type="ST_PositiveInteger"/>
|
||||||
<xsd:element name="SignatureProviderId" type="ST_UniqueIdentifierWithBraces"/>
|
<xsd:element name="SignatureProviderId" type="ST_UniqueIdentifierWithBraces"/>
|
||||||
<xsd:element name="SignatureProviderUrl" type="ST_SignatureProviderUrl"/>
|
<xsd:element name="SignatureProviderUrl" type="ST_SignatureProviderUrl"/>
|
||||||
<xsd:element name="SignatureProviderDetails" type="xsd:int"/>
|
<xsd:element name="SignatureProviderDetails" type="xsd:int"/>
|
||||||
<xsd:element name="SignatureType" type="ST_SignatureType"/>
|
<xsd:element name="SignatureType" type="ST_SignatureType"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:group>
|
</xsd:group>
|
||||||
<xsd:group name="EG_OptionalChildren">
|
<xsd:group name="EG_OptionalChildren">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="DelegateSuggestedSigner" type="xsd:string"/>
|
<xsd:element name="DelegateSuggestedSigner" type="xsd:string"/>
|
||||||
<xsd:element name="DelegateSuggestedSigner2" type="xsd:string"/>
|
<xsd:element name="DelegateSuggestedSigner2" type="xsd:string"/>
|
||||||
<xsd:element name="DelegateSuggestedSignerEmail" type="xsd:string"/>
|
<xsd:element name="DelegateSuggestedSignerEmail" type="xsd:string"/>
|
||||||
<xsd:element name="ManifestHashAlgorithm" type="xsd:anyURI" minOccurs="0"/>
|
<xsd:element name="ManifestHashAlgorithm" type="xsd:anyURI" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:group>
|
</xsd:group>
|
||||||
<xsd:group name="EG_OptionalChildrenV2">
|
<xsd:group name="EG_OptionalChildrenV2">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="Address1" type="xsd:string"/>
|
<xsd:element name="Address1" type="xsd:string"/>
|
||||||
<xsd:element name="Address2" type="xsd:string"/>
|
<xsd:element name="Address2" type="xsd:string"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:group>
|
</xsd:group>
|
||||||
<xsd:complexType name="CT_SignatureInfoV1">
|
<xsd:complexType name="CT_SignatureInfoV1">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:group ref="EG_RequiredChildren"/>
|
<xsd:group ref="EG_RequiredChildren"/>
|
||||||
<xsd:group ref="EG_OptionalChildren" minOccurs="0"/>
|
<xsd:group ref="EG_OptionalChildren" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="CT_SignatureInfoV2">
|
<xsd:complexType name="CT_SignatureInfoV2">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:group ref="EG_OptionalChildrenV2" minOccurs="0"/>
|
<xsd:group ref="EG_OptionalChildrenV2" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:element name="SignatureInfoV1" type="CT_SignatureInfoV1"/>
|
<xsd:element name="SignatureInfoV1" type="CT_SignatureInfoV1"/>
|
||||||
<xsd:element name="SignatureInfoV2" type="CT_SignatureInfoV2"/>
|
<xsd:element name="SignatureInfoV2" type="CT_SignatureInfoV2"/>
|
||||||
</xsd:schema>
|
</xsd:schema>
|
||||||
@ -1,466 +1,466 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.3.2#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.3.2#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified">
|
<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.3.2#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.3.2#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified">
|
||||||
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>
|
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>
|
||||||
<!-- Start auxiliary types definitions: AnyType, ObjectIdentifierType,
|
<!-- Start auxiliary types definitions: AnyType, ObjectIdentifierType,
|
||||||
EncapsulatedPKIDataType and containers for time-stamp tokens -->
|
EncapsulatedPKIDataType and containers for time-stamp tokens -->
|
||||||
<!-- Start AnyType -->
|
<!-- Start AnyType -->
|
||||||
<xsd:element name="Any" type="AnyType"/>
|
<xsd:element name="Any" type="AnyType"/>
|
||||||
<xsd:complexType name="AnyType" mixed="true">
|
<xsd:complexType name="AnyType" mixed="true">
|
||||||
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
|
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
|
||||||
<xsd:any namespace="##any" processContents="lax"/>
|
<xsd:any namespace="##any" processContents="lax"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:anyAttribute namespace="##any"/>
|
<xsd:anyAttribute namespace="##any"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End AnyType -->
|
<!-- End AnyType -->
|
||||||
<!-- Start ObjectIdentifierType-->
|
<!-- Start ObjectIdentifierType-->
|
||||||
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
|
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
|
||||||
<xsd:complexType name="ObjectIdentifierType">
|
<xsd:complexType name="ObjectIdentifierType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="Identifier" type="IdentifierType"/>
|
<xsd:element name="Identifier" type="IdentifierType"/>
|
||||||
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
|
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
|
||||||
<xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
|
<xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="IdentifierType">
|
<xsd:complexType name="IdentifierType">
|
||||||
<xsd:simpleContent>
|
<xsd:simpleContent>
|
||||||
<xsd:extension base="xsd:anyURI">
|
<xsd:extension base="xsd:anyURI">
|
||||||
<xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
|
<xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
|
||||||
</xsd:extension>
|
</xsd:extension>
|
||||||
</xsd:simpleContent>
|
</xsd:simpleContent>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:simpleType name="QualifierType">
|
<xsd:simpleType name="QualifierType">
|
||||||
<xsd:restriction base="xsd:string">
|
<xsd:restriction base="xsd:string">
|
||||||
<xsd:enumeration value="OIDAsURI"/>
|
<xsd:enumeration value="OIDAsURI"/>
|
||||||
<xsd:enumeration value="OIDAsURN"/>
|
<xsd:enumeration value="OIDAsURN"/>
|
||||||
</xsd:restriction>
|
</xsd:restriction>
|
||||||
</xsd:simpleType>
|
</xsd:simpleType>
|
||||||
<xsd:complexType name="DocumentationReferencesType">
|
<xsd:complexType name="DocumentationReferencesType">
|
||||||
<xsd:sequence maxOccurs="unbounded">
|
<xsd:sequence maxOccurs="unbounded">
|
||||||
<xsd:element name="DocumentationReference" type="xsd:anyURI"/>
|
<xsd:element name="DocumentationReference" type="xsd:anyURI"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End ObjectIdentifierType-->
|
<!-- End ObjectIdentifierType-->
|
||||||
<!-- Start EncapsulatedPKIDataType-->
|
<!-- Start EncapsulatedPKIDataType-->
|
||||||
<xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
|
<xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
|
||||||
<xsd:complexType name="EncapsulatedPKIDataType">
|
<xsd:complexType name="EncapsulatedPKIDataType">
|
||||||
<xsd:simpleContent>
|
<xsd:simpleContent>
|
||||||
<xsd:extension base="xsd:base64Binary">
|
<xsd:extension base="xsd:base64Binary">
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
<xsd:attribute name="Encoding" type="xsd:anyURI" use="optional"/>
|
<xsd:attribute name="Encoding" type="xsd:anyURI" use="optional"/>
|
||||||
</xsd:extension>
|
</xsd:extension>
|
||||||
</xsd:simpleContent>
|
</xsd:simpleContent>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End EncapsulatedPKIDataType -->
|
<!-- End EncapsulatedPKIDataType -->
|
||||||
<!-- Start time-stamp containers types -->
|
<!-- Start time-stamp containers types -->
|
||||||
<!-- Start GenericTimeStampType -->
|
<!-- Start GenericTimeStampType -->
|
||||||
<xsd:element name="Include" type="IncludeType"/>
|
<xsd:element name="Include" type="IncludeType"/>
|
||||||
<xsd:complexType name="IncludeType">
|
<xsd:complexType name="IncludeType">
|
||||||
<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
|
<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
|
||||||
<xsd:attribute name="referencedData" type="xsd:boolean" use="optional"/>
|
<xsd:attribute name="referencedData" type="xsd:boolean" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:element name="ReferenceInfo" type="ReferenceInfoType"/>
|
<xsd:element name="ReferenceInfo" type="ReferenceInfoType"/>
|
||||||
<xsd:complexType name="ReferenceInfoType">
|
<xsd:complexType name="ReferenceInfoType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element ref="ds:DigestMethod"/>
|
<xsd:element ref="ds:DigestMethod"/>
|
||||||
<xsd:element ref="ds:DigestValue"/>
|
<xsd:element ref="ds:DigestValue"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="GenericTimeStampType" abstract="true">
|
<xsd:complexType name="GenericTimeStampType" abstract="true">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:choice minOccurs="0">
|
<xsd:choice minOccurs="0">
|
||||||
<xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>
|
<xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
<xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>
|
<xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>
|
||||||
</xsd:choice>
|
</xsd:choice>
|
||||||
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
|
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
|
||||||
<xsd:choice maxOccurs="unbounded">
|
<xsd:choice maxOccurs="unbounded">
|
||||||
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
|
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
|
||||||
<xsd:element name="XMLTimeStamp" type="AnyType"/>
|
<xsd:element name="XMLTimeStamp" type="AnyType"/>
|
||||||
</xsd:choice>
|
</xsd:choice>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End GenericTimeStampType -->
|
<!-- End GenericTimeStampType -->
|
||||||
<!-- Start XAdESTimeStampType -->
|
<!-- Start XAdESTimeStampType -->
|
||||||
<xsd:element name="XAdESTimeStamp" type="XAdESTimeStampType"/>
|
<xsd:element name="XAdESTimeStamp" type="XAdESTimeStampType"/>
|
||||||
<xsd:complexType name="XAdESTimeStampType">
|
<xsd:complexType name="XAdESTimeStampType">
|
||||||
<xsd:complexContent>
|
<xsd:complexContent>
|
||||||
<xsd:restriction base="GenericTimeStampType">
|
<xsd:restriction base="GenericTimeStampType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>
|
<xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
|
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
|
||||||
<xsd:choice maxOccurs="unbounded">
|
<xsd:choice maxOccurs="unbounded">
|
||||||
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
|
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
|
||||||
<xsd:element name="XMLTimeStamp" type="AnyType"/>
|
<xsd:element name="XMLTimeStamp" type="AnyType"/>
|
||||||
</xsd:choice>
|
</xsd:choice>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
</xsd:restriction>
|
</xsd:restriction>
|
||||||
</xsd:complexContent>
|
</xsd:complexContent>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End XAdESTimeStampType -->
|
<!-- End XAdESTimeStampType -->
|
||||||
<!-- Start OtherTimeStampType -->
|
<!-- Start OtherTimeStampType -->
|
||||||
<xsd:element name="OtherTimeStamp" type="OtherTimeStampType"/>
|
<xsd:element name="OtherTimeStamp" type="OtherTimeStampType"/>
|
||||||
<xsd:complexType name="OtherTimeStampType">
|
<xsd:complexType name="OtherTimeStampType">
|
||||||
<xsd:complexContent>
|
<xsd:complexContent>
|
||||||
<xsd:restriction base="GenericTimeStampType">
|
<xsd:restriction base="GenericTimeStampType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>
|
<xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>
|
||||||
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
|
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
|
||||||
<xsd:choice>
|
<xsd:choice>
|
||||||
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
|
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
|
||||||
<xsd:element name="XMLTimeStamp" type="AnyType"/>
|
<xsd:element name="XMLTimeStamp" type="AnyType"/>
|
||||||
</xsd:choice>
|
</xsd:choice>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
</xsd:restriction>
|
</xsd:restriction>
|
||||||
</xsd:complexContent>
|
</xsd:complexContent>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End OtherTimeStampType -->
|
<!-- End OtherTimeStampType -->
|
||||||
<!-- End time-stamp containers types -->
|
<!-- End time-stamp containers types -->
|
||||||
<!-- End auxiliary types definitions-->
|
<!-- End auxiliary types definitions-->
|
||||||
<!-- Start container types -->
|
<!-- Start container types -->
|
||||||
<!-- Start QualifyingProperties -->
|
<!-- Start QualifyingProperties -->
|
||||||
<xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
|
<xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
|
||||||
<xsd:complexType name="QualifyingPropertiesType">
|
<xsd:complexType name="QualifyingPropertiesType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
|
<xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
|
||||||
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
|
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
|
<xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End QualifyingProperties -->
|
<!-- End QualifyingProperties -->
|
||||||
<!-- Start SignedProperties-->
|
<!-- Start SignedProperties-->
|
||||||
<xsd:element name="SignedProperties" type="SignedPropertiesType"/>
|
<xsd:element name="SignedProperties" type="SignedPropertiesType"/>
|
||||||
<xsd:complexType name="SignedPropertiesType">
|
<xsd:complexType name="SignedPropertiesType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType" minOccurs="0"/>
|
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType" minOccurs="0"/>
|
||||||
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
|
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End SignedProperties-->
|
<!-- End SignedProperties-->
|
||||||
<!-- Start UnsignedProperties-->
|
<!-- Start UnsignedProperties-->
|
||||||
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType"/>
|
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType"/>
|
||||||
<xsd:complexType name="UnsignedPropertiesType">
|
<xsd:complexType name="UnsignedPropertiesType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0"/>
|
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0"/>
|
||||||
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
|
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End UnsignedProperties-->
|
<!-- End UnsignedProperties-->
|
||||||
<!-- Start SignedSignatureProperties-->
|
<!-- Start SignedSignatureProperties-->
|
||||||
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
|
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
|
||||||
<xsd:complexType name="SignedSignaturePropertiesType">
|
<xsd:complexType name="SignedSignaturePropertiesType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="SigningTime" type="xsd:dateTime" minOccurs="0"/>
|
<xsd:element name="SigningTime" type="xsd:dateTime" minOccurs="0"/>
|
||||||
<xsd:element name="SigningCertificate" type="CertIDListType" minOccurs="0"/>
|
<xsd:element name="SigningCertificate" type="CertIDListType" minOccurs="0"/>
|
||||||
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType" minOccurs="0"/>
|
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType" minOccurs="0"/>
|
||||||
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0"/>
|
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0"/>
|
||||||
<xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
|
<xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End SignedSignatureProperties-->
|
<!-- End SignedSignatureProperties-->
|
||||||
<!-- Start SignedDataObjectProperties-->
|
<!-- Start SignedDataObjectProperties-->
|
||||||
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType"/>
|
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType"/>
|
||||||
<xsd:complexType name="SignedDataObjectPropertiesType">
|
<xsd:complexType name="SignedDataObjectPropertiesType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded"/>
|
<xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0" maxOccurs="unbounded"/>
|
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
<xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>
|
<xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
<xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>
|
<xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End SignedDataObjectProperties-->
|
<!-- End SignedDataObjectProperties-->
|
||||||
<!-- Start UnsignedSignatureProperties-->
|
<!-- Start UnsignedSignatureProperties-->
|
||||||
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType"/>
|
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType"/>
|
||||||
<xsd:complexType name="UnsignedSignaturePropertiesType">
|
<xsd:complexType name="UnsignedSignaturePropertiesType">
|
||||||
<xsd:choice maxOccurs="unbounded">
|
<xsd:choice maxOccurs="unbounded">
|
||||||
<xsd:element name="CounterSignature" type="CounterSignatureType"/>
|
<xsd:element name="CounterSignature" type="CounterSignatureType"/>
|
||||||
<xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>
|
<xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>
|
||||||
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
|
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
|
||||||
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
|
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
|
||||||
<xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>
|
<xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>
|
||||||
<xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>
|
<xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>
|
||||||
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
|
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
|
||||||
<xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>
|
<xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>
|
||||||
<xsd:element name="CertificateValues" type="CertificateValuesType"/>
|
<xsd:element name="CertificateValues" type="CertificateValuesType"/>
|
||||||
<xsd:element name="RevocationValues" type="RevocationValuesType"/>
|
<xsd:element name="RevocationValues" type="RevocationValuesType"/>
|
||||||
<xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>
|
<xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>
|
||||||
<xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>
|
<xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>
|
||||||
<xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>
|
<xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>
|
||||||
<xsd:any namespace="##other"/>
|
<xsd:any namespace="##other"/>
|
||||||
</xsd:choice>
|
</xsd:choice>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End UnsignedSignatureProperties-->
|
<!-- End UnsignedSignatureProperties-->
|
||||||
<!-- Start UnsignedDataObjectProperties-->
|
<!-- Start UnsignedDataObjectProperties-->
|
||||||
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType"/>
|
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType"/>
|
||||||
<xsd:complexType name="UnsignedDataObjectPropertiesType">
|
<xsd:complexType name="UnsignedDataObjectPropertiesType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="UnsignedDataObjectProperty" type="AnyType" maxOccurs="unbounded"/>
|
<xsd:element name="UnsignedDataObjectProperty" type="AnyType" maxOccurs="unbounded"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End UnsignedDataObjectProperties-->
|
<!-- End UnsignedDataObjectProperties-->
|
||||||
<!-- Start QualifyingPropertiesReference-->
|
<!-- Start QualifyingPropertiesReference-->
|
||||||
<xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType"/>
|
<xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType"/>
|
||||||
<xsd:complexType name="QualifyingPropertiesReferenceType">
|
<xsd:complexType name="QualifyingPropertiesReferenceType">
|
||||||
<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
|
<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End QualifyingPropertiesReference-->
|
<!-- End QualifyingPropertiesReference-->
|
||||||
<!-- End container types -->
|
<!-- End container types -->
|
||||||
<!-- Start SigningTime element -->
|
<!-- Start SigningTime element -->
|
||||||
<xsd:element name="SigningTime" type="xsd:dateTime"/>
|
<xsd:element name="SigningTime" type="xsd:dateTime"/>
|
||||||
<!-- End SigningTime element -->
|
<!-- End SigningTime element -->
|
||||||
<!-- Start SigningCertificate -->
|
<!-- Start SigningCertificate -->
|
||||||
<xsd:element name="SigningCertificate" type="CertIDListType"/>
|
<xsd:element name="SigningCertificate" type="CertIDListType"/>
|
||||||
<xsd:complexType name="CertIDListType">
|
<xsd:complexType name="CertIDListType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
|
<xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="CertIDType">
|
<xsd:complexType name="CertIDType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
|
<xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
|
||||||
<xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
|
<xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="DigestAlgAndValueType">
|
<xsd:complexType name="DigestAlgAndValueType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element ref="ds:DigestMethod"/>
|
<xsd:element ref="ds:DigestMethod"/>
|
||||||
<xsd:element ref="ds:DigestValue"/>
|
<xsd:element ref="ds:DigestValue"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End SigningCertificate -->
|
<!-- End SigningCertificate -->
|
||||||
<!-- Start SignaturePolicyIdentifier -->
|
<!-- Start SignaturePolicyIdentifier -->
|
||||||
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
|
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
|
||||||
<xsd:complexType name="SignaturePolicyIdentifierType">
|
<xsd:complexType name="SignaturePolicyIdentifierType">
|
||||||
<xsd:choice>
|
<xsd:choice>
|
||||||
<xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
|
<xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
|
||||||
<xsd:element name="SignaturePolicyImplied"/>
|
<xsd:element name="SignaturePolicyImplied"/>
|
||||||
</xsd:choice>
|
</xsd:choice>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="SignaturePolicyIdType">
|
<xsd:complexType name="SignaturePolicyIdType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
|
<xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
|
||||||
<xsd:element ref="ds:Transforms" minOccurs="0"/>
|
<xsd:element ref="ds:Transforms" minOccurs="0"/>
|
||||||
<xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
|
<xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
|
||||||
<xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
|
<xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="SigPolicyQualifiersListType">
|
<xsd:complexType name="SigPolicyQualifiersListType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
|
<xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:element name="SPURI" type="xsd:anyURI"/>
|
<xsd:element name="SPURI" type="xsd:anyURI"/>
|
||||||
<xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
|
<xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
|
||||||
<xsd:complexType name="SPUserNoticeType">
|
<xsd:complexType name="SPUserNoticeType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
|
<xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
|
||||||
<xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
|
<xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="NoticeReferenceType">
|
<xsd:complexType name="NoticeReferenceType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="Organization" type="xsd:string"/>
|
<xsd:element name="Organization" type="xsd:string"/>
|
||||||
<xsd:element name="NoticeNumbers" type="IntegerListType"/>
|
<xsd:element name="NoticeNumbers" type="IntegerListType"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="IntegerListType">
|
<xsd:complexType name="IntegerListType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
|
<xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End SignaturePolicyIdentifier -->
|
<!-- End SignaturePolicyIdentifier -->
|
||||||
<!-- Start CounterSignature -->
|
<!-- Start CounterSignature -->
|
||||||
<xsd:element name="CounterSignature" type="CounterSignatureType"/>
|
<xsd:element name="CounterSignature" type="CounterSignatureType"/>
|
||||||
<xsd:complexType name="CounterSignatureType">
|
<xsd:complexType name="CounterSignatureType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element ref="ds:Signature"/>
|
<xsd:element ref="ds:Signature"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End CounterSignature -->
|
<!-- End CounterSignature -->
|
||||||
<!-- Start DataObjectFormat -->
|
<!-- Start DataObjectFormat -->
|
||||||
<xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
|
<xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
|
||||||
<xsd:complexType name="DataObjectFormatType">
|
<xsd:complexType name="DataObjectFormatType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
|
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
|
||||||
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
|
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
|
||||||
<xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
|
<xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
|
||||||
<xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
|
<xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
|
<xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End DataObjectFormat -->
|
<!-- End DataObjectFormat -->
|
||||||
<!-- Start CommitmentTypeIndication -->
|
<!-- Start CommitmentTypeIndication -->
|
||||||
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
|
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
|
||||||
<xsd:complexType name="CommitmentTypeIndicationType">
|
<xsd:complexType name="CommitmentTypeIndicationType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
|
<xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
|
||||||
<xsd:choice>
|
<xsd:choice>
|
||||||
<xsd:element name="ObjectReference" type="xsd:anyURI" maxOccurs="unbounded"/>
|
<xsd:element name="ObjectReference" type="xsd:anyURI" maxOccurs="unbounded"/>
|
||||||
<xsd:element name="AllSignedDataObjects"/>
|
<xsd:element name="AllSignedDataObjects"/>
|
||||||
</xsd:choice>
|
</xsd:choice>
|
||||||
<xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
|
<xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="CommitmentTypeQualifiersListType">
|
<xsd:complexType name="CommitmentTypeQualifiersListType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
|
<xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End CommitmentTypeIndication -->
|
<!-- End CommitmentTypeIndication -->
|
||||||
<!-- Start SignatureProductionPlace -->
|
<!-- Start SignatureProductionPlace -->
|
||||||
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
|
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
|
||||||
<xsd:complexType name="SignatureProductionPlaceType">
|
<xsd:complexType name="SignatureProductionPlaceType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="City" type="xsd:string" minOccurs="0"/>
|
<xsd:element name="City" type="xsd:string" minOccurs="0"/>
|
||||||
<xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
|
<xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
|
||||||
<xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
|
<xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
|
||||||
<xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
|
<xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End SignatureProductionPlace -->
|
<!-- End SignatureProductionPlace -->
|
||||||
<!-- Start SignerRole -->
|
<!-- Start SignerRole -->
|
||||||
<xsd:element name="SignerRole" type="SignerRoleType"/>
|
<xsd:element name="SignerRole" type="SignerRoleType"/>
|
||||||
<xsd:complexType name="SignerRoleType">
|
<xsd:complexType name="SignerRoleType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0"/>
|
<xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0"/>
|
||||||
<xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0"/>
|
<xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="ClaimedRolesListType">
|
<xsd:complexType name="ClaimedRolesListType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
|
<xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="CertifiedRolesListType">
|
<xsd:complexType name="CertifiedRolesListType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
|
<xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End SignerRole -->
|
<!-- End SignerRole -->
|
||||||
<xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType"/>
|
<xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType"/>
|
||||||
<xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType"/>
|
<xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType"/>
|
||||||
<xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>
|
<xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>
|
||||||
<!-- Start CompleteCertificateRefs -->
|
<!-- Start CompleteCertificateRefs -->
|
||||||
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
|
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
|
||||||
<xsd:complexType name="CompleteCertificateRefsType">
|
<xsd:complexType name="CompleteCertificateRefsType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="CertRefs" type="CertIDListType"/>
|
<xsd:element name="CertRefs" type="CertIDListType"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End CompleteCertificateRefs -->
|
<!-- End CompleteCertificateRefs -->
|
||||||
<!-- Start CompleteRevocationRefs-->
|
<!-- Start CompleteRevocationRefs-->
|
||||||
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
|
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
|
||||||
<xsd:complexType name="CompleteRevocationRefsType">
|
<xsd:complexType name="CompleteRevocationRefsType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
|
<xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
|
||||||
<xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
|
<xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
|
||||||
<xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
|
<xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="CRLRefsType">
|
<xsd:complexType name="CRLRefsType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
|
<xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="CRLRefType">
|
<xsd:complexType name="CRLRefType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
|
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
|
||||||
<xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
|
<xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="CRLIdentifierType">
|
<xsd:complexType name="CRLIdentifierType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="Issuer" type="xsd:string"/>
|
<xsd:element name="Issuer" type="xsd:string"/>
|
||||||
<xsd:element name="IssueTime" type="xsd:dateTime"/>
|
<xsd:element name="IssueTime" type="xsd:dateTime"/>
|
||||||
<xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
|
<xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="OCSPRefsType">
|
<xsd:complexType name="OCSPRefsType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
|
<xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="OCSPRefType">
|
<xsd:complexType name="OCSPRefType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
|
<xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
|
||||||
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0"/>
|
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="ResponderIDType">
|
<xsd:complexType name="ResponderIDType">
|
||||||
<xsd:choice>
|
<xsd:choice>
|
||||||
<xsd:element name="ByName" type="xsd:string"/>
|
<xsd:element name="ByName" type="xsd:string"/>
|
||||||
<xsd:element name="ByKey" type="xsd:base64Binary"/>
|
<xsd:element name="ByKey" type="xsd:base64Binary"/>
|
||||||
</xsd:choice>
|
</xsd:choice>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="OCSPIdentifierType">
|
<xsd:complexType name="OCSPIdentifierType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="ResponderID" type="ResponderIDType"/>
|
<xsd:element name="ResponderID" type="ResponderIDType"/>
|
||||||
<xsd:element name="ProducedAt" type="xsd:dateTime"/>
|
<xsd:element name="ProducedAt" type="xsd:dateTime"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="OtherCertStatusRefsType">
|
<xsd:complexType name="OtherCertStatusRefsType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
|
<xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End CompleteRevocationRefs-->
|
<!-- End CompleteRevocationRefs-->
|
||||||
<xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>
|
<xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>
|
||||||
<xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>
|
<xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>
|
||||||
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
|
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
|
||||||
<xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>
|
<xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>
|
||||||
<!-- Start CertificateValues -->
|
<!-- Start CertificateValues -->
|
||||||
<xsd:element name="CertificateValues" type="CertificateValuesType"/>
|
<xsd:element name="CertificateValues" type="CertificateValuesType"/>
|
||||||
<xsd:complexType name="CertificateValuesType">
|
<xsd:complexType name="CertificateValuesType">
|
||||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||||
<xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
|
<xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
|
||||||
<xsd:element name="OtherCertificate" type="AnyType"/>
|
<xsd:element name="OtherCertificate" type="AnyType"/>
|
||||||
</xsd:choice>
|
</xsd:choice>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End CertificateValues -->
|
<!-- End CertificateValues -->
|
||||||
<!-- Start RevocationValues-->
|
<!-- Start RevocationValues-->
|
||||||
<xsd:element name="RevocationValues" type="RevocationValuesType"/>
|
<xsd:element name="RevocationValues" type="RevocationValuesType"/>
|
||||||
<xsd:complexType name="RevocationValuesType">
|
<xsd:complexType name="RevocationValuesType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
|
<xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
|
||||||
<xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
|
<xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
|
||||||
<xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
|
<xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="CRLValuesType">
|
<xsd:complexType name="CRLValuesType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
|
<xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="OCSPValuesType">
|
<xsd:complexType name="OCSPValuesType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
|
<xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:complexType name="OtherCertStatusValuesType">
|
<xsd:complexType name="OtherCertStatusValuesType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
|
<xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<!-- End RevocationValues-->
|
<!-- End RevocationValues-->
|
||||||
<xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>
|
<xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>
|
||||||
<xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>
|
<xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>
|
||||||
<xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>
|
<xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>
|
||||||
</xsd:schema>
|
</xsd:schema>
|
||||||
|
|||||||
@ -1,15 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.4.1#" xmlns="http://uri.etsi.org/01903/v1.4.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" elementFormDefault="qualified">
|
<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.4.1#" xmlns="http://uri.etsi.org/01903/v1.4.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" elementFormDefault="qualified">
|
||||||
<xsd:import namespace="http://uri.etsi.org/01903/v1.3.2#" schemaLocation="http://uri.etsi.org/01903/v1.3.2/XAdES.xsd"/>
|
<xsd:import namespace="http://uri.etsi.org/01903/v1.3.2#" schemaLocation="http://uri.etsi.org/01903/v1.3.2/XAdES.xsd"/>
|
||||||
<!-- Start CertificateValues -->
|
<!-- Start CertificateValues -->
|
||||||
<xsd:element name="TimeStampValidationData" type="ValidationDataType"/>
|
<xsd:element name="TimeStampValidationData" type="ValidationDataType"/>
|
||||||
<xsd:complexType name="ValidationDataType">
|
<xsd:complexType name="ValidationDataType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element ref="xades:CertificateValues" minOccurs="0"/>
|
<xsd:element ref="xades:CertificateValues" minOccurs="0"/>
|
||||||
<xsd:element ref="xades:RevocationValues" minOccurs="0"/>
|
<xsd:element ref="xades:RevocationValues" minOccurs="0"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
|
||||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
<xsd:element name="ArchiveTimeStamp" type="xades:XAdESTimeStampType"/>
|
<xsd:element name="ArchiveTimeStamp" type="xades:XAdESTimeStampType"/>
|
||||||
</xsd:schema>
|
</xsd:schema>
|
||||||
|
|||||||
@ -1,50 +1,50 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
====================================================================
|
====================================================================
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
this work for additional information regarding copyright ownership.
|
this work for additional information regarding copyright ownership.
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
(the "License"); you may not use this file except in compliance with
|
(the "License"); you may not use this file except in compliance with
|
||||||
the License. You may obtain a copy of the License at
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
====================================================================
|
====================================================================
|
||||||
-->
|
-->
|
||||||
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
|
<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
|
||||||
|
|
||||||
<xb:namespace uri="urn:schemas-microsoft-com:office:office">
|
<xb:namespace uri="urn:schemas-microsoft-com:office:office">
|
||||||
<xb:package>com.microsoft.schemas.office.office</xb:package>
|
<xb:package>com.microsoft.schemas.office.office</xb:package>
|
||||||
</xb:namespace>
|
</xb:namespace>
|
||||||
|
|
||||||
<xb:namespace uri="urn:schemas-microsoft-com:office:excel">
|
<xb:namespace uri="urn:schemas-microsoft-com:office:excel">
|
||||||
<xb:package>com.microsoft.schemas.office.excel</xb:package>
|
<xb:package>com.microsoft.schemas.office.excel</xb:package>
|
||||||
</xb:namespace>
|
</xb:namespace>
|
||||||
|
|
||||||
<xb:namespace uri="urn:schemas-microsoft-com:office:word">
|
<xb:namespace uri="urn:schemas-microsoft-com:office:word">
|
||||||
<xb:package>com.microsoft.schemas.office.word</xb:package>
|
<xb:package>com.microsoft.schemas.office.word</xb:package>
|
||||||
</xb:namespace>
|
</xb:namespace>
|
||||||
|
|
||||||
<xb:namespace uri="urn:schemas-microsoft-com:office:powerpoint">
|
<xb:namespace uri="urn:schemas-microsoft-com:office:powerpoint">
|
||||||
<xb:package>com.microsoft.schemas.office.powerpoint</xb:package>
|
<xb:package>com.microsoft.schemas.office.powerpoint</xb:package>
|
||||||
</xb:namespace>
|
</xb:namespace>
|
||||||
|
|
||||||
<xb:namespace uri="urn:schemas-microsoft-com:vml">
|
<xb:namespace uri="urn:schemas-microsoft-com:vml">
|
||||||
<xb:package>com.microsoft.schemas.vml</xb:package>
|
<xb:package>com.microsoft.schemas.vml</xb:package>
|
||||||
</xb:namespace>
|
</xb:namespace>
|
||||||
|
|
||||||
<xb:namespace uri="http://schemas.openxmlformats.org/markup-compatibility/2006">
|
<xb:namespace uri="http://schemas.openxmlformats.org/markup-compatibility/2006">
|
||||||
<xb:package>com.microsoft.schemas.compatibility</xb:package>
|
<xb:package>com.microsoft.schemas.compatibility</xb:package>
|
||||||
</xb:namespace>
|
</xb:namespace>
|
||||||
|
|
||||||
<xb:namespace uri="urn:schemas-poi-apache-org:vmldrawing">
|
<xb:namespace uri="urn:schemas-poi-apache-org:vmldrawing">
|
||||||
<xb:package>org.apache.poi.schemas.vmldrawing</xb:package>
|
<xb:package>org.apache.poi.schemas.vmldrawing</xb:package>
|
||||||
</xb:namespace>
|
</xb:namespace>
|
||||||
|
|
||||||
</xb:config>
|
</xb:config>
|
||||||
@ -22,8 +22,8 @@ sourceSets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api 'net.bytebuddy:byte-buddy:1.17.7'
|
api 'net.bytebuddy:byte-buddy:1.18.5'
|
||||||
api 'net.bytebuddy:byte-buddy-agent:1.17.7'
|
api 'net.bytebuddy:byte-buddy-agent:1.18.5'
|
||||||
api "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}"
|
api "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,8 +42,8 @@ tasks.register('compileJava9', JavaCompile) {
|
|||||||
javaCompiler = javaToolchains.compilerFor {
|
javaCompiler = javaToolchains.compilerFor {
|
||||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||||
}
|
}
|
||||||
sourceCompatibility = 1.9
|
sourceCompatibility = 11
|
||||||
targetCompatibility = 1.9
|
targetCompatibility = 11
|
||||||
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
||||||
source = file(JAVA9_SRC)
|
source = file(JAVA9_SRC)
|
||||||
classpath = files()
|
classpath = files()
|
||||||
@ -56,7 +56,7 @@ tasks.register('compileJava9', JavaCompile) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||||
|
|
||||||
manifest {
|
manifest {
|
||||||
attributes (
|
attributes (
|
||||||
|
|||||||
@ -25,7 +25,6 @@ import java.lang.instrument.Instrumentation;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.nio.file.StandardOpenOption;
|
import java.nio.file.StandardOpenOption;
|
||||||
import java.security.ProtectionDomain;
|
import java.security.ProtectionDomain;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -78,7 +77,7 @@ public class OOXMLLiteAgent {
|
|||||||
private static final Set<Integer> hashes = new HashSet<>();
|
private static final Set<Integer> hashes = new HashSet<>();
|
||||||
|
|
||||||
static void load(String path) throws IOException {
|
static void load(String path) throws IOException {
|
||||||
logPath = Paths.get(path);
|
logPath = Path.of(path);
|
||||||
if (Files.exists(logPath)) {
|
if (Files.exists(logPath)) {
|
||||||
try (Stream<String> stream = Files.lines(logPath)) {
|
try (Stream<String> stream = Files.lines(logPath)) {
|
||||||
stream.forEach((s) -> hashes.add(s.hashCode()));
|
stream.forEach((s) -> hashes.add(s.hashCode()));
|
||||||
@ -109,7 +108,7 @@ public class OOXMLLiteAgent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void load(String path) throws IOException {
|
void load(String path) throws IOException {
|
||||||
this.logPath = Paths.get(path);
|
this.logPath = Path.of(path);
|
||||||
if (Files.exists(this.logPath)) {
|
if (Files.exists(this.logPath)) {
|
||||||
try (Stream<String> stream = Files.lines(this.logPath)) {
|
try (Stream<String> stream = Files.lines(this.logPath)) {
|
||||||
stream.forEach((s) -> hashes.add(s.hashCode()));
|
stream.forEach((s) -> hashes.add(s.hashCode()));
|
||||||
|
|||||||
@ -93,8 +93,8 @@ task compileJava9(type: JavaCompile, dependsOn: 'compileJava') {
|
|||||||
javaCompiler = javaToolchains.compilerFor {
|
javaCompiler = javaToolchains.compilerFor {
|
||||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||||
}
|
}
|
||||||
sourceCompatibility = 1.9
|
sourceCompatibility = 11
|
||||||
targetCompatibility = 1.9
|
targetCompatibility = 11
|
||||||
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
||||||
source = file(JAVA9_SRC)
|
source = file(JAVA9_SRC)
|
||||||
classpath = files()
|
classpath = files()
|
||||||
@ -107,7 +107,7 @@ task compileJava9(type: JavaCompile, dependsOn: 'compileJava') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||||
|
|
||||||
doFirst {
|
doFirst {
|
||||||
File clazzFile = file("${OOXML_LITE_REPORT}.clazz")
|
File clazzFile = file("${OOXML_LITE_REPORT}.clazz")
|
||||||
|
|||||||
@ -62,7 +62,7 @@ dependencies {
|
|||||||
// and uncomment the line below to use a pre-built version of poi-ooxml-full.
|
// and uncomment the line below to use a pre-built version of poi-ooxml-full.
|
||||||
// Try to use the last release version of poi-ooxml-full. You might be unlucky if
|
// Try to use the last release version of poi-ooxml-full. You might be unlucky if
|
||||||
// recent unreleased changes in poi-ooxml-full are needed.
|
// recent unreleased changes in poi-ooxml-full are needed.
|
||||||
// api "org.apache.poi:poi-ooxml-full:5.4.1"
|
// api "org.apache.poi:poi-ooxml-full:5.5.1"
|
||||||
|
|
||||||
api "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}"
|
api "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}"
|
||||||
api "org.apache.commons:commons-compress:${commonsCompressVersion}"
|
api "org.apache.commons:commons-compress:${commonsCompressVersion}"
|
||||||
@ -125,7 +125,7 @@ dependencies {
|
|||||||
testImplementation project(path:':poi', configuration:'tests')
|
testImplementation project(path:':poi', configuration:'tests')
|
||||||
testImplementation project(path:':poi-ooxml-lite-agent', configuration: 'archives')
|
testImplementation project(path:':poi-ooxml-lite-agent', configuration: 'archives')
|
||||||
testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}"
|
testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}"
|
||||||
testImplementation 'org.xmlunit:xmlunit-core:2.10.4'
|
testImplementation 'org.xmlunit:xmlunit-core:2.11.0'
|
||||||
testImplementation 'org.reflections:reflections:0.10.2'
|
testImplementation 'org.reflections:reflections:0.10.2'
|
||||||
testImplementation 'org.openjdk.jmh:jmh-core:1.36'
|
testImplementation 'org.openjdk.jmh:jmh-core:1.36'
|
||||||
testImplementation 'org.openjdk.jmh:jmh-generator-annprocess:1.36'
|
testImplementation 'org.openjdk.jmh:jmh-generator-annprocess:1.36'
|
||||||
@ -157,8 +157,8 @@ tasks.register('compileJava9', JavaCompile) {
|
|||||||
javaCompiler = javaToolchains.compilerFor {
|
javaCompiler = javaToolchains.compilerFor {
|
||||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||||
}
|
}
|
||||||
sourceCompatibility = 1.9
|
sourceCompatibility = 11
|
||||||
targetCompatibility = 1.9
|
targetCompatibility = 11
|
||||||
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
|
||||||
source = file(JAVA9_SRC)
|
source = file(JAVA9_SRC)
|
||||||
classpath = files()
|
classpath = files()
|
||||||
@ -174,8 +174,8 @@ tasks.register('compileTest9', JavaCompile) {
|
|||||||
javaCompiler = javaToolchains.compilerFor {
|
javaCompiler = javaToolchains.compilerFor {
|
||||||
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
|
||||||
}
|
}
|
||||||
sourceCompatibility = 1.9
|
sourceCompatibility = 11
|
||||||
targetCompatibility = 1.9
|
targetCompatibility = 11
|
||||||
destinationDirectory = file(TEST9_OUT + VERSIONS9)
|
destinationDirectory = file(TEST9_OUT + VERSIONS9)
|
||||||
source = file(TEST9_SRC)
|
source = file(TEST9_SRC)
|
||||||
options.compilerArgs = [
|
options.compilerArgs = [
|
||||||
@ -187,7 +187,7 @@ tasks.register('compileTest9', JavaCompile) {
|
|||||||
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}")
|
||||||
|
|
||||||
manifest {
|
manifest {
|
||||||
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
|
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
|
||||||
@ -197,7 +197,7 @@ jar {
|
|||||||
// Create a separate jar for test-code to depend on it in other projects
|
// Create a separate jar for test-code to depend on it in other projects
|
||||||
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency
|
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency
|
||||||
task testJar(type: Jar, dependsOn: testClasses) {
|
task testJar(type: Jar, dependsOn: testClasses) {
|
||||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests")
|
destinationDirectory = file("../build/dist/maven/${base.archivesName.get()}-tests")
|
||||||
|
|
||||||
setArchiveClassifier 'tests'
|
setArchiveClassifier 'tests'
|
||||||
// ignore second module-info.class from main
|
// ignore second module-info.class from main
|
||||||
@ -214,12 +214,12 @@ javadoc {
|
|||||||
failOnError = true
|
failOnError = true
|
||||||
doFirst {
|
doFirst {
|
||||||
options {
|
options {
|
||||||
if (jdkVersion > 8) addBooleanOption('html5', true)
|
addBooleanOption('html5', true)
|
||||||
links 'https://poi.apache.org/apidocs/dev/'
|
links 'https://poi.apache.org/apidocs/dev/'
|
||||||
if (jdkVersion >= 23) links 'https://docs.oracle.com/en/java/javase/23/docs/api/' else links 'https://docs.oracle.com/javase/8/docs/api/'
|
if (jdkVersion >= 23) links 'https://docs.oracle.com/en/java/javase/23/docs/api/' else links 'https://docs.oracle.com/en/java/javase/11/docs/api/'
|
||||||
use = true
|
use = true
|
||||||
splitIndex = true
|
splitIndex = true
|
||||||
source = "1.8"
|
source = "11"
|
||||||
classpath += configurations.javadocs.files
|
classpath += configurations.javadocs.files
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -250,9 +250,6 @@ test {
|
|||||||
dependsOn { testJar }
|
dependsOn { testJar }
|
||||||
|
|
||||||
systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true'
|
systemProperties['junit.jupiter.execution.parallel.enabled'] = 'true'
|
||||||
if (jdkVersion == 8) {
|
|
||||||
systemProperties['sun.java2d.renderer'] = 'sun.java2d.marlin.MarlinRenderingEngine'
|
|
||||||
}
|
|
||||||
|
|
||||||
if (NO_SCRATCHPAD) {
|
if (NO_SCRATCHPAD) {
|
||||||
useJUnitPlatform {
|
useJUnitPlatform {
|
||||||
@ -262,16 +259,12 @@ test {
|
|||||||
|
|
||||||
doFirst {
|
doFirst {
|
||||||
jvmArgs += [
|
jvmArgs += [
|
||||||
"-Xverify:all",
|
'-Xverify:all',
|
||||||
"-XX:ErrorFile=../build/hs_err_pid%p.log",
|
'-XX:ErrorFile=../build/hs_err_pid%p.log',
|
||||||
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}"
|
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}",
|
||||||
|
'--add-modules', MODULE_NAME,
|
||||||
|
'--module-path', '../build/dist/maven/poi-ooxml-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath,
|
||||||
]
|
]
|
||||||
if (jdkVersion > 8) {
|
|
||||||
jvmArgs += [
|
|
||||||
'--add-modules', MODULE_NAME,
|
|
||||||
'--module-path', '../build/dist/maven/poi-ooxml-tests' + File.pathSeparator + files(TEST_MODULE_PATH).asPath,
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,44 +1,44 @@
|
|||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
this work for additional information regarding copyright ownership.
|
this work for additional information regarding copyright ownership.
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
(the "License"); you may not use this file except in compliance with
|
(the "License"); you may not use this file except in compliance with
|
||||||
the License. You may obtain a copy of the License at
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==================================================================== */
|
==================================================================== */
|
||||||
package org.apache.poi.ooxml;
|
package org.apache.poi.ooxml;
|
||||||
|
|
||||||
import org.apache.poi.openxml4j.opc.PackageRelationshipTypes;
|
import org.apache.poi.openxml4j.opc.PackageRelationshipTypes;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a hyperlink relationship.
|
* Represents a hyperlink relationship.
|
||||||
*
|
*
|
||||||
* @since POI 5.3.0
|
* @since 5.3.0
|
||||||
*/
|
*/
|
||||||
public class HyperlinkRelationship extends ReferenceRelationship {
|
public class HyperlinkRelationship extends ReferenceRelationship {
|
||||||
/**
|
/**
|
||||||
* Initializes a new instance of the HyperlinkRelationship.
|
* Initializes a new instance of the HyperlinkRelationship.
|
||||||
*
|
*
|
||||||
* @param hyperlinkUri The target uri of the hyperlink relationship.
|
* @param hyperlinkUri The target uri of the hyperlink relationship.
|
||||||
* @param isExternal Is the URI external.
|
* @param isExternal Is the URI external.
|
||||||
* @param id The relationship ID.
|
* @param id The relationship ID.
|
||||||
*/
|
*/
|
||||||
protected HyperlinkRelationship(POIXMLDocumentPart container, URI hyperlinkUri, boolean isExternal, String id) {
|
protected HyperlinkRelationship(POIXMLDocumentPart container, URI hyperlinkUri, boolean isExternal, String id) {
|
||||||
super(container, hyperlinkUri, isExternal, PackageRelationshipTypes.HYPERLINK_PART, id);
|
super(container, hyperlinkUri, isExternal, PackageRelationshipTypes.HYPERLINK_PART, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRelationshipType() {
|
public String getRelationshipType() {
|
||||||
return PackageRelationshipTypes.HYPERLINK_PART;
|
return PackageRelationshipTypes.HYPERLINK_PART;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -155,7 +155,7 @@ public abstract class POIXMLDocument extends POIXMLDocumentPart implements Close
|
|||||||
* @return the document's embedded files
|
* @return the document's embedded files
|
||||||
*
|
*
|
||||||
* @throws OpenXML4JException if the embedded parts can't be determined
|
* @throws OpenXML4JException if the embedded parts can't be determined
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public abstract List<PackagePart> getAllEmbeddedParts() throws OpenXML4JException;
|
public abstract List<PackagePart> getAllEmbeddedParts() throws OpenXML4JException;
|
||||||
|
|
||||||
|
|||||||
@ -45,6 +45,7 @@ import org.apache.poi.xssf.usermodel.XSSFRelation;
|
|||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||||
import org.apache.poi.xwpf.usermodel.XWPFRelation;
|
import org.apache.poi.xwpf.usermodel.XWPFRelation;
|
||||||
|
import org.apache.xmlbeans.XmlException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents an entry of a OOXML package.
|
* Represents an entry of a OOXML package.
|
||||||
@ -167,7 +168,7 @@ public class POIXMLDocumentPart {
|
|||||||
*
|
*
|
||||||
* @param part - The package part that holds xml data representing this sheet.
|
* @param part - The package part that holds xml data representing this sheet.
|
||||||
* @see #read(POIXMLFactory, Map)
|
* @see #read(POIXMLFactory, Map)
|
||||||
* @since POI 3.14-Beta1
|
* @since 3.14-Beta1
|
||||||
*/
|
*/
|
||||||
public POIXMLDocumentPart(PackagePart part) {
|
public POIXMLDocumentPart(PackagePart part) {
|
||||||
this(null, part);
|
this(null, part);
|
||||||
@ -180,7 +181,7 @@ public class POIXMLDocumentPart {
|
|||||||
* @param parent - Parent part
|
* @param parent - Parent part
|
||||||
* @param part - The package part that holds xml data representing this sheet.
|
* @param part - The package part that holds xml data representing this sheet.
|
||||||
* @see #read(POIXMLFactory, Map)
|
* @see #read(POIXMLFactory, Map)
|
||||||
* @since POI 3.14-Beta1
|
* @since 3.14-Beta1
|
||||||
*/
|
*/
|
||||||
public POIXMLDocumentPart(POIXMLDocumentPart parent, PackagePart part) {
|
public POIXMLDocumentPart(POIXMLDocumentPart parent, PackagePart part) {
|
||||||
this.packagePart = part;
|
this.packagePart = part;
|
||||||
@ -258,7 +259,7 @@ public class POIXMLDocumentPart {
|
|||||||
*/
|
*/
|
||||||
public final POIXMLDocumentPart getRelationById(String id) {
|
public final POIXMLDocumentPart getRelationById(String id) {
|
||||||
RelationPart rp = getRelationPartById(id);
|
RelationPart rp = getRelationPartById(id);
|
||||||
return (rp == null) ? null : rp.getDocumentPart();
|
return rp == null ? null : rp.getDocumentPart();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -668,8 +669,22 @@ public class POIXMLDocumentPart {
|
|||||||
|
|
||||||
POIXMLDocumentPart childPart = context.get(p);
|
POIXMLDocumentPart childPart = context.get(p);
|
||||||
if (childPart == null) {
|
if (childPart == null) {
|
||||||
childPart = factory.createDocumentPart(this, p);
|
try {
|
||||||
//here we are checking if part if embedded and excel then set it to chart class
|
childPart = factory.createDocumentPart(this, p);
|
||||||
|
} catch (POIXMLException e) {
|
||||||
|
if (e.getCause() instanceof XmlException
|
||||||
|
&& XSSFRelation.CHART.getRelation().equals(rel.getRelationshipType())) {
|
||||||
|
// https://github.com/apache/poi/pull/982
|
||||||
|
// only allow this skipping event for charts
|
||||||
|
// we need to be careful about not catching every exception here because
|
||||||
|
// issues like zip bomb exceptions need to thrown and not ignored
|
||||||
|
LOG.atWarn().log("Skipped unsupported part: {}", e.getMessage());
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//here we are checking if part is embedded and excel then set it to chart class
|
||||||
//so that at the time to writing we can also write updated embedded part
|
//so that at the time to writing we can also write updated embedded part
|
||||||
if (this instanceof XDDFChart && childPart instanceof XSSFWorkbook) {
|
if (this instanceof XDDFChart && childPart instanceof XSSFWorkbook) {
|
||||||
((XDDFChart) this).setWorkbook((XSSFWorkbook) childPart);
|
((XDDFChart) this).setWorkbook((XSSFWorkbook) childPart);
|
||||||
@ -749,7 +764,7 @@ public class POIXMLDocumentPart {
|
|||||||
*
|
*
|
||||||
* @param relId the part which is to be removed
|
* @param relId the part which is to be removed
|
||||||
* @return true, if the relation was removed
|
* @return true, if the relation was removed
|
||||||
* @since POI 5.3.0
|
* @since 5.3.0
|
||||||
*/
|
*/
|
||||||
public final boolean removeReferenceRelationship(String relId) {
|
public final boolean removeReferenceRelationship(String relId) {
|
||||||
ReferenceRelationship existing = referenceRelationships.remove(relId);
|
ReferenceRelationship existing = referenceRelationships.remove(relId);
|
||||||
@ -766,7 +781,7 @@ public class POIXMLDocumentPart {
|
|||||||
*
|
*
|
||||||
* @param relId the relation id
|
* @param relId the relation id
|
||||||
* @return the reference relationship or {@code null} if not found
|
* @return the reference relationship or {@code null} if not found
|
||||||
* @since POI 5.3.0
|
* @since 5.3.0
|
||||||
*/
|
*/
|
||||||
public final ReferenceRelationship getReferenceRelationship(String relId) {
|
public final ReferenceRelationship getReferenceRelationship(String relId) {
|
||||||
return referenceRelationships.get(relId);
|
return referenceRelationships.get(relId);
|
||||||
@ -779,10 +794,10 @@ public class POIXMLDocumentPart {
|
|||||||
* @param isExternal true, if the target is an external resource
|
* @param isExternal true, if the target is an external resource
|
||||||
* @param relId the relation id
|
* @param relId the relation id
|
||||||
* @return the created reference relationship
|
* @return the created reference relationship
|
||||||
* @since POI 5.3.0
|
* @since 5.3.0
|
||||||
*/
|
*/
|
||||||
public final HyperlinkRelationship createHyperlink(URI uri, boolean isExternal, String relId) {
|
public final HyperlinkRelationship createHyperlink(URI uri, boolean isExternal, String relId) {
|
||||||
PackageRelationship pr = packagePart.addRelationship(uri, isExternal ? TargetMode.EXTERNAL : TargetMode.INTERNAL,
|
packagePart.addRelationship(uri, isExternal ? TargetMode.EXTERNAL : TargetMode.INTERNAL,
|
||||||
PackageRelationshipTypes.HYPERLINK_PART, relId);
|
PackageRelationshipTypes.HYPERLINK_PART, relId);
|
||||||
HyperlinkRelationship hyperlink = new HyperlinkRelationship(this, uri, isExternal, relId);
|
HyperlinkRelationship hyperlink = new HyperlinkRelationship(this, uri, isExternal, relId);
|
||||||
referenceRelationships.put(relId, hyperlink);
|
referenceRelationships.put(relId, hyperlink);
|
||||||
@ -793,7 +808,7 @@ public class POIXMLDocumentPart {
|
|||||||
* Returns an unmodifiable list of reference relationships for this POIXMLDocumentPart.
|
* Returns an unmodifiable list of reference relationships for this POIXMLDocumentPart.
|
||||||
*
|
*
|
||||||
* @return reference relationships
|
* @return reference relationships
|
||||||
* @since POI 5.3.0
|
* @since 5.3.0
|
||||||
* @see #getRelationParts() for child relations
|
* @see #getRelationParts() for child relations
|
||||||
*/
|
*/
|
||||||
public final List<ReferenceRelationship> getReferenceRelationships() {
|
public final List<ReferenceRelationship> getReferenceRelationships() {
|
||||||
|
|||||||
@ -75,7 +75,7 @@ public abstract class POIXMLFactory {
|
|||||||
* @param relationshipType the relationship type of the descriptor
|
* @param relationshipType the relationship type of the descriptor
|
||||||
* @return the descriptor or null if type is unknown
|
* @return the descriptor or null if type is unknown
|
||||||
*
|
*
|
||||||
* @since POI 3.14-Beta1
|
* @since 3.14-Beta1
|
||||||
*/
|
*/
|
||||||
protected abstract POIXMLRelation getDescriptor(String relationshipType);
|
protected abstract POIXMLRelation getDescriptor(String relationshipType);
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ public abstract class POIXMLFactory {
|
|||||||
*
|
*
|
||||||
* @throws POIXMLException if the relations are erroneous or the part is not related
|
* @throws POIXMLException if the relations are erroneous or the part is not related
|
||||||
*
|
*
|
||||||
* @since POI 3.14-Beta1
|
* @since 3.14-Beta1
|
||||||
*/
|
*/
|
||||||
protected PackageRelationship getPackageRelationship(POIXMLDocumentPart parent, PackagePart part) {
|
protected PackageRelationship getPackageRelationship(POIXMLDocumentPart parent, PackagePart part) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -316,11 +316,11 @@ public class POIXMLProperties {
|
|||||||
public void setLastPrinted(String date) throws InvalidFormatException {
|
public void setLastPrinted(String date) throws InvalidFormatException {
|
||||||
part.setLastPrintedProperty(date);
|
part.setLastPrintedProperty(date);
|
||||||
}
|
}
|
||||||
/** @since POI 3.15 beta 3 */
|
/** @since 3.15 beta 3 */
|
||||||
public String getLastModifiedByUser() {
|
public String getLastModifiedByUser() {
|
||||||
return part.getLastModifiedByProperty().orElse(null);
|
return part.getLastModifiedByProperty().orElse(null);
|
||||||
}
|
}
|
||||||
/** @since POI 3.15 beta 3 */
|
/** @since 3.15 beta 3 */
|
||||||
public void setLastModifiedByUser(String user) {
|
public void setLastModifiedByUser(String user) {
|
||||||
part.setLastModifiedByProperty(user);
|
part.setLastModifiedByProperty(user);
|
||||||
}
|
}
|
||||||
@ -349,7 +349,7 @@ public class POIXMLProperties {
|
|||||||
/**
|
/**
|
||||||
* Sets the version property.
|
* Sets the version property.
|
||||||
* @param version property value
|
* @param version property value
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
public void setVersion(String version) {
|
public void setVersion(String version) {
|
||||||
part.setVersionProperty(version);
|
part.setVersionProperty(version);
|
||||||
@ -358,7 +358,7 @@ public class POIXMLProperties {
|
|||||||
/**
|
/**
|
||||||
* Returns the version property value.
|
* Returns the version property value.
|
||||||
* @return version property (can be null)
|
* @return version property (can be null)
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
public String getVersion() {
|
public String getVersion() {
|
||||||
return part.getVersionProperty().orElse(null);
|
return part.getVersionProperty().orElse(null);
|
||||||
@ -399,7 +399,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setTemplate(String template) {
|
public void setTemplate(String template) {
|
||||||
props.getProperties().setTemplate(template);
|
props.getProperties().setTemplate(template);
|
||||||
}
|
}
|
||||||
@ -409,7 +409,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setManager(String manager) {
|
public void setManager(String manager) {
|
||||||
props.getProperties().setManager(manager);
|
props.getProperties().setManager(manager);
|
||||||
}
|
}
|
||||||
@ -419,7 +419,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setCompany(String company) {
|
public void setCompany(String company) {
|
||||||
props.getProperties().setCompany(company);
|
props.getProperties().setCompany(company);
|
||||||
}
|
}
|
||||||
@ -429,7 +429,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setPresentationFormat(String presentationFormat) {
|
public void setPresentationFormat(String presentationFormat) {
|
||||||
props.getProperties().setPresentationFormat(presentationFormat);
|
props.getProperties().setPresentationFormat(presentationFormat);
|
||||||
}
|
}
|
||||||
@ -439,7 +439,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setApplication(String application) {
|
public void setApplication(String application) {
|
||||||
props.getProperties().setApplication(application);
|
props.getProperties().setApplication(application);
|
||||||
}
|
}
|
||||||
@ -449,7 +449,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setAppVersion(String appVersion) {
|
public void setAppVersion(String appVersion) {
|
||||||
props.getProperties().setAppVersion(appVersion);
|
props.getProperties().setAppVersion(appVersion);
|
||||||
}
|
}
|
||||||
@ -460,7 +460,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setPages(int pages) {
|
public void setPages(int pages) {
|
||||||
props.getProperties().setPages(pages);
|
props.getProperties().setPages(pages);
|
||||||
}
|
}
|
||||||
@ -470,7 +470,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setWords(int words) {
|
public void setWords(int words) {
|
||||||
props.getProperties().setWords(words);
|
props.getProperties().setWords(words);
|
||||||
}
|
}
|
||||||
@ -480,7 +480,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setCharacters(int characters) {
|
public void setCharacters(int characters) {
|
||||||
props.getProperties().setCharacters(characters);
|
props.getProperties().setCharacters(characters);
|
||||||
}
|
}
|
||||||
@ -490,7 +490,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setCharactersWithSpaces(int charactersWithSpaces) {
|
public void setCharactersWithSpaces(int charactersWithSpaces) {
|
||||||
props.getProperties().setCharactersWithSpaces(charactersWithSpaces);
|
props.getProperties().setCharactersWithSpaces(charactersWithSpaces);
|
||||||
}
|
}
|
||||||
@ -500,7 +500,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setLines(int lines) {
|
public void setLines(int lines) {
|
||||||
props.getProperties().setLines(lines);
|
props.getProperties().setLines(lines);
|
||||||
}
|
}
|
||||||
@ -510,7 +510,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setParagraphs(int paragraphs) {
|
public void setParagraphs(int paragraphs) {
|
||||||
props.getProperties().setParagraphs(paragraphs);
|
props.getProperties().setParagraphs(paragraphs);
|
||||||
}
|
}
|
||||||
@ -520,7 +520,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setSlides(int slides) {
|
public void setSlides(int slides) {
|
||||||
props.getProperties().setSlides(slides);
|
props.getProperties().setSlides(slides);
|
||||||
}
|
}
|
||||||
@ -530,7 +530,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setNotes(int notes) {
|
public void setNotes(int notes) {
|
||||||
props.getProperties().setNotes(notes);
|
props.getProperties().setNotes(notes);
|
||||||
}
|
}
|
||||||
@ -540,7 +540,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setTotalTime(int totalTime) {
|
public void setTotalTime(int totalTime) {
|
||||||
props.getProperties().setTotalTime(totalTime);
|
props.getProperties().setTotalTime(totalTime);
|
||||||
}
|
}
|
||||||
@ -550,7 +550,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setHiddenSlides(int hiddenSlides) {
|
public void setHiddenSlides(int hiddenSlides) {
|
||||||
props.getProperties().setHiddenSlides(hiddenSlides);
|
props.getProperties().setHiddenSlides(hiddenSlides);
|
||||||
}
|
}
|
||||||
@ -560,7 +560,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setMMClips(int mmClips) {
|
public void setMMClips(int mmClips) {
|
||||||
props.getProperties().setMMClips(mmClips);
|
props.getProperties().setMMClips(mmClips);
|
||||||
}
|
}
|
||||||
@ -571,7 +571,7 @@ public class POIXMLProperties {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
/** @since POI 4.1.1 */
|
/** @since 4.1.1 */
|
||||||
public void setHyperlinkBase(String hyperlinkBase) {
|
public void setHyperlinkBase(String hyperlinkBase) {
|
||||||
props.getProperties().setHyperlinkBase(hyperlinkBase);
|
props.getProperties().setHyperlinkBase(hyperlinkBase);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,79 +1,79 @@
|
|||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
this work for additional information regarding copyright ownership.
|
this work for additional information regarding copyright ownership.
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
(the "License"); you may not use this file except in compliance with
|
(the "License"); you may not use this file except in compliance with
|
||||||
the License. You may obtain a copy of the License at
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==================================================================== */
|
==================================================================== */
|
||||||
package org.apache.poi.ooxml;
|
package org.apache.poi.ooxml;
|
||||||
|
|
||||||
import org.apache.poi.openxml4j.opc.PackageRelationship;
|
import org.apache.poi.openxml4j.opc.PackageRelationship;
|
||||||
import org.apache.poi.openxml4j.opc.TargetMode;
|
import org.apache.poi.openxml4j.opc.TargetMode;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines a reference relationship. A reference relationship can be internal or external.
|
* Defines a reference relationship. A reference relationship can be internal or external.
|
||||||
*
|
*
|
||||||
* @since POI 5.3.0
|
* @since 5.3.0
|
||||||
*/
|
*/
|
||||||
public abstract class ReferenceRelationship {
|
public abstract class ReferenceRelationship {
|
||||||
private POIXMLDocumentPart container;
|
private POIXMLDocumentPart container;
|
||||||
private final String relationshipType;
|
private final String relationshipType;
|
||||||
private final boolean external;
|
private final boolean external;
|
||||||
private final String id;
|
private final String id;
|
||||||
private final URI uri;
|
private final URI uri;
|
||||||
|
|
||||||
protected ReferenceRelationship(POIXMLDocumentPart container, PackageRelationship packageRelationship) {
|
protected ReferenceRelationship(POIXMLDocumentPart container, PackageRelationship packageRelationship) {
|
||||||
if (packageRelationship == null) {
|
if (packageRelationship == null) {
|
||||||
throw new IllegalArgumentException("packageRelationship");
|
throw new IllegalArgumentException("packageRelationship");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.container = container;
|
this.container = container;
|
||||||
this.relationshipType = packageRelationship.getRelationshipType();
|
this.relationshipType = packageRelationship.getRelationshipType();
|
||||||
this.uri = packageRelationship.getTargetURI();
|
this.uri = packageRelationship.getTargetURI();
|
||||||
this.external = packageRelationship.getTargetMode() == TargetMode.EXTERNAL;
|
this.external = packageRelationship.getTargetMode() == TargetMode.EXTERNAL;
|
||||||
this.id = packageRelationship.getId();
|
this.id = packageRelationship.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ReferenceRelationship(POIXMLDocumentPart container, URI targetUri, boolean isExternal, String relationshipType, String id) {
|
protected ReferenceRelationship(POIXMLDocumentPart container, URI targetUri, boolean isExternal, String relationshipType, String id) {
|
||||||
if (targetUri == null) {
|
if (targetUri == null) {
|
||||||
throw new NullPointerException("targetUri cannot be null");
|
throw new NullPointerException("targetUri cannot be null");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.container = container;
|
this.container = container;
|
||||||
this.relationshipType = relationshipType;
|
this.relationshipType = relationshipType;
|
||||||
this.uri = targetUri;
|
this.uri = targetUri;
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.external = isExternal;
|
this.external = isExternal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public POIXMLDocumentPart getContainer() {
|
public POIXMLDocumentPart getContainer() {
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRelationshipType() {
|
public String getRelationshipType() {
|
||||||
return relationshipType;
|
return relationshipType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isExternal() {
|
public boolean isExternal() {
|
||||||
return external;
|
return external;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public URI getUri() {
|
public URI getUri() {
|
||||||
return uri;
|
return uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,7 +119,7 @@ public final class POIXMLExtractorFactory implements ExtractorProvider {
|
|||||||
* Clears the setting for this thread made by {@link #setThreadPrefersEventExtractors(boolean) }
|
* Clears the setting for this thread made by {@link #setThreadPrefersEventExtractors(boolean) }
|
||||||
*
|
*
|
||||||
* @see #setThreadPrefersEventExtractors(boolean)
|
* @see #setThreadPrefersEventExtractors(boolean)
|
||||||
* @since POI 5.2.4
|
* @since 5.2.4
|
||||||
*/
|
*/
|
||||||
public static void removeThreadPrefersEventExtractorsSetting() {
|
public static void removeThreadPrefersEventExtractorsSetting() {
|
||||||
ExtractorFactory.removeThreadPrefersEventExtractorsSetting();
|
ExtractorFactory.removeThreadPrefersEventExtractorsSetting();
|
||||||
|
|||||||
@ -73,14 +73,14 @@ public class POIXMLPropertiesTextExtractor implements POIXMLTextExtractor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void appendDateIfPresent(StringBuilder text, String thing, Optional<Date> value) {
|
private void appendDateIfPresent(StringBuilder text, String thing, Optional<Date> value) {
|
||||||
if (!value.isPresent()) {
|
if (value.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
appendIfPresent(text, thing, dateFormat.format(value.get()));
|
appendIfPresent(text, thing, dateFormat.format(value.get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void appendIfPresent(StringBuilder text, String thing, Optional<String> value) {
|
private void appendIfPresent(StringBuilder text, String thing, Optional<String> value) {
|
||||||
if (!value.isPresent()) {
|
if (value.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
appendIfPresent(text, thing, value.get());
|
appendIfPresent(text, thing, value.get());
|
||||||
|
|||||||
@ -23,7 +23,7 @@ import org.apache.poi.util.Internal;
|
|||||||
* Helper class for number related operations.
|
* Helper class for number related operations.
|
||||||
* <p>Note: This class is for internal POI usage only.</p>
|
* <p>Note: This class is for internal POI usage only.</p>
|
||||||
*
|
*
|
||||||
* @since POI 5.5.0
|
* @since 5.5.0
|
||||||
*/
|
*/
|
||||||
@Internal
|
@Internal
|
||||||
public class NumberHelper {
|
public class NumberHelper {
|
||||||
|
|||||||
@ -32,12 +32,10 @@ import org.apache.poi.openxml4j.opc.PackagePartName;
|
|||||||
import org.apache.poi.openxml4j.opc.PackageProperties;
|
import org.apache.poi.openxml4j.opc.PackageProperties;
|
||||||
import org.apache.poi.openxml4j.opc.PackageRelationship;
|
import org.apache.poi.openxml4j.opc.PackageRelationship;
|
||||||
import org.apache.poi.openxml4j.opc.PackageRelationshipCollection;
|
import org.apache.poi.openxml4j.opc.PackageRelationshipCollection;
|
||||||
import org.apache.poi.openxml4j.opc.PackageRelationshipTypes;
|
|
||||||
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
|
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
|
||||||
import org.apache.poi.openxml4j.opc.TargetMode;
|
import org.apache.poi.openxml4j.opc.TargetMode;
|
||||||
import org.apache.poi.openxml4j.opc.internal.InvalidZipException;
|
import org.apache.poi.openxml4j.opc.internal.InvalidZipException;
|
||||||
import org.apache.poi.util.IOUtils;
|
import org.apache.poi.util.IOUtils;
|
||||||
import org.apache.poi.util.Removal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides handy methods to work with OOXML packages
|
* Provides handy methods to work with OOXML packages
|
||||||
@ -60,7 +58,7 @@ public final class PackageHelper {
|
|||||||
* @return OPCPackage
|
* @return OPCPackage
|
||||||
* @throws IOException If reading data from the stream fails
|
* @throws IOException If reading data from the stream fails
|
||||||
* @throws POIXMLException If the stream is not a valid OPC package
|
* @throws POIXMLException If the stream is not a valid OPC package
|
||||||
* @since POI 5.2.0
|
* @since 5.2.0
|
||||||
*/
|
*/
|
||||||
public static OPCPackage open(InputStream stream, boolean closeStream) throws IOException {
|
public static OPCPackage open(InputStream stream, boolean closeStream) throws IOException {
|
||||||
try {
|
try {
|
||||||
@ -78,50 +76,6 @@ public final class PackageHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Clone the specified package.
|
|
||||||
*
|
|
||||||
* @param pkg the package to clone
|
|
||||||
* @param file the destination file
|
|
||||||
* @return the cloned package
|
|
||||||
* @deprecated this method is not used internally and creates temp files that are not well handled
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
@Removal(version = "6.0.0")
|
|
||||||
public static OPCPackage clone(OPCPackage pkg, File file) throws OpenXML4JException, IOException {
|
|
||||||
|
|
||||||
String path = file.getAbsolutePath();
|
|
||||||
|
|
||||||
try (OPCPackage dest = OPCPackage.create(path)) {
|
|
||||||
PackageRelationshipCollection rels = pkg.getRelationships();
|
|
||||||
for (PackageRelationship rel : rels) {
|
|
||||||
PackagePart part = pkg.getPart(rel);
|
|
||||||
PackagePart part_tgt;
|
|
||||||
if (rel.getRelationshipType().equals(PackageRelationshipTypes.CORE_PROPERTIES)) {
|
|
||||||
copyProperties(pkg.getPackageProperties(), dest.getPackageProperties());
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
dest.addRelationship(part.getPartName(), rel.getTargetMode(), rel.getRelationshipType());
|
|
||||||
part_tgt = dest.createPart(part.getPartName(), part.getContentType());
|
|
||||||
|
|
||||||
try (
|
|
||||||
InputStream in = part.getInputStream();
|
|
||||||
OutputStream out = part_tgt.getOutputStream()
|
|
||||||
) {
|
|
||||||
IOUtils.copy(in, out);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (part.hasRelationships()) {
|
|
||||||
copy(pkg, part, dest, part_tgt);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//the temp file will be deleted when JVM terminates
|
|
||||||
new File(path).deleteOnExit();
|
|
||||||
return OPCPackage.open(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recursively copy package parts to the destination package
|
* Recursively copy package parts to the destination package
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,41 +0,0 @@
|
|||||||
/* ====================================================================
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
==================================================================== */
|
|
||||||
|
|
||||||
package org.apache.poi.ooxml.util;
|
|
||||||
|
|
||||||
import javax.xml.parsers.ParserConfigurationException;
|
|
||||||
|
|
||||||
import org.apache.poi.util.Removal;
|
|
||||||
import org.apache.poi.util.XMLHelper;
|
|
||||||
import org.xml.sax.SAXException;
|
|
||||||
import org.xml.sax.XMLReader;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides handy methods for working with SAX parsers and readers
|
|
||||||
* @deprecated use {@link XMLHelper}
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
@Removal(version = "6.0.0")
|
|
||||||
public final class SAXHelper {
|
|
||||||
/**
|
|
||||||
* Creates a new SAX XMLReader, with sensible defaults
|
|
||||||
*/
|
|
||||||
public static XMLReader newXMLReader() throws SAXException, ParserConfigurationException {
|
|
||||||
return XMLHelper.newXMLReader();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,36 +0,0 @@
|
|||||||
/* ====================================================================
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
==================================================================== */
|
|
||||||
|
|
||||||
package org.apache.poi.ooxml.util;
|
|
||||||
|
|
||||||
import javax.xml.transform.TransformerFactory;
|
|
||||||
|
|
||||||
import org.apache.poi.util.Removal;
|
|
||||||
import org.apache.poi.util.XMLHelper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated use {@link XMLHelper}
|
|
||||||
*/
|
|
||||||
@Removal(version = "6.0.0")
|
|
||||||
@Deprecated
|
|
||||||
public final class TransformerHelper {
|
|
||||||
private TransformerHelper() {}
|
|
||||||
|
|
||||||
public static TransformerFactory getFactory() {
|
|
||||||
return XMLHelper.getTransformerFactory();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -102,7 +102,7 @@ public final class XPathHelper {
|
|||||||
* thrown if the AlternateContent is not allowed by the surrounding element or if the
|
* thrown if the AlternateContent is not allowed by the surrounding element or if the
|
||||||
* extracted object is of the generic type XmlAnyTypeImpl.
|
* extracted object is of the generic type XmlAnyTypeImpl.
|
||||||
*
|
*
|
||||||
* @since POI 4.1.2
|
* @since 4.1.2
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Internal
|
@Internal
|
||||||
|
|||||||
@ -24,7 +24,7 @@ package org.apache.poi.openxml4j.opc;
|
|||||||
*
|
*
|
||||||
* Consumers may disable these compliance checks individually or as a whole at their
|
* Consumers may disable these compliance checks individually or as a whole at their
|
||||||
* own discretion to allow certain non-compliant documents to be parsed.
|
* own discretion to allow certain non-compliant documents to be parsed.
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
public class OPCComplianceFlags {
|
public class OPCComplianceFlags {
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ import java.io.OutputStream;
|
|||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Path;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -151,7 +151,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
|
|||||||
* @param opcComplianceFlags Enable or disable specific OPC compliance flags.
|
* @param opcComplianceFlags Enable or disable specific OPC compliance flags.
|
||||||
* This is useful to allow parsing of certain non-compliant documents.
|
* This is useful to allow parsing of certain non-compliant documents.
|
||||||
* @throws OpenXML4JRuntimeException if there are issues creating properties part
|
* @throws OpenXML4JRuntimeException if there are issues creating properties part
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
OPCPackage(PackageAccess access, OPCComplianceFlags opcComplianceFlags) {
|
OPCPackage(PackageAccess access, OPCComplianceFlags opcComplianceFlags) {
|
||||||
if (getClass() != ZipPackage.class) {
|
if (getClass() != ZipPackage.class) {
|
||||||
@ -203,7 +203,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
|
|||||||
* @throws InvalidFormatException
|
* @throws InvalidFormatException
|
||||||
* If the specified file doesn't exist, and a parsing error
|
* If the specified file doesn't exist, and a parsing error
|
||||||
* occur.
|
* occur.
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
public static OPCPackage open(String path, OPCComplianceFlags opcComplianceFlags) throws InvalidFormatException {
|
public static OPCPackage open(String path, OPCComplianceFlags opcComplianceFlags) throws InvalidFormatException {
|
||||||
return open(path, defaultPackageAccess, opcComplianceFlags);
|
return open(path, defaultPackageAccess, opcComplianceFlags);
|
||||||
@ -234,7 +234,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
|
|||||||
* @throws InvalidFormatException
|
* @throws InvalidFormatException
|
||||||
* If the specified file doesn't exist, and a parsing error
|
* If the specified file doesn't exist, and a parsing error
|
||||||
* occur.
|
* occur.
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
public static OPCPackage open(File file, OPCComplianceFlags opcComplianceFlags) throws InvalidFormatException {
|
public static OPCPackage open(File file, OPCComplianceFlags opcComplianceFlags) throws InvalidFormatException {
|
||||||
return open(file, defaultPackageAccess, opcComplianceFlags);
|
return open(file, defaultPackageAccess, opcComplianceFlags);
|
||||||
@ -265,7 +265,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
|
|||||||
* The level of OPC compliance to enforce when reading the package
|
* The level of OPC compliance to enforce when reading the package
|
||||||
* @return A Package object
|
* @return A Package object
|
||||||
* @throws InvalidFormatException if a parsing error occur.
|
* @throws InvalidFormatException if a parsing error occur.
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
public static OPCPackage open(ZipEntrySource zipEntry, OPCComplianceFlags opcComplianceFlags) throws InvalidFormatException {
|
public static OPCPackage open(ZipEntrySource zipEntry, OPCComplianceFlags opcComplianceFlags) throws InvalidFormatException {
|
||||||
OPCPackage pack = new ZipPackage(zipEntry, PackageAccess.READ, opcComplianceFlags);
|
OPCPackage pack = new ZipPackage(zipEntry, PackageAccess.READ, opcComplianceFlags);
|
||||||
@ -317,7 +317,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
|
|||||||
* occur.
|
* occur.
|
||||||
* @throws InvalidOperationException If the zip file cannot be opened.
|
* @throws InvalidOperationException If the zip file cannot be opened.
|
||||||
* @throws InvalidFormatException if the package is not valid.
|
* @throws InvalidFormatException if the package is not valid.
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
public static OPCPackage open(String path, PackageAccess access, OPCComplianceFlags opcComplianceFlags)
|
public static OPCPackage open(String path, PackageAccess access, OPCComplianceFlags opcComplianceFlags)
|
||||||
throws InvalidFormatException, InvalidOperationException {
|
throws InvalidFormatException, InvalidOperationException {
|
||||||
@ -378,7 +378,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
|
|||||||
* If the specified file doesn't exist or is a directory.
|
* If the specified file doesn't exist or is a directory.
|
||||||
* @throws InvalidFormatException
|
* @throws InvalidFormatException
|
||||||
* If a parsing error occurs.
|
* If a parsing error occurs.
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
public static OPCPackage open(File file, PackageAccess access, OPCComplianceFlags opcComplianceFlags)
|
public static OPCPackage open(File file, PackageAccess access, OPCComplianceFlags opcComplianceFlags)
|
||||||
throws InvalidFormatException {
|
throws InvalidFormatException {
|
||||||
@ -447,7 +447,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
|
|||||||
* @throws InvalidFormatException
|
* @throws InvalidFormatException
|
||||||
* Throws if the specified file exist and is not valid.
|
* Throws if the specified file exist and is not valid.
|
||||||
* @throws IOException If reading the stream fails
|
* @throws IOException If reading the stream fails
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
public static OPCPackage open(InputStream in, OPCComplianceFlags opcComplianceFlags) throws InvalidFormatException,
|
public static OPCPackage open(InputStream in, OPCComplianceFlags opcComplianceFlags) throws InvalidFormatException,
|
||||||
IOException {
|
IOException {
|
||||||
@ -484,7 +484,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
|
|||||||
* @throws InvalidFormatException
|
* @throws InvalidFormatException
|
||||||
* Throws if the specified file exist and is not valid.
|
* Throws if the specified file exist and is not valid.
|
||||||
* @throws IOException If reading the stream fails
|
* @throws IOException If reading the stream fails
|
||||||
* @since POI 5.2.5
|
* @since 5.2.5
|
||||||
*/
|
*/
|
||||||
public static OPCPackage open(InputStream in, boolean closeStream) throws InvalidFormatException,
|
public static OPCPackage open(InputStream in, boolean closeStream) throws InvalidFormatException,
|
||||||
IOException {
|
IOException {
|
||||||
@ -509,7 +509,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
|
|||||||
* @throws InvalidFormatException
|
* @throws InvalidFormatException
|
||||||
* Throws if the specified file exist and is not valid.
|
* Throws if the specified file exist and is not valid.
|
||||||
* @throws IOException If reading the stream fails
|
* @throws IOException If reading the stream fails
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
public static OPCPackage open(InputStream in, boolean closeStream, OPCComplianceFlags opcComplianceFlags) throws InvalidFormatException,
|
public static OPCPackage open(InputStream in, boolean closeStream, OPCComplianceFlags opcComplianceFlags) throws InvalidFormatException,
|
||||||
IOException {
|
IOException {
|
||||||
@ -711,7 +711,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
|
|||||||
}
|
}
|
||||||
String name = path.substring(path.lastIndexOf(File.separatorChar) + 1);
|
String name = path.substring(path.lastIndexOf(File.separatorChar) + 1);
|
||||||
|
|
||||||
try (InputStream is = Files.newInputStream(Paths.get(path))) {
|
try (InputStream is = Files.newInputStream(Path.of(path))) {
|
||||||
addThumbnail(name, is);
|
addThumbnail(name, is);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1796,7 +1796,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
|
|||||||
* @param oldContentType the content type to be replaced
|
* @param oldContentType the content type to be replaced
|
||||||
* @param newContentType the replacement
|
* @param newContentType the replacement
|
||||||
* @return whether replacement was successful
|
* @return whether replacement was successful
|
||||||
* @since POI-3.8
|
* @since -3.8
|
||||||
*/
|
*/
|
||||||
public boolean replaceContentType(String oldContentType, String newContentType){
|
public boolean replaceContentType(String oldContentType, String newContentType){
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
@ -1861,7 +1861,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true if the package is in Strict OOXML format
|
* @return true if the package is in Strict OOXML format
|
||||||
* @since POI 5.1.0
|
* @since 5.1.0
|
||||||
*/
|
*/
|
||||||
public boolean isStrictOoxmlFormat() {
|
public boolean isStrictOoxmlFormat() {
|
||||||
PackageRelationshipCollection coreDocRelationships = getRelationshipsByType(
|
PackageRelationshipCollection coreDocRelationships = getRelationshipsByType(
|
||||||
@ -1875,7 +1875,10 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
|
|||||||
public abstract boolean isClosed();
|
public abstract boolean isClosed();
|
||||||
|
|
||||||
protected void closeParts() {
|
protected void closeParts() {
|
||||||
partList.closeParts();
|
// might not be initialized fully yet
|
||||||
|
if (partList != null) {
|
||||||
|
partList.closeParts();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -287,7 +287,7 @@ public final class PackageRelationshipCollection implements Iterable<PackageRela
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Is this collection empty?
|
* Is this collection empty?
|
||||||
* @since POI 5.2.0
|
* @since 5.2.0
|
||||||
*/
|
*/
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return relationshipsByID.isEmpty();
|
return relationshipsByID.isEmpty();
|
||||||
@ -386,7 +386,7 @@ public final class PackageRelationshipCollection implements Iterable<PackageRela
|
|||||||
/**
|
/**
|
||||||
* Get this collection's spliterator.
|
* Get this collection's spliterator.
|
||||||
*
|
*
|
||||||
* @since POI 5.2.0
|
* @since 5.2.0
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Spliterator<PackageRelationship> spliterator() {
|
public Spliterator<PackageRelationship> spliterator() {
|
||||||
|
|||||||
@ -110,7 +110,7 @@ public final class ZipPackage extends OPCPackage {
|
|||||||
* Constructor. Creates a new, empty ZipPackage.
|
* Constructor. Creates a new, empty ZipPackage.
|
||||||
* @param opcComplianceFlags
|
* @param opcComplianceFlags
|
||||||
* The level of OPC compliance to enforce when reading the package
|
* The level of OPC compliance to enforce when reading the package
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
public ZipPackage(OPCComplianceFlags opcComplianceFlags) {
|
public ZipPackage(OPCComplianceFlags opcComplianceFlags) {
|
||||||
super(defaultPackageAccess, opcComplianceFlags);
|
super(defaultPackageAccess, opcComplianceFlags);
|
||||||
@ -156,7 +156,7 @@ public final class ZipPackage extends OPCPackage {
|
|||||||
* ZipInputStream.
|
* ZipInputStream.
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* if input stream cannot be opened, read, or closed
|
* if input stream cannot be opened, read, or closed
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
ZipPackage(InputStream in, PackageAccess access, OPCComplianceFlags opcComplianceFlags) throws IOException {
|
ZipPackage(InputStream in, PackageAccess access, OPCComplianceFlags opcComplianceFlags) throws IOException {
|
||||||
super(access, opcComplianceFlags);
|
super(access, opcComplianceFlags);
|
||||||
@ -180,7 +180,7 @@ public final class ZipPackage extends OPCPackage {
|
|||||||
* ZipInputStream.
|
* ZipInputStream.
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* if input stream cannot be opened, read, or closed
|
* if input stream cannot be opened, read, or closed
|
||||||
* @since POI 5.2.5
|
* @since 5.2.5
|
||||||
*/
|
*/
|
||||||
ZipPackage(InputStream in, PackageAccess access, boolean closeStream) throws IOException {
|
ZipPackage(InputStream in, PackageAccess access, boolean closeStream) throws IOException {
|
||||||
this(in, access, closeStream, OPCComplianceFlags.enforceAll());
|
this(in, access, closeStream, OPCComplianceFlags.enforceAll());
|
||||||
@ -203,7 +203,7 @@ public final class ZipPackage extends OPCPackage {
|
|||||||
* ZipInputStream.
|
* ZipInputStream.
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* if input stream cannot be opened, read, or closed
|
* if input stream cannot be opened, read, or closed
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
ZipPackage(InputStream in, PackageAccess access, boolean closeStream, OPCComplianceFlags opcComplianceFlags) throws IOException {
|
ZipPackage(InputStream in, PackageAccess access, boolean closeStream, OPCComplianceFlags opcComplianceFlags) throws IOException {
|
||||||
super(access, opcComplianceFlags);
|
super(access, opcComplianceFlags);
|
||||||
@ -235,7 +235,7 @@ public final class ZipPackage extends OPCPackage {
|
|||||||
* @param opcComplianceFlags
|
* @param opcComplianceFlags
|
||||||
* The level of OPC compliance to enforce when reading the package
|
* The level of OPC compliance to enforce when reading the package
|
||||||
* @throws InvalidOperationException If the zip file cannot be opened.
|
* @throws InvalidOperationException If the zip file cannot be opened.
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
ZipPackage(String path, PackageAccess access, OPCComplianceFlags opcComplianceFlags) throws InvalidOperationException {
|
ZipPackage(String path, PackageAccess access, OPCComplianceFlags opcComplianceFlags) throws InvalidOperationException {
|
||||||
this(new File(path), access, opcComplianceFlags);
|
this(new File(path), access, opcComplianceFlags);
|
||||||
@ -264,7 +264,7 @@ public final class ZipPackage extends OPCPackage {
|
|||||||
* @param opcComplianceFlags
|
* @param opcComplianceFlags
|
||||||
* The level of OPC compliance to enforce when reading the package
|
* The level of OPC compliance to enforce when reading the package
|
||||||
* @throws InvalidOperationException If the zip file cannot be opened.
|
* @throws InvalidOperationException If the zip file cannot be opened.
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
ZipPackage(File file, PackageAccess access, OPCComplianceFlags opcComplianceFlags) throws InvalidOperationException {
|
ZipPackage(File file, PackageAccess access, OPCComplianceFlags opcComplianceFlags) throws InvalidOperationException {
|
||||||
super(access, opcComplianceFlags);
|
super(access, opcComplianceFlags);
|
||||||
@ -348,7 +348,7 @@ public final class ZipPackage extends OPCPackage {
|
|||||||
* The package access mode.
|
* The package access mode.
|
||||||
* @param access
|
* @param access
|
||||||
* The package access mode.
|
* The package access mode.
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
ZipPackage(ZipEntrySource zipEntry, PackageAccess access, OPCComplianceFlags opcComplianceFlags) {
|
ZipPackage(ZipEntrySource zipEntry, PackageAccess access, OPCComplianceFlags opcComplianceFlags) {
|
||||||
super(access, opcComplianceFlags);
|
super(access, opcComplianceFlags);
|
||||||
|
|||||||
@ -34,7 +34,7 @@ import java.io.*;
|
|||||||
/**
|
/**
|
||||||
* (Experimental) Encrypted Temp File version of a package part.
|
* (Experimental) Encrypted Temp File version of a package part.
|
||||||
*
|
*
|
||||||
* @since POI 5.1.0
|
* @since 5.1.0
|
||||||
*/
|
*/
|
||||||
@Beta
|
@Beta
|
||||||
public final class EncryptedTempFilePackagePart extends PackagePart {
|
public final class EncryptedTempFilePackagePart extends PackagePart {
|
||||||
|
|||||||
@ -22,7 +22,7 @@ import java.io.IOException;
|
|||||||
/**
|
/**
|
||||||
* Thrown if the zip file is invalid.
|
* Thrown if the zip file is invalid.
|
||||||
*
|
*
|
||||||
* @since POI 5.4.0
|
* @since 5.4.0
|
||||||
*/
|
*/
|
||||||
public class InvalidZipException extends IOException {
|
public class InvalidZipException extends IOException {
|
||||||
public InvalidZipException(String message) {
|
public InvalidZipException(String message) {
|
||||||
|
|||||||
@ -35,7 +35,7 @@ import java.nio.file.Files;
|
|||||||
/**
|
/**
|
||||||
* (Experimental) Temp File version of a package part.
|
* (Experimental) Temp File version of a package part.
|
||||||
*
|
*
|
||||||
* @since POI 5.1.0
|
* @since 5.1.0
|
||||||
*/
|
*/
|
||||||
@Beta
|
@Beta
|
||||||
public final class TempFilePackagePart extends PackagePart {
|
public final class TempFilePackagePart extends PackagePart {
|
||||||
|
|||||||
@ -138,7 +138,7 @@ public class PackagePropertiesMarshaller implements PartMarshaller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Element setElementTextContent(String localName, NamespaceImpl namespace, Optional<?> property, String propertyValue) {
|
private Element setElementTextContent(String localName, NamespaceImpl namespace, Optional<?> property, String propertyValue) {
|
||||||
if (!property.isPresent())
|
if (property.isEmpty())
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
Element root = xmlDoc.getDocumentElement();
|
Element root = xmlDoc.getDocumentElement();
|
||||||
|
|||||||
@ -56,7 +56,7 @@ public final class PackagePropertiesUnmarshaller implements PartUnmarshaller {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param opcComplianceFlags Overrides the default OPC compliance settings
|
* @param opcComplianceFlags Overrides the default OPC compliance settings
|
||||||
* @since POI 5.4.1
|
* @since 5.4.1
|
||||||
*/
|
*/
|
||||||
public PackagePropertiesUnmarshaller(OPCComplianceFlags opcComplianceFlags) {
|
public PackagePropertiesUnmarshaller(OPCComplianceFlags opcComplianceFlags) {
|
||||||
this.opcComplianceFlags = opcComplianceFlags;
|
this.opcComplianceFlags = opcComplianceFlags;
|
||||||
|
|||||||
@ -124,7 +124,7 @@ public final class ZipArchiveFakeEntry extends ZipArchiveEntry implements Closea
|
|||||||
/**
|
/**
|
||||||
* Deletes any temp files and releases any byte arrays.
|
* Deletes any temp files and releases any byte arrays.
|
||||||
* @throws IOException If closing the entry fails.
|
* @throws IOException If closing the entry fails.
|
||||||
* @since POI 5.1.0
|
* @since 5.1.0
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
|
|||||||
@ -41,7 +41,7 @@ public interface ZipEntrySource extends Closeable {
|
|||||||
* @param path the path in unix-notation
|
* @param path the path in unix-notation
|
||||||
* @return the entry or {@code null} if not found
|
* @return the entry or {@code null} if not found
|
||||||
*
|
*
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
ZipArchiveEntry getEntry(String path);
|
ZipArchiveEntry getEntry(String path);
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ public class ZipInputStreamZipEntrySource implements ZipEntrySource {
|
|||||||
* and the data is put in a temp file instead - defaults to -1 meaning temp files are not used
|
* and the data is put in a temp file instead - defaults to -1 meaning temp files are not used
|
||||||
* and that zip entries with more than 2GB of data after decompressing will fail, 0 means all
|
* and that zip entries with more than 2GB of data after decompressing will fail, 0 means all
|
||||||
* zip entries are stored in temp files. A threshold like 50000000 (approx 50Mb is recommended)
|
* zip entries are stored in temp files. A threshold like 50000000 (approx 50Mb is recommended)
|
||||||
* @since POI 5.1.0
|
* @since 5.1.0
|
||||||
* @see #setEncryptTempFiles(boolean)
|
* @see #setEncryptTempFiles(boolean)
|
||||||
*/
|
*/
|
||||||
public static void setThresholdBytesForTempFiles(int thresholdBytes) {
|
public static void setThresholdBytesForTempFiles(int thresholdBytes) {
|
||||||
@ -62,7 +62,7 @@ public class ZipInputStreamZipEntrySource implements ZipEntrySource {
|
|||||||
* Get the threshold at which a zip entry is regarded as too large for holding in memory
|
* Get the threshold at which a zip entry is regarded as too large for holding in memory
|
||||||
* and the data is put in a temp file instead (defaults to -1 meaning temp files are not used)
|
* and the data is put in a temp file instead (defaults to -1 meaning temp files are not used)
|
||||||
* @return threshold in bytes
|
* @return threshold in bytes
|
||||||
* @since POI 5.1.0
|
* @since 5.1.0
|
||||||
*/
|
*/
|
||||||
public static int getThresholdBytesForTempFiles() {
|
public static int getThresholdBytesForTempFiles() {
|
||||||
return thresholdForTempFiles;
|
return thresholdForTempFiles;
|
||||||
@ -71,7 +71,7 @@ public class ZipInputStreamZipEntrySource implements ZipEntrySource {
|
|||||||
/**
|
/**
|
||||||
* Encrypt temp files when they are used. Only affects temp files related to zip entries.
|
* Encrypt temp files when they are used. Only affects temp files related to zip entries.
|
||||||
* @param encrypt whether temp files should be encrypted
|
* @param encrypt whether temp files should be encrypted
|
||||||
* @since POI 5.1.0
|
* @since 5.1.0
|
||||||
* @see #setThresholdBytesForTempFiles(int)
|
* @see #setThresholdBytesForTempFiles(int)
|
||||||
*/
|
*/
|
||||||
public static void setEncryptTempFiles(boolean encrypt) {
|
public static void setEncryptTempFiles(boolean encrypt) {
|
||||||
@ -80,7 +80,7 @@ public class ZipInputStreamZipEntrySource implements ZipEntrySource {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether temp files should be encrypted (default false). Only affects temp files related to zip entries.
|
* Whether temp files should be encrypted (default false). Only affects temp files related to zip entries.
|
||||||
* @since POI 5.1.0
|
* @since 5.1.0
|
||||||
*/
|
*/
|
||||||
public static boolean shouldEncryptTempFiles() {
|
public static boolean shouldEncryptTempFiles() {
|
||||||
return encryptTempFiles;
|
return encryptTempFiles;
|
||||||
|
|||||||
@ -93,7 +93,7 @@ public class ZipSecureFile extends ZipFile {
|
|||||||
* See setMaxFileCount() for details.
|
* See setMaxFileCount() for details.
|
||||||
*
|
*
|
||||||
* @return The max accepted file count (i.e. the max number of files we allow inside zip files that we read - including OOXML files like xlsx, docx, pptx, etc.).
|
* @return The max accepted file count (i.e. the max number of files we allow inside zip files that we read - including OOXML files like xlsx, docx, pptx, etc.).
|
||||||
* @since POI 5.2.4
|
* @since 5.2.4
|
||||||
*/
|
*/
|
||||||
public static long getMaxFileCount() {
|
public static long getMaxFileCount() {
|
||||||
return MAX_FILE_COUNT;
|
return MAX_FILE_COUNT;
|
||||||
@ -104,7 +104,7 @@ public class ZipSecureFile extends ZipFile {
|
|||||||
* including OOXML files like xlsx, docx, pptx, etc. The default is 1000.
|
* including OOXML files like xlsx, docx, pptx, etc. The default is 1000.
|
||||||
*
|
*
|
||||||
* @param maxFileCount The max accepted file count
|
* @param maxFileCount The max accepted file count
|
||||||
* @since POI 5.2.4
|
* @since 5.2.4
|
||||||
*/
|
*/
|
||||||
public static void setMaxFileCount(final long maxFileCount) {
|
public static void setMaxFileCount(final long maxFileCount) {
|
||||||
MAX_FILE_COUNT = maxFileCount;
|
MAX_FILE_COUNT = maxFileCount;
|
||||||
@ -151,7 +151,7 @@ public class ZipSecureFile extends ZipFile {
|
|||||||
*
|
*
|
||||||
* @param graceEntrySize the grace entry size of a single zip entry
|
* @param graceEntrySize the grace entry size of a single zip entry
|
||||||
* @throws IllegalArgumentException for negative graceEntrySize
|
* @throws IllegalArgumentException for negative graceEntrySize
|
||||||
* @since POI 5.2.4
|
* @since 5.2.4
|
||||||
*/
|
*/
|
||||||
public static void setGraceEntrySize(long graceEntrySize) {
|
public static void setGraceEntrySize(long graceEntrySize) {
|
||||||
if (graceEntrySize < 0) {
|
if (graceEntrySize < 0) {
|
||||||
@ -167,7 +167,7 @@ public class ZipSecureFile extends ZipFile {
|
|||||||
* See setGraceEntrySize() for details.
|
* See setGraceEntrySize() for details.
|
||||||
*
|
*
|
||||||
* @return The current grace entry size
|
* @return The current grace entry size
|
||||||
* @since POI 5.2.4
|
* @since 5.2.4
|
||||||
*/
|
*/
|
||||||
public static long getGraceEntrySize() {
|
public static long getGraceEntrySize() {
|
||||||
return GRACE_ENTRY_SIZE;
|
return GRACE_ENTRY_SIZE;
|
||||||
@ -249,6 +249,7 @@ public class ZipSecureFile extends ZipFile {
|
|||||||
* @return the path name of the ZIP file
|
* @return the path name of the ZIP file
|
||||||
* @deprecated there is no need for this method - it will be removed in a future version of POI (deprecated since POI 5.3.0)
|
* @deprecated there is no need for this method - it will be removed in a future version of POI (deprecated since POI 5.3.0)
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(since = "5.3.0", forRemoval = true)
|
||||||
@Removal(version = "7.0.0")
|
@Removal(version = "7.0.0")
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return fileName;
|
return fileName;
|
||||||
|
|||||||
@ -34,7 +34,6 @@ import java.text.DateFormat;
|
|||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -47,7 +46,6 @@ import java.util.function.Supplier;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import javax.xml.crypto.URIDereferencer;
|
|
||||||
import javax.xml.crypto.dsig.CanonicalizationMethod;
|
import javax.xml.crypto.dsig.CanonicalizationMethod;
|
||||||
import javax.xml.crypto.dsig.DigestMethod;
|
import javax.xml.crypto.dsig.DigestMethod;
|
||||||
import javax.xml.crypto.dsig.Transform;
|
import javax.xml.crypto.dsig.Transform;
|
||||||
@ -70,7 +68,6 @@ import org.apache.poi.poifs.crypt.dsig.services.TimeStampService;
|
|||||||
import org.apache.poi.poifs.crypt.dsig.services.TimeStampServiceValidator;
|
import org.apache.poi.poifs.crypt.dsig.services.TimeStampServiceValidator;
|
||||||
import org.apache.poi.poifs.crypt.dsig.services.TimeStampSimpleHttpClient;
|
import org.apache.poi.poifs.crypt.dsig.services.TimeStampSimpleHttpClient;
|
||||||
import org.apache.poi.util.LocaleUtil;
|
import org.apache.poi.util.LocaleUtil;
|
||||||
import org.apache.poi.util.Removal;
|
|
||||||
import org.apache.xml.security.signature.XMLSignature;
|
import org.apache.xml.security.signature.XMLSignature;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -113,12 +110,12 @@ public class SignatureConfig {
|
|||||||
private static final String XMLSEC_SANTUARIO = "org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI";
|
private static final String XMLSEC_SANTUARIO = "org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI";
|
||||||
private static final String XMLSEC_JDK = "org.jcp.xml.dsig.internal.dom.XMLDSigRI";
|
private static final String XMLSEC_JDK = "org.jcp.xml.dsig.internal.dom.XMLDSigRI";
|
||||||
|
|
||||||
private static final List<Supplier<SignatureFacet>> DEFAULT_FACETS = Collections.unmodifiableList(Arrays.asList(
|
private static final List<Supplier<SignatureFacet>> DEFAULT_FACETS = List.of(
|
||||||
OOXMLSignatureFacet::new,
|
OOXMLSignatureFacet::new,
|
||||||
KeyInfoSignatureFacet::new,
|
KeyInfoSignatureFacet::new,
|
||||||
XAdESSignatureFacet::new,
|
XAdESSignatureFacet::new,
|
||||||
Office2010SignatureFacet::new
|
Office2010SignatureFacet::new
|
||||||
));
|
);
|
||||||
|
|
||||||
private List<SignatureFacet> signatureFacets = new ArrayList<>();
|
private List<SignatureFacet> signatureFacets = new ArrayList<>();
|
||||||
private HashAlgorithm digestAlgo = HashAlgorithm.sha256;
|
private HashAlgorithm digestAlgo = HashAlgorithm.sha256;
|
||||||
@ -130,7 +127,6 @@ public class SignatureConfig {
|
|||||||
* the optional signature policy service used for XAdES-EPES.
|
* the optional signature policy service used for XAdES-EPES.
|
||||||
*/
|
*/
|
||||||
private SignaturePolicyService signaturePolicyService;
|
private SignaturePolicyService signaturePolicyService;
|
||||||
private URIDereferencer uriDereferencer = new OOXMLURIDereferencer();
|
|
||||||
private String canonicalizationMethod = CanonicalizationMethod.INCLUSIVE;
|
private String canonicalizationMethod = CanonicalizationMethod.INCLUSIVE;
|
||||||
|
|
||||||
private boolean includeEntireCertificateChain = true;
|
private boolean includeEntireCertificateChain = true;
|
||||||
@ -236,14 +232,14 @@ public class SignatureConfig {
|
|||||||
/**
|
/**
|
||||||
* if true, the signature is added to the existing signatures
|
* if true, the signature is added to the existing signatures
|
||||||
*
|
*
|
||||||
* @since POI 4.1.0
|
* @since 4.1.0
|
||||||
*/
|
*/
|
||||||
private boolean allowMultipleSignatures = false;
|
private boolean allowMultipleSignatures = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Switch to enable/disable secure validation - see setter for more information
|
* Switch to enable/disable secure validation - see setter for more information
|
||||||
*
|
*
|
||||||
* @since POI 5.2.0
|
* @since 5.2.0
|
||||||
*/
|
*/
|
||||||
private boolean secureValidation = true;
|
private boolean secureValidation = true;
|
||||||
|
|
||||||
@ -253,7 +249,7 @@ public class SignatureConfig {
|
|||||||
* Switch to enable/disable automatic CRL download - by default the download is with all https hostname
|
* Switch to enable/disable automatic CRL download - by default the download is with all https hostname
|
||||||
* and certificate verifications disabled.
|
* and certificate verifications disabled.
|
||||||
*
|
*
|
||||||
* @since POI 5.2.1
|
* @since 5.2.1
|
||||||
*/
|
*/
|
||||||
private boolean allowCRLDownload = false;
|
private boolean allowCRLDownload = false;
|
||||||
|
|
||||||
@ -362,7 +358,7 @@ public class SignatureConfig {
|
|||||||
/**
|
/**
|
||||||
* @return the formatted execution time ({@link #SIGNATURE_TIME_FORMAT})
|
* @return the formatted execution time ({@link #SIGNATURE_TIME_FORMAT})
|
||||||
*
|
*
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public String formatExecutionTime() {
|
public String formatExecutionTime() {
|
||||||
final DateFormat fmt = new SimpleDateFormat(SIGNATURE_TIME_FORMAT, Locale.ROOT);
|
final DateFormat fmt = new SimpleDateFormat(SIGNATURE_TIME_FORMAT, Locale.ROOT);
|
||||||
@ -374,7 +370,7 @@ public class SignatureConfig {
|
|||||||
* Sets the executionTime which is in standard format ({@link #SIGNATURE_TIME_FORMAT})
|
* Sets the executionTime which is in standard format ({@link #SIGNATURE_TIME_FORMAT})
|
||||||
* @param executionTime the execution time
|
* @param executionTime the execution time
|
||||||
*
|
*
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public void setExecutionTime(String executionTime) {
|
public void setExecutionTime(String executionTime) {
|
||||||
if (executionTime != null && !executionTime.isEmpty()){
|
if (executionTime != null && !executionTime.isEmpty()){
|
||||||
@ -402,28 +398,6 @@ public class SignatureConfig {
|
|||||||
this.signaturePolicyService = signaturePolicyService;
|
this.signaturePolicyService = signaturePolicyService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the dereferencer used for Reference/@URI attributes, defaults to {@link OOXMLURIDereferencer}
|
|
||||||
*
|
|
||||||
* @deprecated in POI 5.0.0 - use {@link SignatureInfo#getUriDereferencer()} instead
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
@Removal(version = "5.0.0")
|
|
||||||
public URIDereferencer getUriDereferencer() {
|
|
||||||
return uriDereferencer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param uriDereferencer the dereferencer used for Reference/@URI attributes
|
|
||||||
*
|
|
||||||
* @deprecated in POI 5.0.0 - use {@link SignatureInfo#setUriDereferencer(URIDereferencer)} instead
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
@Removal(version = "5.0.0")
|
|
||||||
public void setUriDereferencer(URIDereferencer uriDereferencer) {
|
|
||||||
this.uriDereferencer = uriDereferencer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Gives back the human-readable description of what the citizen
|
* @return Gives back the human-readable description of what the citizen
|
||||||
* will be signing. The default value is "Office OpenXML Document".
|
* will be signing. The default value is "Office OpenXML Document".
|
||||||
@ -598,7 +572,7 @@ public class SignatureConfig {
|
|||||||
/**
|
/**
|
||||||
* @return the http client used for timestamp server connections
|
* @return the http client used for timestamp server connections
|
||||||
*
|
*
|
||||||
* @since POI 5.2.1
|
* @since 5.2.1
|
||||||
*/
|
*/
|
||||||
public TimeStampHttpClient getTspHttpClient() {
|
public TimeStampHttpClient getTspHttpClient() {
|
||||||
return tspHttpClient;
|
return tspHttpClient;
|
||||||
@ -607,7 +581,7 @@ public class SignatureConfig {
|
|||||||
/**
|
/**
|
||||||
* @param tspHttpClient the http client used for timestamp server connections
|
* @param tspHttpClient the http client used for timestamp server connections
|
||||||
*
|
*
|
||||||
* @since POI 5.2.1
|
* @since 5.2.1
|
||||||
*/
|
*/
|
||||||
public void setTspHttpClient(TimeStampHttpClient tspHttpClient) {
|
public void setTspHttpClient(TimeStampHttpClient tspHttpClient) {
|
||||||
this.tspHttpClient = tspHttpClient;
|
this.tspHttpClient = tspHttpClient;
|
||||||
@ -690,7 +664,7 @@ public class SignatureConfig {
|
|||||||
* @param xadesDigestAlgo hash algorithm used for XAdES.
|
* @param xadesDigestAlgo hash algorithm used for XAdES.
|
||||||
* When {@code null}, defaults to {@link #getDigestAlgo()}
|
* When {@code null}, defaults to {@link #getDigestAlgo()}
|
||||||
*
|
*
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public void setXadesDigestAlgo(String xadesDigestAlgo) {
|
public void setXadesDigestAlgo(String xadesDigestAlgo) {
|
||||||
this.xadesDigestAlgo = getDigestMethodAlgo(xadesDigestAlgo);
|
this.xadesDigestAlgo = getDigestMethodAlgo(xadesDigestAlgo);
|
||||||
@ -951,7 +925,7 @@ public class SignatureConfig {
|
|||||||
*
|
*
|
||||||
* @param signatureMethodUri the method uri
|
* @param signatureMethodUri the method uri
|
||||||
*
|
*
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public void setSignatureMethodFromUri(final String signatureMethodUri) {
|
public void setSignatureMethodFromUri(final String signatureMethodUri) {
|
||||||
switch (signatureMethodUri) {
|
switch (signatureMethodUri) {
|
||||||
@ -1018,7 +992,7 @@ public class SignatureConfig {
|
|||||||
/**
|
/**
|
||||||
* @return true, if the signature config is to be updated based on the successful validated document
|
* @return true, if the signature config is to be updated based on the successful validated document
|
||||||
*
|
*
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public boolean isUpdateConfigOnValidate() {
|
public boolean isUpdateConfigOnValidate() {
|
||||||
return updateConfigOnValidate;
|
return updateConfigOnValidate;
|
||||||
@ -1031,7 +1005,7 @@ public class SignatureConfig {
|
|||||||
*
|
*
|
||||||
* @param updateConfigOnValidate if true, update config on validate
|
* @param updateConfigOnValidate if true, update config on validate
|
||||||
*
|
*
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public void setUpdateConfigOnValidate(boolean updateConfigOnValidate) {
|
public void setUpdateConfigOnValidate(boolean updateConfigOnValidate) {
|
||||||
this.updateConfigOnValidate = updateConfigOnValidate;
|
this.updateConfigOnValidate = updateConfigOnValidate;
|
||||||
@ -1040,7 +1014,7 @@ public class SignatureConfig {
|
|||||||
/**
|
/**
|
||||||
* @return true, if multiple signatures can be attached
|
* @return true, if multiple signatures can be attached
|
||||||
*
|
*
|
||||||
* @since POI 4.1.0
|
* @since 4.1.0
|
||||||
*/
|
*/
|
||||||
public boolean isAllowMultipleSignatures() {
|
public boolean isAllowMultipleSignatures() {
|
||||||
return allowMultipleSignatures;
|
return allowMultipleSignatures;
|
||||||
@ -1052,7 +1026,7 @@ public class SignatureConfig {
|
|||||||
* @param allowMultipleSignatures if true, the signature will be added,
|
* @param allowMultipleSignatures if true, the signature will be added,
|
||||||
* otherwise all existing signatures will be replaced by the current
|
* otherwise all existing signatures will be replaced by the current
|
||||||
*
|
*
|
||||||
* @since POI 4.1.0
|
* @since 4.1.0
|
||||||
*/
|
*/
|
||||||
public void setAllowMultipleSignatures(boolean allowMultipleSignatures) {
|
public void setAllowMultipleSignatures(boolean allowMultipleSignatures) {
|
||||||
this.allowMultipleSignatures = allowMultipleSignatures;
|
this.allowMultipleSignatures = allowMultipleSignatures;
|
||||||
@ -1061,7 +1035,7 @@ public class SignatureConfig {
|
|||||||
/**
|
/**
|
||||||
* @return is secure validation enabled?
|
* @return is secure validation enabled?
|
||||||
*
|
*
|
||||||
* @since POI 5.2.0
|
* @since 5.2.0
|
||||||
*/
|
*/
|
||||||
public boolean isSecureValidation() {
|
public boolean isSecureValidation() {
|
||||||
return secureValidation;
|
return secureValidation;
|
||||||
@ -1087,7 +1061,7 @@ public class SignatureConfig {
|
|||||||
*
|
*
|
||||||
* @see <a href="https://santuario.apache.org/faq.html#faq-4.SecureValidation">XmlSec SecureValidation</a>
|
* @see <a href="https://santuario.apache.org/faq.html#faq-4.SecureValidation">XmlSec SecureValidation</a>
|
||||||
*
|
*
|
||||||
* @since POI 5.2.0
|
* @since 5.2.0
|
||||||
*/
|
*/
|
||||||
public void setSecureValidation(boolean secureValidation) {
|
public void setSecureValidation(boolean secureValidation) {
|
||||||
this.secureValidation = secureValidation;
|
this.secureValidation = secureValidation;
|
||||||
|
|||||||
@ -37,7 +37,7 @@ public class XDDFLineProperties {
|
|||||||
/**
|
/**
|
||||||
* @param fill
|
* @param fill
|
||||||
* fill properties to set on the new line properties.
|
* fill properties to set on the new line properties.
|
||||||
* @since POI 4.0.2
|
* @since 4.0.2
|
||||||
*/
|
*/
|
||||||
public XDDFLineProperties(XDDFFillProperties fill) {
|
public XDDFLineProperties(XDDFFillProperties fill) {
|
||||||
this();
|
this();
|
||||||
|
|||||||
@ -151,7 +151,7 @@ public class XDDFArea3DChartData extends XDDFChartData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
public CTAreaSer getCTAreaSer() {
|
public CTAreaSer getCTAreaSer() {
|
||||||
return series;
|
return series;
|
||||||
|
|||||||
@ -127,7 +127,7 @@ public class XDDFAreaChartData extends XDDFChartData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
public CTAreaSer getCTAreaSer() {
|
public CTAreaSer getCTAreaSer() {
|
||||||
return series;
|
return series;
|
||||||
|
|||||||
@ -198,7 +198,7 @@ public class XDDFBar3DChartData extends XDDFChartData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
public CTBarSer getCTBarSer() {
|
public CTBarSer getCTBarSer() {
|
||||||
return series;
|
return series;
|
||||||
|
|||||||
@ -188,7 +188,7 @@ public class XDDFBarChartData extends XDDFChartData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
public CTBarSer getCTBarSer() {
|
public CTBarSer getCTBarSer() {
|
||||||
return series;
|
return series;
|
||||||
|
|||||||
@ -32,7 +32,7 @@ import org.openxmlformats.schemas.drawingml.x2006.chart.CTSerTx;
|
|||||||
import org.openxmlformats.schemas.drawingml.x2006.chart.CTNumData;
|
import org.openxmlformats.schemas.drawingml.x2006.chart.CTNumData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
@Beta
|
@Beta
|
||||||
public class XDDFBubbleChartData extends XDDFChartData {
|
public class XDDFBubbleChartData extends XDDFChartData {
|
||||||
@ -125,7 +125,7 @@ public class XDDFBubbleChartData extends XDDFChartData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
public CTBubbleSer getCTBubbleSer() {
|
public CTBubbleSer getCTBubbleSer() {
|
||||||
return series;
|
return series;
|
||||||
|
|||||||
@ -81,7 +81,7 @@ public class XDDFCategoryAxis extends XDDFChartAxis {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 4.0.2
|
* @since 4.0.2
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public XDDFRunProperties getOrAddTextProperties() {
|
public XDDFRunProperties getOrAddTextProperties() {
|
||||||
|
|||||||
@ -143,7 +143,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
* the package part holding the chart data, the content type must
|
* the package part holding the chart data, the content type must
|
||||||
* be
|
* be
|
||||||
* {@code application/vnd.openxmlformats-officedocument.drawingml.chart+xml}
|
* {@code application/vnd.openxmlformats-officedocument.drawingml.chart+xml}
|
||||||
* @since POI 3.14-Beta1
|
* @since 3.14-Beta1
|
||||||
*/
|
*/
|
||||||
protected XDDFChart(PackagePart part) throws IOException, XmlException {
|
protected XDDFChart(PackagePart part) throws IOException, XmlException {
|
||||||
super(part);
|
super(part);
|
||||||
@ -186,7 +186,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear all properties, as if a new instance had just been created.
|
* Clear all properties, as if a new instance had just been created.
|
||||||
* @since POI 4.1.2
|
* @since 4.1.2
|
||||||
*/
|
*/
|
||||||
public void clear() {
|
public void clear() {
|
||||||
axes.clear();
|
axes.clear();
|
||||||
@ -322,7 +322,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the chart title.
|
* Remove the chart title.
|
||||||
* @since POI 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
public void removeTitle() {
|
public void removeTitle() {
|
||||||
setAutoTitleDeleted(true);
|
setAutoTitleDeleted(true);
|
||||||
@ -500,7 +500,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear all chart series, as if a new instance had just been created.
|
* Clear all chart series, as if a new instance had just been created.
|
||||||
* @since POI 4.1.2
|
* @since 4.1.2
|
||||||
*/
|
*/
|
||||||
public void clearChartSeries() {
|
public void clearChartSeries() {
|
||||||
CTPlotArea plotArea = getCTPlotArea();
|
CTPlotArea plotArea = getCTPlotArea();
|
||||||
@ -758,7 +758,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
* index used to suffix on file
|
* index used to suffix on file
|
||||||
* @return return relation part which used to write relation in .rels file
|
* @return return relation part which used to write relation in .rels file
|
||||||
* and get relation id
|
* and get relation id
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public PackageRelationship createRelationshipInChart(POIXMLRelation chartRelation, POIXMLFactory chartFactory,
|
public PackageRelationship createRelationshipInChart(POIXMLRelation chartRelation, POIXMLFactory chartFactory,
|
||||||
int chartIndex) {
|
int chartIndex) {
|
||||||
@ -775,7 +775,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
* @param chartFactory
|
* @param chartFactory
|
||||||
* factory object of POIXMLFactory (XWPFFactory/XSLFFactory)
|
* factory object of POIXMLFactory (XWPFFactory/XSLFFactory)
|
||||||
* @return return the new package part
|
* @return return the new package part
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
private PackagePart createWorksheetPart(POIXMLRelation chartWorkbookRelation, POIXMLFactory chartFactory)
|
private PackagePart createWorksheetPart(POIXMLRelation chartWorkbookRelation, POIXMLFactory chartFactory)
|
||||||
throws InvalidFormatException {
|
throws InvalidFormatException {
|
||||||
@ -788,7 +788,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
* this method write the XSSFWorkbook object data into embedded excel file
|
* this method write the XSSFWorkbook object data into embedded excel file
|
||||||
*
|
*
|
||||||
* @param workbook XSSFworkbook object
|
* @param workbook XSSFworkbook object
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public void saveWorkbook(XSSFWorkbook workbook) throws IOException, InvalidFormatException {
|
public void saveWorkbook(XSSFWorkbook workbook) throws IOException, InvalidFormatException {
|
||||||
PackagePart worksheetPart = getWorksheetPart();
|
PackagePart worksheetPart = getWorksheetPart();
|
||||||
@ -810,21 +810,21 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return the chart relation in the implementing subclass.
|
* @return the chart relation in the implementing subclass.
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
protected abstract POIXMLRelation getChartRelation();
|
protected abstract POIXMLRelation getChartRelation();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return the chart workbook relation in the implementing subclass.
|
* @return the chart workbook relation in the implementing subclass.
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
protected abstract POIXMLRelation getChartWorkbookRelation();
|
protected abstract POIXMLRelation getChartWorkbookRelation();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return the chart factory in the implementing subclass.
|
* @return the chart factory in the implementing subclass.
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
protected abstract POIXMLFactory getChartFactory();
|
protected abstract POIXMLFactory getChartFactory();
|
||||||
|
|
||||||
@ -837,7 +837,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
* category values
|
* category values
|
||||||
* @param valuesData
|
* @param valuesData
|
||||||
* data values
|
* data values
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
protected void fillSheet(XSSFSheet sheet, XDDFDataSource<?> categoryData, XDDFNumericalDataSource<?> valuesData) {
|
protected void fillSheet(XSSFSheet sheet, XDDFDataSource<?> categoryData, XDDFNumericalDataSource<?> valuesData) {
|
||||||
int numOfPoints = categoryData.getPointCount();
|
int numOfPoints = categoryData.getPointCount();
|
||||||
@ -862,7 +862,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
* @param index
|
* @param index
|
||||||
* index of current row
|
* index of current row
|
||||||
* @return this method return sheet row on given index
|
* @return this method return sheet row on given index
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
private XSSFRow getRow(XSSFSheet sheet, int index) {
|
private XSSFRow getRow(XSSFSheet sheet, int index) {
|
||||||
XSSFRow row = sheet.getRow(index);
|
XSSFRow row = sheet.getRow(index);
|
||||||
@ -882,7 +882,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
* @param index
|
* @param index
|
||||||
* index of current cell
|
* index of current cell
|
||||||
* @return this method return sheet cell on given index
|
* @return this method return sheet cell on given index
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
private XSSFCell getCell(XSSFRow row, int index) {
|
private XSSFCell getCell(XSSFRow row, int index) {
|
||||||
XSSFCell cell = row.getCell(index);
|
XSSFCell cell = row.getCell(index);
|
||||||
@ -898,7 +898,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
*
|
*
|
||||||
* @param other
|
* @param other
|
||||||
* chart object
|
* chart object
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public void importContent(XDDFChart other) {
|
public void importContent(XDDFChart other) {
|
||||||
getCTChartSpace().set(other.getCTChartSpace());
|
getCTChartSpace().set(other.getCTChartSpace());
|
||||||
@ -935,7 +935,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
* @param column
|
* @param column
|
||||||
* column index
|
* column index
|
||||||
* @return return cell reference
|
* @return return cell reference
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public CellReference setSheetTitle(String title, int column) {
|
public CellReference setSheetTitle(String title, int column) {
|
||||||
XSSFSheet sheet = getSheet();
|
XSSFSheet sheet = getSheet();
|
||||||
@ -950,7 +950,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public String formatRange(CellRangeAddress range) {
|
public String formatRange(CellRangeAddress range) {
|
||||||
final XSSFSheet sheet = getSheet();
|
final XSSFSheet sheet = getSheet();
|
||||||
@ -961,7 +961,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
* get sheet object of embedded excel file
|
* get sheet object of embedded excel file
|
||||||
*
|
*
|
||||||
* @return excel sheet object
|
* @return excel sheet object
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
private XSSFSheet getSheet() {
|
private XSSFSheet getSheet() {
|
||||||
try {
|
try {
|
||||||
@ -977,7 +977,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
* writing xssfworkbook object into output stream of embedded part
|
* writing xssfworkbook object into output stream of embedded part
|
||||||
*
|
*
|
||||||
* @return returns the packagepart of embedded file
|
* @return returns the packagepart of embedded file
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
private PackagePart getWorksheetPart() throws InvalidFormatException {
|
private PackagePart getWorksheetPart() throws InvalidFormatException {
|
||||||
for (RelationPart part : getRelationParts()) {
|
for (RelationPart part : getRelationParts()) {
|
||||||
@ -999,7 +999,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return returns the workbook object of embedded excel file
|
* @return returns the workbook object of embedded excel file
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public XSSFWorkbook getWorkbook() throws IOException, InvalidFormatException {
|
public XSSFWorkbook getWorkbook() throws IOException, InvalidFormatException {
|
||||||
if (workbook == null) {
|
if (workbook == null) {
|
||||||
@ -1028,7 +1028,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
*
|
*
|
||||||
* @param workbook
|
* @param workbook
|
||||||
* workbook object which we read from chart embedded part
|
* workbook object which we read from chart embedded part
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public void setWorkbook(XSSFWorkbook workbook) {
|
public void setWorkbook(XSSFWorkbook workbook) {
|
||||||
this.workbook = workbook;
|
this.workbook = workbook;
|
||||||
@ -1041,7 +1041,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
* @param id
|
* @param id
|
||||||
* relation id of embedded excel relation id into external data
|
* relation id of embedded excel relation id into external data
|
||||||
* relation tag
|
* relation tag
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
public void setExternalId(String id) {
|
public void setExternalId(String id) {
|
||||||
CTChartSpace ctChartSpace = getCTChartSpace();
|
CTChartSpace ctChartSpace = getCTChartSpace();
|
||||||
@ -1053,7 +1053,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return method return chart index
|
* @return method return chart index
|
||||||
* @since POI 4.0.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
protected int getChartIndex() {
|
protected int getChartIndex() {
|
||||||
return chartIndex;
|
return chartIndex;
|
||||||
@ -1075,7 +1075,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
|||||||
* @param newSheet
|
* @param newSheet
|
||||||
* sheet to be used in the data references.
|
* sheet to be used in the data references.
|
||||||
*
|
*
|
||||||
* @since POI 5.1.0
|
* @since 5.1.0
|
||||||
*/
|
*/
|
||||||
public void replaceReferences(XSSFSheet newSheet) {
|
public void replaceReferences(XSSFSheet newSheet) {
|
||||||
for (XDDFChartData data : getChartSeries()) {
|
for (XDDFChartData data : getChartSeries()) {
|
||||||
|
|||||||
@ -65,7 +65,7 @@ public abstract class XDDFChartAxis implements HasShapeProperties {
|
|||||||
public abstract XDDFShapeProperties getOrAddMinorGridProperties();
|
public abstract XDDFShapeProperties getOrAddMinorGridProperties();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 4.0.2
|
* @since 4.0.2
|
||||||
*/
|
*/
|
||||||
public abstract XDDFRunProperties getOrAddTextProperties();
|
public abstract XDDFRunProperties getOrAddTextProperties();
|
||||||
|
|
||||||
@ -357,7 +357,7 @@ public abstract class XDDFChartAxis implements HasShapeProperties {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return tick label position.
|
* @return tick label position.
|
||||||
* @since POI 4.0.2
|
* @since 4.0.2
|
||||||
*/
|
*/
|
||||||
public AxisTickLabelPosition getTickLabelPosition() {
|
public AxisTickLabelPosition getTickLabelPosition() {
|
||||||
return AxisTickLabelPosition.valueOf(getCTTickLblPos().getVal());
|
return AxisTickLabelPosition.valueOf(getCTTickLblPos().getVal());
|
||||||
@ -366,7 +366,7 @@ public abstract class XDDFChartAxis implements HasShapeProperties {
|
|||||||
/**
|
/**
|
||||||
* @param labelPosition
|
* @param labelPosition
|
||||||
* tick label position.
|
* tick label position.
|
||||||
* @since POI 4.0.2
|
* @since 4.0.2
|
||||||
*/
|
*/
|
||||||
public void setTickLabelPosition(AxisTickLabelPosition labelPosition) {
|
public void setTickLabelPosition(AxisTickLabelPosition labelPosition) {
|
||||||
getCTTickLblPos().setVal(labelPosition.underlying);
|
getCTTickLblPos().setVal(labelPosition.underlying);
|
||||||
|
|||||||
@ -159,7 +159,7 @@ public abstract class XDDFChartData {
|
|||||||
/**
|
/**
|
||||||
* Set the Chart Series title.
|
* Set the Chart Series title.
|
||||||
* @param title chart series title
|
* @param title chart series title
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
public void setTitle(String title) {
|
public void setTitle(String title) {
|
||||||
setTitle(title, null);
|
setTitle(title, null);
|
||||||
@ -224,7 +224,7 @@ public abstract class XDDFChartData {
|
|||||||
/**
|
/**
|
||||||
* @param fill
|
* @param fill
|
||||||
* fill property for the shape representing the series.
|
* fill property for the shape representing the series.
|
||||||
* @since POI 4.1.1
|
* @since 4.1.1
|
||||||
*/
|
*/
|
||||||
public void setFillProperties(XDDFFillProperties fill) {
|
public void setFillProperties(XDDFFillProperties fill) {
|
||||||
XDDFShapeProperties properties = getShapeProperties();
|
XDDFShapeProperties properties = getShapeProperties();
|
||||||
@ -238,7 +238,7 @@ public abstract class XDDFChartData {
|
|||||||
/**
|
/**
|
||||||
* @param line
|
* @param line
|
||||||
* line property for the shape representing the series.
|
* line property for the shape representing the series.
|
||||||
* @since POI 4.1.1
|
* @since 4.1.1
|
||||||
*/
|
*/
|
||||||
public void setLineProperties(XDDFLineProperties line) {
|
public void setLineProperties(XDDFLineProperties line) {
|
||||||
XDDFShapeProperties properties = getShapeProperties();
|
XDDFShapeProperties properties = getShapeProperties();
|
||||||
@ -255,7 +255,7 @@ public abstract class XDDFChartData {
|
|||||||
*
|
*
|
||||||
* @param index
|
* @param index
|
||||||
* data point index.
|
* data point index.
|
||||||
* @since POI 5.1.0
|
* @since 5.1.0
|
||||||
*/
|
*/
|
||||||
public void clearDataPoint(long index) {
|
public void clearDataPoint(long index) {
|
||||||
List<CTDPt> points = getDPtList();
|
List<CTDPt> points = getDPtList();
|
||||||
@ -275,7 +275,7 @@ public abstract class XDDFChartData {
|
|||||||
* data point index.
|
* data point index.
|
||||||
* @return
|
* @return
|
||||||
* the data point with the given {@code index}.
|
* the data point with the given {@code index}.
|
||||||
* @since POI 5.1.0
|
* @since 5.1.0
|
||||||
*/
|
*/
|
||||||
public XDDFDataPoint getDataPoint(long index) {
|
public XDDFDataPoint getDataPoint(long index) {
|
||||||
List<CTDPt> points = getDPtList();
|
List<CTDPt> points = getDPtList();
|
||||||
|
|||||||
@ -33,12 +33,12 @@ public interface XDDFDataSource<T> {
|
|||||||
T getPointAt(int index);
|
T getPointAt(int index);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 4.0.2
|
* @since 4.0.2
|
||||||
*/
|
*/
|
||||||
boolean isLiteral();
|
boolean isLiteral();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 4.1.2
|
* @since 4.1.2
|
||||||
*/
|
*/
|
||||||
boolean isCellRange();
|
boolean isCellRange();
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ public interface XDDFDataSource<T> {
|
|||||||
String getFormatCode();
|
String getFormatCode();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 5.0.0
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
@Internal
|
@Internal
|
||||||
default void fillNumericalCache(CTNumData cache) {
|
default void fillNumericalCache(CTNumData cache) {
|
||||||
@ -95,7 +95,7 @@ public interface XDDFDataSource<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 4.1.2
|
* @since 4.1.2
|
||||||
*/
|
*/
|
||||||
@Internal
|
@Internal
|
||||||
default void fillStringCache(CTStrData cache) {
|
default void fillStringCache(CTStrData cache) {
|
||||||
|
|||||||
@ -85,7 +85,7 @@ public class XDDFDateAxis extends XDDFChartAxis {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 4.0.2
|
* @since 4.0.2
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public XDDFRunProperties getOrAddTextProperties() {
|
public XDDFRunProperties getOrAddTextProperties() {
|
||||||
|
|||||||
@ -138,7 +138,7 @@ public class XDDFDoughnutChartData extends XDDFChartData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
public CTPieSer getCTPieSer() {
|
public CTPieSer getCTPieSer() {
|
||||||
return series;
|
return series;
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import org.openxmlformats.schemas.drawingml.x2006.chart.CTNumDataSource;
|
|||||||
import org.openxmlformats.schemas.drawingml.x2006.chart.CTNumRef;
|
import org.openxmlformats.schemas.drawingml.x2006.chart.CTNumRef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 4.1.2
|
* @since 4.1.2
|
||||||
*/
|
*/
|
||||||
@Beta
|
@Beta
|
||||||
public class XDDFErrorBars {
|
public class XDDFErrorBars {
|
||||||
|
|||||||
@ -142,7 +142,7 @@ public class XDDFLine3DChartData extends XDDFChartData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
public CTLineSer getCTLineSer() {
|
public CTLineSer getCTLineSer() {
|
||||||
return series;
|
return series;
|
||||||
|
|||||||
@ -117,7 +117,7 @@ public class XDDFLineChartData extends XDDFChartData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
public CTLineSer getCTLineSer() {
|
public CTLineSer getCTLineSer() {
|
||||||
return series;
|
return series;
|
||||||
|
|||||||
@ -87,7 +87,7 @@ public class XDDFPie3DChartData extends XDDFChartData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
public CTPieSer getCTPieSer() {
|
public CTPieSer getCTPieSer() {
|
||||||
return series;
|
return series;
|
||||||
|
|||||||
@ -117,7 +117,7 @@ public class XDDFPieChartData extends XDDFChartData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
public CTPieSer getCTPieSer() {
|
public CTPieSer getCTPieSer() {
|
||||||
return series;
|
return series;
|
||||||
|
|||||||
@ -117,7 +117,7 @@ public class XDDFRadarChartData extends XDDFChartData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
public CTRadarSer getCTRadarSer() {
|
public CTRadarSer getCTRadarSer() {
|
||||||
return series;
|
return series;
|
||||||
|
|||||||
@ -122,7 +122,7 @@ public class XDDFScatterChartData extends XDDFChartData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 5.2.3
|
* @since 5.2.3
|
||||||
*/
|
*/
|
||||||
public CTScatterSer getCTScatterSer() {
|
public CTScatterSer getCTScatterSer() {
|
||||||
return series;
|
return series;
|
||||||
@ -205,35 +205,35 @@ public class XDDFScatterChartData extends XDDFChartData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 4.1.2
|
* @since 4.1.2
|
||||||
*/
|
*/
|
||||||
public int getErrorBarsCount() {
|
public int getErrorBarsCount() {
|
||||||
return series.sizeOfErrBarsArray();
|
return series.sizeOfErrBarsArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 4.1.2
|
* @since 4.1.2
|
||||||
*/
|
*/
|
||||||
public XDDFErrorBars getErrorBars(int index) {
|
public XDDFErrorBars getErrorBars(int index) {
|
||||||
return new XDDFErrorBars(series.getErrBarsArray(index));
|
return new XDDFErrorBars(series.getErrBarsArray(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 4.1.2
|
* @since 4.1.2
|
||||||
*/
|
*/
|
||||||
public XDDFErrorBars addNewErrorBars() {
|
public XDDFErrorBars addNewErrorBars() {
|
||||||
return new XDDFErrorBars(series.addNewErrBars());
|
return new XDDFErrorBars(series.addNewErrBars());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 4.1.2
|
* @since 4.1.2
|
||||||
*/
|
*/
|
||||||
public XDDFErrorBars insertNewErrorBars(int index) {
|
public XDDFErrorBars insertNewErrorBars(int index) {
|
||||||
return new XDDFErrorBars(series.insertNewErrBars(index));
|
return new XDDFErrorBars(series.insertNewErrBars(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since POI 4.1.2
|
* @since 4.1.2
|
||||||
*/
|
*/
|
||||||
public void removeErrorBars(int index) {
|
public void removeErrorBars(int index) {
|
||||||
series.removeErrBars(index);
|
series.removeErrBars(index);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user