| java.lang.Object org.mmbase.util.functions.FunctionProvider org.mmbase.util.functions.IndexFunction
IndexFunction | public class IndexFunction extends FunctionProvider (Code) | | The index node functions can be assigned to nodes which are connected by an 'index' relation. An
index relation is an extension of 'posrel', but also has an 'index' and a 'root' field. These are
used to calcaluate the 'number' of the connected nodes. The 'pos' field only serves to fix the order.
The index field can be empty in which case the node with the lowest pos gets number 1, the
following number 2 and so on. But on any one of the index relations the index can be stated
explicitely. If e.g. the index is specified 'a' then the following node will be 'b'. You can also
arrange for 'i', 'ii', 'iii', 'iv' and so on.
The root field (a node-type field) specifies to which tree the relations belong. So principaly
the same 'chapter' can exists with several different chapter numbers. Also, it is used to define
where counting must starts, because the complete number of a chapter consists of a chain of
numbers (like 2.3.4.iii).
If the index is specified to be '-' then that means that it is explicitely empty. That cannot be
'' or otherwise unfilled, because that means 'determin automaticly' already.
author: Michiel Meeuwissen version: $Id: IndexFunction.java,v 1.15 2007/11/25 18:25:49 nklasens Exp $ since: MMBase-1.8 |
Inner Class :protected static class Stack extends ArrayList | |
romanSuccessor | protected static String romanSuccessor(String index)(Code) | | Calculates the 'successor' of a roman number, preserving uppercase/lowercase.
|
successor | public static String successor(String index)(Code) | | Returns the 'successor' of a string. Which means that e.g. after 'zzz' follows 'aaaa'.
|
successor | protected static String successor(String index, String separator, String joiner, boolean roman)(Code) | | Calculates the 'successor' of an index String. Like '7.4.iii' of which the successor is
'7.4.iv'.
Parameters: index - The string to succeed Parameters: separator - Regular expression to split up the string first (e.g. "\\.") Parameters: joiner - String to rejoin it again (e.g. ".") Parameters: roman - Whether to consider roman numbers |
|
|