org.apache.neethi.builders
Interface AssertionBuilder

All Known Implementing Classes:
XMLPrimitiveAssertionBuilder

public interface AssertionBuilder

AssertionBuilder is the interface which must implement by any CustomAssertionBuilder. It defines a single method which takes an OMElement and an AssertionFactory instace and creates an Assertion from the given OMElement. Custom AssertionBuilder authors can use the AssertionFactory specified to build Assertions for any unknown OMElements inside the given OMElement. They are given the opportunity to control the behaviour of Assertion operations based on the corresponding domain policy assertion of the given OMElement and the level of its processing.


Method Summary
 Assertion build(org.apache.axiom.om.OMElement element, AssertionBuilderFactory factory)
          Constructs an assertion from a known OMElement.
 javax.xml.namespace.QName[] getKnownElements()
          Returns an array of QNames of OMElements from which assertion can be built by this AssertionFactory.
 

Method Detail

build

public Assertion build(org.apache.axiom.om.OMElement element,
                       AssertionBuilderFactory factory)
                throws java.lang.IllegalArgumentException
Constructs an assertion from a known OMElement. If that element contains other child elements that the Builder doesn't understand, it uses the AssertionBuilderFactory to construct assertions from them.

Parameters:
element - the known element from which an assertion can be built
factory - the factory from which AssertionBuilders are taken to build assertion from unknown child elements
Returns:
an Assertion built from the given element
Throws:
java.lang.IllegalArgumentException - if the given element is malformed

getKnownElements

public javax.xml.namespace.QName[] getKnownElements()
Returns an array of QNames of OMElements from which assertion can be built by this AssertionFactory.

Returns:
an array of QNames of known OMElements


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.