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/02 16:49:05 UTC

[10/25] incubator-taverna-language git commit: Delete odfdom

http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/372aab83/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
deleted file mode 100644
index 2b2c0de..0000000
--- a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/TempDirDeleter.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-package org.apache.taverna.scufl2.ucfpackage.impl.odfdom.pkg;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-class TempDirDeleter extends Thread {
-    private static TempDirDeleter deleterThread = null;
-    private ArrayList<File> dirList;
-
-    static TempDirDeleter getInstance() {
-        if (deleterThread == null) {
-            deleterThread = new TempDirDeleter();
-            Runtime.getRuntime().addShutdownHook(deleterThread);
-        }
-        return deleterThread;
-    }
-
-    private TempDirDeleter() {
-        dirList = new ArrayList<>();
-    }
-
-    synchronized boolean add(File dir) {
-        return dirList.add(dir);
-    }
-
-    synchronized boolean remove(File dir) {
-        return dirList.remove(dir);
-    }
-
-    @Override
-    public void run() {
-        synchronized (this) {
-            Iterator<File> iterator = dirList.iterator();
-            while (iterator.hasNext()) {
-                File dir = iterator.next();
-                deleteDirectoryRecursive(dir);
-                iterator.remove();
-            }
-            dirList.clear();
-        }
-    }
-
-    private void deleteDirectoryRecursive(File dir) {
-        if (dir == null)
-            return;
-
-        File[] fileArray = dir.listFiles();
-        if (fileArray != null)
-            for (int i = 0; i < fileArray.length; i++)
-                if (fileArray[i].isDirectory())
-                    deleteDirectoryRecursive(fileArray[i]);
-                else
-                    fileArray[i].delete();
-        dir.delete();
-    }
-
-    void deleteDirectory(File dir) {
-        deleteDirectoryRecursive(dir);
-        dirList.remove(dir);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/372aab83/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
deleted file mode 100644
index ced62b5..0000000
--- a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/Algorithm.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-package org.apache.taverna.scufl2.ucfpackage.impl.odfdom.pkg.manifest;
-
-public class Algorithm {
-	private String name;
-	private String initializationVector;
-
-	public Algorithm() {
-	}
-
-	public Algorithm(String name, String initializationVector) {
-		this.name = name;
-		this.initializationVector = initializationVector;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setInitializationVector(String initializationVector) {
-		this.initializationVector = initializationVector;
-	}
-
-	public String getInitializationVector() {
-		return initializationVector;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/372aab83/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
deleted file mode 100644
index dd87ae9..0000000
--- a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/EncryptionData.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-package org.apache.taverna.scufl2.ucfpackage.impl.odfdom.pkg.manifest;
-
-public class EncryptionData {
-	private String checksumType;
-	private String checksum;
-	Algorithm algorithm;
-	KeyDerivation keyDerivation;
-
-	public EncryptionData() {
-	}
-
-	public EncryptionData(String checksumType, String checksum,
-			Algorithm algorithm, KeyDerivation keyDerivation) {
-		this.checksumType = checksumType;
-		this.checksum = checksum;
-		this.algorithm = algorithm;
-		this.keyDerivation = keyDerivation;
-	}
-
-	public void setChecksumType(String checksumType) {
-		this.checksumType = checksumType;
-	}
-
-	public String getChecksumType() {
-		return checksumType;
-	}
-
-	public void setChecksum(String checksum) {
-		this.checksum = checksum;
-	}
-
-	public String getChecksum() {
-		return checksum;
-	}
-
-	public void setAlgorithm(Algorithm algorithm) {
-		this.algorithm = algorithm;
-	}
-
-	public Algorithm getAlgorithm() {
-		return algorithm;
-	}
-
-	public void setKeyDerivation(KeyDerivation keyDerivation) {
-		this.keyDerivation = keyDerivation;
-	}
-
-	public KeyDerivation getKeyDerivation() {
-		return keyDerivation;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/372aab83/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
deleted file mode 100644
index 5183194..0000000
--- a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/KeyDerivation.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-package org.apache.taverna.scufl2.ucfpackage.impl.odfdom.pkg.manifest;
-
-public class KeyDerivation {
-	private String name;
-	private String salt;
-	private int iterationCount = 0;
-
-	public KeyDerivation() {
-	}
-
-	public KeyDerivation(String name, String salt, int iterationCount) {
-		this.name = name;
-		this.salt = salt;
-		this.iterationCount = iterationCount;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setSalt(String salt) {
-		this.salt = salt;
-	}
-
-	public String getSalt() {
-		return salt;
-	}
-
-	public void setIterationCount(int iterationCount) {
-		this.iterationCount = iterationCount;
-	}
-
-	public int getIterationCount() {
-		return iterationCount;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/372aab83/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
deleted file mode 100644
index 8069877..0000000
--- a/taverna-scufl2-ucfpackage/src/main/java/org/apache/taverna/scufl2/ucfpackage/impl/odfdom/pkg/manifest/OdfFileEntry.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-package org.apache.taverna.scufl2.ucfpackage.impl.odfdom.pkg.manifest;
-
-import javax.activation.MimetypesFileTypeMap;
-
-public class OdfFileEntry {
-	private String mPath;
-	private String mMediaType = "";
-	private int mSize = -1;
-	private String version = null;
-	private EncryptionData _encryptionData; // The following static attributes
-	public OdfFileEntry() {
-	}
-
-	public OdfFileEntry(String path, String mediaType) {
-		mPath = path;
-		mMediaType = (mediaType == null ? "" : mediaType);
-		mSize = 0;
-	}
-
-	public OdfFileEntry(String path, String mediaType, int size) {
-		mPath = path;
-		mMediaType = mediaType;
-		mSize = size;
-	}
-
-	public void setPath(String path) {
-		mPath = path;
-	}
-
-	public String getPath() {
-		return mPath;
-	}
-
-	public void setMediaType(String mediaType) {
-		mMediaType = (mediaType == null ? "" : mediaType);
-	}
-
-	public String getMediaType() {
-		return mMediaType;
-	}
-
-	/**
-	 * 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) {
-		return MimetypesFileTypeMap.getDefaultFileTypeMap().getContentType(fileRef);
-	}
-
-	public void setSize(int size) {
-		mSize = size;
-	}
-
-	/**
-	 * get the size or -1 if not set
-	 */
-	public int getSize() {
-		return mSize;
-	}
-
-	public void setEncryptionData(EncryptionData encryptionData) {
-		_encryptionData = encryptionData;
-	}
-
-	public EncryptionData getEncryptionData() {
-		return _encryptionData;
-	}
-
-	public String getVersion() {
-		return version;
-	}
-
-	public void setVersion(String version) {
-		this.version = version;
-	}
-}