info.aduna.gee.publication.content
Class Entry

java.lang.Object
  extended by info.aduna.gee.publication.content.Entry
All Implemented Interfaces:
EntryConstants, LocalNames, FileNames
Direct Known Subclasses:
SummaryEntry

public class Entry
extends Object
implements LocalNames, EntryConstants, FileNames

Entry represents an individual piece of content in a ZPad.


Field Summary
protected static String _HAD_OCCURRING_CLABELS_VALUE
           
protected static WProperties _sharedEmptyProperties
           
 WProperties entryAttribs
          The HTML attributes of this Entry (i.e.
 WProperties entryParams
          The HTML parameters of this Entry (i.e.
 WProperties entryProps
          The ZPad-specific properties of this Entry (e.g.
 OpaqueCLabel[] occurringOCLabels
           
 
Fields inherited from interface info.aduna.gee.publication.LocalNames
AM, APRIL, AUGUST, BUTTON_ADD, BUTTON_ASSOCIATES_MAY_NOT_EDIT, BUTTON_BACKUP, BUTTON_BOTTOM, BUTTON_CLEAR, BUTTON_CLEAR_CART, BUTTON_DELETE, BUTTON_DESCRIPTION, BUTTON_DOWN, BUTTON_EDIT, BUTTON_EDIT_CLABELS, BUTTON_EDIT_SUBSCRIPTION, BUTTON_EDIT_SUBSCRIPTIONS, BUTTON_ENTRY_FROM_CLIPBOARD, BUTTON_ENTRY_TO_CLIPBOARD, BUTTON_EXIT_EDIT_MODE, BUTTON_FAST_BACKWARD, BUTTON_FAST_FORWARD, BUTTON_FIND_FUTURE, BUTTON_FIND_PAST, BUTTON_INTERNALIZE_ENTRY, BUTTON_LINK, BUTTON_LINK_IN_FRAME, BUTTON_LOCK_ZPAD, BUTTON_MORE_TEXT, BUTTON_NEXTCONTENT, BUTTON_PERSONALIZE, BUTTON_PL0, BUTTON_PL1, BUTTON_PL2, BUTTON_PL3, BUTTON_PL4, BUTTON_PREVIOUSCONTENT, BUTTON_PROVIDE_ENTRY, BUTTON_RE_EXPORT, BUTTON_RE_MANUAL, BUTTON_REPEAT, BUTTON_REPEAT_TODAY, BUTTON_RESTORE, BUTTON_SEND_ORDER, BUTTON_SUGGESTED_DESTINATION, BUTTON_SUMMARY, BUTTON_SYNCHRONIZE, BUTTON_TIME, BUTTON_TODAY, BUTTON_TOMORROW, BUTTON_TOOLS, BUTTON_TOP, BUTTON_UNDO, BUTTON_UP, BUTTON_UPLOAD_IMAGE, BUTTON_YESTERDAY, CONFIRM_BACKUP_ERROR, CONFIRM_CHANGE_ALL_REPEATING, CONFIRM_CLABEL_DEFINITION_FORMAT, CONFIRM_COULD_NOT_SAVE, CONFIRM_DELETE_ALL_REPEATING, CONFIRM_DELETE_EXPIRED, CONFIRM_ERROR, CONFIRM_FILE_CHANGED, CONFIRM_FILE_CHANGED_TITLE, CONFIRM_FILE_REALLY_CHANGED, CONFIRM_FIND_CONTENT, CONFIRM_FIRST_SECTION, CONFIRM_HAS_THEMES_FRAME, CONFIRM_MIXED_TODAY, CONFIRM_NO_MORE_CONTENT, CONFIRM_NOT_A_ZPAD, CONFIRM_NOT_REMOVE_SECTION, CONFIRM_QUESTION, CONFIRM_READONLY_BROWSER, CONFIRM_SURE, CONFIRM_THIS_ZPAD, CONFIRM_TODAY_IS_AT_STARTUP, CONFIRM_TODAY_IS_AT_TRANSFER, CONFIRM_UNDO, DECEMBER, ENTRY_TYPE_APPLET, ENTRY_TYPE_HTML, ENTRY_TYPE_IMAGE, ENTRY_TYPE_OBJECT, ENTRY_TYPE_TEXT, ENTRY_TYPE_TMPLD, ERROR_CONFIG_LOAD, ERROR_DATABASE_LOAD, ERROR_IMAGE_LOAD, ERROR_RESOLVE_LOCATION, ERROR_ZPAD_LOAD, EXC_INVALID_PORT_NUMBER, EXC_NO_GZIP_SUPPORT, EXC_NO_HOSTNAME_SPECIFIED, EXC_UNKNOWN_COMPR, EXC_UNKNOWN_ENCODING, EXC_VELOCITY_NOT_SHOWN, FEBRUARY, FRIDAY, FROM, GETTING_BUTTONS, GETTING_CONTENT, HTML_EDIT_ENTRY, HTML_ENTRY_EXPIRED, HTML_ENTRY_NOT_YET_INSPIRED, HTML_ENTRY_WILL_EXPIRE, HTML_MOVE_ENTRY, HTML_ZPAD_GET_ENTRY, INVALID_USER_LOCATION, JANUARY, JULY, JUNE, LABEL_ACCEPT_BATCH, LABEL_ADD_TO_CART, LABEL_ALL_CLABELS, LABEL_ALLSUB_SECTIONS, LABEL_APPLET_CODE, LABEL_APPLET_CODEBASE, LABEL_AT_STARTUP, LABEL_AT_STARTUP_BRIEF, LABEL_BACKGROUND, LABEL_BATCH_IS_MULTIPLE, LABEL_BATCH_NEW_SECTION, LABEL_BLUE, LABEL_BOTTOMUP_SUBSCRIPTION, LABEL_CART_EMPTY, LABEL_CASE_SENSITIVE, LABEL_CHOOSE_SECTION, LABEL_CHOOSE_TMPL, LABEL_CLABEL_IMAGE, LABEL_CLABEL_OVER_IMAGE, LABEL_CLABEL_RULE, LABEL_CLABELS, LABEL_CLABELS_SELECTED, LABEL_COUNT, LABEL_COVER_SECTIONS, LABEL_COVER_SPECIFIC_BUTTONS, LABEL_COVER_SPECIFIC_ENTRY_BUTTONS, LABEL_COVER_USES_HIERMENU, LABEL_COVER_USES_HIERMENU_ALL_OPTION, LABEL_COVER_USES_INPAGE, LABEL_COVER_USES_JOUST, LABEL_CURRENT_SECTIONS, LABEL_DAILY, LABEL_DATE, LABEL_DAYOFWEEK, LABEL_DESCR, LABEL_DESCRIPTION, LABEL_DESTINATION, LABEL_DONT_INHERIT, LABEL_EDIT_BATCH, LABEL_EMBED_SOURCE, LABEL_ENTRY_HTML, LABEL_ENTRY_IS_TMPL, LABEL_FOREGROUND, LABEL_GREEN, LABEL_HEIGHT, LABEL_HTML_STYLE, LABEL_ID, LABEL_IMAGE_LOCATION, LABEL_IMPORT_CLASSNAME, LABEL_IMPORT_SERVERNAME, LABEL_INHERIT_CLABELS, LABEL_INHERIT_PRIVACY_GROUPS, LABEL_INLINE_DESCRIPTION, LABEL_INPAGE_ALT_TEMPLATE_ID, LABEL_INPAGE_ALT_TEMPLATE_SOURCE, LABEL_INPAGE_SUB_TEMPLATE_ID, LABEL_INPAGE_SUB_TEMPLATE_SOURCE, LABEL_INPAGE_SUBSUB_TEMPLATE_ID, LABEL_INPAGE_SUBSUB_TEMPLATE_SOURCE, LABEL_INPAGE_TEMPLATE_ID, LABEL_INPAGE_TEMPLATE_SOURCE, LABEL_LOADED_FRAMES, LABEL_LOADED_TEMPLATES, LABEL_MONTH, LABEL_MONTHLY, LABEL_MOUNTPOINT, LABEL_MULTISUB_SECTIONS, LABEL_NEVER_EXPIRES, LABEL_NEVER_INSPIRES, LABEL_NEW_CLABEL, LABEL_NEW_FRAME, LABEL_NEW_PL_MEMBER, LABEL_NEW_SECTION, LABEL_NEW_SUBSCRIPTION, LABEL_NEW_TEMPLATE, LABEL_NEW_ZPAD_NAME, LABEL_NO_COLOR, LABEL_NO_ENTRY_SPECIFIC_PROPERTIES, LABEL_NO_FRAME, LABEL_NO_TEMPLATE_PREFERENCE, LABEL_NOT_AT_THIS_PL, LABEL_NOT_IN_CLIENTMODE, LABEL_OBJECT_LOCATION, LABEL_OCCURRING_SUBSCRIPTION, LABEL_OPTIONS, LABEL_ORDER_PRICE, LABEL_OWN_CONTENTS_ONLY, LABEL_OWN_SECTIONS, LABEL_OWNER_VERSION, LABEL_PASSWORD, LABEL_PASSWORD_ERROR, LABEL_PL_MEMBERS, LABEL_PLUS_ASSOCIATES, LABEL_PRICE, LABEL_PRICE_PER_ITEM, LABEL_PRO_VERSION, LABEL_RECURSIVE_SUBSCRIPTION, LABEL_RED, LABEL_REPEAT_1, LABEL_REPEAT_2, LABEL_REPEAT_3, LABEL_REQUIRED, LABEL_RGB, LABEL_SELECT_ZPAD, LABEL_SELECTED_ZPAD, LABEL_SHARED_SUBSCRIPTION, LABEL_SHOWING_RESULT, LABEL_STARTPOINT, LABEL_SUBSCRIPTIONS, LABEL_SYSTEM_SUBSCRIPTIONS, LABEL_THIS_IS_HTML, LABEL_THIS_ZPAD, LABEL_TMPL_DESCRIPTOR, LABEL_TMPL_ID, LABEL_TMPL_LOOP, LABEL_TMPL_NOT_AVAILABLE, LABEL_TMPL_STUBCHARS, LABEL_TODAY, LABEL_TOPDOWN_SUBSCRIPTION, LABEL_TOTAL_PRICE, LABEL_TRANSLATION_URL, LABEL_UNCLASSIFIED, LABEL_UP_TO_USER, LABEL_USE_RANGE, LABEL_USER_NAME, LABEL_VOLUME_DISCOUNT, LABEL_WEEKLY, LABEL_WIDTH, LABEL_YEAR, LABEL_YEARLY, MARCH, MAY, MONDAY, MORE, NO_CONTENT_IN_PAGE, NOVEMBER, OCTOBER, PM, PRESSED_DATE_POPUP, PRESSED_EDIT_POPUP, PRESSED_FIND_POPUP, PRESSED_META_POPUP, PRESSED_PERSONALIZE_POPUP, PRESSED_PRIVL_POPUP, PRESSED_SECTION_POPUP, PRESSED_TOOLS_POPUP, QUESTION_ENTRY_TO_CLIPBOARD, QUESTION_OVERWRITE_BACKUP, QUESTION_REPLACE_WITH_BACKUP, QUESTION_SELECT_ADVANCED_VERSION, REMOVE, SATURDAY, SAVING_CONTENT, SEARCH_FOR_MANUAL, SEARCH_FOR_PRIVACY_LEVEL, SEARCH_FOR_PROVIDE_PL, SEARCH_FOR_RE_EXPORT, SEARCH_FOR_RE_MANUAL, SEARCH_FOR_SUBSCRIPTION, SEARCH_FOR_TIME, SEARCH_FOR_TYPE, SEPTEMBER, SHOULD_SYNC, SUNDAY, TEMPLATE_NOT_AVAILABLE, THURSDAY, TITLE_ADD_ALIAS, TITLE_ADD_APPLET, TITLE_ADD_EMBED, TITLE_ADD_HTML, TITLE_ADD_IMAGE, TITLE_ADD_IMPORT, TITLE_ADD_OBJECT, TITLE_ADD_TEXT, TITLE_ADD_TMPLD, TITLE_ADVANCED_ZPAD, TITLE_CHANGE_COVER, TITLE_CLABEL_DEFINITIONS, TITLE_CLABEL_SELECTION, TITLE_COPY_TO, TITLE_COVER_OPTIONS, TITLE_COVER_SECTIONS, TITLE_DATE_OFFSET, TITLE_DATE_SECTIONS, TITLE_DATE_SPEC, TITLE_DESTINATION, TITLE_EDIT_CATEGORIES, TITLE_EDIT_PRIVACY_GROUPS, TITLE_EDIT_SHEET, TITLE_ENTRY_ATTRIBS, TITLE_ENTRY_EXPIRATION, TITLE_ENTRY_INSPIRATION, TITLE_ENTRY_PARAMS, TITLE_ENTRY_PROPS, TITLE_EXPIRED_HANDLING, TITLE_EXTERNAL_SECTIONS, TITLE_FIND_ENTRY, TITLE_FIRST_SECTION, TITLE_IDENTIFY_YOURSELF, TITLE_INSTANT_COVER, TITLE_LAST_SECTION, TITLE_LOGIN_DIALOG, TITLE_MANIPULATE_SECTION, TITLE_MOVE_ENTRY, TITLE_MOVE_TO, TITLE_NAVIGATOR, TITLE_PERSONALIZE_SHEET, TITLE_PL_GROUPS, TITLE_REMOVE_ALIAS, TITLE_REMOVE_FILE, TITLE_REMOVE_IMAGE, TITLE_SELECT_DATE, TITLE_SELECT_PL, TITLE_SELECT_SECTION, TITLE_SELECT_TMPL, TITLE_SET_CLABEL_IMAGES, TITLE_SET_COLOR, TITLE_SET_COLORS, TITLE_SET_FRAME, TITLE_SET_HTML, TITLE_SET_PL, TITLE_START_SECTION, TITLE_STATISTICS, TITLE_SUBSCRIPTIONS, TITLE_TEMPLATE_PREFERENCE, TITLE_TOOLS_SHEET, TITLE_TRANSFER, TITLE_UPLOAD_FILE, TITLE_USER_SECTIONS, TO, TUESDAY, WEDNESDAY, ZPAD
 
Fields inherited from interface info.aduna.gee.publication.content.EntryConstants
ACLS_PREFIX, AFTER_TRANSFER, APPLET_TYPE_VALUE, ASSOCIATES_EDIT_LEVEL, BEFORE_STORAGE, BEFORE_TRANSFER, CODE_KEY, CODEBASE_KEY, CONSTRUCTION_KEY, CONTAINER_TTL_KEY, CONTAINERID_KEY, CONTAINERPROPS_KEY, DBPRIVACY_LEVEL_KEY, DESCRIPTION_KEY, EMBED_TYPE_VALUE, END_TIME_KEY, ENTRY_ID_KEY, ENTRYATTRIBS_KEY, ENTRYPARAMS_KEY, ENTRYPROPS_KEY, EXPIRES_KEY, EXTERNAL_ENTRY_KEY, HEIGHT_KEY, HTML_KEY, HTML_TYPE_VALUE, ID2IDID_KEY, IMAGE_TYPE_VALUE, IMPORT_CLASSNAME, IMPORT_DONT_FORWARD, IMPORT_IMPORTED, IMPORT_LANGUAGE, IMPORT_SERVER_NAME, IMPORT_TYPE_VALUE, INFO_EXTENSION, INHERIT_CONFIGURATION, INLINE_DESCRIPTION_IS_HTML_KEY, INLINE_DESCRIPTION_KEY, INSPIRES_KEY, JIT_DESTINATION, JIT_DESTINATION_INDEX, LINK_IN_FRAME_KEY, LINK_KEY, MANUAL_KEY, MINIMALHEIGHT_KEY, MINIMALWIDTH_KEY, NAVIGATION_KEY, OBJECT_TYPE_VALUE, OCCURRING_CLABELS_KEY, OVERRIDE_SUGGESTION_KEY, PRIVACY_LEVEL_KEY, PROVIDE_KEY, PROVIDE_PL_KEY, QUALIFIED_BASE_KEY, RE_EXPORT_KEY, RE_MANUAL_KEY, REPEAT_ID_KEY, REPEAT_TODAY_KEY, REQUIRES_NEW_PAGE, ROTATABLE_KEY, SHARED_CLABELS_KEY, SHOP_GIF_KEY, SHOP_GIF_LOCATION_KEY, SHOP_ID_KEY, SHOP_ORIGIN_KEY, SHOP_OVER_GIF_KEY, SORT_CLABELS, SORT_DESCRIPTION, SOURCE_KEY, STARTSECTION_KEY, SUBSCRIBED_COLOR_KEY, SUBSCRIBED_GIF_KEY, SUBSCRIBED_GIF_LOCATION_KEY, SUBSCRIBED_OVER_GIF_KEY, SUBSCRIBED_VISIBLE_CLABELS_KEY, SUBSCRIPTION_KEY, SUBSCRIPTION_LINK_KEY, SUGGESTION_KEY, SUMMARY_IS_HTML_KEY, SUMMARY_KEY, SUMMARY_TYPE_VALUE, TEMPLATEPREFERENCES_KEY, TEXT_KEY, TEXT_TYPE_VALUE, TIME_KEY, TMPL_DESCRIPTOR_KEY, TMPL_FOREIGN_ID_KEY, TMPL_ID_KEY, TMPL_PREFERENCES_KEY, TMPL_STUB_RECOGNIZER_KEY, TMPLD_TYPE_VALUE, TYPE_KEY, WIDTH_KEY
 
Fields inherited from interface info.aduna.gee.publication.net.FileNames
ASA_FILE_NAME, BAK_FILE_NAME, CAT_FILE_NAME, CFG_FILE_NAME, CHS_FILE_NAME, DAT_FILE_NAME, HLP_FILE_NAME, LOCAL_FILE_PREFIX, SBS_FILE_NAME, SSS_FILE_NAME, WIF_FILE_NAME
 
Constructor Summary
Entry(WProperties eProps, WProperties eAttribs, WProperties eParams)
          Construct a new Entry of the specified type.
 
Method Summary
protected  void _addToVelocityContext(Object key, Object value)
           
protected  String _appletToHtmlTag()
          Get the HTML representation of an applet Entry.
protected  Dimension _dimensionOf(String text, int maxWidth)
          Calculate the space a text will take when the maximum width is given.
protected  String _embedToHtmlTag()
           
protected static WProperties _getStubsFromString(String s, String sStub, String eStub)
           
protected  Hashtable _getVelocityContext(boolean create)
           
protected static Entry _gsubTmpld(Navigator navigator, Entry tmpld, Entry tmpl)
          Create a new Entry that is the result of expanding a Tmpld *once*.
protected  String _htmlConvenience(Navigator navigator, String txt)
          Replace returns by
if the text does not contain fancy html itself and the tmpl is an html object.
protected  String _imageToHtmlTag(Template template, Navigator navigator, int entryId)
          Get the HTML representation of an image Entry.
protected  String _importToHtmlTag()
           
 String _objectToHtmlTag()
          Get the HTML representation of an object Entry.
protected  String _tmpldToHtmlTag(Template template, Navigator navigator, int entryId)
          Get the HTML tag of a templated entry.
protected static String _toHtmlText(String text)
          Replace special ASCII character with their correct HTML counterparts.
protected static void _wrapTmpld(Navigator navigator, Entry tmpld)
          Wrap all keys expressed by the TMPLD itself.
 void calculateOpaqueLabels(Navigator navigator)
           
 void cleanUp(int reason)
          Remove all unnecessary attributes.
 Object clone()
          Create a shallow clone of this Entry.
 int compareTime(Entry other, Navigator navigator)
           
 boolean contains(String pattern, boolean useCase, Navigator navigator)
          Does this entry contain (case sensitive) the pattern supplied ? NOTE: do *not* use toString + index, because toString will remove all *irrelevant* keys (such as "10_info=Entry is handmatig aangemaakt").
static Entry create(int type)
          Create a new Entry of the specified type.
static Entry create(String source, String options, String attribs, String params)
          Create an Entry (the Zpad JavaScript API).
static Entry create(String source, WProperties optionProps, WProperties attribProps, WProperties paramProps)
          Create an Entry (the Zpad Java API).
static Entry create(WProperties allProps)
          Create a new Entry from a WProperties object.
static Entry createTmpld(Navigator navigator, String tmplDescriptorOrId, boolean isDescriptor)
          Create a Tmpld Entry.
 boolean equals(Object other)
          Is this Entry equal to another Entry.
 String getCLabelString()
          Get the storage representation of the labels.
 String getInlineDescriptionHTML()
          Get the HTML code (if any) that represents the inline description.
static String getKey(String fullKey)
          Get the key-part of a subKey'ed key
 WDate getMovingDate()
          Get the section of a "moving Entry" (aka "repeat today Entry")
 String getProvideString(Navigator navigator)
          Get the provide String of an Entry.
static String getSubKey(String fullKey)
          Get the subkey-part of a subKey'ed key
 String getTemplateID()
          This function is to hide backwards compatibility.
 WTime getTime(Navigator navigator, boolean startTime)
           
 Entry getTmpl(Navigator navigator, boolean allowDefault)
           
 Vector getTmpls(Navigator navigator, boolean allowDefault)
          Get the sequence of TMPL's of a TMPLD.
 WProperties getTmplStubs(Navigator navigator)
          Find the list of stubs of a tmpl.
static WProperties getTmplStubs(Navigator navigator, Vector tmpls)
          Get the effective stubs-list of a Vector of Templates.
 Entry getTopTmpl(Navigator navigator)
          Get the top Template in the template hierarchy of this TMPLD.
 int getType()
          Get the type of this Entry.
 Entry gsub(Navigator navigator, Entry tmpld)
          Gsub using the current (Template!) Entry the key-value pairs of the (Templated) argument and return the resulting new one.
 Entry gsubTmpld(Navigator navigator, boolean doClone)
          Return the Entry that results from expanding a TMPLD completely.
static String infoKey(String key)
          Get the Info Key that corresponds to the original key.
 boolean isContributed()
          Is the Entry contributed by a subscription?
 boolean isExpiredAt(WDate date)
          Is this Entry at its expiry date at the specified date?
 boolean isImported()
          Is the Entry contributed by an IMPORT?
 boolean isInspired()
          Is the entry already inspired ?
 boolean isTemplate()
          Is the Entry an entry template ?
static String redirect(String attrib, String value)
          Use (server side) redirection knowledge.
 boolean requiresNewPage()
          Does the Entry require a new page ?
 void scaled(int boundaryWidth, int boundaryHeight, Navigator navigator)
          Scale this Entry to fit within new boundaries while maintaining its aspect ratio, i.e.
 void setCLabelString(String labelString)
          Set the storage representation of the labels.
static String subKey(String key, String sub)
          Get the full key that combines the original key and a subkey part.
 String toHtmlTag(Template template, Navigator navigator, int entryId)
          Get the HTML representation of this Entry.
 WProperties toProperties()
          Create a properties object representing this object.
 String toString()
          Get a very rough String representation of this Entry.
 int totalWidth()
          Calculate the total width of the entry + (optionally) the description below it.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

entryProps

public WProperties entryProps
The ZPad-specific properties of this Entry (e.g. Privacy Level, Time).

See Also:
entryAttribs, entryParams

entryAttribs

public WProperties entryAttribs
The HTML attributes of this Entry (i.e. anything that appears *within* the HTML tag, e.g. width, height).

See Also:
entryProps, entryParams

entryParams

public WProperties entryParams
The HTML parameters of this Entry (i.e. anything that appears in its own tag, e.g. applet parameters).

See Also:
#entryPropss, entryAttribs

occurringOCLabels

public OpaqueCLabel[] occurringOCLabels

_sharedEmptyProperties

protected static WProperties _sharedEmptyProperties

_HAD_OCCURRING_CLABELS_VALUE

protected static final String _HAD_OCCURRING_CLABELS_VALUE
See Also:
Constant Field Values
Constructor Detail

Entry

public Entry(WProperties eProps,
             WProperties eAttribs,
             WProperties eParams)
Construct a new Entry of the specified type.

Parameters:
eProps - The properties of the new Entry. A TYPE_KEY property should exist in eProps.
eAttribs - The HTML attributes of the new Entry.
eParams - The object parameters of the new Entry.
See Also:
EntryConstants.TYPE_KEY, entryProps, entryAttribs, entryParams
Method Detail

create

public static Entry create(int type)
Create a new Entry of the specified type.

Parameters:
type - The type of entry to create.
See Also:
EntryConstants.TYPE_KEY, create(int)

create

public static Entry create(WProperties allProps)
Create a new Entry from a WProperties object.

Parameters:
allProps - properties object containing properties objects containing the entry parameters.
Returns:
an instance of Entry initialized according to the parameters in the properties object.
See Also:
#toWProperties

create

public static Entry create(String source,
                           String options,
                           String attribs,
                           String params)
Create an Entry (the Zpad JavaScript API).


create

public static Entry create(String source,
                           WProperties optionProps,
                           WProperties attribProps,
                           WProperties paramProps)
Create an Entry (the Zpad Java API).


toProperties

public WProperties toProperties()
Create a properties object representing this object.

Returns:
a Wproperties object with enough information to restore the entry with it later.
See Also:
create(info.aduna.gee.publication.util.WProperties)

equals

public boolean equals(Object other)
Is this Entry equal to another Entry. An Entry may contain a lot of "irrelevant" stuff (0_info, 1_info, etc.)

Overrides:
equals in class Object
Parameters:
other - the Entry to compare this Entry to.

compareTime

public int compareTime(Entry other,
                       Navigator navigator)
Parameters:
other - the Entry to compare this Entry to.
navigator - the navigator

isContributed

public boolean isContributed()
Is the Entry contributed by a subscription?


isImported

public boolean isImported()
Is the Entry contributed by an IMPORT?


isTemplate

public boolean isTemplate()
Is the Entry an entry template ?


getTemplateID

public String getTemplateID()
This function is to hide backwards compatibility. Precondition: isTemplate().


requiresNewPage

public boolean requiresNewPage()
Does the Entry require a new page ?


isExpiredAt

public boolean isExpiredAt(WDate date)
Is this Entry at its expiry date at the specified date?

Parameters:
date - the "virtual" date at which the expiration is checked
Returns:
true when expired, false otherwise.

isInspired

public boolean isInspired()
Is the entry already inspired ?


scaled

public void scaled(int boundaryWidth,
                   int boundaryHeight,
                   Navigator navigator)
Scale this Entry to fit within new boundaries while maintaining its aspect ratio, i.e. both width and height are scaled by the same factor.

Parameters:
boundaryWidth - the width to scale this Entry to.
boundaryHeight - the height to scale this Entry to.

toHtmlTag

public String toHtmlTag(Template template,
                        Navigator navigator,
                        int entryId)
Get the HTML representation of this Entry.

Returns:
a string containing an HTML tag.
See Also:
#_textToHtmlTag, _imageToHtmlTag(info.aduna.gee.publication.cover.Template, info.aduna.gee.publication.ui.navigator.Navigator, int), _appletToHtmlTag(), _objectToHtmlTag()

_imageToHtmlTag

protected String _imageToHtmlTag(Template template,
                                 Navigator navigator,
                                 int entryId)
Get the HTML representation of an image Entry.

Returns:
a string containing an HTML tag.

_appletToHtmlTag

protected String _appletToHtmlTag()
Get the HTML representation of an applet Entry.

Returns:
a string containing an HTML tag.

_objectToHtmlTag

public String _objectToHtmlTag()
Get the HTML representation of an object Entry.

Returns:
a string containing an HTML tag.

_toHtmlText

protected static String _toHtmlText(String text)
Replace special ASCII character with their correct HTML counterparts. In particular, '\n' is replaced by '
', and \t is emulated by 8 spaces.

Parameters:
text - the text to change.
Returns:
correct HTML text.

clone

public Object clone()
Create a shallow clone of this Entry.

Overrides:
clone in class Object
Returns:
a shallow clone of this Entry.

toString

public String toString()
Get a very rough String representation of this Entry.

Overrides:
toString in class Object
Returns:
a String representation of this Entry.

getType

public int getType()
Get the type of this Entry.

Returns:
one of the possible entry types.
See Also:
EntryConstants.TYPE_KEY

contains

public boolean contains(String pattern,
                        boolean useCase,
                        Navigator navigator)
Does this entry contain (case sensitive) the pattern supplied ? NOTE: do *not* use toString + index, because toString will remove all *irrelevant* keys (such as "10_info=Entry is handmatig aangemaakt").

Parameters:
pattern - the pattern we're looking for.
useCase - if true use case.

getProvideString

public String getProvideString(Navigator navigator)
Get the provide String of an Entry.

Parameters:
navigator - either the Navigator or null

cleanUp

public void cleanUp(int reason)
Remove all unnecessary attributes.

Parameters:
reason - one of BEFORE_STORAGE, BEFORE_TRANSFER, AFTER_TRANSFER

_dimensionOf

protected Dimension _dimensionOf(String text,
                                 int maxWidth)
Calculate the space a text will take when the maximum width is given.


totalWidth

public int totalWidth()
Calculate the total width of the entry + (optionally) the description below it.


getInlineDescriptionHTML

public String getInlineDescriptionHTML()
Get the HTML code (if any) that represents the inline description.


infoKey

public static String infoKey(String key)
Get the Info Key that corresponds to the original key.


subKey

public static String subKey(String key,
                            String sub)
Get the full key that combines the original key and a subkey part. This is e.g. used to store and retrieve clabel-specific links.

Parameters:
key - the original key, e.g. LINK_KEY
sub - the subkey indicator (e.g. the String a clabel number) or null

getKey

public static String getKey(String fullKey)
Get the key-part of a subKey'ed key


getSubKey

public static String getSubKey(String fullKey)
Get the subkey-part of a subKey'ed key

Returns:
the subkey part or null

redirect

public static String redirect(String attrib,
                              String value)
Use (server side) redirection knowledge. Use it ONLY when it is invisible for the user!


getMovingDate

public WDate getMovingDate()
Get the section of a "moving Entry" (aka "repeat today Entry")


createTmpld

public static Entry createTmpld(Navigator navigator,
                                String tmplDescriptorOrId,
                                boolean isDescriptor)
Create a Tmpld Entry.


getTmplStubs

public WProperties getTmplStubs(Navigator navigator)
Find the list of stubs of a tmpl. key: pure stub value: stub surrounded by stub recognizers


getTmplStubs

public static WProperties getTmplStubs(Navigator navigator,
                                       Vector tmpls)
Get the effective stubs-list of a Vector of Templates.


_tmpldToHtmlTag

protected String _tmpldToHtmlTag(Template template,
                                 Navigator navigator,
                                 int entryId)
Get the HTML tag of a templated entry.


gsubTmpld

public Entry gsubTmpld(Navigator navigator,
                       boolean doClone)
Return the Entry that results from expanding a TMPLD completely.


_wrapTmpld

protected static void _wrapTmpld(Navigator navigator,
                                 Entry tmpld)
Wrap all keys expressed by the TMPLD itself. Note: the entry itself is changed, so take care to feed a clone if necessary.


_gsubTmpld

protected static Entry _gsubTmpld(Navigator navigator,
                                  Entry tmpld,
                                  Entry tmpl)
Create a new Entry that is the result of expanding a Tmpld *once*.


gsub

public Entry gsub(Navigator navigator,
                  Entry tmpld)
Gsub using the current (Template!) Entry the key-value pairs of the (Templated) argument and return the resulting new one.


_addToVelocityContext

protected void _addToVelocityContext(Object key,
                                     Object value)

_getVelocityContext

protected Hashtable _getVelocityContext(boolean create)

_importToHtmlTag

protected String _importToHtmlTag()

_embedToHtmlTag

protected String _embedToHtmlTag()

getTmpl

public Entry getTmpl(Navigator navigator,
                     boolean allowDefault)

getTmpls

public Vector getTmpls(Navigator navigator,
                       boolean allowDefault)
Get the sequence of TMPL's of a TMPLD.


getTopTmpl

public Entry getTopTmpl(Navigator navigator)
Get the top Template in the template hierarchy of this TMPLD.


calculateOpaqueLabels

public void calculateOpaqueLabels(Navigator navigator)
Parameters:
navigator - if null, only a best effort will be done and nothing is set when it doesn't succeed.

getCLabelString

public String getCLabelString()
Get the storage representation of the labels.


setCLabelString

public void setCLabelString(String labelString)
Set the storage representation of the labels.


_getStubsFromString

protected static WProperties _getStubsFromString(String s,
                                                 String sStub,
                                                 String eStub)
Returns:
the WProperties all mappings "auto" -> "##auto##", or null.

_htmlConvenience

protected String _htmlConvenience(Navigator navigator,
                                  String txt)
Replace returns by
if the text does not contain fancy html itself and the tmpl is an html object. Take care of spaces in URL's.


getTime

public WTime getTime(Navigator navigator,
                     boolean startTime)
Parameters:
navigator - the navigator
startTime - if true the start time else the end time
Returns:
the time or null


Copyright © 1997-2008 Aduna. All Rights Reserved.