1 26 27 29 package de.nava.informa.impl.castorjdo; 30 31 import java.net.URL ; 32 import java.net.MalformedURLException ; 33 import org.apache.commons.logging.Log; 34 import org.apache.commons.logging.LogFactory; 35 36 import de.nava.informa.core.ImageIF; 37 38 43 public class Image extends de.nava.informa.impl.basic.Image 44 implements ImageIF, java.io.Serializable { 45 46 private static Log logger = LogFactory.getLog(Channel.class); 47 48 public Image() { 49 super(); 50 } 51 52 56 public String getLocationAsString(){ 57 return getLocation().toString(); 58 } 59 60 public void setLocation(String location) { 61 try { 62 setLocation(new URL (location)); 63 } catch (MalformedURLException e) { 64 try { 65 logger.info("Resetting invalid location <" + location + ">: " + e); 66 setLocation(new URL ("http://example.org")); 67 } catch (MalformedURLException x) { 68 } 70 } 71 } 72 73 } 74 | Popular Tags |