Class XmlResourceConfigLoader
- java.lang.Object
-
- org.smooks.engine.resource.config.loader.xml.XmlResourceConfigLoader
-
- All Implemented Interfaces:
ResourceConfigLoader
public class XmlResourceConfigLoader extends Object implements ResourceConfigLoader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
XmlResourceConfigLoader.SmooksConfig
-
Constructor Summary
Constructors Modifier Constructor Description XmlResourceConfigLoader()
protected
XmlResourceConfigLoader(ResourceConfigSeq resourceConfigSeq)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConditionEvaluator(String id, ExpressionEvaluator evaluator)
protected void
assertElementPermitted(Element configElement)
protected void
assertExtendedConfigOK(String configNamespace, String resourcePath)
protected void
assertUniqueConditionId(String id)
protected void
configureFeatures(Element configElement, ResourceConfig resourceConfig)
protected void
configureHandlers(Element configElement, ResourceConfig resourceConfig)
protected void
configureParams(Element configElement, ResourceConfig resourceConfig)
ExpressionEvaluator
digestCondition(Element conditionElement)
protected void
digestConditions(Element conditionsElement)
protected void
digestImport(Element importElement, URI baseURI)
protected void
digestParameters(Element resourceConfigElement, ResourceConfig resourceConfig)
protected void
digestParams(Element paramsElement)
protected void
digestProfiles(Element profilesElement)
ExpressionEvaluator
getConditionEvaluator(String idRef)
String
getCurrentPath()
protected Smooks
getExtendedResourceConfigLoader(String configNamespace)
ResourceConfigSeq
getResourceConfigSeq()
protected static boolean
isExtensionConfig()
ResourceConfigSeq
load(InputStream inputStream, String baseURI, ClassLoader classLoader)
Digest the XML Smooks configuration stream.protected void
loadConfigRecursively(Reader reader, String baseURI)
protected void
loadExtendedResourceConfig(Element configElement, String defaultProfile, String defaultConditionRef)
protected void
loadReaderResourceConfig(Element configElement, String defaultProfile)
protected void
loadResourceConfig(Element configElement, String defaultProfile, String defaultConditionRef)
protected void
loadV20XSDValidatedConfig(String baseURI, Document configDoc)
protected void
popConfig()
protected void
pushConfig(String file, URI fileURI)
protected static void
setExtensionDigestOff()
protected static void
setExtensionDigestOn()
-
-
-
Field Detail
-
XSD_V20
public static final String XSD_V20
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
XmlResourceConfigLoader
public XmlResourceConfigLoader()
-
XmlResourceConfigLoader
protected XmlResourceConfigLoader(ResourceConfigSeq resourceConfigSeq)
-
-
Method Detail
-
load
public ResourceConfigSeq load(InputStream inputStream, String baseURI, ClassLoader classLoader)
Digest the XML Smooks configuration stream.- Specified by:
load
in interfaceResourceConfigLoader
- Parameters:
inputStream
- The stream.baseURI
- The base URI to be associated with the configuration stream.- Returns:
- A
ResourceConfigSeq
containing the list ofResourceConfigs
defined in the XML configuration. - Throws:
SAXException
- Error parsing the XML stream.IOException
- Error reading the XML stream.SmooksConfigException
- Invalid configuration..
-
getResourceConfigSeq
public ResourceConfigSeq getResourceConfigSeq()
-
loadConfigRecursively
protected void loadConfigRecursively(Reader reader, String baseURI) throws IOException, SAXException, URISyntaxException, SmooksConfigException
-
loadV20XSDValidatedConfig
protected void loadV20XSDValidatedConfig(String baseURI, Document configDoc) throws SAXException, URISyntaxException, SmooksConfigException
-
digestParams
protected void digestParams(Element paramsElement)
-
assertElementPermitted
protected void assertElementPermitted(Element configElement)
-
digestImport
protected void digestImport(Element importElement, URI baseURI) throws SAXException, URISyntaxException, SmooksConfigException
-
loadReaderResourceConfig
protected void loadReaderResourceConfig(Element configElement, String defaultProfile)
-
configureHandlers
protected void configureHandlers(Element configElement, ResourceConfig resourceConfig)
-
configureFeatures
protected void configureFeatures(Element configElement, ResourceConfig resourceConfig)
-
configureParams
protected void configureParams(Element configElement, ResourceConfig resourceConfig)
-
loadResourceConfig
protected void loadResourceConfig(Element configElement, String defaultProfile, String defaultConditionRef)
-
loadExtendedResourceConfig
protected void loadExtendedResourceConfig(Element configElement, String defaultProfile, String defaultConditionRef)
-
getExtendedResourceConfigLoader
protected Smooks getExtendedResourceConfigLoader(String configNamespace)
-
assertExtendedConfigOK
protected void assertExtendedConfigOK(String configNamespace, String resourcePath)
-
isExtensionConfig
protected static boolean isExtensionConfig()
-
setExtensionDigestOn
protected static void setExtensionDigestOn()
-
setExtensionDigestOff
protected static void setExtensionDigestOff()
-
digestConditions
protected void digestConditions(Element conditionsElement)
-
digestCondition
public ExpressionEvaluator digestCondition(Element conditionElement) throws SmooksConfigException
- Throws:
SmooksConfigException
-
digestProfiles
protected void digestProfiles(Element profilesElement)
-
digestParameters
protected void digestParameters(Element resourceConfigElement, ResourceConfig resourceConfig)
-
getCurrentPath
public String getCurrentPath()
-
popConfig
protected void popConfig()
-
addConditionEvaluator
public void addConditionEvaluator(String id, ExpressionEvaluator evaluator)
-
getConditionEvaluator
public ExpressionEvaluator getConditionEvaluator(String idRef)
-
assertUniqueConditionId
protected void assertUniqueConditionId(String id)
-
-