| java.lang.Object de.nava.informa.utils.AtomParserUtils
AtomParserUtils | public class AtomParserUtils (Code) | | Common utility functions for Atom 0.3 and Atom 1.0 parser
|
Field Summary | |
final public static Log | LOGGER |
Method Summary | |
public static String | getItemLink(Element item, Namespace defNS) Looks for link sub-elements of type "link" and selects the most preferred.
Parameters: item - item element. Parameters: defNS - default namespace. | public static int | getPreferenceOrderForItemLinkType(String type, String rel) Returns order of item link type preference.
Parameters: type - type ("text/html", "text/plain", "application/xml" ...). | public static String | getValue(Element elt, String mode) Returns value of the element.
Parameters: elt - the element to retrieve the value from. Parameters: mode - can be one of "escaped", "base64" or "xml". | public static List | trimContents(List contents) Cuts all empty (whitespace) text blocks from the head and tail of contents list.
Parameters: contents - list of contents. |
LOGGER | final public static Log LOGGER(Code) | | |
getItemLink | public static String getItemLink(Element item, Namespace defNS)(Code) | | Looks for link sub-elements of type "link" and selects the most preferred.
Parameters: item - item element. Parameters: defNS - default namespace. link in string or null . |
getPreferenceOrderForItemLinkType | public static int getPreferenceOrderForItemLinkType(String type, String rel)(Code) | | Returns order of item link type preference.
Parameters: type - type ("text/html", "text/plain", "application/xml" ...). order (the lower the more preferred). |
getValue | public static String getValue(Element elt, String mode)(Code) | | Returns value of the element.
Parameters: elt - the element to retrieve the value from. Parameters: mode - can be one of "escaped", "base64" or "xml". If null, "xml" is assumed. |
trimContents | public static List trimContents(List contents)(Code) | | Cuts all empty (whitespace) text blocks from the head and tail of contents list.
Parameters: contents - list of contents. trimmed version. |
|
|