|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.topologi.diffx.config.DiffXConfig
The configuration to use with a DiffX operation.
This class acts as a container for a set of properties that can be applied to the main components of Diffx such as the:
XMLRecorder implementations,DiffXAlgorithm implementations,DiffXFormatter implementations.In order to produce the correct results, the configuration must be applied throughout the three steps of processing.
There is an illegal state in this configuration, if the the diffx is not namespace
aware it cannot not report the differences in the prefixes. Therefore it is impossible
to set both flags to false.
The set methods for those flags will ensure that this situation does
not occur. The general rule is that the flag being set takes precedence.
Note that it simply mimics SAX2 which cannot have the features
http://xml.org/sax/features/namespaces and
http://xml.org/sax/features/namespace-prefixes both set to
false.
XMLRecorder,
DiffXAlgorithm,
DiffXFormatter| Constructor Summary | |
DiffXConfig()
Creates a new configuration for DiffX |
|
| Method Summary | |
boolean |
isIgnoreWhiteSpace()
Indicates whether the differences in white spaces should be ignored or not. |
boolean |
isNamespaceAware()
Indicates whether the Diff-X takes namespaces into account. |
boolean |
isPreserveWhiteSpace()
Indicates whether the white spaces are preserved or not. |
boolean |
isReportPrefixDifferences()
Returns whether the differences in prefixes are reported. |
void |
setIgnoreWhiteSpace(boolean ignore)
Sets whether the differences in white spaces should be ignored or not. |
void |
setNamespaceAware(boolean aware)
Sets whether the Diff-X should take namespaces into account. |
void |
setPreserveWhiteSpace(boolean preserve)
Sets whether the white spaces should be preserved or not. |
void |
setReportPrefixDifferences(boolean report)
Sets whether the Diff-X should report differences in prefixes. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DiffXConfig()
| Method Detail |
public void setIgnoreWhiteSpace(boolean ignore)
ignore - true to ignore differences in white spaces;
false otherwise.public void setPreserveWhiteSpace(boolean preserve)
preserve - true to preserve the white spaces;
false otherwise.public void setNamespaceAware(boolean aware)
It is more efficient to disable namespace processing when the XML to compare are not expected to use any namespace.
In order to avoid an illegal state, if this flag is set to false
and the differences in prefixes will be automatically reported.
aware - true to preserve the white spaces;
false otherwise.public void setReportPrefixDifferences(boolean report)
In order to avoid an illegal state, if this flag is set to false
and then the processor becomes namespace aware.
report - true to report differences in prefixes;
false to ignore them.public boolean isIgnoreWhiteSpace()
true to ignore differences in white spaces;
false otherwise.public boolean isPreserveWhiteSpace()
true to preserve the white spaces;
false otherwise.public boolean isNamespaceAware()
true to preserve the white spaces;
false otherwise.public boolean isReportPrefixDifferences()
true to report differences in prefixes;
false to ignore them.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||