org.openfast.template.loader
Class AbstractFieldParser

java.lang.Object
  extended by org.openfast.template.loader.AbstractFieldParser
All Implemented Interfaces:
FieldParser
Direct Known Subclasses:
ComposedDecimalParser, GroupParser, ScalarParser, SequenceParser

public abstract class AbstractFieldParser
extends java.lang.Object
implements FieldParser


Constructor Summary
protected AbstractFieldParser(java.lang.String nodeName)
           
protected AbstractFieldParser(java.lang.String[] nodeNames)
           
 
Method Summary
 boolean canParse(org.w3c.dom.Element element, org.openfast.template.loader.ParsingContext context)
           
protected static org.w3c.dom.Element getElement(org.w3c.dom.Element fieldNode, int elementIndex)
          Find the first element item within the passed Element objects child nodes
protected static boolean isElement(org.w3c.dom.Node item)
          Determines if the passed Node is of type element
protected abstract  Field parse(org.w3c.dom.Element fieldNode, boolean optional, org.openfast.template.loader.ParsingContext context)
           
 Field parse(org.w3c.dom.Element fieldNode, org.openfast.template.loader.ParsingContext parent)
           
protected static void parseExternalAttributes(org.w3c.dom.Element element, Field field)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFieldParser

protected AbstractFieldParser(java.lang.String nodeName)

AbstractFieldParser

protected AbstractFieldParser(java.lang.String[] nodeNames)
Method Detail

canParse

public boolean canParse(org.w3c.dom.Element element,
                        org.openfast.template.loader.ParsingContext context)
Specified by:
canParse in interface FieldParser

parse

public final Field parse(org.w3c.dom.Element fieldNode,
                         org.openfast.template.loader.ParsingContext parent)
Specified by:
parse in interface FieldParser

parse

protected abstract Field parse(org.w3c.dom.Element fieldNode,
                               boolean optional,
                               org.openfast.template.loader.ParsingContext context)

parseExternalAttributes

protected static void parseExternalAttributes(org.w3c.dom.Element element,
                                              Field field)

getElement

protected static org.w3c.dom.Element getElement(org.w3c.dom.Element fieldNode,
                                                int elementIndex)
Find the first element item within the passed Element objects child nodes

Parameters:
fieldNode - The dom element object
Returns:
Returns the first element of the child nodes of the passed element, otherwise returns null

isElement

protected static boolean isElement(org.w3c.dom.Node item)
Determines if the passed Node is of type element

Parameters:
item - The Node that is being checked to see if its of type element
Returns:
Returns true if passed Node type is type element, false otherwise


Copyright © 2006-2008 The LaSalle Technology Group, LLC. All Rights Reserved.