p2ps.imp.discovery
Class AdvertisementUtils
java.lang.Object
p2ps.imp.discovery.AdvertisementUtils
- public class AdvertisementUtils
- extends java.lang.Object
A utility class for handling advertisement XML
- Version:
- $Revision: 295 $
- Author:
- Ian Wang
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdvertisementUtils
public AdvertisementUtils()
isXMLEnvelope
public static boolean isXMLEnvelope(Element elem)
- Returns:
- true if the specified envelope contains an valid advertisement
getXMLAdvert
public static Element getXMLAdvert(Element envelope)
- Returns:
- the root element of the advert from within the XML envelope (or
null if no advert contained)
getAdvertID
public static java.lang.String getAdvertID(Element advert)
- Returns:
- the advert id from the advert XML root.
isAdvertisement
public static boolean isAdvertisement(Element advert)
- Returns:
- true if the specified XML element is a advertisement/query
(queries a specialized advertisements)
isQuery
public static boolean isQuery(Element advert)
- Returns:
- true if the specified XML advert is a query