1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package net.sf.statcvs.output;
24
25 import java.io.IOException;
26 import java.net.URL;
27
28 /**
29 * CSS handler for a CSS file specified by a HTTP URL.
30 *
31 * @author Richard Cyganiak
32 */
33 public class UrlCssHandler implements CssHandler {
34
35 private final URL url;
36
37 /**
38 * Creates a new UrlCssHandler for a CSS file located at a given URL.
39 * @param url the url to the CSS file
40 */
41 public UrlCssHandler(final URL url) {
42 this.url = url;
43 }
44
45 /**
46 * Simply return the URL
47 * @see net.sf.statcvs.output.CssHandler#getLink()
48 */
49 public String getLink() {
50 return url.toString();
51 }
52
53 /**
54 * We could check here if there is a real CSS file at the URL, but
55 * this would require net access, so we just do nothing.
56 * @see net.sf.statcvs.output.CssHandler#checkForMissingResources()
57 */
58 public void checkForMissingResources() throws ConfigurationException {
59
60 }
61
62 /**
63 * We don't create any output files. We could copy the CSS file from
64 * the URL to the output dir, but this would require net access, so
65 * we just do nothing.
66 * @see net.sf.statcvs.output.CssHandler#createOutputFiles()
67 */
68 public void createOutputFiles() throws IOException {
69
70 }
71
72 /**
73 * toString
74 * @return string
75 */
76 public String toString() {
77 return "remote CSS file (" + url + ")";
78 }
79 }