1 package be
.nikiroo
.gofetch
.output
;
3 import be
.nikiroo
.gofetch
.data
.Story
;
4 import be
.nikiroo
.gofetch
.support
.BasicSupport
.Type
;
7 * Base class for output operations.
11 public abstract class Output
{
13 * The type of source, can be NULL for no-type.
18 * The gopher hostname to use.
20 protected String hostname
;
23 * The sub directory and (pre-)selector to use for the resources.
25 protected String preselector
;
28 * The Gopher port to use.
33 * Create a new {@link Output} class for the given type (which can be NULL).
36 * the type or NULL for no type
38 * the gopher hostname to use
40 * the sub directory and (pre-)selector to use for the resources
42 * the Gopher port to use
44 public Output(Type type
, String hostname
, String preselector
, int port
) {
46 this.hostname
= hostname
;
47 this.preselector
= preselector
;
52 * Get the header to use in the index file.
56 abstract public String
getIndexHeader();
59 * Get the footer to use in the index file.
63 abstract public String
getIndexFooter();
66 * Export the header of a story (a <i>resume</i> mode).
73 abstract public String
exportHeader(Story story
);
76 * Export a full story with comments.
83 abstract public String
export(Story story
);