Class DeltaXMLFactory
Create a new instance of the factory class supporting the XML patch file
format.
Constructor
-
class DeltaXMLFactory()
Methods
createAttacher
-
DeltaXMLFactory#createAttacher(resolver)
Arguments: |
- resolver (Object) – An instance of ContextResolver. Use the output of
createResolver method from the resolver factory.
|
Returns delta.Attacher: |
| Initialized attacher instance.
|
Return an initialized context delta attacher instance
createCollector
-
DeltaXMLFactory#createCollector(deltadoc, doc[, equals])
Arguments: |
- deltadoc (Object) – The delta document produced by createEmptyDocument
or loadDocument.
- doc (Object) – The document as created by the
loadOriginalDocument method of the document factory class.
- equals (function) – The equality test-function used during diffing.
|
Returns delta.DeltaCollector: |
| An initialized collector instance.
|
Return an initialized collector instance.
createDeltaAdapter
-
DeltaXMLFactory#createDeltaAdapter(fragAdapter)
Arguments: |
- fragAdapter (Object) – A document fragemnt adapter. Use the object
produced by createFragmentAdapter method from a document factory.
|
Returns domdelta.DOMDeltaAdapter: |
| Initialized instance of the proper delta
adapter.
|
Return an initialized delta adapter instance.
createDetacher
-
DeltaXMLFactory#createDetacher(doc)
Arguments: |
- doc (Object) – The document as created by the
loadOriginalDocument method of the document factory class.
|
Returns contextdelta.Detacher: |
| Initialized detacher instance.
|
Return an initialized context delta detacher instance.
createEmptyDocument
-
DeltaXMLFactory#createEmptyDocument([matching])
Arguments: |
- matching (tree.Matching) – A matching produced by some tree diff algorithm.
|
Returns Object: | A delta document initialized with default values.
|
Return a new empty delta document.
loadDocument
-
DeltaXMLFactory#loadDocument(domdoc, fragAdapter[, name])
Arguments: |
- domdoc (String|Document) – A document containing delta operations.
- fragAdapter (Object) – A document fragemnt adapter. Use the object
produced by createFragmentAdapter method from a document factory.
- name (String) – The file name of the document.
|
Returns Object: | A delta document initialized from the given DOMDocument.
|
Return a delta document loaded from the given string or DOMDocument.
serializeDocument
-
DeltaXMLFactory#serializeDocument(deltadoc)
Arguments: |
- deltadoc (Object) – A populated delta document.
|
Returns String: | The XML representation of the delta document as a string.
|
Serialize the data property into the src string and return it. Also store
the source into the src property of deltadoc.