|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.db.AbstractDBEntry
com.antelmann.db.PropertyEntryImpl
com.antelmann.db.BaseDocument
public class BaseDocument
a base implementation for a DocumentEntry
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.antelmann.db.Taggable |
|---|
Taggable.Adapter<T extends Tag> |
| Nested classes/interfaces inherited from interface com.antelmann.util.Localizable |
|---|
Localizable.Adapter |
| Field Summary | |
|---|---|
protected BinaryData |
binaryData
|
protected ImageHolder |
imageHolder
|
| Fields inherited from class com.antelmann.db.PropertyEntryImpl |
|---|
propertyChangeSupport, props, um, vcs |
| Fields inherited from interface com.antelmann.db.DBEntry |
|---|
ENTRY_FLAVOR, ENTRY_LIST_FLAVOR |
| Constructor Summary | |
|---|---|
BaseDocument(Object id)
|
|
| Method Summary | |
|---|---|
boolean |
add(Keyword word)
makes this instance member of the given group |
boolean |
addKeyword(String keyword)
|
Date |
getBeginTime()
|
InputStream |
getContent()
accesses the raw content of this document |
ValueRetriever<? extends InputStream> |
getContentRetriever()
|
String |
getDescription()
provides a detailed description of this document |
Image |
getDisplayIcon()
returns an image that is suitable for use as an icon for this instance. |
Image |
getDisplayImage()
returns an image that represents a visual representation of this instance. |
Date |
getEndTime()
|
ValueRetriever<? extends Image> |
getImageRetriever()
responsible for getting/generating the image used as a display image. |
String[] |
getKeywords()
|
Locale |
getLocale()
allows access to the Locale that this instance currently uses to localize its messages, |
String |
getNotes()
returns internal notes of this document |
URL |
getOriginalLocation()
returns the originating URL - if applicable |
Collection<Keyword> |
getTags()
lists all groups that this instance is currently a member of (the data is essentially derived from a set) |
String |
getTitle()
returns the title of this document |
boolean |
hasKeyword(String keyword)
|
boolean |
isTagged(Keyword word)
allows to determine the membership of the given tag or group |
boolean |
remove(Keyword word)
terminates the membership of this instance to the given group |
boolean |
removeKeyword(String keyword)
|
void |
setBeginTime(Date beginTime)
|
void |
setContent(InputStream stream)
|
void |
setContent(URL url)
|
void |
setContentRetriever(ValueRetriever<InputStream> contentRetriever)
|
void |
setDescription(String description)
|
void |
setDisplayImage(Image image)
|
void |
setDisplayImage(URL url)
|
void |
setEndTime(Date endTime)
|
void |
setImageRetriever(ValueRetriever<Image> imageRetriever)
|
void |
setLocale(Locale locale,
Object context)
sets the Locale for this object so that all subsequent return values of method calls to this instance can be localized accordingly until a different Locale is set. |
void |
setNotes(String notes)
|
void |
setOriginalLocation(URL url)
|
void |
setTitle(String title)
|
void |
storeContentTo(File file)
|
String |
toDetailedString()
provides full details of this instance in a String. |
String |
toString()
|
| Methods inherited from class com.antelmann.db.AbstractDBEntry |
|---|
equals, getID, hashCode, hashEntry, sameEntry |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.antelmann.db.PropertyEntry |
|---|
getProperties, getProperty, removeProperty, setProperty |
| Methods inherited from interface com.antelmann.db.DBEntry |
|---|
getID |
| Field Detail |
|---|
protected final ImageHolder imageHolder
protected final BinaryData binaryData
| Constructor Detail |
|---|
public BaseDocument(Object id)
| Method Detail |
|---|
public Locale getLocale()
Localizable
getLocale in interface LocalizableLocalizable.setLocale(Locale, Object)
public void setLocale(Locale locale,
Object context)
Localizable
setLocale in interface Localizablelocale - the Locale that is to be used to determine return values for all methods
of this instance; if set to null, the default locale is to be used.context - a context that may be required for this instance to load the resources for the given locale;
this context may be null for objects that do not require an external context.
Examples of a context may be a database, a resource file, some map or no context at all.Localizable.getLocale()public String getTitle()
DocumentEntry
getTitle in interface DocumentEntrypublic void setTitle(String title)
public String getDescription()
DocumentEntry
getDescription in interface DocumentEntrypublic void setDescription(String description)
public String toString()
toString in class AbstractDBEntrypublic String toDetailedString()
DetailedString
toDetailedString in interface DetailedStringtoDetailedString in class PropertyEntryImplpublic String getNotes()
DocumentEntry
getNotes in interface DocumentEntrypublic void setNotes(String notes)
public boolean addKeyword(String keyword)
public boolean add(Keyword word)
Taggable
add in interface Taggable<Keyword>word - the Group object that this instance is to become a member of
public Collection<Keyword> getTags()
Taggable
getTags in interface Taggable<Keyword>public String[] getKeywords()
public boolean hasKeyword(String keyword)
public boolean isTagged(Keyword word)
Taggable
isTagged in interface Taggable<Keyword>public boolean removeKeyword(String keyword)
public boolean remove(Keyword word)
Taggable
remove in interface Taggable<Keyword>word - the Group that this instance is to be removed from as a member
public Date getBeginTime()
getBeginTime in interface LifeCycleObjectpublic void setBeginTime(Date beginTime)
public Date getEndTime()
getEndTime in interface LifeCycleObjectpublic void setEndTime(Date endTime)
public void setContentRetriever(ValueRetriever<InputStream> contentRetriever)
public ValueRetriever<? extends InputStream> getContentRetriever()
public void setContent(InputStream stream)
throws OutOfMemoryError,
IOException
OutOfMemoryError
IOExceptionpublic void setContent(URL url)
public InputStream getContent()
throws IOException
DocumentEntry
getContent in interface DocumentEntryIOException
public void storeContentTo(File file)
throws IOException
IOExceptionpublic URL getOriginalLocation()
DocumentEntry
getOriginalLocation in interface DocumentEntrypublic void setOriginalLocation(URL url)
public void setImageRetriever(ValueRetriever<Image> imageRetriever)
public ValueRetriever<? extends Image> getImageRetriever()
getDisplayImage(),
setImageRetriever(ValueRetriever)public void setDisplayImage(URL url)
public void setDisplayImage(Image image)
public Image getDisplayImage()
throws IOException
Imageable
getDisplayImage in interface ImageableIOException
public Image getDisplayIcon()
throws IOException
Imageable
getDisplayIcon in interface ImageableIOException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||