E
- type of resource (Media or Album)public class Resource<E extends com.google.gdata.data.photos.GphotoEntry<E>>
extends java.util.Observable
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected E |
entry
|
protected ResourceStatus
|
status
|
Constructor and Description |
---|
Resource()
Construct a new Resource
|
Resource(java.lang.String path)
Construct a new resource with its path to file
|
Modifier and Type | Method and Description |
---|---|
boolean |
delete(boolean confirm)
Delete the resource (locally and/or online)
|
void |
downloadTags(Album a)
Download the tags associated to the resource in picasaweb
|
java.lang.String |
getDescription()
Get the description of the resource
|
E |
getEntry()
Get the entry corresponding to this resource Useful for Picasa sync and
required data
|
com.google.gdata.data.geo.Point |
getGeoLocation()
Get the geolocation point of the photo
|
java.lang.String |
getId()
Get the unique id of the resource Useful for Picasa
|
java.net.URI |
getResourcePath()
Get the path to the resource
|
SerializableEntry
|
getSerialEntry()
Get the entry of the resource
|
ResourceStatus |
getStatus()
Get the status of the resource (local, online or sync)
|
java.util.ArrayList<com.google.gdata.data.photos.TagEntry> |
getTags()
Get the tags describing the resource
|
java.net.URI |
getThumbnailPath()
Get the path to the thumbnail of the resource
|
java.lang.String |
getTitle()
Get the title of the resource
|
void |
resetTags()
Reset the tags of the resource
|
void |
save()
Set the last updated time to now If the resource is online or
synchronized, update online infos
|
void |
save(boolean updateMedia)
|
void |
setDescription(java.lang.String description)
Set the description of the resource
|
void |
setEntry(E entry)
Set the entry corresponding to this resource Useful for Picasa sync and
required data
|
void |
setGeoLocation(java.lang.Double lat,
java.lang.Double lon)
Set the location of the photo
|
void |
setId(java.lang.String id)
Set the unique id of the resource
|
void |
setResourcePath(java.lang.String path)
Set the path to the resource
|
void |
setSerialEntry(SerializableEntry serialEntry)
Set the entry of the resource
|
void |
setStatus(ResourceStatus status)
Set the status of the resource (local, online or sync)
|
void |
setTags(java.lang.String tagsString)
Set the tags describing the resource
|
void |
setThumbnailPath(java.lang.String thumbnailPath)
Set the path to the thumbnail
|
void |
setTitle(java.lang.String t)
Set the title of the resource
|
void |
setTitle(java.lang.String t,
boolean refresh)
Set the title of the resource
|
protected ResourceStatus status
public Resource() throws java.net.URISyntaxException
java.net.URISyntaxException
public Resource(java.lang.String path) throws java.net.URISyntaxException
path
-java.net.URISyntaxException
public java.util.ArrayList<com.google.gdata.data.photos.TagEntry> getTags()
public void setTags(java.lang.String tagsString)
tagsString
- tags (space separated values)public void resetTags()
public void downloadTags(Album a) throws java.io.IOException, com.google.gdata.util.ServiceException
a
- album to downloadjava.io.IOException
com.google.gdata.util.ServiceException
public java.lang.String getTitle()
public void setTitle(java.lang.String t)
t
- titlepublic SerializableEntry getSerialEntry()
public void setSerialEntry(SerializableEntry serialEntry)
serialEntry
- entry to setpublic void setTitle(java.lang.String t, boolean refresh)
t
- titlepublic java.net.URI getResourcePath()
public void setResourcePath(java.lang.String path) throws java.net.URISyntaxException
path
- path to the resourcejava.net.URISyntaxException
public java.net.URI getThumbnailPath()
public void setThumbnailPath(java.lang.String thumbnailPath) throws java.net.URISyntaxException
thumbnailPath
- path to thumbnailjava.net.URISyntaxException
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- description to setpublic ResourceStatus getStatus()
public void setStatus(ResourceStatus status)
status
- the status to setpublic java.lang.String getId()
public void setId(java.lang.String id)
id
-public E getEntry()
public void setEntry(E entry)
entry
-public com.google.gdata.data.geo.Point getGeoLocation()
public void setGeoLocation(java.lang.Double lat, java.lang.Double lon)
lat
- latitudelon
- longitudepublic boolean delete(boolean confirm)
java.io.IOException
com.google.gdata.util.ServiceException
public void save()
public void save(boolean updateMedia)