public class RuleHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
RuleHelper.VHandler |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.net.URL,java.lang.ClassLoader> |
loaders |
protected Rules |
rules |
| Constructor and Description |
|---|
RuleHelper(Rules rules)
The constructor
|
RuleHelper(Transformer transformer,
java.io.File file)
The constructor
|
RuleHelper(Transformer transformer,
java.io.InputStream stream)
The constructor
|
RuleHelper(Transformer transformer,
java.lang.String info)
The constructor
|
RuleHelper(Transformer transformer,
java.net.URL url)
The constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
configAttribute(AttributeRule rule,
Attribute config)
Configure the attribute rule.
|
protected void |
configLiteral(LiteralRule rule,
Literal config)
Configure the literal rule.
|
protected void |
configMethod(MethodRule rule,
RuleMethod config)
Configure the method rule.
|
protected void |
configStore(StoreRule rule,
Store config)
Configure the store rule.
|
protected AbstractRule |
createRule(RuleEngine engine,
AoSession aoSession,
Rule rule)
Create the rules.
|
java.lang.String |
getEnvironmentName()
Get the name of the environment.
|
java.lang.Object |
getObject(Objdef objectDef,
java.lang.ClassLoader classLoader)
Get an object from objectdef xsd definition.
|
java.util.Map<java.lang.String,java.lang.Object> |
getObjectMap()
Get an object map from load element.
|
RulePostMethod[] |
getPostMethods(Rule rule)
Create the postmethods.
|
RulePreMethod[] |
getPreMethods(Rule rule)
Create the premethods.
|
java.util.Properties |
getProperties()
Get the properties from rules.
|
java.util.Properties |
getProperties(Propertyseq seq)
Get properties from property sequence
|
RuleMethod |
getRuleMethod(Implementation method) |
AbstractRule[] |
getRules(RuleEngine engine,
AoSession aoSession)
Get the rules.
|
AnchorHelper |
getSourceAnchor()
Get an AnchorHelper representing the source anchor.
|
AnchorHelper |
getTargetAnchor()
Get an AnchorHelper representing the target anchor.
|
Transformer |
getTransformer()
Get the transfromer that is bind to the helper.
|
boolean |
hasSourceAnchor()
Return a boolean whether a source anchor is defined.
|
boolean |
hasTargetAnchor()
Return a boolean whether a target anchor is defined.
|
boolean |
isPedantic(Rule rule)
Get the gather mode of a rule
|
java.lang.Class |
loadClass(Classdef classDef,
java.lang.ClassLoader classLoader)
Load a class from classdef xsd definition.
|
java.lang.String |
replaceKeywords(java.lang.String val)
Replace the keyword from the given property value.
|
protected Rules rules
protected java.util.Map<java.net.URL,java.lang.ClassLoader> loaders
public RuleHelper(Transformer transformer, java.lang.String info) throws javax.xml.bind.JAXBException, java.io.IOException, java.io.FileNotFoundException
transformer - the transformer.info - an implementation dependen string for error message output.javax.xml.bind.JAXBExceptionjava.io.IOExceptionjava.io.FileNotFoundExceptionpublic RuleHelper(Transformer transformer, java.io.File file) throws javax.xml.bind.JAXBException, java.io.IOException, java.io.FileNotFoundException
rules - The unmarshalled xml files.javax.xml.bind.JAXBExceptionjava.io.IOExceptionjava.io.FileNotFoundExceptionpublic RuleHelper(Transformer transformer, java.net.URL url) throws javax.xml.bind.JAXBException, java.io.IOException, java.io.FileNotFoundException
rules - The unmarshalled xml url.javax.xml.bind.JAXBExceptionjava.io.IOExceptionjava.io.FileNotFoundExceptionpublic RuleHelper(Transformer transformer, java.io.InputStream stream) throws javax.xml.bind.JAXBException, java.io.IOException, java.io.FileNotFoundException
rules - The unmarshalled xml url.javax.xml.bind.JAXBExceptionjava.io.IOExceptionjava.io.FileNotFoundExceptionpublic RuleHelper(Rules rules)
rules - The unmarshalled xml files.public Transformer getTransformer()
public java.util.Properties getProperties()
public java.util.Properties getProperties(Propertyseq seq)
seq - the property sequence.public java.lang.String getEnvironmentName()
public java.util.Map<java.lang.String,java.lang.Object> getObjectMap()
public java.lang.Object getObject(Objdef objectDef, java.lang.ClassLoader classLoader)
objectDef - classLoader - public java.lang.Class loadClass(Classdef classDef, java.lang.ClassLoader classLoader)
classDef - classLoader - public boolean hasSourceAnchor()
public boolean hasTargetAnchor()
public AnchorHelper getSourceAnchor()
public AnchorHelper getTargetAnchor()
public AbstractRule[] getRules(RuleEngine engine, AoSession aoSession)
engine - The rule engine.aoSession - the sesion belongs to the rules.protected AbstractRule createRule(RuleEngine engine, AoSession aoSession, Rule rule)
engine - The rule engine.aoSession - The sessino belongs to the rules.rule - The rule defintion.public boolean isPedantic(Rule rule)
public RulePreMethod[] getPreMethods(Rule rule)
rule - the rulepublic RulePostMethod[] getPostMethods(Rule rule)
rule - the ruleprotected void configLiteral(LiteralRule rule, Literal config)
rule - The rule.config - The configurationprotected void configStore(StoreRule rule, Store config)
rule - The rule.config - The configurationprotected void configAttribute(AttributeRule rule, Attribute config)
rule - The ruleconfig - the attribute configuration.protected void configMethod(MethodRule rule, RuleMethod config)
rule - The ruleconfig - the method configuration.public RuleMethod getRuleMethod(Implementation method)
public java.lang.String replaceKeywords(java.lang.String val)
val - the property value.