1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.rendering.wikimodel.xml

File WemTableTagNotifier.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart1.png
82% of files have more coverage

Code metrics

4
10
8
1
79
44
10
1
1.25
8
1.25

Classes

Class Line # Actions
WemTableTagNotifier 29 10 0% 10 20
0.090909099.1%
 

Contributing tests

This file is covered by 2 tests. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.rendering.wikimodel.xml;
21   
22    import org.xwiki.rendering.wikimodel.IWemListenerTable;
23    import org.xwiki.rendering.wikimodel.WikiParameters;
24   
25    /**
26    * @version $Id: b738ba6bfd9105220fc41ec4e793e86ff4cbad55 $
27    * @since 4.0M1
28    */
 
29    public class WemTableTagNotifier extends AbstractTagNotifier
30    implements IWemListenerTable
31    {
32    /**
33    * @param listener
34    */
 
35  6 toggle public WemTableTagNotifier(ITagListener listener)
36    {
37  6 super(listener);
38    }
39   
 
40  0 toggle public void beginTable(WikiParameters params)
41    {
42  0 fListener.beginTag(TABLE, EMPTY_MAP, userParams(params));
43    }
44   
 
45  0 toggle public void beginTableCell(boolean tableHead, WikiParameters params)
46    {
47  0 String tag = tableHead ? TABLE_HEAD : TABLE_CELL;
48  0 fListener.beginTag(tag, EMPTY_MAP, userParams(params));
49    }
50   
 
51  0 toggle public void beginTableRow(WikiParameters params)
52    {
53  0 fListener.beginTag(TABLE_ROW, EMPTY_MAP, userParams(params));
54    }
55   
 
56  0 toggle public void endTable(WikiParameters params)
57    {
58  0 fListener.endTag(TABLE, EMPTY_MAP, userParams(params));
59    }
60   
 
61  0 toggle public void endTableCell(boolean tableHead, WikiParameters params)
62    {
63  0 String tag = tableHead ? TABLE_HEAD : TABLE_CELL;
64  0 fListener.endTag(tag, EMPTY_MAP, userParams(params));
65    }
66   
 
67  0 toggle public void endTableRow(WikiParameters params)
68    {
69  0 fListener.endTag(TABLE_ROW, EMPTY_MAP, userParams(params));
70    }
71   
 
72  0 toggle public void onTableCaption(String str)
73    {
74  0 fListener.onTag(
75    TABLE_CAPTION,
76    tagParams(TABLE_CAPTION_PARAM, str),
77    EMPTY_MAP);
78    }
79    }