| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
package org.xwiki.rendering.xml.internal.parser; |
| 21 |
|
|
| 22 |
|
import org.xml.sax.Attributes; |
| 23 |
|
import org.xml.sax.Locator; |
| 24 |
|
import org.xml.sax.SAXException; |
| 25 |
|
import org.xwiki.rendering.block.XDOM; |
| 26 |
|
import org.xwiki.rendering.internal.parser.XDOMGeneratorListener; |
| 27 |
|
import org.xwiki.rendering.parser.xml.ContentHandlerBlockParser; |
| 28 |
|
import org.xwiki.rendering.parser.xml.ContentHandlerStreamParser; |
| 29 |
|
import org.xwiki.rendering.syntax.Syntax; |
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
@version |
| 35 |
|
@since |
| 36 |
|
|
| |
|
| 0% |
Uncovered Elements: 29 (29) |
Complexity: 14 |
Complexity Density: 0.93 |
|
| 37 |
|
public class ProxyContentHandlerBlockParser implements ContentHandlerBlockParser |
| 38 |
|
{ |
| 39 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
private ContentHandlerStreamParser parser; |
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
private XDOMGeneratorListener listener; |
| 48 |
|
|
| 49 |
|
|
| 50 |
|
@param |
| 51 |
|
@param |
| 52 |
|
|
| |
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 53 |
0 |
public ProxyContentHandlerBlockParser(ContentHandlerStreamParser parser, XDOMGeneratorListener listener)... |
| 54 |
|
{ |
| 55 |
0 |
this.parser = parser; |
| 56 |
0 |
this.listener = listener; |
| 57 |
|
} |
| 58 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 59 |
0 |
@Override... |
| 60 |
|
public void setDocumentLocator(Locator locator) |
| 61 |
|
{ |
| 62 |
0 |
this.parser.setDocumentLocator(locator); |
| 63 |
|
} |
| 64 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 65 |
0 |
@Override... |
| 66 |
|
public void startDocument() throws SAXException |
| 67 |
|
{ |
| 68 |
0 |
this.parser.startDocument(); |
| 69 |
|
} |
| 70 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 71 |
0 |
@Override... |
| 72 |
|
public void endDocument() throws SAXException |
| 73 |
|
{ |
| 74 |
0 |
this.parser.endDocument(); |
| 75 |
|
} |
| 76 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 77 |
0 |
@Override... |
| 78 |
|
public void startPrefixMapping(String prefix, String uri) throws SAXException |
| 79 |
|
{ |
| 80 |
0 |
this.parser.startPrefixMapping(prefix, uri); |
| 81 |
|
} |
| 82 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 83 |
0 |
@Override... |
| 84 |
|
public void endPrefixMapping(String prefix) throws SAXException |
| 85 |
|
{ |
| 86 |
0 |
this.parser.endPrefixMapping(prefix); |
| 87 |
|
} |
| 88 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 89 |
0 |
@Override... |
| 90 |
|
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException |
| 91 |
|
{ |
| 92 |
0 |
this.parser.startElement(uri, localName, qName, atts); |
| 93 |
|
} |
| 94 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 95 |
0 |
@Override... |
| 96 |
|
public void endElement(String uri, String localName, String qName) throws SAXException |
| 97 |
|
{ |
| 98 |
0 |
this.parser.endElement(uri, localName, qName); |
| 99 |
|
} |
| 100 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 101 |
0 |
@Override... |
| 102 |
|
public void characters(char[] ch, int start, int length) throws SAXException |
| 103 |
|
{ |
| 104 |
0 |
this.parser.characters(ch, start, length); |
| 105 |
|
} |
| 106 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 107 |
0 |
@Override... |
| 108 |
|
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException |
| 109 |
|
{ |
| 110 |
0 |
this.parser.ignorableWhitespace(ch, start, length); |
| 111 |
|
} |
| 112 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 113 |
0 |
@Override... |
| 114 |
|
public void processingInstruction(String target, String data) throws SAXException |
| 115 |
|
{ |
| 116 |
0 |
this.parser.processingInstruction(target, data); |
| 117 |
|
} |
| 118 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 119 |
0 |
@Override... |
| 120 |
|
public void skippedEntity(String name) throws SAXException |
| 121 |
|
{ |
| 122 |
0 |
this.parser.skippedEntity(name); |
| 123 |
|
} |
| 124 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 125 |
0 |
@Override... |
| 126 |
|
public Syntax getSyntax() |
| 127 |
|
{ |
| 128 |
0 |
return this.parser.getSyntax(); |
| 129 |
|
} |
| 130 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 131 |
0 |
@Override... |
| 132 |
|
public XDOM getXDOM() |
| 133 |
|
{ |
| 134 |
0 |
return this.listener.getXDOM(); |
| 135 |
|
} |
| 136 |
|
} |