Search in sources :

Example 1 with CoreNSAwareAttribute

use of org.apache.axiom.core.CoreNSAwareAttribute in project webservices-axiom by apache.

the class BuildableContext method processAttribute.

@Override
void processAttribute(String namespaceURI, String localName, String prefix, String value, String type, boolean specified) throws StreamException {
    if (passThroughHandler != null) {
        passThroughHandler.processAttribute(namespaceURI, localName, prefix, value, type, specified);
    } else {
        CoreNSAwareAttribute attr = builderHandler.nodeFactory.createNode(CoreNSAwareAttribute.class);
        attr.initName(namespaceURI, localName, prefix, builderHandler.namespaceHelper);
        try {
            attr.coreSetCharacterData(value, null);
        } catch (CoreModelException ex) {
            throw new CoreModelStreamException(ex);
        }
        attr.coreSetType(type);
        attr.coreSetSpecified(specified);
        ((CoreElement) target).coreAppendAttribute(attr);
    }
}
Also used : CoreElement(org.apache.axiom.core.CoreElement) CoreModelException(org.apache.axiom.core.CoreModelException) CoreNSAwareAttribute(org.apache.axiom.core.CoreNSAwareAttribute) CoreModelStreamException(org.apache.axiom.core.CoreModelStreamException)

Aggregations

CoreElement (org.apache.axiom.core.CoreElement)1 CoreModelException (org.apache.axiom.core.CoreModelException)1 CoreModelStreamException (org.apache.axiom.core.CoreModelStreamException)1 CoreNSAwareAttribute (org.apache.axiom.core.CoreNSAwareAttribute)1