public final class XMLConstraintSaver
extends java.lang.Object
| Constructor and Description |
|---|
XMLConstraintSaver(Constraint constraint)
Constructs an XMLConstraintSaver object that saves the specified constraint to the specified
XML document.
|
| Modifier and Type | Method and Description |
|---|---|
void |
saveToFile(java.lang.String fileName)
Saves the constraint object to an XML file.
|
java.lang.String |
saveToString()
Saves the constraint object to an XML string.
|
public XMLConstraintSaver(Constraint constraint)
constraint - Constraint to be save.java.lang.IllegalArgumentException - if the parameter equals null;
if the constraint is not formula-based (its type is not
FORMULA_BASED). Currently, the possibility of saving other
constraint types is not implemented.public java.lang.String saveToString()
throws XMLNotSavedException
XMLNotSavedException - if failed to save the constraint to a string.public void saveToFile(java.lang.String fileName)
throws XMLNotSavedException
fileName - Target XML document file name.java.lang.IllegalArgumentException - if the parameter equals null.XMLNotSavedException - if failed to save the constraint to a file.