1 package be
.nikiroo
.gofetch
.output
;
3 import be
.nikiroo
.gofetch
.data
.Story
;
4 import be
.nikiroo
.gofetch
.support
.BasicSupport
;
5 import be
.nikiroo
.gofetch
.support
.Type
;
8 * Base class for output operations.
12 public abstract class Output
{
14 * The type of source, can be NULL for no-type.
19 * The gopher hostname to use.
21 protected String hostname
;
24 * The sub directory and (pre-)selector to use for the resources.
26 protected String preselector
;
29 * The Gopher port to use.
34 * Create a new {@link Output} class for the given type (which can be NULL).
37 * the type or NULL for no type
39 * the gopher hostname to use
41 * the sub directory and (pre-)selector to use for the resources
43 * the Gopher port to use
45 public Output(Type type
, String hostname
, String preselector
, int port
) {
47 this.hostname
= hostname
;
48 this.preselector
= preselector
;
53 * Get the header to use in the main index file (the one which will
54 * reference all the supported web sites <tt>index</tt> files).
58 abstract public String
getMainIndexHeader();
61 * Get the footer to use in the index file (the one which will reference all
62 * the supported web sites <tt>index</tt> files).
66 abstract public String
getMainIndexFooter();
69 * Get the header to use in the index file (the supported web site
70 * <tt>index</tt> file this output is for).
73 * the supported web site
77 abstract public String
getIndexHeader(BasicSupport support
);
80 * Get the footer to use in the index file (the supported web site
81 * <tt>index</tt> file this output is for).
84 * the supported web site
88 abstract public String
getIndexFooter(BasicSupport support
);
91 * Export the header of a story (a <i>resume</i> mode).
98 abstract public String
exportHeader(Story story
);
101 * Export a full story with comments.
108 abstract public String
export(Story story
);