Class DomconOzOutputCodec
java.lang.Object
de.saar.chorus.domgraph.codec.OutputCodec
de.saar.chorus.domgraph.codec.MultiOutputCodec
de.saar.chorus.domgraph.codec.domcon.DomconOzOutputCodec
An output codec for weakly normal dominance constraints in Oz syntax.
For further documentation of this format, see
DomconOzInputCodec.- Author:
- Alexander Koller
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidencode(DomGraph graph, NodeLabels labels, Writer writer) Encodes a dominance graph into a string representation for this output codec.voidprint_end_list(Writer writer) Prints the end of a list in the concrete syntax which the USR uses.voidprint_footer(Writer writer) Prints a footer at the end of a file to which the USR is written.voidprint_header(Writer writer) Prints a header at the beginning of a file to which the USR is written.voidprint_list_separator(Writer writer) Prints the separator for separating different items of a list in the concrete syntax which the USR uses.voidprint_start_list(Writer writer) Prints the beginning of a list in the concrete syntax which the USR uses.
-
Constructor Details
-
DomconOzOutputCodec
public DomconOzOutputCodec()
-
-
Method Details
-
encode
public void encode(DomGraph graph, NodeLabels labels, Writer writer) throws IOException, MalformedDomgraphException Description copied from class:OutputCodecEncodes a dominance graph into a string representation for this output codec. The dominance graph is defined by the argumentsgraphandlabels. The USR is written to thewriter.- Specified by:
encodein classOutputCodec- Parameters:
graph- the dominance graphlabels- the node labels for this dominance graphwriter- the writer to which the encoded USR will be written- Throws:
IOException- if an I/O error occurred while writing to thewriterMalformedDomgraphException- if the graph cannot be encoded by this codec
-
print_header
Description copied from class:OutputCodecPrints a header at the beginning of a file to which the USR is written.- Specified by:
print_headerin classOutputCodec- Parameters:
writer- the writer- Throws:
IOException- if an I/O error occurred
-
print_start_list
Description copied from class:MultiOutputCodecPrints the beginning of a list in the concrete syntax which the USR uses. This method is called afterprint_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).- Specified by:
print_start_listin classMultiOutputCodec- Parameters:
writer- the writer- Throws:
IOException- if an I/O error occurred
-
print_end_list
Description copied from class:MultiOutputCodecPrints the end of a list in the concrete syntax which the USR uses. This method is called beforeprint_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).- Specified by:
print_end_listin classMultiOutputCodec- Parameters:
writer- the writer- Throws:
IOException- if an I/O error occurred
-
print_list_separator
Description copied from class:MultiOutputCodecPrints the separator for separating different items of a list in the concrete syntax which the USR uses.- Specified by:
print_list_separatorin classMultiOutputCodec- Parameters:
writer- the writer- Throws:
IOException- if an I/O error occurred
-