|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.XMLFilterImpl
com.deltaxml.sync.filters.UniDeltaCompress
public final class UniDeltaCompress
Converts a full unidelta file into a compressed format.
This involves removing vsets within a tree that are the same as the ancestor and adding invariant attributes (those that are unchanged throughout all versions) back onto their containing start element tag as attributes
Example: The unidelta file
<root xmlns:dxu="..." dxu:vset="|C|A|B|"> <dxu:attributes dxu:vset="|C|A|B|"> <att1 dxu:vset="|C|A|B|"> <dxu:PCDATA dxu:vset="|C|A|B|">value</dxu:PCDATA> </att1> <att2 dxu:vset="|C|B|"> <dxu:PCDATA dxu:vset="|C|">c's value</dxu:PCDATA> <dxu:PCDATA dxu:vset="|B|">b's value</dxu:PCDATA> </att2> </dxu:attributes> <child1 dxu:vset="|C|A|B|"> <grandchild dxu:vset="|B|"/> </child1> <child dxu:vset="|A|B|"/> </root>would be compressed into
<root xmlns:dxu="..." dxu:vset="|C|A|B|" att1="value"> <dxu:attributes> <att2 dxu:vset="|C|B|"> <dxu:PCDATA dxu:vset="|C|">c's value</dxu:PCDATA> <dxu:PCDATA dxu:vset="|B|">b's value</dxu:PCDATA> </att2> </dxu:attributes> <child1> <grandchild dxu:vset="|B|"/> </child1> <child dxu:vset="|A|B|"/> </root>
Note: This class has not been designed to be extendable and so has been declared final.
| Constructor Summary | |
|---|---|
UniDeltaCompress()
Creates a new UniDeltaCompress filter |
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
Overrides the default characters method. |
void |
endElement(String uri,
String localName,
String qName)
Overrides the default endElement method. |
void |
startDocument()
Overrides the default startDocument method. |
void |
startElement(String uri,
String localName,
String qName,
Attributes atts)
Overrides the default startElement method. |
| Methods inherited from class org.xml.sax.helpers.XMLFilterImpl |
|---|
endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UniDeltaCompress()
| Method Detail |
|---|
public void startDocument()
throws SAXException
startDocument method.
startDocument in interface ContentHandlerstartDocument in class XMLFilterImplSAXException
public void startElement(String uri,
String localName,
String qName,
Attributes atts)
throws SAXException
startElement method.
startElement in interface ContentHandlerstartElement in class XMLFilterImplSAXException
public void endElement(String uri,
String localName,
String qName)
throws SAXException
endElement method.
endElement in interface ContentHandlerendElement in class XMLFilterImplSAXException
public void characters(char[] ch,
int start,
int length)
throws SAXException
characters method.
characters in interface ContentHandlercharacters in class XMLFilterImplSAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||