001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/tools/shape/ShapeView.java $
002 /*
003
004 This file is part of deegree.
005 Copyright (C) 2001-2006 by:
006 EXSE, Department of Geography, University of Bonn
007 http://www.giub.uni-bonn.de/deegree/
008 lat/lon GmbH
009 http://www.lat-lon.de
010
011 This library is free software; you can redistribute it and/or
012 modify it under the terms of the GNU Lesser General Public
013 License as published by the Free Software Foundation; either
014 version 2.1 of the License, or (at your option) any later version.
015
016 This library is distributed in the hope that it will be useful,
017 but WITHOUT ANY WARRANTY; without even the implied warranty of
018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
019 Lesser General Public License for more details.
020
021 You should have received a copy of the GNU Lesser General Public
022 License along with this library; if not, write to the Free Software
023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
024
025 Application to index a shape file, using the R-tree algorithm.
026 Copyright (C) May 2003 by IDgis BV, The Netherlands - www.idgis.nl
027 */
028
029 package org.deegree.tools.shape;
030
031 import java.io.File;
032
033 import javax.swing.filechooser.FileView;
034
035 /**
036 *
037 *
038 *
039 * @version $Revision: 6259 $
040 * @author last edited by: $Author: bezema $
041 *
042 * @version 1.0. $Revision: 6259 $, $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $
043 *
044 * @since 2.0
045 */
046 public class ShapeView extends FileView
047 {
048 public String getName(File f)
049 {
050 String name = f.getName();
051
052 if(f.isDirectory())
053 return null;
054
055 return name.substring(0, name.length() - 4);
056 }
057 }/* ********************************************************************
058 Changes to this class. What the people have been up to:
059 $Log$
060 Revision 1.6 2006/07/12 14:46:14 poth
061 comment footer added
062
063 ********************************************************************** */