|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.uniba.euromath.gene.changetracker.DOMChangeCollector
public final class DOMChangeCollector
Collects changes to DOM document.
| Constructor Summary | |
|---|---|
DOMChangeCollector()
|
|
| Method Summary | |
|---|---|
void |
clearChanges()
Clears the change tracer. |
List<? extends Node> |
getModifiedNodes()
Returns unmodifiable list of modified nodes. |
DOMSource |
getSource()
Returns a source that contains whole document. |
void |
init(Source source)
Initializes the collector with given source. |
boolean |
isChanged()
Checks if this collector has captured at least one change. |
boolean |
isCompletelyChanged()
Checks if the source object has changed completely since last call to ChangeCollector.clearChanges(). |
void |
nodeAdded(Node node)
Informs the collector that the node has been added. |
void |
nodeDelete(Node node)
Informs the collector that the node is about to be deleted. |
void |
nodeModified(Node node)
Informs the collector that the node has been modified (this applies only to non-element nodes when changing their textual value). |
void |
reinit(Source source)
Reinitializes the collector. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DOMChangeCollector()
| Method Detail |
|---|
public void init(Source source)
ChangeCollector
Initializes the collector with given source. Implementors must act as if
whole document was changed. Implementor should clone the
source object if it intends to keep it.
Must be called exactly once as the first method.
init in interface ChangeCollectorsource - the source to reinit.public DOMSource getSource()
ChangeCollectorReturns a source that contains whole document.
getSource in interface ChangeCollectorpublic void clearChanges()
ChangeCollector
clearChanges in interface ChangeCollectorpublic boolean isChanged()
ChangeCollector
isChanged in interface ChangeCollectortrue if some changes occured, false
otherwise.public boolean isCompletelyChanged()
ChangeCollector
Checks if the source object has changed completely since last call to
ChangeCollector.clearChanges().
isCompletelyChanged in interface ChangeCollectortrue if the source changed as a whole,
false if it changed only partially or no change occured at
all.public void reinit(Source source)
ChangeCollectorReinitializes the collector. The collector may act as if whole source was changed, or it may compare new source to previous source and reinitialize the list of changes.
May be called multiple times.
reinit in interface ChangeCollectorpublic void nodeAdded(Node node)
node - the node added to the splitted document.public void nodeDelete(Node node)
node - the node being deleted. It must be present in the splitted
document.public void nodeModified(Node node)
node - the node from the splitted document, that was modified.public List<? extends Node> getModifiedNodes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||