1 package be
.nikiroo
.gofetch
.output
;
5 import be
.nikiroo
.gofetch
.data
.Comment
;
6 import be
.nikiroo
.gofetch
.data
.Story
;
7 import be
.nikiroo
.gofetch
.support
.BasicSupport
.Type
;
10 * Base class for output operations.
14 public abstract class Output
{
16 * The type of source, can be NULL for no-type.
21 * The gopher hostname to use.
23 protected String hostname
;
26 * The sub directory and (pre-)selector to use for the resources.
28 protected String preselector
;
31 * The Gopher port to use.
36 * Create a new {@link Output} class for the given type (which can be NULL).
39 * the type or NULL for no type
41 * the gopher hostname to use
43 * the sub directory and (pre-)selector to use for the resources
45 * the Gopher port to use
47 public Output(Type type
, String hostname
, String preselector
, int port
) {
49 this.hostname
= hostname
;
50 this.preselector
= preselector
;
55 * Get the header to use in the index file.
59 abstract public String
getIndexHeader();
62 * Get the footer to use in the index file.
66 abstract public String
getIndexFooter();
69 * Export a story (in resume mode).
76 abstract public String
export(Story story
);
79 * Export a full story with comments.
88 abstract public String
export(Story story
, List
<Comment
> comments
);