@@ -0,0 +1,2303 @@
+/*%0A * The Gemma project.%0A * %0A * Copyright (c) 2006 University of British Columbia%0A * %0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *       http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A *%0A */%0Apackage edu.columbia.gemma.common.description;%0A%0Aimport java.io.File;%0Aimport java.net.URI;%0Aimport java.net.URISyntaxException;%0A%0Aimport org.apache.commons.logging.Log;%0Aimport org.apache.commons.logging.LogFactory;%0A%0A/**%0A * @author pavlidis%0A * @version $Id$%0A * @see edu.columbia.gemma.common.description.LocalFile%0A */%0Apublic class LocalFileImpl extends edu.columbia.gemma.common.description.LocalFile %7B%0A%0A    private static Log log = LogFactory.getLog( LocalFileImpl.class.getName() );%0A%0A    /**%0A     * The serial version UID of this class. Needed for serialization.%0A     */%0A    private static final long serialVersionUID = -2781283721621657394L;%0A%0A    /**%0A     * Attempt to create a java.io.File from the local URI. If it doesn't look like a URI, it is just treated as a path.%0A     * %0A     * @see edu.columbia.gemma.common.description.LocalFile#asFile()%0A     */%0A    public java.io.File asFile() %7B%0A        URI u;%0A        try %7B%0A            u = new URI( this.getLocalURI() );%0A        %7D catch ( URISyntaxException e ) %7B%0A            log.warn( this.getLocalURI() + %22 could not be converted into a URI, treating as plain path.%22 );%0A            // maybe it's just a regular file.%0A            return new File( this.getLocalURI() );%0A            // throw new RuntimeException( e );%0A        %7D%0A        return new File( u.getPath() );%0A    %7D%0A%0A    /**%0A     * @see edu.columbia.gemma.common.description.LocalFile#canRead()%0A     */%0A    public Boolean canRead() %7B%0A        return this.asFile().canRead();%0A    %7D%0A%0A    /**%0A     * @see edu.columbia.gemma.common.description.LocalFile#canWrite()%0A     */%0A    public Boolean canWrite() %7B%0A        return this.asFile().canWrite();%0A    %7D%0A%0A%7D

make asFile a bit more robust/tolerant, for better or worse.