You are viewing a plain text version of this content. The canonical link for it is here.
Posted to photark-commits@incubator.apache.org by lr...@apache.org on 2010/06/08 04:30:45 UTC
svn commit: r952534 - in /incubator/photark/branches/photark-rest:
photark-filesystem/src/test/java/org/apache/photark/services/filesystem/
photark/src/main/java/org/apache/photark/
Author: lresende
Date: Tue Jun 8 04:30:44 2010
New Revision: 952534
URL: http://svn.apache.org/viewvc?rev=952534&view=rev
Log:
Java doc additions and minor clean up
Modified:
incubator/photark/branches/photark-rest/photark-filesystem/src/test/java/org/apache/photark/services/filesystem/FileSystemGalleryTestCase.java
incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/AlbumRef.java
incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/Image.java
incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/ImageMetadata.java
incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/ImageRef.java
Modified: incubator/photark/branches/photark-rest/photark-filesystem/src/test/java/org/apache/photark/services/filesystem/FileSystemGalleryTestCase.java
URL: http://svn.apache.org/viewvc/incubator/photark/branches/photark-rest/photark-filesystem/src/test/java/org/apache/photark/services/filesystem/FileSystemGalleryTestCase.java?rev=952534&r1=952533&r2=952534&view=diff
==============================================================================
--- incubator/photark/branches/photark-rest/photark-filesystem/src/test/java/org/apache/photark/services/filesystem/FileSystemGalleryTestCase.java (original)
+++ incubator/photark/branches/photark-rest/photark-filesystem/src/test/java/org/apache/photark/services/filesystem/FileSystemGalleryTestCase.java Tue Jun 8 04:30:44 2010
@@ -21,6 +21,8 @@ package org.apache.photark.services.file
import java.io.IOException;
+import junit.framework.Assert;
+
import org.apache.tuscany.sca.node.Contribution;
import org.apache.tuscany.sca.node.ContributionLocationHelper;
import org.apache.tuscany.sca.node.Node;
@@ -63,10 +65,12 @@ public class FileSystemGalleryTestCase {
WebRequest request = new GetMethodWebRequest(GALLERY_SERVICE_URL);
WebResponse response = wc.getResource(request);
- JSONObject json = new JSONObject(response.getText());
+ JSONObject jsonResponde = new JSONObject(response.getText());
+
+ Assert.assertNotNull(jsonResponde);
//for debug purposes
- System.out.println(">>>" + json.toString());
+ System.out.println(">>>" + jsonResponde.toString());
}
Modified: incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/AlbumRef.java
URL: http://svn.apache.org/viewvc/incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/AlbumRef.java?rev=952534&r1=952533&r2=952534&view=diff
==============================================================================
--- incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/AlbumRef.java (original)
+++ incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/AlbumRef.java Tue Jun 8 04:30:44 2010
@@ -37,7 +37,7 @@ public class AlbumRef {
public AlbumRef() {
}
-
+
/**
* Get Album name
* @return the album name
@@ -53,7 +53,7 @@ public class AlbumRef {
public void setName(String name) {
this.albumName = name;
}
-
+
/**
* Get cover image reference
* @return the cover image url reference
@@ -61,7 +61,7 @@ public class AlbumRef {
public String getCoverImageRef() {
return coverImageRef;
}
-
+
/**
* Set cover image reference
* @param coverImageRef the cover image url reference
@@ -77,7 +77,7 @@ public class AlbumRef {
public String getRef() {
return albumRef;
}
-
+
/**
* Set album ref
* @param albumRef album ref
@@ -85,7 +85,7 @@ public class AlbumRef {
public void setRef(String albumRef) {
this.albumRef = albumRef;
}
-
+
/**
* Utility method to create a AlbumRef from a Album
* @param album
@@ -93,13 +93,13 @@ public class AlbumRef {
*/
public static AlbumRef createAlbumRef(Album album) {
AlbumRef albumRef = new AlbumRef();
-
+
albumRef.setName(album.getName());
if(! album.getImages().isEmpty()) {
albumRef.setCoverImageRef(album.getImages().get(0).getLocation());
}
albumRef.setRef(album.getLocation());
-
+
return albumRef;
}
}
Modified: incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/Image.java
URL: http://svn.apache.org/viewvc/incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/Image.java?rev=952534&r1=952533&r2=952534&view=diff
==============================================================================
--- incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/Image.java (original)
+++ incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/Image.java Tue Jun 8 04:30:44 2010
@@ -32,10 +32,10 @@ public class Image {
private String name;
private String title;
private Date datePosted;
-
+
private String url;
private String urlThumb;
-
+
private List<ImageMetadata> imageAttributes = new ArrayList<ImageMetadata>();
/**
@@ -46,7 +46,7 @@ public class Image {
public Image() {
}
-
+
/**
* Constructor
* @param name Image name
@@ -66,7 +66,7 @@ public class Image {
public String getName() {
return name;
}
-
+
/**
* Set image file name
* @param name image file name
@@ -82,7 +82,7 @@ public class Image {
public String getTitle() {
return title;
}
-
+
/**
* Set image title
* @param title image title
@@ -90,7 +90,7 @@ public class Image {
public void setTitle(String title) {
this.title = title;
}
-
+
/**
* Get date when image was posted
* @return date posted
@@ -98,7 +98,7 @@ public class Image {
public Date getDatePosted() {
return datePosted;
}
-
+
/**
* Get Image URL
* @return the image URL
@@ -130,7 +130,7 @@ public class Image {
public void setThumbnailLocation(String thumbnailLocation) {
this.urlThumb = thumbnailLocation;
}
-
+
/**
* Return image metadata retrieved from EXIF properties
* @return list of image metadata attributes
Modified: incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/ImageMetadata.java
URL: http://svn.apache.org/viewvc/incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/ImageMetadata.java?rev=952534&r1=952533&r2=952534&view=diff
==============================================================================
--- incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/ImageMetadata.java (original)
+++ incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/ImageMetadata.java Tue Jun 8 04:30:44 2010
@@ -30,14 +30,14 @@ import org.apache.sanselan.formats.tiff.
public class ImageMetadata implements ExifTagConstants {
private String key;
private String value;
-
+
/**
* Default constructor
*/
public ImageMetadata() {
-
+
}
-
+
/**
* Constructor that initializes name/value pair for metadata
* @param key
@@ -47,7 +47,7 @@ public class ImageMetadata implements Ex
this.key = key;
this.value = value;
}
-
+
/**
* Return EXIF Metadata attribute name
* @return
@@ -55,7 +55,7 @@ public class ImageMetadata implements Ex
public String getKey() {
return key;
}
-
+
/**
* Set EXIF Metadata attribute name
* @param key
@@ -63,7 +63,7 @@ public class ImageMetadata implements Ex
public void setKey(String key) {
this.key = key;
}
-
+
/**
* Get EXIF Metadata attribute value
* @return
@@ -71,7 +71,7 @@ public class ImageMetadata implements Ex
public String getValue() {
return value;
}
-
+
/**
* Set EXIF Metadata attribute value
* @param value
Modified: incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/ImageRef.java
URL: http://svn.apache.org/viewvc/incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/ImageRef.java?rev=952534&r1=952533&r2=952534&view=diff
==============================================================================
--- incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/ImageRef.java (original)
+++ incubator/photark/branches/photark-rest/photark/src/main/java/org/apache/photark/ImageRef.java Tue Jun 8 04:30:44 2010
@@ -20,57 +20,95 @@
package org.apache.photark;
/**
- *
+ * Summary info for Images
* @version $Rev$ $Date$
*/
public class ImageRef {
private String name;
private String title;
-
+
private String url;
private String urlThumb;
private String imageRef;
+ /**
+ * Get image name
+ * @return image name
+ */
public String getName() {
return name;
}
+ /**
+ * Set image name
+ * @param name image name
+ */
public void setName(String name) {
this.name = name;
}
+ /**
+ * Get image title
+ * @return image title
+ */
public String getTitle() {
return title;
}
+ /**
+ * Set image title
+ * @param title image title
+ */
public void setTitle(String title) {
this.title = title;
}
+ /**
+ * Get image location
+ * @return image location
+ */
public String getLocation() {
return url;
}
+ /**
+ * Set image location
+ * @param location image location
+ */
public void setLocation(String location) {
this.url = location;
}
+ /**
+ * Get thumbnail image location
+ * @return thumbnail image location
+ */
public String getThumbnailLocation() {
return urlThumb;
}
+ /**
+ * Set thumbnail image location
+ * @param thumbnailLocation thumbnail image location
+ */
public void setThumbnailLocation(String thumbnailLocation) {
this.urlThumb = thumbnailLocation;
}
+ /**
+ * Get image reference
+ * @return image reference
+ */
public String getImageRef() {
return imageRef;
}
+ /**
+ * Set image reference
+ * @param imageRef image reference
+ */
public void setImageRef(String imageRef) {
this.imageRef = imageRef;
}
-
-
}