org.gcube.common
Class OAIMetadataFormatList

java.lang.Object
  extended by org.gcube.common.OAIMetadataFormatList

public class OAIMetadataFormatList
extends Object

This class represents a list of Metadata Formats, as returned by the ListMetadataFormats OAI request. This class is similar to a read-only, forward-only database cursor. It will automatically handle resumptionTokens and any other flow control used by a repository, such as HTTP redirects or retries. This object is returned by the OAIRepository.ListMetadataFormats method.


Constructor Summary
OAIMetadataFormatList()
          Constructs an empty list of OAI metadata formats.
 
Method Summary
protected  void frndSetOAIResumptionStream(OAIResumptionStream rs)
           
 int getCompleteSize()
          Return the number of items in the list (-1 if unknown)
 int getCurrentIndex()
          Return the index of the current item (0 to CompleteListSize-1)
 OAIMetadataFormat getCurrentItem()
          Returns an OAIMetadataFormat object for the current record in the list.
 OAIRepository getOAIRepository()
          Returns the OAIRepository object from which this list was created.
 boolean isListValid()
          Returns true if the record list appears to be valid (well-formed, and if the Validation if Very Strict also valid according to the XML Schemas); if the Validation is Loose and the record is not well-formed, false is returned.
 boolean moreItems()
          Returns true if there are more records in the record list; else false.
 void moveNext()
          Moves the cursor location to the next record in the list.
 void requery()
          This will reset the entire list to the beginning, redoing the query from scratch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAIMetadataFormatList

public OAIMetadataFormatList()
Constructs an empty list of OAI metadata formats.

Method Detail

isListValid

public boolean isListValid()
Returns true if the record list appears to be valid (well-formed, and if the Validation if Very Strict also valid according to the XML Schemas); if the Validation is Loose and the record is not well-formed, false is returned.


frndSetOAIResumptionStream

protected void frndSetOAIResumptionStream(OAIResumptionStream rs)

getCurrentItem

public OAIMetadataFormat getCurrentItem()
                                 throws OAIException
Returns an OAIMetadataFormat object for the current record in the list.

Throws:
OAIException

getCurrentIndex

public int getCurrentIndex()
                    throws OAIException
Return the index of the current item (0 to CompleteListSize-1)

Throws:
OAIException

getCompleteSize

public int getCompleteSize()
                    throws OAIException
Return the number of items in the list (-1 if unknown)

Throws:
OAIException

moreItems

public boolean moreItems()
                  throws OAIException
Returns true if there are more records in the record list; else false.

Throws:
OAIException

moveNext

public void moveNext()
              throws OAIException
Moves the cursor location to the next record in the list.

Throws:
OAIException

getOAIRepository

public OAIRepository getOAIRepository()
Returns the OAIRepository object from which this list was created.


requery

public void requery()
             throws OAIException
This will reset the entire list to the beginning, redoing the query from scratch.

Throws:
OAIException


Copyright © 2013. All Rights Reserved.