krysalis-version/src/java/org/krysalis/version/specification DatestampedVersionSpecification.java,NONE,1.1 VersionSpecificationImpl.java,1.3,1.4 VersionSpecificationFactory.java,1.2,1.3

[email protected] Tue, 25 Mar 2003 08:01:35 -0800
Newsgroups gmane.comp.krysalis.sandbox
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/krysalis-version/src/java/org/krysalis/version/specification
In directory sc8-pr-cvs1:/tmp/cvs-serv1962/src/java/org/krysalis/version/specification

Modified Files:
	VersionSpecificationImpl.java VersionSpecificationFactory.java 
Added Files:
	DatestampedVersionSpecification.java 
Log Message:
Tried working on DatestampedSpec...

--- NEW FILE: DatestampedVersionSpecification.java ---
/*
The Krysalis Patchy Software License, Version 1.1_01

Copyright (c) 2002-2003 Nicola Ken Barozzi.  All rights reserved.

This Licence is compatible with the BSD licence as described and 
approved by http://www.opensource.org/, and is based on the
Apache Software Licence Version 1.1.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in
   the documentation and/or other materials provided with the
   distribution.

3. The end-user documentation included with the redistribution,
   if any, must include the following acknowledgment:
      "This product includes software developed for project
       Krysalis (http://www.krysalis.org/)."
   Alternately, this acknowledgment may appear in the software itself,
   if and wherever such third-party acknowledgments normally appear.

4. The names "Krysalis" and "Nicola Ken Barozzi" and
   "Krysalis Centipede" must not be used to endorse or promote products
   derived from this software without prior written permission. For
   written permission, please contact [email protected].

5. Products derived from this software may not be called "Krysalis",
   "Krysalis Centipede", nor may "Krysalis" appear in their name, without
    prior written permission of Nicola Ken Barozzi.

6. This software may contain voluntary contributions made by many 
   individuals, who decided to donate the code to this project in respect 
   of this licence.

THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
====================================================================
*/
package org.krysalis.version.specification;

import org.krysalis.version.formatting.VersionFormat;
import org.krysalis.version.formatting.format.DatestampedVersionFormat;
import org.krysalis.version.impl.VersionImplementationConstants;
import org.krysalis.version.impl.data.VersionDataElement;

/**
 *
 * @author $Author: arb_jack $
 * @version $Revision: 1.1 $
 * 
 */
public class DatestampedVersionSpecification extends VersionSpecificationImpl {

    /**
     * @see org.krysalis.version.specification.VersionSpecification#getId()
     */
    public String getId() {
        return VersionImplementationConstants.VERSION_PACKAGE+".datestamped";
    }

    /**
     * @see org.krysalis.version.specification.VersionSpecification#getDescription()
     */
    public String getDescription() {
        return "Datestamped Version Default Specification";
    }

    /**
     * @see org.krysalis.version.specification.VersionSpecification#getElementMask()
     */
    public int getElementMask() {
        return VersionDataElement.ELEMENT_BUILD_NUMBER;
    }

    /**
     * @see org.krysalis.version.specification.VersionSpecification#getVersionFormat()
     */
    public VersionFormat getVersionFormat() {
        return new DatestampedVersionFormat();
    }
}

Index: VersionSpecificationImpl.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-version/src/java/org/krysalis/version/specification/VersionSpecificationImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** VersionSpecificationImpl.java	21 Mar 2003 22:04:12 -0000	1.3
--- VersionSpecificationImpl.java	25 Mar 2003 16:01:01 -0000	1.4
***************
*** 92,95 ****
--- 92,96 ----
          out.print(indent);
          out.println("Format:" + getVersionFormat());
+         getVersionFormat().dump(out,depth+1);
      }
  

Index: VersionSpecificationFactory.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-version/src/java/org/krysalis/version/specification/VersionSpecificationFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** VersionSpecificationFactory.java	24 Mar 2003 01:25:46 -0000	1.2
--- VersionSpecificationFactory.java	25 Mar 2003 16:01:02 -0000	1.3
***************
*** 74,77 ****
--- 74,80 ----
  
          registerVersionSpecification(
+             VersionImplementationConstants.DATESTAMPED_VERSION_ID,
+             DatestampedVersionSpecification.class);
+         registerVersionSpecification(
              VersionImplementationConstants.KRYSALIS_VERSION_ID,
              KrysalisVersionSpecification.class);
***************
*** 105,108 ****
--- 108,115 ----
      public static VersionSpecification createKrysalisVersionSpecification() {
          return new KrysalisVersionSpecification();
+     }
+ 
+     public static VersionSpecification createDatestampedVersionSpecification() {
+         return new DatestampedVersionSpecification();
      }
  




-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en