You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by st...@apache.org on 2015/07/16 00:54:58 UTC
[2/2] incubator-taverna-language git commit: odfdom: Include
prominent notices of changes
odfdom: Include prominent notices of changes
>From Apache License 2.0:
> 4b. You must cause any modified files to carry prominent notices stating that You changed the files;
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/commit/4b59c140
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/tree/4b59c140
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/diff/4b59c140
Branch: refs/heads/master
Commit: 4b59c14015515a5ed3c62def07d521437bd67378
Parents: 02efe5d
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Wed Jul 15 23:53:48 2015 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Wed Jul 15 23:53:48 2015 +0100
----------------------------------------------------------------------
.../ucfpackage/impl/odfdom/pkg/OdfPackage.java | 11 ++++++++---
.../impl/odfdom/pkg/OdfPackageStream.java | 16 ++++++++++------
.../ucfpackage/impl/odfdom/pkg/OdfXMLHelper.java | 5 +++++
.../ucfpackage/impl/odfdom/pkg/StreamHelper.java | 6 +++++-
.../ucfpackage/impl/odfdom/pkg/TempDir.java | 19 ++++++++++++-------
.../impl/odfdom/pkg/TempDirDeleter.java | 15 ++++++++++-----
.../impl/odfdom/pkg/manifest/Algorithm.java | 15 ++++++++++-----
.../impl/odfdom/pkg/manifest/EncryptionData.java | 15 ++++++++++-----
.../impl/odfdom/pkg/manifest/KeyDerivation.java | 15 ++++++++++-----
.../impl/odfdom/pkg/manifest/OdfFileEntry.java | 19 ++++++++++++-------
10 files changed, 92 insertions(+), 44 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/4b59c140/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfPackage.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfPackage.java b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfPackage.java
index c99cdbe..33cba39 100644
--- a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfPackage.java
+++ b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfPackage.java
@@ -20,6 +20,11 @@
* limitations under the License.
*
************************************************************************/
+/* This file is derived from ODFDOM 0.8.6, and
+ * has been modified for Apache Taverna.
+ * (c) 2010-2014 University of Manchester
+ * (c) 2015 The Apache Software Foundation
+ */
package org.apache.taverna.scufl2.ucfpackage.impl.odfdom.pkg;
import static java.util.logging.Level.INFO;
@@ -1180,12 +1185,12 @@ public class OdfPackage implements AutoCloseable {
buf.append(i);
buf.append("\"");
}
- if (fileEntry.getVersion() != null) {
+ if (fileEntry.getVersion() != null) {
buf.append(" manifest:version=\"");
buf.append(encodeXMLAttributes(fileEntry.getVersion()));
buf.append("\"");
}
-
+
EncryptionData enc = fileEntry.getEncryptionData();
if (enc != null) {
@@ -1352,7 +1357,7 @@ public class OdfPackage implements AutoCloseable {
* if we would return ZipFile getInputStream(entry) we would not be able
* to read 2 Entries at the same time. This is a limitation of the
* ZipFile class.
- *
+ *
* As it would be quite a common thing to read the content.xml and the
* styles.xml simultaneously when using XSLT on OdfPackages we want to
* circumvent this limitation
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/4b59c140/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfPackageStream.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfPackageStream.java b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfPackageStream.java
index 5b25929..d1d71d8 100644
--- a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfPackageStream.java
+++ b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfPackageStream.java
@@ -1,25 +1,29 @@
/************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
- *
+ *
* Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
- *
+ *
* Use is subject to license terms.
- *
+ *
* Licensed 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. You can also
* obtain a copy of the License at http://odftoolkit.org/docs/license.txt
- *
+ *
* 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 file is derived from ODFDOM 0.8.6, and
+ * has been modified for Apache Taverna.
+ * (c) 2010-2014 University of Manchester
+ * (c) 2015 The Apache Software Foundation
+ */
package org.apache.taverna.scufl2.ucfpackage.impl.odfdom.pkg;
import java.io.IOException;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/4b59c140/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfXMLHelper.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfXMLHelper.java b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfXMLHelper.java
index 9d4e152..b5b88c8 100644
--- a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfXMLHelper.java
+++ b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/OdfXMLHelper.java
@@ -19,6 +19,11 @@
* limitations under the License.
*
************************************************************************/
+/* This file is derived from ODFDOM 0.8.6, and
+ * has been modified for Apache Taverna.
+ * (c) 2010-2014 University of Manchester
+ * (c) 2015 The Apache Software Foundation
+ */
package org.apache.taverna.scufl2.ucfpackage.impl.odfdom.pkg;
import java.io.ByteArrayOutputStream;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/4b59c140/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/StreamHelper.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/StreamHelper.java b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/StreamHelper.java
index 19b43dc..936486a 100644
--- a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/StreamHelper.java
+++ b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/StreamHelper.java
@@ -19,7 +19,11 @@ package org.apache.taverna.scufl2.ucfpackage.impl.odfdom.pkg;
* under the License.
*
*/
-
+/* This file is derived from ODFDOM 0.8.6, and
+ * has been modified for Apache Taverna.
+ * (c) 2010-2014 University of Manchester
+ * (c) 2015 The Apache Software Foundation
+ */
import java.io.IOException;
import java.io.InputStream;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/4b59c140/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/TempDir.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/TempDir.java b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/TempDir.java
index 220b3aa..7178aaa 100644
--- a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/TempDir.java
+++ b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/TempDir.java
@@ -1,24 +1,29 @@
/************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
- *
+ *
* Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
- *
+ *
* Use is subject to license terms.
- *
+ *
* Licensed 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. You can also
* obtain a copy of the License at http://odftoolkit.org/docs/license.txt
- *
+ *
* 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 file is derived from ODFDOM 0.8.6, and
+ * has been modified for Apache Taverna.
+ * (c) 2010-2014 University of Manchester
+ * (c) 2015 The Apache Software Foundation
+ */
package org.apache.taverna.scufl2.ucfpackage.impl.odfdom.pkg;
import java.io.File;
@@ -26,7 +31,7 @@ import java.io.IOException;
class TempDir {
/**
- * Creates a temp directory with a generated name (given a certain prefix)
+ * Creates a temp directory with a generated name (given a certain prefix)
* in a given directory.
* @param prefix The prefix for the directory name; must be three characters
* or more.
@@ -46,7 +51,7 @@ class TempDir {
/**
* Delete a temporary created directory. As a precaution, only directories
- * created by this class can be deleted. To avoid memory leaks, this class
+ * created by this class can be deleted. To avoid memory leaks, this class
* should be used exclusively for deleting.
* @param odfDirectory the temp directory to delete.
*/
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/4b59c140/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/TempDirDeleter.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/TempDirDeleter.java b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/TempDirDeleter.java
index 2b2c0de..ab5676c 100644
--- a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/TempDirDeleter.java
+++ b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/TempDirDeleter.java
@@ -1,24 +1,29 @@
/************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
- *
+ *
* Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
- *
+ *
* Use is subject to license terms.
- *
+ *
* Licensed 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. You can also
* obtain a copy of the License at http://odftoolkit.org/docs/license.txt
- *
+ *
* 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 file is derived from ODFDOM 0.8.6, and
+ * has been modified for Apache Taverna.
+ * (c) 2010-2014 University of Manchester
+ * (c) 2015 The Apache Software Foundation
+ */
package org.apache.taverna.scufl2.ucfpackage.impl.odfdom.pkg;
import java.io.File;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/4b59c140/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/Algorithm.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/Algorithm.java b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/Algorithm.java
index ced62b5..b0ef46b 100644
--- a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/Algorithm.java
+++ b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/Algorithm.java
@@ -1,24 +1,29 @@
/************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
- *
+ *
* Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
- *
+ *
* Use is subject to license terms.
- *
+ *
* Licensed 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. You can also
* obtain a copy of the License at http://odftoolkit.org/docs/license.txt
- *
+ *
* 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 file is derived from ODFDOM 0.8.6, and
+ * has been modified for Apache Taverna.
+ * (c) 2010-2014 University of Manchester
+ * (c) 2015 The Apache Software Foundation
+ */
package org.apache.taverna.scufl2.ucfpackage.impl.odfdom.pkg.manifest;
public class Algorithm {
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/4b59c140/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/EncryptionData.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/EncryptionData.java b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/EncryptionData.java
index dd87ae9..931a449 100644
--- a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/EncryptionData.java
+++ b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/EncryptionData.java
@@ -1,24 +1,29 @@
/************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
- *
+ *
* Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
- *
+ *
* Use is subject to license terms.
- *
+ *
* Licensed 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. You can also
* obtain a copy of the License at http://odftoolkit.org/docs/license.txt
- *
+ *
* 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 file is derived from ODFDOM 0.8.6, and
+ * has been modified for Apache Taverna.
+ * (c) 2010-2014 University of Manchester
+ * (c) 2015 The Apache Software Foundation
+ */
package org.apache.taverna.scufl2.ucfpackage.impl.odfdom.pkg.manifest;
public class EncryptionData {
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/4b59c140/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/KeyDerivation.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/KeyDerivation.java b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/KeyDerivation.java
index 5183194..45559d4 100644
--- a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/KeyDerivation.java
+++ b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/KeyDerivation.java
@@ -1,24 +1,29 @@
/************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
- *
+ *
* Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
- *
+ *
* Use is subject to license terms.
- *
+ *
* Licensed 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. You can also
* obtain a copy of the License at http://odftoolkit.org/docs/license.txt
- *
+ *
* 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 file is derived from ODFDOM 0.8.6, and
+ * has been modified for Apache Taverna.
+ * (c) 2010-2014 University of Manchester
+ * (c) 2015 The Apache Software Foundation
+ */
package org.apache.taverna.scufl2.ucfpackage.impl.odfdom.pkg.manifest;
public class KeyDerivation {
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/4b59c140/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/OdfFileEntry.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/OdfFileEntry.java b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/OdfFileEntry.java
index 8069877..f2b9340 100644
--- a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/OdfFileEntry.java
+++ b/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/OdfFileEntry.java
@@ -1,24 +1,29 @@
/************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
- *
+ *
* Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
- *
+ *
* Use is subject to license terms.
- *
+ *
* Licensed 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. You can also
* obtain a copy of the License at http://odftoolkit.org/docs/license.txt
- *
+ *
* 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 file is derived from ODFDOM 0.8.6, and
+ * has been modified for Apache Taverna.
+ * (c) 2010-2014 University of Manchester
+ * (c) 2015 The Apache Software Foundation
+ */
package org.apache.taverna.scufl2.ucfpackage.impl.odfdom.pkg.manifest;
import javax.activation.MimetypesFileTypeMap;
@@ -62,10 +67,10 @@ public class OdfFileEntry {
/**
* Get the media type from the given file reference
- *
+ *
* @param fileRef
* the reference to the file the media type is questioned
- *
+ *
* @return the mediaType string of the given file reference
*/
public static String getMediaType(String fileRef) {