org.apache.neethi.builders.xml
Class XMLPrimitiveAssertionBuilder

java.lang.Object
  extended by org.apache.neethi.builders.xml.XMLPrimitiveAssertionBuilder
All Implemented Interfaces:
AssertionBuilder<Element>

public class XMLPrimitiveAssertionBuilder
extends Object
implements AssertionBuilder<Element>


Constructor Summary
XMLPrimitiveAssertionBuilder()
           
 
Method Summary
 Assertion build(Element element, AssertionBuilderFactory factory)
          Constructs an assertion from a known element.
 QName[] getKnownElements()
          Returns an array of QNames of elements from which assertion can be built by this AssertionFactory.
protected  QName getQName(Element element)
           
static boolean isIgnorable(Element el)
           
static boolean isOptional(Element el)
           
 Assertion newPolicyContainingAssertion(Element element, Map<QName,String> atts, Policy policy)
           
 Assertion newPrimitiveAssertion(Element element, Map<QName,String> atts)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLPrimitiveAssertionBuilder

public XMLPrimitiveAssertionBuilder()
Method Detail

build

public Assertion build(Element element,
                       AssertionBuilderFactory factory)
                throws IllegalArgumentException
Description copied from interface: AssertionBuilder
Constructs an assertion from a known element. If that element contains other child elements that the Builder doesn't understand, it uses the AssertionBuilderFactory to construct assertions from them.

Specified by:
build in interface AssertionBuilder<Element>
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:
IllegalArgumentException - if the given element is malformed

getQName

protected QName getQName(Element element)

newPrimitiveAssertion

public Assertion newPrimitiveAssertion(Element element,
                                       Map<QName,String> atts)

newPolicyContainingAssertion

public Assertion newPolicyContainingAssertion(Element element,
                                              Map<QName,String> atts,
                                              Policy policy)

isOptional

public static boolean isOptional(Element el)

isIgnorable

public static boolean isIgnorable(Element el)

getKnownElements

public QName[] getKnownElements()
Description copied from interface: AssertionBuilder
Returns an array of QNames of elements from which assertion can be built by this AssertionFactory.

Specified by:
getKnownElements in interface AssertionBuilder<Element>
Returns:
an array of QNames of known elements


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.