net.sf.joost.instruction
Class MessageFactory

java.lang.Object
  extended by net.sf.joost.instruction.FactoryBase
      extended by net.sf.joost.instruction.MessageFactory
All Implemented Interfaces:
Constants

public final class MessageFactory
extends FactoryBase

Factory for message elements, which are represented by the inner Instance class.

Version:
$Revision: 2.11 $ $Date: 2009/08/21 12:46:17 $
Author:
Oliver Becker

Nested Class Summary
 class MessageFactory.Instance
          Represents an instance of the message element.
 
Field Summary
private  HashSet attrNames
          allowed attributes for this element
private static int DEBUG_LEVEL
          index in LEVEL_VALUES
private static int ERROR_LEVEL
          index in LEVEL_VALUES
private static int FATAL_LEVEL
          index in LEVEL_VALUES
private static int INFO_LEVEL
          index in LEVEL_VALUES
private static String[] LEVEL_VALUES
          enumerated values for the level attribute
private static int TRACE_LEVEL
          index in LEVEL_VALUES
private static int WARN_LEVEL
          index in LEVEL_VALUES
 
Fields inherited from class net.sf.joost.instruction.FactoryBase
NO_VALUE, YES_VALUE, YESNO_VALUES
 
Fields inherited from interface net.sf.joost.Constants
DEBUG, DEFAULT_ENCODING, FEAT_NS, FEAT_NSPREFIX, FEATURE_URI_PREFIX, FUNC_NS, JOOST_EXT_NS, PR_ATTRIBUTES, PR_BUFFER, PR_CHILDREN, PR_CONTINUE, PR_ERROR, PR_SELF, PR_SIBLINGS, STX_NS
 
Constructor Summary
MessageFactory()
           
 
Method Summary
 NodeBase createNode(NodeBase parent, String qName, Attributes attrs, ParseContext context)
          The factory method.
 String getName()
           
 
Methods inherited from class net.sf.joost.instruction.FactoryBase
checkAttributes, getEnumAttValue, getExpandedName, getRequiredAttribute, parseAVT, parseExpr, parsePattern, parseRequiredAVT, parseRequiredExpr, parseRequiredPattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attrNames

private HashSet attrNames
allowed attributes for this element


LEVEL_VALUES

private static final String[] LEVEL_VALUES
enumerated values for the level attribute


TRACE_LEVEL

private static final int TRACE_LEVEL
index in LEVEL_VALUES

See Also:
Constant Field Values

DEBUG_LEVEL

private static final int DEBUG_LEVEL
index in LEVEL_VALUES

See Also:
Constant Field Values

INFO_LEVEL

private static final int INFO_LEVEL
index in LEVEL_VALUES

See Also:
Constant Field Values

WARN_LEVEL

private static final int WARN_LEVEL
index in LEVEL_VALUES

See Also:
Constant Field Values

ERROR_LEVEL

private static final int ERROR_LEVEL
index in LEVEL_VALUES

See Also:
Constant Field Values

FATAL_LEVEL

private static final int FATAL_LEVEL
index in LEVEL_VALUES

See Also:
Constant Field Values
Constructor Detail

MessageFactory

public MessageFactory()
Method Detail

getName

public String getName()
Specified by:
getName in class FactoryBase
Returns:
"message"

createNode

public NodeBase createNode(NodeBase parent,
                           String qName,
                           Attributes attrs,
                           ParseContext context)
                    throws SAXParseException
Description copied from class: FactoryBase
The factory method.

Specified by:
createNode in class FactoryBase
Parameters:
parent - the parent Node
qName - the full name of this node
attrs - the attribute set of this node
context - the parse context
Returns:
an Instance of the appropriate Node
Throws:
SAXParseException - for missing or wrong attributes, etc.