com.esri.aims.mtier.model.metadata
Class Dataset

java.lang.Object
  extended by com.esri.aims.mtier.model.metadata.Dataset

public class Dataset
extends Object

This class represents a metadata document being served.


Constructor Summary
Dataset()
          Constructs an instance of a Dataset object.
 
Method Summary
 void addCustomAttribute(String name, String value)
          Adds a custom attribute to the Dataset.
 boolean containsCustomAttributeKey(String name)
          Returns true if a key with the name name is included.
 Dataset copy()
          Copies the current Dataset.
static String encodeThumbnail(File file)
          Reads in a file, encodes it, and returns an encoded String.
 String getContent()
          Returns content associated with this Dataset.
 Enumeration getCustomAttributeKeys()
          Returns custom attribute keys as an Enumeration.
 String getCustomAttributeValue(String name)
          Returns a custom attribute value given a key.
 String getDocID()
          Returns the document ID for this Dataset.
 String getDocumentContent()
          Returns the document content set in this bean.
 Envelope getEnvelope()
          Returns the Envelope associated with the Dataset.
 String getGnd()
          Returns the GND file value for the Dataset.
 String getIndexStatus()
          Returns index status.
 String getName()
          Returns the Dataset name string.
 String getOnLink()
          Returns the onlink value of the dataset.
 String getOwner()
          Returns the owner value.
 Dataset getParent()
          Returns parent Dataset if it has been set.
 String getParentDocId()
          Returns the parent DocID for this Dataset.
 long getRefCount()
          Returns the reference count.
 String getServer()
          Returns the server value for the Dataset.
 String getService()
          Returns the Servicename for the Dataset.
 String getServiceType()
          Returns the service type of the Dataset.
 String getThumbnail()
          Returns encoded thumbnail data String.
 String getTimeStamp()
          Returns the timestamp of the Dataset as a String.
 String getUpdated()
          Returns time updated as a String.
 String getUrl()
          Returns the URL value for the Dataset.
 boolean isFolder()
          True if this Dataset is a folder, false otherwise.
 boolean isHasChildren()
          Returns true if the Dataset has children, false otherwise.
 boolean isHasSiblings()
          Returns true if the Dataset has siblings, false otherwise.
 boolean isPrivate()
          Returns true if the Dataset is private, false otherwise.
 void setContent(String newContent)
          Sets the content of this Dataset.
 void setDocID(String docID)
          Sets the document ID for this Dataset.
 void setDocumentContent(String content)
          Sets the document content value for this bean.
 void setEnvelope(Envelope newEnvelope)
          Sets the Envelope of the Dataset.
 void setGnd(String newGnd)
          Sets the GND file value for the Dataset.
 void setHasChildren(boolean newHasChildren)
          Sets whether or not Dataset has children.
 void setHasSiblings(boolean newHasSiblings)
          Sets whether or not Dataset has siblings.
 void setIndexStatus(String newIndexStatus)
          Sets index status with given string.
 void setIsFolder(boolean newIsFolder)
          True to set this Dataset as a folder, false otherwise.
 void setIsPrivate(boolean newIsPrivate)
          Sets the Dataset as private or not.
 void setName(String newName)
          Sets the name of the Dataset.
 void setOnLink(String newOnLink)
          Sets the onlink value for the Dataset.
 void setOwner(String newOwner)
          Sets the owner value.
 void setParent(Dataset parent)
          Sets a Dataset as this one's parent.
 void setParentDocId(String value)
          Sets the parent DocID for this Dataset.
 void setRefCount(long newRefCount)
          Sets the Reference count.
 void setServer(String newServer)
          Sets the server value for the Dataset.
 void setService(String newService)
          Sets the Servicename for the Dataset.
 void setServiceType(String newServiceType)
          Sets the service type as a String (Image, Feature, etc.).
 void setThumbnail(File thumbnailFile)
          Sets the thumbnail from a File.
 void setThumbnail(String thumbnailData)
          Sets the thumbnail as a data String.
 void setThumbnail(String thumbnailData, boolean encode)
          Sets the thumbnail as a data String.
 void setTimeStamp(String newTimeStamp)
          Sets the given string as timestamp for the Dataset.
 void setUpdated(String newUpdated)
          Sets time updated as a String.
 void setUrl(String newUrl)
          Sets the URL value for the Dataset as a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dataset

public Dataset()
Constructs an instance of a Dataset object.

Method Detail

getDocID

public String getDocID()
Returns the document ID for this Dataset.

Returns:
String The document ID for the Dataset.

setDocID

public void setDocID(String docID)
Sets the document ID for this Dataset.

Parameters:
docID - the document ID string for the Dataset.

getName

public String getName()
Returns the Dataset name string.

Returns:
String the name of the Dataset.

setName

public void setName(String newName)
Sets the name of the Dataset.

Parameters:
newName - is the newName for the Dataset.

setOwner

public void setOwner(String newOwner)
Sets the owner value.


getOwner

public String getOwner()
Returns the owner value.


setHasChildren

public void setHasChildren(boolean newHasChildren)
Sets whether or not Dataset has children.


isHasChildren

public boolean isHasChildren()
Returns true if the Dataset has children, false otherwise.


setHasSiblings

public void setHasSiblings(boolean newHasSiblings)
Sets whether or not Dataset has siblings.


isHasSiblings

public boolean isHasSiblings()
Returns true if the Dataset has siblings, false otherwise.


setUrl

public void setUrl(String newUrl)
Sets the URL value for the Dataset as a String.


getUrl

public String getUrl()
Returns the URL value for the Dataset.


setOnLink

public void setOnLink(String newOnLink)
Sets the onlink value for the Dataset.


getOnLink

public String getOnLink()
Returns the onlink value of the dataset.


setIsPrivate

public void setIsPrivate(boolean newIsPrivate)
Sets the Dataset as private or not. Set the value as 'True' for private, false otherwise.


isPrivate

public boolean isPrivate()
Returns true if the Dataset is private, false otherwise.


setTimeStamp

public void setTimeStamp(String newTimeStamp)
Sets the given string as timestamp for the Dataset.


getTimeStamp

public String getTimeStamp()
Returns the timestamp of the Dataset as a String.


setEnvelope

public void setEnvelope(Envelope newEnvelope)
Sets the Envelope of the Dataset.


getEnvelope

public Envelope getEnvelope()
Returns the Envelope associated with the Dataset.


setServer

public void setServer(String newServer)
Sets the server value for the Dataset.


getServer

public String getServer()
Returns the server value for the Dataset.


setServiceType

public void setServiceType(String newServiceType)
Sets the service type as a String (Image, Feature, etc.).


getServiceType

public String getServiceType()
Returns the service type of the Dataset.


setGnd

public void setGnd(String newGnd)
Sets the GND file value for the Dataset.


getGnd

public String getGnd()
Returns the GND file value for the Dataset.


setThumbnail

public void setThumbnail(String thumbnailData)
Sets the thumbnail as a data String. This method assumes that the image has already been read in and properly encoded. The use of setThumbNail(File) is recommeded here as an alternative.

Parameters:
thumbnailData - The data for a thumbnail image.
See Also:
setThumbnail(File), encodeThumbnail(File)

setThumbnail

public void setThumbnail(String thumbnailData,
                         boolean encode)
Sets the thumbnail as a data String. This method assumes that the image has already been read in and properly encoded. The use of setThumbNail(File) is recommeded here as an alternative.

Parameters:
thumbnailData - The data for a thumbnail image.
encode - True to encode thumbnail data
See Also:
setThumbnail(File), encodeThumbnail(File)

setThumbnail

public void setThumbnail(File thumbnailFile)
                  throws IOException
Sets the thumbnail from a File. This data is read in and encoded for the user.

Parameters:
thumbnailFile - The File of the thumbnail image.
Throws:
IOException
See Also:
setThumbnail(String)

getThumbnail

public String getThumbnail()
Returns encoded thumbnail data String.

Returns:
String The thumbnail data String.

setDocumentContent

public void setDocumentContent(String content)
Sets the document content value for this bean.


getDocumentContent

public String getDocumentContent()
Returns the document content set in this bean.


setService

public void setService(String newService)
Sets the Servicename for the Dataset.


getService

public String getService()
Returns the Servicename for the Dataset.


setParent

public void setParent(Dataset parent)
Sets a Dataset as this one's parent.


getParent

public Dataset getParent()
Returns parent Dataset if it has been set.


setIsFolder

public void setIsFolder(boolean newIsFolder)
True to set this Dataset as a folder, false otherwise.


isFolder

public boolean isFolder()
True if this Dataset is a folder, false otherwise.


setContent

public void setContent(String newContent)
Sets the content of this Dataset.


getContent

public String getContent()
Returns content associated with this Dataset.


getParentDocId

public String getParentDocId()
Returns the parent DocID for this Dataset.


setParentDocId

public void setParentDocId(String value)
Sets the parent DocID for this Dataset.


setRefCount

public void setRefCount(long newRefCount)
Sets the Reference count.


getRefCount

public long getRefCount()
Returns the reference count.


setIndexStatus

public void setIndexStatus(String newIndexStatus)
Sets index status with given string.


getIndexStatus

public String getIndexStatus()
Returns index status.


setUpdated

public void setUpdated(String newUpdated)
Sets time updated as a String.


getUpdated

public String getUpdated()
Returns time updated as a String.


addCustomAttribute

public void addCustomAttribute(String name,
                               String value)
Adds a custom attribute to the Dataset.


getCustomAttributeKeys

public Enumeration getCustomAttributeKeys()
Returns custom attribute keys as an Enumeration.


getCustomAttributeValue

public String getCustomAttributeValue(String name)
Returns a custom attribute value given a key.


containsCustomAttributeKey

public boolean containsCustomAttributeKey(String name)
Returns true if a key with the name name is included.


encodeThumbnail

public static String encodeThumbnail(File file)
                              throws IOException
Reads in a file, encodes it, and returns an encoded String. The intended purpose of this method is to encode images, however any file can be encoded.

Parameters:
file - is the file to be read in and encoded.
Returns:
String The contents of the file, encoded.
Throws:
IOException

copy

public Dataset copy()
Copies the current Dataset.

Returns:
Dataset A copy of the current Dataset.