info.aduna.autofocus.model
Class Item

java.lang.Object
  extended by info.aduna.clustermap.DefaultObject
      extended by info.aduna.autofocus.model.Item

public class Item
extends DefaultObject

Items are the primary objects displayed in AutoFocus. Items correspond with single query results and contain properties such as title, type, location, etc. Furthermore, an Item is capable of registering scores for queries. ItemPanel extends DefaultObject so that the ClusterMap knows how to export it to a clickable image map (currently it is not possible to configure the properties that should be exported, it only knows how to deal with DefaultObjects). The ID is mapped to the location property and the title is mapped to the name property.


Field Summary
 CollationKey collationKey
           
static String DEFAULT_TYPE_DESCRIPTION
           
static Comparator<Item> ITEM_DATE_COMPARATOR
           
 
Constructor Summary
Item(String id)
           
 
Method Summary
 boolean equals(Object o)
           
 Contact[] getContacts()
           
 Contact[] getCreators()
           
 String getFolderID()
           
 String getFolderName()
           
 String getID()
           
 String getInitialText()
           
 String getLanguage()
           
 long getLastModified()
          Returns the last modified date of this Item using the usual long-based encoding (see e.g.
 String getMimeType()
           
 Contact[] getReceivers()
           
 RepositoryWrapper getRepositoryWrapper()
          Returns the RepositoryInfo holding information about the Repository from which this Item originates.
 Contact[] getSenders()
           
 ArrayList<String> getSignificantTerms()
          Returns the significant terms of this Item as an alphabetically sorted list of Strings.
 long getSize()
          Returns the size of this object in bytes.
 String getTitle()
           
 String getTypeDescription()
           
 int hashCode()
          Returns the hashCode of the ID String.
 void setContacts(Contact[] contacts)
           
 void setCreators(Contact[] creators)
           
 void setFolderID(String folderID)
           
 void setFolderName(String folderName)
           
 void setInitialText(String initialText)
           
 void setLanguage(String language)
           
 void setLastModified(long lastModified)
           
 void setMimeType(String mimeType)
           
 void setReceivers(Contact[] receivers)
           
 void setRepositoryInfo(RepositoryWrapper repositoryInfo)
           
 void setSenders(Contact[] senders)
           
 void setSignificantTerms(ArrayList<String> terms)
           
 void setSize(long size)
           
 void setTitle(String title)
           
 void setTypeDescription(String typeDescription)
           
 
Methods inherited from class info.aduna.clustermap.DefaultObject
getLocation, getName, setLocation, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TYPE_DESCRIPTION

public static final String DEFAULT_TYPE_DESCRIPTION
See Also:
Constant Field Values

ITEM_DATE_COMPARATOR

public static final Comparator<Item> ITEM_DATE_COMPARATOR

collationKey

public CollationKey collationKey
Constructor Detail

Item

public Item(String id)
Method Detail

getTitle

public String getTitle()

getID

public String getID()

getFolderID

public String getFolderID()

getFolderName

public String getFolderName()

getSize

public long getSize()
Returns the size of this object in bytes.


getLastModified

public long getLastModified()
Returns the last modified date of this Item using the usual long-based encoding (see e.g. System.currentTimeMillis()).


getMimeType

public String getMimeType()

getTypeDescription

public String getTypeDescription()

getInitialText

public String getInitialText()

getSignificantTerms

public ArrayList<String> getSignificantTerms()
Returns the significant terms of this Item as an alphabetically sorted list of Strings.


getLanguage

public String getLanguage()

getCreators

public Contact[] getCreators()

getSenders

public Contact[] getSenders()

getReceivers

public Contact[] getReceivers()

getContacts

public Contact[] getContacts()

getRepositoryWrapper

public RepositoryWrapper getRepositoryWrapper()
Returns the RepositoryInfo holding information about the Repository from which this Item originates.


hashCode

public int hashCode()
Returns the hashCode of the ID String. This makes hash code calculation very cheap because this hash code is cached and already used in a lot of places (e.g. AFModelController, QueryResult).

Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

setTitle

public void setTitle(String title)

setFolderID

public void setFolderID(String folderID)

setFolderName

public void setFolderName(String folderName)

setSize

public void setSize(long size)

setLastModified

public void setLastModified(long lastModified)

setMimeType

public void setMimeType(String mimeType)

setInitialText

public void setInitialText(String initialText)

setSignificantTerms

public void setSignificantTerms(ArrayList<String> terms)

setLanguage

public void setLanguage(String language)

setCreators

public void setCreators(Contact[] creators)

setSenders

public void setSenders(Contact[] senders)

setReceivers

public void setReceivers(Contact[] receivers)

setContacts

public void setContacts(Contact[] contacts)

setRepositoryInfo

public void setRepositoryInfo(RepositoryWrapper repositoryInfo)

setTypeDescription

public void setTypeDescription(String typeDescription)


Copyright © 1997-2008 Aduna. All Rights Reserved.