krysalis-version/src/java/org/krysalis/version/eclipse/plugin/model ConstraintContentProvider.java,NONE,1.1 DefaultSectionsParser.java,NONE,1.1 ConstraintModelFactory.java,NONE,1.1 IConstraintFileParser.java,NONE,1.1

[email protected] Fri, 21 Mar 2003 15:33:01 -0800
Newsgroups gmane.comp.krysalis.sandbox
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/krysalis-version/src/java/org/krysalis/version/eclipse/plugin/model
In directory sc8-pr-cvs1:/tmp/cvs-serv22996/src/java/org/krysalis/version/eclipse/plugin/model

Added Files:
	ConstraintContentProvider.java DefaultSectionsParser.java 
	ConstraintModelFactory.java IConstraintFileParser.java 
Log Message:
Constraint changes

--- NEW FILE: ConstraintContentProvider.java ---
/*****************************************************************************
 * Copyright (C) The Krysalis project. All rights reserved.                  *
 * ------------------------------------------------------------------------- *
 * This software is published under the terms of the Krysalis Patchy         *
 * Software License version 1.1_01, a copy of which has been included        *
 * at the bottom of this file.                                               *
 *****************************************************************************/
package org.krysalis.version.eclipse.plugin.model;

import java.util.ArrayList;

import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;
import org.krysalis.version.constraint.ConstraintSet;
import org.krysalis.version.constraint.collecting.ConstraintSetCollection;
import org.krysalis.version.constraint.collecting.UberConstraintCollector;

public class ConstraintContentProvider implements IStructuredContentProvider
{

	ArrayList m_classpathEntries = null;
	String[][] m_versionData = null;

	/**
	 * @see IStructuredContentProvider#getElements(Object)
	 */
	public Object[] getElements(Object parent)
	{
		System.out.println("ConstraintContentProvider::getElements");
		Object[] returnObjArray = null;
		
		try
		{
			ConstraintSetCollection collection = 
				   (new UberConstraintCollector()).collect();
				   
			System.out.println("ConstraintContentProvider: - collection size ["+collection.size()+"]");	   
			returnObjArray = collection.toArray();
		}
		catch (Exception exp)
		{
			System.out.println("Exception in getting the elements " + exp);
			// log the exception
			returnObjArray = new Object[0];
		}
		return returnObjArray;
		
	}

	/**
	 * @see IContentProvider#dispose()
	 */
	public void dispose()
	{
	}

	/**
	 * @see IContentProvider#inputChanged(Viewer, Object, Object)
	 */
	public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
	{
		System.out.println("VersionContentProvider::inputChanged");
	}


}
/*
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 KRYSALIS PROJECT 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.
====================================================================*/
--- NEW FILE: DefaultSectionsParser.java ---
/*****************************************************************************
 * Copyright (C) The Krysalis project. All rights reserved.                  *
 * ------------------------------------------------------------------------- *
 * This software is published under the terms of the Krysalis Patchy         *
 * Software License version 1.1_01, a copy of which has been included        *
 * at the bottom of this file.                                               *
 *****************************************************************************/
package org.krysalis.version.eclipse.plugin.model;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Hashtable;
import java.util.Vector;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.krysalis.version.eclipse.plugin.util.MarkElement;

/**
 * This class is a simple parser implementing the IconstraintFileParser
 * interface. It parses a constraint file into sections based on the
 * existence of numbered section tags in the input. A line beginning
 * with a number followed by a dot will be taken as a section indicator
 * (for example, 1., 2., or 12.). 
 * As well, a line beginning with a subsection-style series of numbers
 * will also be taken as a section indicator, and can be used to 
 * indicate subsections (for example, 1.1, or 1.1.12).
 */
public class DefaultSectionsParser implements IConstraintFileParser
{
	/**
	 * Returns a string containing the contents of the given
	 * file.  Returns an empty string if there were any errors
	 * reading the file.
	 */
	protected String getText(IFile file)
	{
		try
		{
			InputStream in = file.getContents();
			ByteArrayOutputStream out = new ByteArrayOutputStream();
			byte[] buf = new byte[1024];
			int read = in.read(buf);
			while (read > 0)
			{
				out.write(buf, 0, read);
				read = in.read(buf);
			}
			return out.toString();
		}
		catch (CoreException e)
		{
		}
		catch (IOException e)
		{
		}
		return ""; //$NON-NLS-1$
	}
	/**
	 * Parses the input given by the argument.
	 *
	 * @param file  the element containing the input text
	 * @return an element collection representing the parsed input
	 */
	public MarkElement[] parse(IFile file)
	{
		Hashtable clazzTable = new Hashtable(40);
		Vector topLevel = new Vector();
		String s = getText(file);
		int start = 0;
		int end = -1;
		int lineno = 0;
		int lastlineno = 0;
		MarkElement lastme = null;
		int ix;
		
		System.out.println("File to be parsed [" + s + "]");

		// parse content for headings
		ix = s.indexOf('\n', start);
		while (ix != -1)
		{
			start = end + 1;
			end = ix = s.indexOf('\n', start);
			lineno++;
			if(start < end)
			{
			
				// skip blanks
				while (s.charAt(start) == ' ' || s.charAt(start) == '\t')
				{
					start++;
				}
				if (lastme != null)
				{
					lastme.setNumberOfLines(lineno - lastlineno - 1);
				}
				lastlineno = lineno;
				
				if (ix == -1)  // get the end of the string
				{
					end = s.length();
				}
				
				String line = s.substring(start,end);
				System.out.println("Line to be parsed [" + line + "]");
				int ruleIndex = getRuleIndex(line);
				System.out.println("Rule Index returned [" + ruleIndex + "]");
	
				String rule = (line.substring(ruleIndex-1, line.length()) ).trim();
				System.out.println("Rule  [" + rule + "]");
				
				String clazzName = ( line.substring(0, ruleIndex-1) ).trim();
				System.out.println("Class  [" + clazzName + "]");
				
				IAdaptable parent = (IAdaptable) clazzTable.get(clazzName);
				
				if(parent == null)
				{
				
					parent = new MarkElement(file, clazzName,
												start, ruleIndex - start);
					clazzTable.put(clazzName, parent);
					topLevel.add(parent);
				}
				 					
				MarkElement me = new MarkElement(parent, rule, ruleIndex, end );
				lastme = me;
			}	
		}
		if (lastme != null)
		{
			// set the number of lines for the last section
			lastme.setNumberOfLines(lineno - lastlineno - 1);
		}
		MarkElement[] results = new MarkElement[topLevel.size()];
		topLevel.copyInto(results);
		return results;
	}
	/**
	 * Creates a section name from the buffer and trims trailing
	 * space characters.
	 *
	 * @param buffer  the string from which to create the section name
	 * @param start  the start index
	 * @param end  the end index
	 * @return a section name
	 */
	private String parseHeading(String buffer, int start, int end)
	{
		while (Character.isWhitespace(buffer.charAt(end - 1)) && end > start)
		{
			end--;
		}
		return buffer.substring(start, end);
	}
	 
	protected int getRuleIndex(String rule)
	{
		int start = 0;
		int end = rule.length();
		char c;
		do
		{
			c = rule.charAt(start++);
		}
		while ((c != '>' && c != '<' && c != '=') && start < end);

		return  start;
	}
}
/*
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 KRYSALIS PROJECT 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.
====================================================================*/
--- NEW FILE: ConstraintModelFactory.java ---
/*****************************************************************************
 * Copyright (C) The Krysalis project. All rights reserved.                  *
 * ------------------------------------------------------------------------- *
 * This software is published under the terms of the Krysalis Patchy         *
 * Software License version 1.1_01, a copy of which has been included        *
 * at the bottom of this file.                                               *
 *****************************************************************************/
package org.krysalis.version.eclipse.plugin.model;

import java.io.FileReader;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IPluginRegistry;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.internal.model.AdaptableList;
import org.krysalis.version.constraint.ConstraintSet;
import org.krysalis.version.constraint.loading.loaders.ConstraintTextLoader;
import org.krysalis.version.eclipse.plugin.util.IConstraintConstants;
import org.krysalis.version.eclipse.plugin.util.MarkElement;
import org.krysalis.version.eclipse.plugin.util.MessageUtil;

/**
 * Creates the sections used in the <code>ContentOutline</code>
 *
 * @see ConstraintContentOutlinePage#getContentOutline(IAdaptable)
 */
public class ConstraintModelFactory
{
	private static ConstraintModelFactory instance = new ConstraintModelFactory();
	private boolean registryLoaded = false;
	IConstraintFileParser parser = null;
	/**
	 * Creates a new ConstraintModelFactory.
	 */
	private ConstraintModelFactory()
	{
	}
	/**
	 * Adds all mark elements to the list for the subtree rooted
	 * at the given mark element.
	 */
	protected void addSections(AdaptableList list, MarkElement element)
	{
		list.add(element);
		Object[] children = element.getChildren(element);
		for (int i = 0; i < children.length; ++i)
		{
			addSections(list, (MarkElement) children[i]);
		}
	}
	/**
	 * Returns the content outline for the given Constraint file.
	 *
	 * @param adaptable  the element for which to return the content outline
	 * @return the content outline for the argument
	 */
	public AdaptableList getContentOutline(IAdaptable adaptable)
	{
		return new AdaptableList(getToc((IFile) adaptable));
	}
	/**
	 * Returns the singleton Constraint adapter.
	 */
	public static ConstraintModelFactory getInstance()
	{
		return instance;
	}
	/**
	 * Returns a list of all sections in this Constraint file.
	 *
	 * @param file  the file for which to return section heading and subheadings
	 * @return A list containing headings and subheadings
	 */
	public AdaptableList getSections(IFile file)
	{
		MarkElement[] topLevel = getToc(file);
		AdaptableList list = new AdaptableList();
		for (int i = 0; i < topLevel.length; i++)
		{
			addSections(list, topLevel[i]);
		}
		return list;
	}
	/**
	 * Returns a list of all sections in this Constraint file.
	 *
	 * @param file  the file for which to return section heading and subheadings
	 * @return A list containing headings and subheadings
	 */
	public ConstraintSet getConstraints(IFile file)
	{
		ConstraintSet set = null;
		try
		{
		
			ConstraintTextLoader loader = new ConstraintTextLoader();
			set = loader.load(file.getContents());
		}
		catch (CoreException e)
		{
		}
		catch (Exception e)
		{
		}
		
		return set;
	}
	/**
	 * Convenience method.  Looks for a Constraint file in the selection,
	 * and if one is found, returns the sections for it.  Returns null
	 * if there is no Constraint file in the selection.
	 */
	public AdaptableList getSections(ISelection sel)
	{
		// If sel is not a structured selection just return.
		if (!(sel instanceof IStructuredSelection))
			return null;
		IStructuredSelection structured = (IStructuredSelection) sel;

		//if the selection is a Constraint file, get its sections.
		Object object = structured.getFirstElement();
		if (object instanceof IFile)
		{
			IFile file = (IFile) object;
			String extension = file.getFileExtension();
			if (extension != null && extension.equals(IConstraintConstants.EXTENSION))
			{
				return getSections(file);
			}
		}

		//the selected object is not a Constraint file
		return null;
	}

	public ConstraintSet getConstraints(ISelection sel)
	{
		// If sel is not a structured selection just return.
		if (!(sel instanceof IStructuredSelection))
			return null;
		IStructuredSelection structured = (IStructuredSelection) sel;

		//if the selection is a Constraint file, get its sections.
		Object object = structured.getFirstElement();
		if (object instanceof IFile)
		{
			IFile file = (IFile) object;
			String extension = file.getFileExtension();
			if (extension != null && extension.equals(IConstraintConstants.EXTENSION))
			{
				return getConstraints(file);
			}
		}

		//the selected object is not a Constraint file
		return null;
	}

	/**
	 * Parses the contents of the Constraint file by looking for lines 
	 * that start with a number.
	 *
	 * @param file  the file representing the Constraint file
	 * @return an element collection representing the table of contents
	 */
	private MarkElement[] getToc(IFile file)
	{
		if (registryLoaded == false)
			loadParser();
		return parser.parse(file);
	}
	/**
	 * Loads the parser from the registry by searching for
	 * extensions that satisfy our published extension point.
	 * For the sake of simplicity, we will pick the last extension,
	 * allowing tools to override what is used. In a more
	 * elaborate tool, all the extensions would be processed.
	 */
	private void loadParser()
	{
		IPluginRegistry pluginRegistry = Platform.getPluginRegistry();
		IExtensionPoint point =
			pluginRegistry.getExtensionPoint(IConstraintConstants.PLUGIN_ID, IConstraintConstants.PP_SECTION_PARSER);
		if (point != null)
		{
			IExtension[] extensions = point.getExtensions();
			for (int i = 0; i < extensions.length; i++)
			{
				IExtension currentExtension = extensions[i];
				// in a real application, we would collection
				// the entire list and probably expose it
				// as a drop-down list. For the sake
				// of simplicity, we will pick the last extension only.
				if (i == extensions.length - 1)
				{
					IConfigurationElement[] configElements = currentExtension.getConfigurationElements();
					for (int j = 0; j < configElements.length; j++)
					{
						IConfigurationElement config = configElements[i];
						if (config.getName().equals(IConstraintConstants.TAG_PARSER))
						{
							// process the first 'parser' element and stop
							processParserElement(config);
							break;
						}
					}
				}
			}
		}
		if (parser == null)
			parser = new DefaultSectionsParser();
		registryLoaded = true;
	}
	/**
	 * Tries to create the Constraint file parser. If an error occurs during
	 * the creation of the parser, print an error and set the parser
	 * to null.
	 *
	 * @param element  the element to process
	 */
	private void processParserElement(IConfigurationElement element)
	{
		try
		{
			parser = (IConstraintFileParser) element.createExecutableExtension(IConstraintConstants.ATT_CLASS);
		}
		catch (CoreException e)
		{
			// since this is an example just write to the console
			System.out.println(MessageUtil.getString("Unable_to_create_file_parser") + e.getStatus().getMessage()); //$NON-NLS-1$
			parser = null;
		}
	}
}
/*
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 KRYSALIS PROJECT 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.
====================================================================*/
--- NEW FILE: IConstraintFileParser.java ---
/*****************************************************************************
 * Copyright (C) The Krysalis project. All rights reserved.                  *
 * ------------------------------------------------------------------------- *
 * This software is published under the terms of the Krysalis Patchy         *
 * Software License version 1.1_01, a copy of which has been included        *
 * at the bottom of this file.                                               *
 *****************************************************************************/
package org.krysalis.version.eclipse.plugin.model;

import org.eclipse.core.resources.IFile;
import org.krysalis.version.eclipse.plugin.util.MarkElement;

/**
 * This interface is used as API for the constraint parser extension 
 * point. The default implementation simply looks for lines
 * in the file that start with a number and assumes that they
 * represent sections. Tools are allowed to replace this 
 * algorithm by defining an extension and supplying an 
 * alternative that implements this interface.
 */
public interface IConstraintFileParser
{
	/**
	 * Parses the contents of the provided file
	 * and generates a collection of sections.
	 */
	public MarkElement[] parse(IFile constraintFile);
}
/*
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 KRYSALIS PROJECT 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.
====================================================================*/



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en