|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.trans.Mode
public class Mode
A Mode is a collection of rules; the selection of a rule to apply to a given element is determined by a Pattern.
| Field Summary | |
|---|---|
static int |
ALL_MODES
|
static int |
DEFAULT_MODE
|
| Constructor Summary | |
|---|---|
Mode()
Default constructor - creates a Mode containing no rules |
|
Mode(Mode omniMode)
Construct a new Mode, copying the contents of an existing Mode |
|
| Method Summary | |
|---|---|
void |
addRule(Pattern p,
Object obj,
int precedence,
double priority)
Add a rule to the Mode. |
int |
getList(int fingerprint,
int type)
Determine which list to use for a given pattern (we must also search the generic list) |
String |
getModeName()
Get the name of this mode (for diagnostic output). |
Object |
getNextMatchRule(NodeInfo node,
Object currentHandler,
Controller controller)
Get the rule corresponding to a given Node, by finding the next-best Pattern match after the specified object. |
Object |
getRule(NodeInfo node,
Controller controller)
Get the rule corresponding to a given Node, by finding the best Pattern match. |
Object |
getRule(NodeInfo node,
int min,
int max,
Controller controller)
Get the rule corresponding to a given Node, by finding the best Pattern match, subject to a minimum and maximum precedence. |
void |
setModeName(String name)
Set the name of this mode (for diagnostic output). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_MODE
public static final int ALL_MODES
| Constructor Detail |
|---|
public Mode()
public Mode(Mode omniMode)
omniMode - the existing mode. May be null, in which case it is not copied| Method Detail |
|---|
public void setModeName(String name)
public String getModeName()
public void addRule(Pattern p,
Object obj,
int precedence,
double priority)
p - a Patternobj - the Object to return from getRule() when the supplied node matches this Patternprecedence - the import precedence of the rulepriority - the explicit or implicit priority of the rule
public int getList(int fingerprint,
int type)
public Object getRule(NodeInfo node,
Controller controller)
throws TransformerException
node - the NodeInfo referring to the node to be matched
TransformerException
public Object getRule(NodeInfo node,
int min,
int max,
Controller controller)
throws XPathException
node - the NodeInfo referring to the node to be matched
XPathException
public Object getNextMatchRule(NodeInfo node,
Object currentHandler,
Controller controller)
throws TransformerException
node - the NodeInfo referring to the node to be matched
TransformerException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||