changeset 827:f210731dc6cc stream

Merge with efd7a223f819f569a52d8d4e6d5e08c24c18fee5
author robcast
date Wed, 23 Feb 2011 18:03:27 +0100
parents 980661e00372 (current diff) efd7a223f819 (diff)
children ba708c57e57c
files servlet/src/digilib/image/ImageLoaderDocuImage.java servlet/src/digilib/image/JAIDocuImage.java servlet/src/digilib/io/ImageFile.java servlet/src/digilib/io/ImageInput.java servlet/src/digilib/io/ImageInputImpl.java servlet/src/digilib/io/ImageSet.java
diffstat 2 files changed, 159 insertions(+), 159 deletions(-) [+]
line wrap: on
line diff
--- a/servlet/src/digilib/io/ImageInput.java	Wed Feb 23 16:00:07 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-/* ImageInput-- digilib image input interface.
-
-  Digital Image Library servlet components
-
-  Copyright (C) 2010 Robert Casties (robcast@mail.berlios.de)
-
-  This program is free software; you can redistribute  it and/or modify it
-  under  the terms of  the GNU General  Public License as published by the
-  Free Software Foundation;  either version 2 of the  License, or (at your
-  option) any later version.
-   
-  Please read license.txt for the full details. A copy of the GPL
-  may be found at http://www.gnu.org/copyleft/lgpl.html
-
-  You should have received a copy of the GNU General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- * Created on 20.12.2010
- */
-
-package digilib.io;
-
-import java.io.File;
-import java.io.InputStream;
-
-import javax.imageio.stream.ImageInputStream;
-
-import digilib.util.ImageSize;
-
-public abstract class ImageInput {
-
-	// mime file type
-	protected String mimetype = null;
-	// image size in pixels
-	protected ImageSize pixelSize = null;
-    protected ImageSet parent = null;
-
-	/**
-	 * @return ImageSize
-	 */
-	public ImageSize getSize() {
-		return pixelSize;
-	}
-
-	/**
-	 * Sets the imageSize.
-	 * @param imageSize The imageSize to set
-	 */
-	public void setSize(ImageSize imageSize) {
-		this.pixelSize = imageSize;
-	}
-
-    /** returns if mimetype has been set.
-     * 
-     * @return String
-     */
-    public boolean hasMimetype() {
-        return (mimetype != null);
-    }
-
-    /**
-	 * @return String
-	 */
-	public String getMimetype() {
-		return mimetype;
-	}
-
-	/**
-	 * Sets the mimetype.
-	 * @param mimetype The mimetype to set
-	 */
-	public void setMimetype(String filetype) {
-		this.mimetype = filetype;
-	}
-
-	/** returns if this image has been checked 
-	 * (i.e. has size and mimetype)
-	 * TODO: deprecated
-	 * @return boolean
-	 */
-	public boolean isChecked() {
-		return (pixelSize != null);
-	}
-	
-	/** Returns the aspect ratio of the image (width/height).
-	 * 
-	 * @return
-	 */
-	public float getAspect() {
-		return (pixelSize != null) ? pixelSize.getAspect() : 0f;
-	}
-	
-    /**
-     * @return ImageSet
-     */
-    public ImageSet getParent() {
-        return parent;
-    }
-
-    /**
-     * Sets the parent.
-     * @param parent The parent to set
-     */
-    public void setParent(ImageSet parent) {
-        this.parent = parent;
-    }
-
-    /** Returns if the input can be returned as ImageInputStream.
-	 * 
-	 * @return
-	 */
-	public boolean hasImageInputStream() {
-		return false;
-	}
-	
-	/** Returns the input as ImageInputStream (if available)
-	 * 
-	 * @return
-	 */
-	public ImageInputStream getImageInputStream() {
-		return null;
-	}
-	
-    /** Returns if the input can be returned as InputStream.
-     * 
-     * @return
-     */
-    public boolean hasInputStream() {
-        return false;
-    }
-    
-    /** Returns the input as InputStream (if available)
-     * 
-     * @return
-     */
-    public InputStream getInputStream() {
-        return null;
-    }
-    
-	/** Returns if the input can be returned as File.
-	 * 
-	 * @return
-	 */
-	public boolean hasFile() {
-		return false;
-	}
-	
-	/** Returns the input as File (if available)
-	 * 
-	 * @return
-	 */
-	public File getFile() {
-		return null;
-	}
-
-	
-	
-}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servlet/src/digilib/io/ImageInputImpl.java	Wed Feb 23 18:03:27 2011 +0100
@@ -0,0 +1,159 @@
+/* ImageInput-- digilib image input interface.
+
+  Digital Image Library servlet components
+
+  Copyright (C) 2010 Robert Casties (robcast@mail.berlios.de)
+
+  This program is free software; you can redistribute  it and/or modify it
+  under  the terms of  the GNU General  Public License as published by the
+  Free Software Foundation;  either version 2 of the  License, or (at your
+  option) any later version.
+   
+  Please read license.txt for the full details. A copy of the GPL
+  may be found at http://www.gnu.org/copyleft/lgpl.html
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ * Created on 20.12.2010
+ */
+
+package digilib.io;
+
+import java.io.File;
+import java.io.InputStream;
+
+import javax.imageio.stream.ImageInputStream;
+
+import digilib.util.ImageSize;
+
+public abstract class ImageInput {
+
+	// mime file type
+	protected String mimetype = null;
+	// image size in pixels
+	protected ImageSize pixelSize = null;
+    protected ImageSet parent = null;
+
+	/**
+	 * @return ImageSize
+	 */
+	public ImageSize getSize() {
+		return pixelSize;
+	}
+
+	/**
+	 * Sets the imageSize.
+	 * @param imageSize The imageSize to set
+	 */
+	public void setSize(ImageSize imageSize) {
+		this.pixelSize = imageSize;
+	}
+
+    /** returns if mimetype has been set.
+     * 
+     * @return String
+     */
+    public boolean hasMimetype() {
+        return (mimetype != null);
+    }
+
+    /**
+	 * @return String
+	 */
+	public String getMimetype() {
+		return mimetype;
+	}
+
+	/**
+	 * Sets the mimetype.
+	 * @param mimetype The mimetype to set
+	 */
+	public void setMimetype(String filetype) {
+		this.mimetype = filetype;
+	}
+
+	/** returns if this image has been checked 
+	 * (i.e. has size and mimetype)
+	 * TODO: deprecated
+	 * @return boolean
+	 */
+	public boolean isChecked() {
+		return (pixelSize != null);
+	}
+	
+	/** Returns the aspect ratio of the image (width/height).
+	 * 
+	 * @return
+	 */
+	public float getAspect() {
+		return (pixelSize != null) ? pixelSize.getAspect() : 0f;
+	}
+	
+    /**
+     * @return ImageSet
+     */
+    public ImageSet getParent() {
+        return parent;
+    }
+
+    /**
+     * Sets the parent.
+     * @param parent The parent to set
+     */
+    public void setParent(ImageSet parent) {
+        this.parent = parent;
+    }
+
+    /** Returns if the input can be returned as ImageInputStream.
+	 * 
+	 * @return
+	 */
+	public boolean hasImageInputStream() {
+		return false;
+	}
+	
+	/** Returns the input as ImageInputStream (if available)
+	 * 
+	 * @return
+	 */
+	public ImageInputStream getImageInputStream() {
+		return null;
+	}
+	
+    /** Returns if the input can be returned as InputStream.
+     * 
+     * @return
+     */
+    public boolean hasInputStream() {
+        return false;
+    }
+    
+    /** Returns the input as InputStream (if available)
+     * 
+     * @return
+     */
+    public InputStream getInputStream() {
+        return null;
+    }
+    
+	/** Returns if the input can be returned as File.
+	 * 
+	 * @return
+	 */
+	public boolean hasFile() {
+		return false;
+	}
+	
+	/** Returns the input as File (if available)
+	 * 
+	 * @return
+	 */
+	public File getFile() {
+		return null;
+	}
+
+	
+	
+}
\ No newline at end of file