org.spicefactory.cinnamon.config.xml
Class SchemaValidatingXomBuilderFactory

java.lang.Object
  extended by org.spicefactory.cinnamon.config.xml.SchemaValidatingXomBuilderFactory

public class SchemaValidatingXomBuilderFactory
extends Object

A Factory that creates XOM Builder instances that optionally load, cache and reuse one or more XML Schema instances.

Author:
Jens Halm

Constructor Summary
SchemaValidatingXomBuilderFactory()
          Creates a new factory instance.
 
Method Summary
 void addSchema(Resource resource)
          Adds the given Resource to load an XML Schema from
 nu.xom.Builder createBuilder()
          Creates a new XOM Builder instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaValidatingXomBuilderFactory

public SchemaValidatingXomBuilderFactory()
Creates a new factory instance.

Method Detail

addSchema

public void addSchema(Resource resource)
Adds the given Resource to load an XML Schema from

Parameters:
resource - the Resource to load an XML Schema from

createBuilder

public nu.xom.Builder createBuilder()
Creates a new XOM Builder instance. Any XML Schema resources that were added to this factory prior to calling this method will be used by the new Builder instance to validate XML documents.

Returns:
a new XOM Builder instance.