incubator-depot-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nickcha...@apache.org
Subject svn commit: rev 22456 - in incubator/depot/trunk/version/src/java/org/apache/depot/version: . impl/data
Date Fri, 02 Jul 2004 08:04:04 GMT
Author: nickchalko
Date: Fri Jul  2 01:04:03 2004
New Revision: 22456

Modified:
   incubator/depot/trunk/version/src/java/org/apache/depot/version/VersionManager.java
   incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/data/VersionData.java
Log:
Added create version and made VersionData implement Version.

Modified: incubator/depot/trunk/version/src/java/org/apache/depot/version/VersionManager.java
==============================================================================
--- incubator/depot/trunk/version/src/java/org/apache/depot/version/VersionManager.java	(original)
+++ incubator/depot/trunk/version/src/java/org/apache/depot/version/VersionManager.java	Fri
Jul  2 01:04:03 2004
@@ -17,6 +17,8 @@
 package org.apache.depot.version;
 
 import org.apache.depot.version.impl.ApacheVersionMarker;
+import org.apache.depot.version.specification.formatting.VersionFormatException;
+import org.apache.depot.version.specification.formatting.VersionFormatFactory;
 
 /**
  * @author arb_jack@users.sourceforge.net
@@ -31,6 +33,16 @@
         throws VersionException {
         return new ApacheVersionMarker(id, version);
     }
+
+	/**
+	 * Create a Version object from the given string.
+	 * @param versionString
+	 * @return
+	 * @throws VersionFormatException
+	 */
+	public Version createVersion(String versionString) throws VersionFormatException {
+		return VersionFormatFactory.createDefaultVersionFormat().parseVersion(versionString);
+	}
 
     // :TODO:
     //  Stamp a version for ...

Modified: incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/data/VersionData.java
==============================================================================
--- incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/data/VersionData.java
(original)
+++ incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/data/VersionData.java
Fri Jul  2 01:04:03 2004
@@ -28,6 +28,7 @@
 import org.apache.depot.common.util.dom.DOMConsumer;
 import org.apache.depot.common.util.dom.DOMProducer;
 import org.apache.depot.common.util.dom.DOMUtils;
+import org.apache.depot.version.Version;
 import org.apache.depot.version.VersionError;
 import org.apache.depot.version.VersionException;
 import org.apache.depot.version.impl.VersionImplementationConstants;
@@ -44,7 +45,7 @@
  * @author arb_jack@users.apache.org
  */
 public class VersionData
-	implements Dumpable, Comparable, DOMProducer, DOMConsumer {
+	implements Dumpable, Comparable, DOMProducer, DOMConsumer, Version {
 
 	public final static String VERSION_TAG = "version";
 	public final static String MAJOR_TAG = "major";
@@ -834,6 +835,22 @@
 	public static VersionData getTestVersionData(int major,int minor,ReleaseLevel level,int
point)
 	{
 		return new TestVersionData(major,minor);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.version.Version#isCompatible(org.apache.depot.version.Version)
+	 */
+	public boolean isCompatible(Version version) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.version.Version#increment(java.lang.String)
+	 */
+	public Version increment(String level) throws VersionException {
+		// TODO Auto-generated method stub
+		return null;
 	}
 }
 

Mime
View raw message