org.eclipse.actf.validation.rulebase
Class RuleBaseMapDocument

java.lang.Object
  extended by org.eclipse.actf.validation.rulebase.RuleBaseMapBuilder
      extended by org.eclipse.actf.validation.rulebase.RuleBaseMapDocument

public class RuleBaseMapDocument
extends RuleBaseMapBuilder

default implementation for the ACTF validation engine. A rulebase mapping document is located in rulebases.xml files somewhere in the resources classpath.

Author:
John Buslawski
See Also:
"resources/rulebases.xml"

Field Summary
static String LOCATION
          attribute defining the rulebase location for a document rulebase; value is 'location'
static String POLYMORPHIC
          attribute defining whether or not rulebases are to be applied polymorphically; value is 'polymorphic'
static String REGEXP
          attribute defining the regular expression for a target; value is 'regexp'
static String RULEBASE
          tag name for the element defining a rulebase; value is 'rulebase'
static String RULEBASE_FACTORY
          attribute defining the rulebase factory; value is 'rulebaseFactory'
static String RULEBASES
          root element name for the rulebases.xml file; value is 'rulebases
static String TARGET
          tag name for element defining a target; value is 'target'
 
Constructor Summary
RuleBaseMapDocument(Element root)
          create a rulebase mapping document from the given XML source stream
 
Method Summary
 IRuleBaseDescriptor[] getRuleBaseDescriptors()
           
protected  IRuleBaseDescriptor parseRuleBaseDescriptor(Object document)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RULEBASES

public static final String RULEBASES
root element name for the rulebases.xml file; value is 'rulebases

See Also:
Constant Field Values

RULEBASE

public static final String RULEBASE
tag name for the element defining a rulebase; value is 'rulebase'

See Also:
Constant Field Values

TARGET

public static final String TARGET
tag name for element defining a target; value is 'target'

See Also:
Constant Field Values

RULEBASE_FACTORY

public static final String RULEBASE_FACTORY
attribute defining the rulebase factory; value is 'rulebaseFactory'

See Also:
Constant Field Values

LOCATION

public static final String LOCATION
attribute defining the rulebase location for a document rulebase; value is 'location'

See Also:
Constant Field Values

POLYMORPHIC

public static final String POLYMORPHIC
attribute defining whether or not rulebases are to be applied polymorphically; value is 'polymorphic'

See Also:
Constant Field Values

REGEXP

public static final String REGEXP
attribute defining the regular expression for a target; value is 'regexp'

See Also:
Constant Field Values
Constructor Detail

RuleBaseMapDocument

public RuleBaseMapDocument(Element root)
create a rulebase mapping document from the given XML source stream

Parameters:
root - -- root element of an XML document
Throws:
SAXException - in case of parsing error
IOException - in case of I/O error
ParserConfigurationException
Method Detail

getRuleBaseDescriptors

public IRuleBaseDescriptor[] getRuleBaseDescriptors()
Overrides:
getRuleBaseDescriptors in class RuleBaseMapBuilder
Returns:
the descriptors

parseRuleBaseDescriptor

protected IRuleBaseDescriptor parseRuleBaseDescriptor(Object document)
Specified by:
parseRuleBaseDescriptor in class RuleBaseMapBuilder