* Check that there are no duplicates and that the next version being added is the next in the sequence
*/
public synchronized void add(Version version) throws org.dbwiki.exception.WikiException {
//System.out.println("DEBUG: "+version.toString());
if (_versionNameIndex.containsKey(version.name())) {
throw new WikiTimeException(WikiTimeException.DuplicateVersion, "Version " + version.name() + " already exists");
}
if (version.number() != (_versionList.size() + 1)) {
throw new WikiFatalException("Invalid version number " + version.number() + ". Expected number is " + (_versionList.size() + 1));
}