1 4 package com.tc.config.schema.dynamic; 5 6 import org.apache.xmlbeans.XmlObject; 7 8 import com.tc.config.schema.context.ConfigContext; 9 10 13 public class StringXPathBasedConfigItem extends XPathBasedConfigItem implements StringConfigItem { 14 15 public StringXPathBasedConfigItem(ConfigContext context, String xpath) { 16 super(context, xpath); 17 } 18 19 protected Object fetchDataFromXmlObject(XmlObject xmlObject) { 20 return super.fetchDataFromXmlObjectByReflection(xmlObject, "getStringValue"); 21 } 22 23 protected Object fetchDataFromDefaultValue(String defaultValue) { 24 return defaultValue; 25 } 26 27 public String getString() { 28 return (String ) getObject(); 29 } 30 31 } 32 | Popular Tags |