com.toalango.qzarch
Class Resource

java.lang.Object
  |
  +--com.toalango.qzarch.Resource

public class Resource
extends java.lang.Object

This class wraps the files in the search result.

Author:
Rune Toalango Johannesen

Constructor Summary
Resource()
           
 
Method Summary
 java.lang.String getLargeIcon()
           
 java.lang.String getLastModified()
          The last modified timestamp of the file formatted as yyyy-MM-dd.
 java.lang.String getName()
          Getter method for the file name.
 java.lang.String getPath()
          The path to the resource in the web app it is deployed in.
 java.lang.String getSize()
          Nicely formatted size property, returning the size in megabyte or kilobyte.
 java.lang.String getSmallIcon()
           
 java.lang.String getTitle()
           
 java.lang.String getType()
          Getter method for the file type (extension).
 void setFile(java.io.File pFile)
           
 void setLargeIcon(java.lang.String pLargeIcon)
           
 void setPath(java.lang.String pPath)
          Setter method for the resource path
 void setSmallIcon(java.lang.String pSmallIcon)
           
 void setTitle(java.lang.String title)
           
 void setType(java.lang.String pType)
          Setter method for the file type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Resource

public Resource()
Method Detail

getName

public java.lang.String getName()
Getter method for the file name.

Returns:
the file name

getType

public java.lang.String getType()
Getter method for the file type (extension).

Returns:
the file name extension

setType

public void setType(java.lang.String pType)
Setter method for the file type.

Parameters:
pType - the property value

getLastModified

public java.lang.String getLastModified()
The last modified timestamp of the file formatted as yyyy-MM-dd.

Returns:
last modified timestamp
See Also:
SimpleDateFormat

getSize

public java.lang.String getSize()
Nicely formatted size property, returning the size in megabyte or kilobyte.

Returns:
the user-friendly way of showing the file size

getPath

public java.lang.String getPath()
The path to the resource in the web app it is deployed in.

This property can be used to reference the resource from a web page.

Returns:
the path to the resource from a web page

setPath

public void setPath(java.lang.String pPath)
Setter method for the resource path

Parameters:
pPath - The value to set the property to

getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String title)

setFile

public void setFile(java.io.File pFile)

getSmallIcon

public java.lang.String getSmallIcon()

setSmallIcon

public void setSmallIcon(java.lang.String pSmallIcon)

getLargeIcon

public java.lang.String getLargeIcon()

setLargeIcon

public void setLargeIcon(java.lang.String pLargeIcon)