|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectOutputCodec
MultiOutputCodec
TermOutputCodec
public class TermOutputCodec
A generic output codec for terms. This codec assumes that the graph that is to be output is
This codec can be used to compute terms both in Oz and in Prolog syntax. The difference between these two concrete syntaxes is that Prolog inserts a comma between subterms, whereas Oz uses whitespace for the same purpose.
| Field Summary | |
|---|---|
static int |
ERROR_NOT_SIMPLE_SOLVED_FORM
|
| Constructor Summary | |
|---|---|
TermOutputCodec(String separator)
Construct a new term output codec with the given subterm separator (e.g. |
|
| Method Summary | |
|---|---|
void |
encode(DomGraph graph,
NodeLabels labels,
Writer writer)
Encodes a dominance graph into a string representation for this output codec. |
void |
print_end_list(Writer writer)
Prints the end of a list in the concrete syntax which the USR uses. |
void |
print_footer(Writer writer)
Prints a footer at the end of a file to which the USR is written. |
void |
print_header(Writer writer)
Prints a header at the beginning of a file to which the USR is written. |
void |
print_list_separator(Writer writer)
Prints the separator for separating different items of a list in the concrete syntax which the USR uses. |
void |
print_start_list(Writer writer)
Prints the beginning of a list in the concrete syntax which the USR uses. |
| Methods inherited from class Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ERROR_NOT_SIMPLE_SOLVED_FORM
| Constructor Detail |
|---|
public TermOutputCodec(String separator)
separator - the subterm separator| Method Detail |
|---|
public void encode(DomGraph graph,
NodeLabels labels,
Writer writer)
throws IOException,
MalformedDomgraphException
OutputCodecgraph and labels.
The USR is written to the writer.
encode in class OutputCodecgraph - the dominance graphlabels - the node labels for this dominance graphwriter - the writer to which the encoded USR will be written
IOException - if an I/O error occurred while writing to the
writer
MalformedDomgraphException - if the graph cannot
be encoded by this codecpublic void print_header(Writer writer)
OutputCodec
print_header in class OutputCodecwriter - the writerpublic void print_footer(Writer writer)
OutputCodec
print_footer in class OutputCodecwriter - the writer
public void print_start_list(Writer writer)
throws IOException
MultiOutputCodecprint_header,
but before any of the USRs. It is only called if we print
more than one graph (e.g. in the solve command, but not the convert command).
print_start_list in class MultiOutputCodecwriter - the writer
IOException - if an I/O error occurred
public void print_end_list(Writer writer)
throws IOException
MultiOutputCodecprint_footer,
but after any of the USRs. It is only called if we print
more than one graph (e.g. in the solve command, but not the convert command).
print_end_list in class MultiOutputCodecwriter - the writer
IOException - if an I/O error occurred
public void print_list_separator(Writer writer)
throws IOException
MultiOutputCodec
print_list_separator in class MultiOutputCodecwriter - the writer
IOException - if an I/O error occurred
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||