## page was renamed from RFCTemplate ## This template may be useful for creating new RFC's (Request for comments) ## This is a wiki comment - leave these in so that people can see them when editing the page || '''RFC Name''' : Java code license clean-up || '''Editor(s)''': Mike Smoot, Gary Bader || <> == About this document == This is an official Request for Comment (RFC) for Java code license clean-up For details on RFCs in general, check out the [[http://www.answers.com/main/ntquery?method=4&dsid=2222&dekey=Request+for+Comments&gwp=8&curtab=2222_1&linktext=Request%20for%20Comments|Wikipedia Entry: Request for Comments (RFCs)]] == Status == ##Put the date and the status. Status can be e.g. "Not yet completely written", "Open for public comment", "Closed for public comment". There could be some explanation of the status This RFC is '''closed''' and has been implemented. See the implementation details below. == Proposal == * We would like to standardize the headers of all Java class files that were created by Cytoscape developers in the cytoscape directory in CVS. * We are not changing any code in the csplugins directory now. * We need to respect the headers of files that are in the cytoscape directory, but were not written by us (exceptions) We propose to put the following header at the top of each Cytoscape 'owned' Java source code file. {{{ /* File: Cytoscape.java Copyright (c) 2006 The Cytoscape Consortium (www.cytoscape.org) The Cytoscape Consortium is: - Institute for Systems Biology - University of California San Diego - Memorial Sloan-Kettering Cancer Center - Pasteur Institute - Agilent Technologies This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and documentation provided hereunder is on an "as is" basis, and the Institute for Systems Biology and the Whitehead Institute have no obligations to provide maintenance, support, updates, enhancements or modifications. In no event shall the Institute for Systems Biology and the Whitehead Institute be liable to any party for direct, indirect, special, incidental or consequential damages, including lost profits, arising out of the use of this software and its documentation, even if the Institute for Systems Biology and the Whitehead Institute have been advised of the possibility of such damage. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ }}} Followed by package and import statements and code == Existing license examples == {{{ //ExpressionData.java /** Copyright (c) 2002 Institute for Systems Biology and the Whitehead Institute ** ** This library is free software; you can redistribute it and/or modify it ** under the terms of the GNU Lesser General Public License as published ** by the Free Software Foundation; either version 2.1 of the License, or ** any later version. ** ** This library is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF ** MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and ** documentation provided hereunder is on an "as is" basis, and the ** Institute for Systems Biology and the Whitehead Institute ** have no obligations to provide maintenance, support, ** updates, enhancements or modifications. In no event shall the ** Institute for Systems Biology and the Whitehead Institute ** be liable to any party for direct, indirect, special, ** incidental or consequential damages, including lost profits, arising ** out of the use of this software and its documentation, even if the ** Institute for Systems Biology and the Whitehead Institute ** have been advised of the possibility of such damage. See ** the GNU Lesser General Public License for more details. ** ** You should have received a copy of the GNU Lesser General Public License ** along with this library; if not, write to the Free Software Foundation, ** Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. **/ //-------------------------------------------------------------------- // $Revision: 1.22 $ // $Date: 2005/01/18 19:22:38 $ // $Author: cerami $ //-------------------------------------------------------------------- }}} {{{ //--------------------------------------------------------------------------- // $Revision: 1.1 $ // $Date: 2004/06/15 22:46:56 $ // $Author: amarkiel $ //--------------------------------------------------------------------------- }}} {{{ /* * The contents of this file are subject to the Sapient Public License * Version 1.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * http://carbon.sf.net/License.html. * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific language governing rights and limitations under the License. * * The Original Code is The Carbon Component Framework. * * The Initial Developer of the Original Code is Sapient Corporation * * Copyright (C) 2003 Sapient Corporation. All Rights Reserved. */ }}} == (no longer) Open Issues == * Who should copyright be assigned to? Should all code be assigned to the Cytoscape Consortium? * yes * How should we deal with existing author statements? Ideally they would be preserved. * Author information preserved in the original copyright statement (if it existed) was not preserved. Author information external of the original copyright statemet was preserved. Of course, all author information still exists in CVS. == Discussion == MikeSmoot comments: * I don't like the double ** at the beginning of each line of comments because it implies that the comment is javadoc, even though it isn't. I'd prefer something like: {{{ /* * Copyright... */ }}} or {{{ //------------------------------------------------- // Copyright... //------------------------------------------------- }}} but that's just a minor quibble. GaryBader - sounds good, though we could make it even simpler like: {{{ /* Copyright... ... */ }}} * It's not clear to me whether we're changing all of the licenses to be the same or whether we're just adding a header to those files that are missing it. * GaryBader - Ideally, we normalize all the code that is copyright Cytoscape. Maybe this needs more discussion. * I don't think that we can change the Sapient licensed code. * GaryBader - definitely agree. The script needs to somehow avoid replacing headers on code that is not our own. * I don't like the CVS tags included in the file. I find the information redundant (that's what CVS is for) and that it clutters up the code. Also, for some files, the Log at the botton of the file will get really, really long (e.g. Cytoscape.java is currently at revision 95). * GaryBader - Fine with me, following the 'when in doubt, keep it simple' design maxim. * We might want to add the name of the file to the Copyright statement, e.g.: {{{ //------------------------------------------------- // File: Cytoscape.java // Copyright (c) 2006 Cytoscape Consortium. // ... //------------------------------------------------- }}} * GaryBader - since the script is automatic, this would be easy. Personally, I don't find this that useful, since my IntelliJ IDE makes this information easy to read, but maybe it is useful in emacs or something. * MikeSmoot - I was thinking it was appropriate just because most licenses (including the LGPL) list the file name as part of the copyright statement. <
> == Implementation == * Using this [[attachment:addCopyright.pl|script]] and this [[attachment:header.cytoscape|header]] file, I added the new copyright information. * The first step was to move the cytoscape/src/cytoscape/util/swing directory to some place where the files wouldn't have their copyrights altered. This is because some of the copyright on some files in this directory are not owned by us and therefore we can't change them. * To add the copyright to all of the other files, the command I ran was something like (from the cytoscape/src directory). find . -name "*.java" -exec addCopyright.pl -a none -h cytoscape.header --extract {} \; * Next I moved the cytoscape/src/cytoscape/util/swing back into place and updated all of the copyrights I was allowed to manually: addCopyright.pl -a none -h cytoscape.header --extract Bio*.java * Check the code in, because you're done. <
> * A handy trick that can be used to fix small mistakes: find . -name "*.java" -exec perl -p -i.bak -e "s/Institute of Systems Biology/Institute for Systems Biology/;" {} \;