wt.dataops.objectcol.xmldef
Class BaseXMLDefAdapter

java.lang.Object
  extended bywt.dataops.objectcol.xmldef.BaseXMLDefAdapter
All Implemented Interfaces:
CriterionDefTags
Direct Known Subclasses:
ConditionXMLDefAdapter, FilterXMLDefAdapter, MethodXMLDefAdapter, RelationshipMapXMLDefAdapter

public class BaseXMLDefAdapter
extends Object
implements CriterionDefTags


Field Summary
protected  Map inputMap
           
protected  Element root
           
 
Fields inherited from interface wt.dataops.objectcol.xmldef.CriterionDefTags
ALLOW_SUBTYPES_XML_TAG, ATTR_XML_TAG, BASE_XML_TAG, BY_METHOD_XML_TAG, BY_RELATIONSHIP_XML_TAG, CLASSNAME_XML_TAG, COLLECT_OTHER_END_XML_TAG, COLLECT_REL_BY_XML_TAG, CONCAT_CHAR_XML_TAG, CONDITION_XML_TAG, CONTENT_XML_TAG, DEFAULT_VALUE_XML_TAG, DELEGATE_NAME_XML_TAG, DELEGATE_XML_TAG, DERIVE_XML_TAG, DERIVED_XML_TAG, DESCRIPTION_XML_TAG, DISPLAY_NAME_XML_TAG, FIELD_XML_TAG, FILTER_XML_TAG, IF_EXISTS_XML_TAG, INCLUDE_DESCENDANTS_XML_TAG, INCLUDE_TYPES_XML_TAG, INPUT_XML_TAG, LINK_XML_TAG, MATCH_XML_TAG, META_DATA_XML_TAG, METHOD_DEF_XML_TAG, METHOD_XML_TAG, NAME_XML_TAG, OBJECT_TYPE_XML_TAG, OBJECTREF, OTHER_END_DEPENDANT_XML_TAG, OUTPUT_TYPE_XML_TAG, OUTPUT_TYPES_XML_TAG, PARAM_XML_TAG, PARAMS_XML_TAG, PATTERN_XML_TAG, POST_PROCESS_XML_TAG, PRIMITIVE_XML_TAG, RECURSE_XML_TAG, RELATED_XML_TAG, RELATIONSHIP_XML_TAG, REQUIRED_XML_TAG, RESOURCE_XML_TAG, RETURN_TYPE_XML_TAG, ROLE_XML_TAG, SEED_XML_TAG, SEEDS_XML_TAG, STRING, TYPE_XML_TAG, UNIQUE_NAME_XML_TAG, USED_AS_XML_TAG, XMLDEF_OBJECT_KEY
 
Constructor Summary
BaseXMLDefAdapter()
           
 
Method Summary
private  String[] createNameTypeArr(String name)
           
protected  String derivedValue(Element derived)
           
private  String deriveValue(Element derive)
           
 String[][] getAllInputs()
           
protected  Class getClassValueFromElement(Element elt)
           
 boolean getDefaultValueForNamedInput(String inputName, boolean defValue)
           
 String getDefaultValueForNamedInput(String inputName, String defValue)
           
protected  String getInputNameForElement(Element elt)
           
 String getInputType(String inputName)
           
 Matcher getMatchingMatcher(String inputName, String value)
           
protected  String getNameValueFromElement(Element elt)
           
 String[][] getRequiredInputs()
           
protected  void initialize(Element elt)
           
protected  Map initInputMap()
           
 boolean isInputRequired(String inputName)
           
 boolean matches(String inputName, Class clazz)
           
 boolean matches(String inputName, String value)
           
static BaseXMLDefAdapter newBaseXMLDefAdapter(Element root)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

root

protected Element root

inputMap

protected Map inputMap
Constructor Detail

BaseXMLDefAdapter

public BaseXMLDefAdapter()
Method Detail

newBaseXMLDefAdapter

public static BaseXMLDefAdapter newBaseXMLDefAdapter(Element root)
                                              throws WTException
Throws:
WTException

initialize

protected void initialize(Element elt)
                   throws WTException
Throws:
WTException

initInputMap

protected Map initInputMap()

getClassValueFromElement

protected Class getClassValueFromElement(Element elt)
                                  throws WTException
Throws:
WTException

getInputNameForElement

protected String getInputNameForElement(Element elt)
                                 throws WTException
Throws:
WTException

getNameValueFromElement

protected String getNameValueFromElement(Element elt)
                                  throws WTException
Throws:
WTException

derivedValue

protected String derivedValue(Element derived)
                       throws WTException
Throws:
WTException

deriveValue

private String deriveValue(Element derive)
                    throws WTException
Throws:
WTException

getMatchingMatcher

public Matcher getMatchingMatcher(String inputName,
                                  String value)

matches

public boolean matches(String inputName,
                       String value)
                throws WTException
Throws:
WTException

matches

public boolean matches(String inputName,
                       Class clazz)
                throws WTException
Throws:
WTException

isInputRequired

public boolean isInputRequired(String inputName)
                        throws WTException
Throws:
WTException

getInputType

public String getInputType(String inputName)
                    throws WTException
Throws:
WTException

getRequiredInputs

public String[][] getRequiredInputs()
                             throws WTException
Throws:
WTException

getAllInputs

public String[][] getAllInputs()
                        throws WTException
Throws:
WTException

createNameTypeArr

private String[] createNameTypeArr(String name)
                            throws WTException
Throws:
WTException

getDefaultValueForNamedInput

public boolean getDefaultValueForNamedInput(String inputName,
                                            boolean defValue)
                                     throws WTException
Throws:
WTException

getDefaultValueForNamedInput

public String getDefaultValueForNamedInput(String inputName,
                                           String defValue)
                                    throws WTException
Throws:
WTException