gov.nasa.pds.registry.model.naming
Class DefaultVersioner

java.lang.Object
  extended by gov.nasa.pds.registry.model.naming.DefaultVersioner
All Implemented Interfaces:
Versioner

public class DefaultVersioner
extends Object
implements Versioner


Constructor Summary
DefaultVersioner()
           
 
Method Summary
 Comparator<RegistryObject> getComparator()
          This comparator imposes orderings that are inconsistent with equals as it only compares the version attribute on Registry Objects.
 String getInitialVersion()
           
 String getNextVersion(String currentVersion)
           
 String getNextVersion(String currentVersion, boolean major)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultVersioner

public DefaultVersioner()
Method Detail

getComparator

public Comparator<RegistryObject> getComparator()
This comparator imposes orderings that are inconsistent with equals as it only compares the version attribute on Registry Objects. Should only be used to sort a list of RegistryObjects with the same lid.

Specified by:
getComparator in interface Versioner

getInitialVersion

public String getInitialVersion()
Specified by:
getInitialVersion in interface Versioner

getNextVersion

public String getNextVersion(String currentVersion)
Specified by:
getNextVersion in interface Versioner

getNextVersion

public String getNextVersion(String currentVersion,
                             boolean major)
Specified by:
getNextVersion in interface Versioner


Copyright © 2010-2011 Planetary Data System. All Rights Reserved.