public abstract class NodeCounter extends Object
Modifier and Type | Field and Description |
---|---|
DOM |
_document |
protected String |
_format |
protected String |
_groupSep |
protected int |
_groupSize |
DTMAxisIterator |
_iterator |
protected String |
_lang |
protected String |
_letterValue |
protected int |
_node |
protected int |
_nodeType |
Translet |
_translet |
protected double |
_value |
static int |
END |
Modifier | Constructor and Description |
---|---|
protected |
NodeCounter(Translet translet,
DOM document,
DTMAxisIterator iterator) |
Modifier and Type | Method and Description |
---|---|
protected String |
formatNumbers(int value)
Format a single value according to the format parameters.
|
protected String |
formatNumbers(int[] values)
Format a sequence of values according to the format paramaters
set by calling setFormatting().
|
abstract String |
getCounter()
Returns the position of node according to the level and
the from and count patterns.
|
String |
getCounter(String format,
String lang,
String letterValue,
String groupSep,
String groupSize)
Returns the position of node according to the level and
the from and count patterns.
|
boolean |
matchesCount(int node)
Returns true if node matches the count pattern.
|
boolean |
matchesFrom(int node)
Returns true if node matches the from pattern.
|
NodeCounter |
setDefaultFormatting()
Sets formatting fields to their default values.
|
protected void |
setFormatting(String format,
String lang,
String letterValue,
String groupSep,
String groupSize)
Sets formatting fields before calling formatNumbers().
|
abstract NodeCounter |
setStartNode(int node)
Set the start node for this counter.
|
NodeCounter |
setValue(double value)
If the user specified a value attribute, use this instead of
counting nodes.
|
public static final int END
protected int _node
protected int _nodeType
protected double _value
public final DOM _document
public final DTMAxisIterator _iterator
public final Translet _translet
protected String _format
protected String _lang
protected String _letterValue
protected String _groupSep
protected int _groupSize
protected NodeCounter(Translet translet, DOM document, DTMAxisIterator iterator)
public abstract NodeCounter setStartNode(int node)
public NodeCounter setValue(double value)
protected void setFormatting(String format, String lang, String letterValue, String groupSep, String groupSize)
public NodeCounter setDefaultFormatting()
public abstract String getCounter()
public String getCounter(String format, String lang, String letterValue, String groupSep, String groupSize)
public boolean matchesCount(int node)
public boolean matchesFrom(int node)
protected String formatNumbers(int value)
protected String formatNumbers(int[] values)
Copyright © 2016 JBoss by Red Hat. All rights reserved.