TPTP 4.2.0 Monitoring Tools Project
Public API Specification

org.eclipse.hyades.logging.adapter.parsers
Class AttributeStatement

java.lang.Object
  extended byorg.eclipse.hyades.logging.adapter.parsers.AttributeStatement
All Implemented Interfaces:
IStatement

Deprecated. This is really an internal implementation class of the Generic Log Adapter run-time parser component and should not be extended or called by external applications.

public class AttributeStatement
extends java.lang.Object
implements IStatement

This class represents a particular attribute to be parsed from the record. It can have multiple substitution rules that are used to determine the value for the attribute based on the data in the record.


Constructor Summary
AttributeStatement()
          Deprecated. Default constructor
AttributeStatement(IParser parser)
          Deprecated. Create an AttributeStatement with the specified IParser object.
 
Method Summary
 boolean isChildChoice()
          Deprecated. Alway returns false because attributes do not have children.
 boolean isRequiredByParent()
          Deprecated. Returns whether this attribute is required by its parent.
 void prepare(org.w3c.dom.Element node, java.lang.String path)
          Deprecated. Prepare the configuration and substitution rules for this attribute.
 java.util.List run(java.lang.String line, java.util.HashMap inputs)
          Deprecated. Run the substitution rules for this attribute until a match is found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeStatement

public AttributeStatement()
Deprecated. 
Default constructor


AttributeStatement

public AttributeStatement(IParser parser)
Deprecated. 
Create an AttributeStatement with the specified IParser object. Configuration information can be retrieved from the IParser object.

Parameters:
parser - - IParser object
Method Detail

prepare

public void prepare(org.w3c.dom.Element node,
                    java.lang.String path)
             throws PreparationException
Deprecated. 
Prepare the configuration and substitution rules for this attribute. If an error occurs and the IParser is available then a message is logged. If no IParser is available the a PreparationException is thrown.

Specified by:
prepare in interface IStatement
Parameters:
node - - configuration information for this attribute
path - - name of this attribute
Throws:
PreparationException - if an error occurs and a message cannot be logged.
See Also:
org.eclipse.hyades.logging.adapter.IStatement#prepare(org.w3c.dom.Element)

run

public java.util.List run(java.lang.String line,
                          java.util.HashMap inputs)
                   throws AdapterException,
                          StatementException
Deprecated. 
Run the substitution rules for this attribute until a match is found. If a match is found, then return the parsed value. Otherwise throw a StatementException.

Specified by:
run in interface IStatement
Parameters:
line - - string to perform the matching and parsing on
inputs - - the map containing the preprocessed properties extracted from the message string
Returns:
a List containing only the parsed value stored as a DirectedGraphImpl object
Throws:
AdapterException - if an error occurred during parsing. The exception contains a message indicating what error occurred and possibly a cause exception.
StatementException - if no data can be parsed for this attribute from the input string.
See Also:
org.eclipse.hyades.logging.adapter.IStatement#run(java.lang.String)

isRequiredByParent

public boolean isRequiredByParent()
Deprecated. 
Returns whether this attribute is required by its parent.

Specified by:
isRequiredByParent in interface IStatement
Returns:
true if this attribute is required by its parent, false otherwise.
See Also:
IStatement.isRequiredByParent()

isChildChoice

public boolean isChildChoice()
Deprecated. 
Alway returns false because attributes do not have children.

Specified by:
isChildChoice in interface IStatement
Returns:
true if this IStatement can have only one valid child, false otherwise.
See Also:
IStatement.isChildChoice()

TPTP 4.2.0 Monitoring Tools Project
Public API Specification