yarfraw.utils.extension
Class ExtensionUtils

java.lang.Object
  extended by yarfraw.utils.extension.ExtensionUtils

public class ExtensionUtils
extends Object


Method Summary
static AdminExtension extractAdminExtension(List<Element> otherElements)
          Extracts the well-formed web extension elements from the input list into an AdminExtension object.
static Atom03Extension extractAtom03Extension(List<Element> otherElements)
          Extracts the Atom 0.3 extension elements that are not mapped to the core models from the input list into an Atom03Extension object.
static BloggerExtension extractBloggerExtension(List<Element> otherElements)
          Extracts the well-formed web extension elements from the input list into an BloggerExtension object.
static DublinCoreExtension extractDublinCoreExtension(List<Element> otherElements)
          Extracts the itunes extension elements from the input list into an DublinCoreExtension object.
static FeedburnerExtension extractFeedburnerExtension(List<Element> otherElements)
          Extracts the feedburner extension elements from the input list into an FeedburnerExtension object.
static GeoRssExtension extractGeoRssExtension(List<Element> otherElements)
          Extracts the Georss extension elements from the input list into an GeoRssExtension object.
The extracted elements will be removed from the original input list.
static GoogleBaseExtension extractGoogleBaseExtension(List<Element> otherElements)
          Extracts the googlebase extension elements from the input list into an GoogleBaseExtension object.
static ItunesExtension extractItunesExtension(List<Element> otherElements)
          Extracts the itunes extension elements from the input list into an ItunesExtension object.
static MrssExtension extractMrssExtension(List<Element> otherElements)
          Extracts the mrss extension elements from the input list into an MrssExtension object.
The extracted elements will be removed from the original input list.
static SlashExtension extractSlashExtension(List<Element> otherElements)
          Extracts the slash extension elements from the input list into an SlashExtension object.
static SyndicationExtension extractSyndicationExtension(List<Element> otherElements)
          Extracts the well-formed web extension elements from the input list into an SyndicationExtension object.
static WellFormedWebExtension extractWellFormedWebExtension(List<Element> otherElements)
          Extracts the well-formed web extension elements from the input list into an WellFormedWebExtension object.
static List<Element> toAdminAtomElements(AdminExtension extensionObject)
          Converts the input AdminExtension object to an element list.
static List<Element> toBloggerAtomElements(BloggerExtension extensionObject)
          Converts the input BloggerExtension object to an element list.
static List<Element> toDublinCoreElements(DublinCoreExtension extensionObject)
          Converts the input DublinCoreExtension object to an element list.
static List<Element> toFeedburnerElements(FeedburnerExtension extensionObject)
          Converts the input FeedburnerExtension object to an element list.
static List<Element> toGeoRssElements(GeoRssExtension extensionObject)
          Converts the input GeoRssExtension object to an element list.
static List<Element> toGoogleBaseElements(GoogleBaseExtension extensionObject)
          Converts the input GoogleBaseExtension object to an element list.
static List<Element> toItunesElements(ItunesExtension extensionObject)
          Converts the input ItunesExtension object to an element list.
static List<Element> toMrssElements(MrssExtension extensionObject)
          Converts the input MrssExtension object to an element list.
static List<Element> toSlahsElements(SlashExtension extensionObject)
          Converts the input FeedburnerExtension object to an element list.
static List<Element> toSyndicationElements(SyndicationExtension extensionObject)
          Converts the input SyndicationExtension object to an element list.
static List<Element> toWellFormedWebElements(WellFormedWebExtension extensionObject)
          Converts the input WellFormedWebExtension object to an element list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

extractAtom03Extension

public static Atom03Extension extractAtom03Extension(List<Element> otherElements)
                                              throws YarfrawException
Extracts the Atom 0.3 extension elements that are not mapped to the core models from the input list into an Atom03Extension object.
The extracted elements will be removed from the original input list.
see http://yarfraw.sourceforge.net about these extension elements

Parameters:
otherElements - - any elements
Returns:
an Atom03Extension object
Throws:
YarfrawException

extractItunesExtension

public static ItunesExtension extractItunesExtension(List<Element> otherElements)
                                              throws YarfrawException
Extracts the itunes extension elements from the input list into an ItunesExtension object.
The extracted elements will be removed from the original input list.
see http://www.apple.com/itunes/store/podcaststechspecs.html about these extension elements

Parameters:
otherElements - - any elements
Returns:
an ItunesExtension object
Throws:
YarfrawException

extractDublinCoreExtension

public static DublinCoreExtension extractDublinCoreExtension(List<Element> otherElements)
                                                      throws YarfrawException
Extracts the itunes extension elements from the input list into an DublinCoreExtension object.
The extracted elements will be removed from the original input list.
see http://dublincore.org/documents/2002/07/31/dcmes-xml/ about these extension elements

Parameters:
otherElements - - any elements
Returns:
an DublinCoreExtension object
Throws:
YarfrawException

extractWellFormedWebExtension

public static WellFormedWebExtension extractWellFormedWebExtension(List<Element> otherElements)
                                                            throws YarfrawException
Extracts the well-formed web extension elements from the input list into an WellFormedWebExtension object.
The extracted elements will be removed from the original input list.
see http://wellformedweb.org/news/wfw_namespace_elements about these extension elements

Parameters:
otherElements - - any elements
Returns:
an WellFormedWebExtension object
Throws:
YarfrawException

extractAdminExtension

public static AdminExtension extractAdminExtension(List<Element> otherElements)
                                            throws YarfrawException
Extracts the well-formed web extension elements from the input list into an AdminExtension object.
The extracted elements will be removed from the original input list.
see http://web.resource.org/rss/1.0/modules/admin/ about these extension elements

Parameters:
otherElements - - any elements
Returns:
an AdminExtension object
Throws:
YarfrawException

extractFeedburnerExtension

public static FeedburnerExtension extractFeedburnerExtension(List<Element> otherElements)
                                                      throws YarfrawException
Extracts the feedburner extension elements from the input list into an FeedburnerExtension object.
The extracted elements will be removed from the original input list.
see www.feedburner.com about these extension elements

Parameters:
otherElements - - any elements
Returns:
an FeedburnerExtension object
Throws:
YarfrawException

extractSlashExtension

public static SlashExtension extractSlashExtension(List<Element> otherElements)
                                            throws YarfrawException
Extracts the slash extension elements from the input list into an SlashExtension object.
The extracted elements will be removed from the original input list.
see http://web.resource.org/rss/1.0/modules/slash/ these extension elements

Parameters:
otherElements - - any elements
Returns:
an SlashExtension object
Throws:
YarfrawException

extractBloggerExtension

public static BloggerExtension extractBloggerExtension(List<Element> otherElements)
                                                throws YarfrawException
Extracts the well-formed web extension elements from the input list into an BloggerExtension object.
The extracted elements will be removed from the original input list.
see http://code.blogger.com/archives/atom-docs.html#extensions about these extension elements

Parameters:
otherElements - - any elements
Returns:
an BloggerExtension object
Throws:
YarfrawException

extractSyndicationExtension

public static SyndicationExtension extractSyndicationExtension(List<Element> otherElements)
                                                        throws YarfrawException
Extracts the well-formed web extension elements from the input list into an SyndicationExtension object.
The extracted elements will be removed from the original input list.
see http://web.resource.org/rss/1.0/modules/syndication/ about these extension elements

Parameters:
otherElements - - any elements
Returns:
an SyndicationExtension object
Throws:
YarfrawException

extractGoogleBaseExtension

public static GoogleBaseExtension extractGoogleBaseExtension(List<Element> otherElements)
                                                      throws YarfrawException
Extracts the googlebase extension elements from the input list into an GoogleBaseExtension object.
see http://www.apple.com/itunes/store/podcaststechspecs.html about these extension elements

Parameters:
otherElements - - any elements
Returns:
an GoogleBaseExtension object
Throws:
YarfrawException

extractGeoRssExtension

public static GeoRssExtension extractGeoRssExtension(List<Element> otherElements)
                                              throws YarfrawException
Extracts the Georss extension elements from the input list into an GeoRssExtension object.
The extracted elements will be removed from the original input list.
see http://georss.org/ about these extension elements

Parameters:
otherElements - - any elements
Returns:
an GeoRssExtension object
Throws:
YarfrawException

extractMrssExtension

public static MrssExtension extractMrssExtension(List<Element> otherElements)
                                          throws YarfrawException
Extracts the mrss extension elements from the input list into an MrssExtension object.
The extracted elements will be removed from the original input list.
see http://search.yahoo.com/mrss about these extension elements

Parameters:
otherElements - - any elements
Returns:
an MrssExtension object
Throws:
YarfrawException

toItunesElements

public static List<Element> toItunesElements(ItunesExtension extensionObject)
                                      throws YarfrawException
Converts the input ItunesExtension object to an element list.
see http://www.apple.com/itunes/store/podcaststechspecs.html about these extension elements

Parameters:
extensionObject - an valid ItunesExtension object
Returns:
a list of elements representing all the elements in the input extension object
Throws:
YarfrawException - if conversion failed

toGeoRssElements

public static List<Element> toGeoRssElements(GeoRssExtension extensionObject)
                                      throws YarfrawException
Converts the input GeoRssExtension object to an element list.
see http://georss.org/ about these extension elements

Parameters:
extensionObject - an valid GeoRssExtension object
Returns:
a list of elements representing all the elements in the input extension object
Throws:
YarfrawException - if conversion failed

toGoogleBaseElements

public static List<Element> toGoogleBaseElements(GoogleBaseExtension extensionObject)
                                          throws YarfrawException
Converts the input GoogleBaseExtension object to an element list.
see http://base.google.com/support/bin/answer.py?answer=58085&hl=en about these extension elements

Parameters:
extensionObject - an valid GoogleBaseExtension object
Returns:
a list of elements representing all the elements in the input extension object
Throws:
YarfrawException - if conversion failed

toMrssElements

public static List<Element> toMrssElements(MrssExtension extensionObject)
                                    throws YarfrawException
Converts the input MrssExtension object to an element list.
see http://search.yahoo.com/mrss about these extension elements

Parameters:
extensionObject - an valid MrssExtension object
Returns:
a list of elements representing all the elements in the input extension object
Throws:
YarfrawException - if conversion failed

toWellFormedWebElements

public static List<Element> toWellFormedWebElements(WellFormedWebExtension extensionObject)
                                             throws YarfrawException
Converts the input WellFormedWebExtension object to an element list.
see http://wellformedweb.org/news/wfw_namespace_elements about these extension elements

Parameters:
extensionObject - an valid WellFormedWebExtension object
Returns:
a list of elements representing all the elements in the input extension object
Throws:
YarfrawException - if conversion failed

toDublinCoreElements

public static List<Element> toDublinCoreElements(DublinCoreExtension extensionObject)
                                          throws YarfrawException
Converts the input DublinCoreExtension object to an element list.
see http://dublincore.org/documents/2002/07/31/dcmes-xml/ about these extension elements

Parameters:
extensionObject - an valid DublinCoreExtension object
Returns:
a list of elements representing all the elements in the input extension object
Throws:
YarfrawException - if conversion failed

toSyndicationElements

public static List<Element> toSyndicationElements(SyndicationExtension extensionObject)
                                           throws YarfrawException
Converts the input SyndicationExtension object to an element list.
see http://web.resource.org/rss/1.0/modules/syndication/ about these extension elements

Parameters:
extensionObject - an valid SyndicationExtension object
Returns:
a list of elements representing all the elements in the input extension object
Throws:
YarfrawException - if conversion failed

toBloggerAtomElements

public static List<Element> toBloggerAtomElements(BloggerExtension extensionObject)
                                           throws YarfrawException
Converts the input BloggerExtension object to an element list.
see http://code.blogger.com/archives/atom-docs.html#extensions about these extension elements

Parameters:
extensionObject - an valid BloggerExtension object
Returns:
a list of elements representing all the elements in the input extension object
Throws:
YarfrawException - if conversion failed

toAdminAtomElements

public static List<Element> toAdminAtomElements(AdminExtension extensionObject)
                                         throws YarfrawException
Converts the input AdminExtension object to an element list.
see http://web.resource.org/rss/1.0/modules/admin/ about these extension elements

Parameters:
extensionObject - an valid AdminExtension object
Returns:
a list of elements representing all the elements in the input extension object
Throws:
YarfrawException - if conversion failed

toFeedburnerElements

public static List<Element> toFeedburnerElements(FeedburnerExtension extensionObject)
                                          throws YarfrawException
Converts the input FeedburnerExtension object to an element list.
see http://web.resource.org/rss/1.0/modules/admin/ about these extension elements

Parameters:
extensionObject - an valid FeedburnerExtension object
Returns:
a list of elements representing all the elements in the input extension object
Throws:
YarfrawException - if conversion failed

toSlahsElements

public static List<Element> toSlahsElements(SlashExtension extensionObject)
                                     throws YarfrawException
Converts the input FeedburnerExtension object to an element list.
see http://web.resource.org/rss/1.0/modules/admin/ about these extension elements

Parameters:
extensionObject - an valid FeedburnerExtension object
Returns:
a list of elements representing all the elements in the input extension object
Throws:
YarfrawException - if conversion failed


Copyright © 2008. All Rights Reserved.