org.apache.lucene.gdata.gom.core.utils
Class AtomParserUtils
java.lang.Object
org.apache.lucene.gdata.gom.core.utils.AtomParserUtils
public class AtomParserUtils
- extends Object
- Author:
- Simon Willnauer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AtomParserUtils
public AtomParserUtils()
escapeXMLCharacter
public static String escapeXMLCharacter(String aString)
- Replaces all xml character with the corresponding entity.
- <!ENTITY lt "&#60;">
- <!ENTITY gt ">">
- <!ENTITY amp "&#38;">
- <!ENTITY apos "'">
- <!ENTITY quot """>
see W3C
specification
- Parameters:
aString
- -
a string may container xml characters like '<'
- Returns:
- the input string with escaped xml characters
isAtomMediaType
public static boolean isAtomMediaType(String aMediaType)
- Parameters:
aMediaType
-
- Returns:
getAtomMediaType
public static AtomMediaType getAtomMediaType(String aMediaType)
- Parameters:
aMediaType
-
- Returns:
getAbsolutAtomURI
public static String getAbsolutAtomURI(String xmlBase,
String atomUri)
throws URISyntaxException
- Parameters:
xmlBase
- atomUri
-
- Returns:
-
- Throws:
URISyntaxException
compareAlternateLinks
public static boolean compareAlternateLinks(GOMLink left,
GOMLink right)
- Compares two links with rel attribute "alternate" Checks if href and type
are equal
- Parameters:
left
- -
left link to compareright
- -
right link to compare
- Returns:
true
if and only if href and type are equal,
otherwise false
main
public static void main(String[] args)
Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.