|
TPTP 4.3.0 Monitoring Tools Project Internal API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.hyades.logging.adapter.internal.parsers.SubstituteStatement
This class represents a substitution rule. It uses the java.util.regex library for processing regular expressions.
| Field Summary | |
|---|---|
protected boolean |
callout
|
protected boolean |
calloutNewInstance
|
protected java.lang.String |
match
|
protected java.lang.String |
name
|
protected java.util.List |
path
|
protected java.util.regex.Pattern |
pattern
|
protected java.lang.String |
positions
|
protected java.util.List |
positionsList
|
protected boolean |
processTime
|
protected org.eclipse.hyades.logging.adapter.IDirectedGraph |
resultGraph
|
protected org.eclipse.hyades.logging.adapter.parsers.IStatefulSubstitutionExtension |
statefulExtension
|
protected java.lang.String |
substitute
|
protected java.lang.String |
substitutionExtensionClass
|
protected java.lang.Class |
substitutionExtensionClassClass
|
protected TimeParser |
timeParser
|
protected boolean |
useBuiltin
|
| Constructor Summary | |
|---|---|
SubstituteStatement(org.eclipse.hyades.logging.adapter.IParser parser)
Create an SubstituteStatement with the specified IParser object. |
|
| Method Summary | |
|---|---|
protected void |
compileMatchString(java.lang.String match)
Compile the match string and set the match pattern |
org.eclipse.hyades.logging.adapter.IDirectedGraph |
createResultGraph(java.lang.Object value)
Deprecated. This method is deprecated by the appropriate DirectedGraphImpl constructor. |
org.eclipse.hyades.logging.adapter.IDirectedGraph |
getResultGraph()
Retrieve the IDirectedGraph created as a result of this rule being run. |
boolean |
isChildChoice()
This method is not applicable to substitution rules so always return false. |
boolean |
isRequiredByParent()
This method is not applicable to substitution rules so always return false. |
protected java.lang.String |
matchAndSubstitute(java.lang.String line)
Check if there is a match and if so do the substitution |
protected java.lang.String |
positionsToString(java.lang.String line,
java.util.HashMap inputs)
This method iterates over the positions string and builds a new string based upon the preprocessed properties extracted from the message string. |
void |
prepare(org.w3c.dom.Element node,
java.lang.String path)
Prepare the configuration for this substitution rule. |
java.util.List |
run(java.lang.String line,
java.util.HashMap inputs)
Run the substitution rule against the message string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String name
protected java.lang.String positions
protected java.lang.String match
protected java.lang.String substitute
protected java.util.regex.Pattern pattern
protected java.util.List positionsList
protected boolean processTime
protected TimeParser timeParser
protected java.lang.String substitutionExtensionClass
protected org.eclipse.hyades.logging.adapter.parsers.IStatefulSubstitutionExtension statefulExtension
protected boolean callout
protected boolean calloutNewInstance
protected java.lang.Class substitutionExtensionClassClass
protected boolean useBuiltin
protected java.util.List path
protected org.eclipse.hyades.logging.adapter.IDirectedGraph resultGraph
| Constructor Detail |
public SubstituteStatement(org.eclipse.hyades.logging.adapter.IParser parser)
parser - - IParser object| Method Detail |
public void prepare(org.w3c.dom.Element node,
java.lang.String path)
throws org.eclipse.hyades.logging.adapter.parsers.PreparationException
prepare in interface org.eclipse.hyades.logging.adapter.parsers.IStatementnode - - configuration information for this substitution rulepath - - name of the attribute this substitution rule is for
org.eclipse.hyades.logging.adapter.parsers.PreparationException - if an error occurs.org.eclipse.hyades.logging.adapter.IStatement#prepare(org.w3c.dom.Element)
protected void compileMatchString(java.lang.String match)
throws org.eclipse.hyades.logging.adapter.parsers.PreparationException
match - - the match string to compile
org.eclipse.hyades.logging.adapter.parsers.PreparationException
public java.util.List run(java.lang.String line,
java.util.HashMap inputs)
throws org.eclipse.hyades.logging.adapter.AdapterException,
org.eclipse.hyades.logging.adapter.parsers.StatementException
run in interface org.eclipse.hyades.logging.adapter.parsers.IStatementline - - string to perform the matching and parsing oninputs - - the map containing the preprocessed properties extracted from the message string
org.eclipse.hyades.logging.adapter.AdapterException - if an error occurred during parsing. The exception
contains a message indicating what error occurred and possibly a cause exception.
org.eclipse.hyades.logging.adapter.parsers.StatementException - if no data can be parsed for this attribute from the input string.org.eclipse.hyades.logging.adapter.IStatement#run(java.lang.String)protected java.lang.String matchAndSubstitute(java.lang.String line)
line - to check for pattern match and to do substitution on
protected java.lang.String positionsToString(java.lang.String line,
java.util.HashMap inputs)
line - - the positions string to parseinputs - - the map containing the preprocessed properties extracted from the message string
public org.eclipse.hyades.logging.adapter.IDirectedGraph getResultGraph()
public org.eclipse.hyades.logging.adapter.IDirectedGraph createResultGraph(java.lang.Object value)
value - - value object
public boolean isRequiredByParent()
isRequiredByParent in interface org.eclipse.hyades.logging.adapter.parsers.IStatementIStatement.isRequiredByParent()public boolean isChildChoice()
isChildChoice in interface org.eclipse.hyades.logging.adapter.parsers.IStatementIStatement.isChildChoice()
|
TPTP 4.3.0 Monitoring Tools Project Internal API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||