junitx.ddtunit.data.processing.parser
Class ParserImpl

java.lang.Object
  extended by junitx.ddtunit.data.processing.parser.ParserImpl
All Implemented Interfaces:
IParser

public final class ParserImpl
extends Object
implements IParser

XML SAX parser converting xml testdatea resourse into object structure used by DDTestCase class execution.
Using JAXP 1.1 to specify and configure SAX conformant parser.
As project default Apache Crimson provided in the distribution of JDK 1.4.2 is used.

Author:
jg

Field Summary
static String XSD_RESOURCE_PATH
          resource path of xml schema used for validation
static String XSD_URL
          URL of xml schema for validation
 
Constructor Summary
ParserImpl()
           
 
Method Summary
 TestClusterDataSet parse(String resource, boolean byName, String clusterId, TestClusterDataSet baseDataSet)
          Parse xml resource provided by resource name filtered by classId.
 TypedObject parseElement(String xmlObjectDef)
           
 TypedObject parseElement(String xmlObjectDef, boolean addXMLHeader)
          Parse object definition and use provided object as base class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XSD_URL

public static final String XSD_URL
URL of xml schema for validation

See Also:
Constant Field Values

XSD_RESOURCE_PATH

public static final String XSD_RESOURCE_PATH
resource path of xml schema used for validation

See Also:
Constant Field Values
Constructor Detail

ParserImpl

public ParserImpl()
Method Detail

parse

public TestClusterDataSet parse(String resource,
                                boolean byName,
                                String clusterId,
                                TestClusterDataSet baseDataSet)
Description copied from interface: IParser
Parse xml resource provided by resource name filtered by classId.

Specified by:
parse in interface IParser
Parameters:
resource - to parse
byName - TODO
clusterId - to filter class tag
Returns:
generated TestClusterDataSet

parseElement

public TypedObject parseElement(String xmlObjectDef,
                                boolean addXMLHeader)
Parse object definition and use provided object as base class. If set to null a new instance of required type will be created during processing.

Specified by:
parseElement in interface IParser
Parameters:
xmlObjectDef - string defining object to instanciate
addXMLHeader - - set true if xml header should be added
Returns:
object to instanciate as defined

parseElement

public TypedObject parseElement(String xmlObjectDef)


Copyright © 2004-2011. All Rights Reserved.