uk.ac.soton.itinnovation.grid.utils
Class AtomUtils
java.lang.Object
uk.ac.soton.itinnovation.grid.utils.AtomUtils
public class AtomUtils
- extends Object
|
Method Summary |
static void |
addEntry(Document doc,
String id,
Date updated,
String title,
Element xhtmlDiv)
Add a new entry to this feed. |
static void |
addEntry(Document doc,
String id,
Date updated,
String title,
String content)
Add a new text entry to this feed. |
static void |
appendSimpleChild(Element node,
String namespaceURI,
String qName,
String content)
|
static Element |
createAnchor(Document doc,
String href,
String text)
|
static Element |
divFromXML(Document doc,
String xml)
|
static Iterator |
entryIterator(Document doc)
|
static Element |
getChildElementNS(Element parent,
String uri,
String name)
|
static Date |
getDate(Element entry)
|
static Document |
getEmptyAtomFeed(String title,
String author,
String endpoint,
String homePage)
|
static Document |
getEmptyAtomFeed(String title,
String version,
String author,
String endpoint,
String homePage)
|
static String |
getLink(Element entry)
|
static String |
getTime(Date time)
|
static String |
getTitle(Element entry)
|
static void |
markSelected(Document doc,
String id)
Find the entry with ID 'id' and add a grid:selected attribute. |
static void |
mergeFeed(Document main,
Document subFeed)
Add the entries in subFeed to main. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GRID_NS
public static final String GRID_NS
- See Also:
- Constant Field Values
ATOM_NS
public static final String ATOM_NS
- See Also:
- Constant Field Values
XHTML_NS
public static final String XHTML_NS
- See Also:
- Constant Field Values
AtomUtils
public AtomUtils()
appendSimpleChild
public static void appendSimpleChild(Element node,
String namespaceURI,
String qName,
String content)
getTime
public static String getTime(Date time)
getEmptyAtomFeed
public static Document getEmptyAtomFeed(String title,
String author,
String endpoint,
String homePage)
getEmptyAtomFeed
public static Document getEmptyAtomFeed(String title,
String version,
String author,
String endpoint,
String homePage)
addEntry
public static void addEntry(Document doc,
String id,
Date updated,
String title,
String content)
- Add a new text entry to this feed.
This version of addEntry adds an entry with a single paragraph of simple text.
addEntry
public static void addEntry(Document doc,
String id,
Date updated,
String title,
Element xhtmlDiv)
- Add a new entry to this feed.
- Parameters:
doc - the feed to add it toid - a globally unique URI for this entryupdated - when this entry was created / last updatedtitle - a short summaryxhtmlDiv - an XHTML div element with the content
mergeFeed
public static void mergeFeed(Document main,
Document subFeed)
- Add the entries in subFeed to main.
createAnchor
public static Element createAnchor(Document doc,
String href,
String text)
getTitle
public static String getTitle(Element entry)
getDate
public static Date getDate(Element entry)
getLink
public static String getLink(Element entry)
entryIterator
public static Iterator entryIterator(Document doc)
divFromXML
public static Element divFromXML(Document doc,
String xml)
markSelected
public static void markSelected(Document doc,
String id)
- Find the entry with ID 'id' and add a grid:selected attribute. The style-sheet
uses this to highlight the entry.
getChildElementNS
public static Element getChildElementNS(Element parent,
String uri,
String name)
Copyright © 2001-2007 University of Southampton IT Innovation Centre. All Rights Reserved.