|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.client.toolkit.activity.xmldb.XMLResourceSetBlockMaker
This BlockMaker
processes an
org.xmldb.api.base.ResourceSet
, returning an XML
representation as a sequence of java.lang.String
blocks.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private static java.lang.String |
FOOTER
Footer for the XML representation. |
private static java.lang.String |
HEADER
Header for the XML representation. |
private boolean |
mFirstCall
Used to ensure that the header is written on the first call to next . |
private boolean |
mMoreBlocks
Tracks whether there are any more blocks to be retrieved. |
private org.xmldb.api.base.ResourceIterator |
mResourceIterator
Resource iterator |
Constructor Summary | |
XMLResourceSetBlockMaker(org.xmldb.api.base.ResourceSet resourceSet)
Constructor. |
Method Summary | |
boolean |
hasNext()
Returns true if this BlockMaker has
more blocks to return, otherwise false |
java.lang.Object |
next()
Returns the next block. |
private java.lang.String |
resourceToXML(org.xmldb.api.base.Resource resource)
Converts a Resource into an XML
String representation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static final java.lang.String HEADER
private static final java.lang.String FOOTER
private org.xmldb.api.base.ResourceIterator mResourceIterator
private boolean mMoreBlocks
private boolean mFirstCall
next
.
Constructor Detail |
public XMLResourceSetBlockMaker(org.xmldb.api.base.ResourceSet resourceSet) throws BlockMakerException
resourceSet
- A ResourceSet
to be converted to XML and
provided as blocks.
java.lang.IllegalArgumentException
- If resourceSet
is null
.
BlockMakerException
- If for some reason there is a problem setting up the
block maker using resourceSet
.Method Detail |
public boolean hasNext() throws BlockMakerException
BlockMaker
true
if this BlockMaker
has
more blocks to return, otherwise false.
- Specified by:
hasNext
in interface BlockMaker
- Returns:
true
or false
.
- Throws:
BlockMakerException
- if a problem occurs when accessing the blocks.
public java.lang.Object next() throws BlockMakerException
BlockMaker
next
in interface BlockMaker
Object
.
BlockMakerException
- if a problem occurs when accessing the block.private java.lang.String resourceToXML(org.xmldb.api.base.Resource resource) throws org.xmldb.api.base.XMLDBException
Resource
into an XML
String
representation.
resource
- Resource
to convert.
org.xmldb.api.base.XMLDBException
- If there is a problem accessing the content of the
Resource
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |