org.dspace.app.xmlui.utils
Class FeedUtils
java.lang.Object
org.dspace.app.xmlui.utils.FeedUtils
public class FeedUtils
- extends java.lang.Object
Utility functions and data in common to all producers of syndication feeds
in the XMLUI -- e.g. DSpaceFeedGenerator, OpenSearchGenerator.
Currently just implements the I18N mechanism: since the feed producer
is shared with the JSPUI, and that UI employs a completely different i18n
mechanism, the SyndicationFeed abstraction takes its own map of message
keys to localized values. For the XMLUI, the "localized value" is actually
a string with a special sentinal prefix (defined here as I18N_PREFIX). This
is really just a marker; the DOM has to be post-processed later and the
prefixed text is replaced by a Cocoon i18n element (whose key attribute
is the text following the prefix).
Note that the keys in the initial i18n message table are dictated by
the SyndicationFeed class.
- Author:
- Larry Stone
- See Also:
SyndicationFeed
|
Field Summary |
static java.util.Map<java.lang.String,java.lang.String> |
i18nLabels
|
|
Method Summary |
static void |
unmangleI18N(org.w3c.dom.Document dom)
Scan the document and replace any text nodes that begin
with the i18n prefix with an actual i18n element that
can be processed by the i18n transformer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
i18nLabels
public static final java.util.Map<java.lang.String,java.lang.String> i18nLabels
FeedUtils
public FeedUtils()
unmangleI18N
public static void unmangleI18N(org.w3c.dom.Document dom)
- Scan the document and replace any text nodes that begin
with the i18n prefix with an actual i18n element that
can be processed by the i18n transformer.
- Parameters:
dom -
Copyright © 2010 DuraSpace. All Rights Reserved.