org.nees.metadata.service
Interface Rewindable

All Known Implementing Classes:
NMDSFacade, NMDSSession

public interface Rewindable

Represents a referential context in which identifiers can be resolved to times, or accession events, in the past.

See Also:
NMDSSession, NMDSFacade

Field Summary
static int ACCESSION_NOT_REWOUND
           
static java.util.Date TIME_NOT_REWOUND
           
 
Method Summary
 int getRewindAccessionNumber()
          Get the accession number the context is rewound to.
 java.util.Date getRewindTime()
          Get the time the context is rewound to.
 boolean isRewound()
          Is this context rewound?
 void returnToCurrent()
          Return from a rewind.
 int rewindToAccessionNumber(int accNo)
          Rewind the context to a particular accession number.
 int rewindToTime(java.util.Date time)
          Rewind the context to an earlier time.
 

Field Detail

ACCESSION_NOT_REWOUND

public static final int ACCESSION_NOT_REWOUND
See Also:
Constant Field Values

TIME_NOT_REWOUND

public static final java.util.Date TIME_NOT_REWOUND
Method Detail

isRewound

public boolean isRewound()
Is this context rewound?


getRewindAccessionNumber

public int getRewindAccessionNumber()
Get the accession number the context is rewound to.


getRewindTime

public java.util.Date getRewindTime()
Get the time the context is rewound to.


rewindToTime

public int rewindToTime(java.util.Date time)
                 throws NMDSException
Rewind the context to an earlier time. This determines the greatest accession number whose timestamp is <= the given time, and rewinds to that accession number. This can also be accomplished using NMDSRewindCommand.

Parameters:
time - the time to rewind to.
Returns:
the accession number rewound to.
Throws:
NMDSException

rewindToAccessionNumber

public int rewindToAccessionNumber(int accNo)
                            throws NMDSException
Rewind the context to a particular accession number.

Parameters:
accNo - the accession number to rewind to.
Returns:
the accession number rewound to.
Throws:
NMDSException

returnToCurrent

public void returnToCurrent()
                     throws NMDSException
Return from a rewind. Can also be accomplished using NMDSReturnCommand

Throws:
NMDSException