public static OMAttribute processRefAtt(OMElement omElement) { OMAttribute omatribute = omElement.getAttribute(new QName(SOAP11_REF_ATTR)); if (omatribute == null) { omatribute = omElement.getAttribute(new QName(SOAP12_REF_ATTR)); } return omatribute; }
protected String getAttribute(OMElement elt, QName qName) { OMAttribute a = elt.getAttribute(qName); if (a != null) { return a.getAttributeValue(); } return null; }
String getAttributeValue(String s, String s1) { if (currentEvent == START_ELEMENT) { QName qname = new QName(s, s1); OMAttribute attr = ((OMElement)node).getAttribute(qname); return attr == null ? null : attr.getAttributeValue(); } else { throw new IllegalStateException( "attribute type accessed in illegal event!"); } }
private String processAuthEndpointQueryParamElem(OMElement authEndpointQueryParamElem) { OMAttribute nameAttr = authEndpointQueryParamElem.getAttribute(new QName( FrameworkConstants.Config.ATTR_AUTH_ENDPOINT_QUERY_PARAM_NAME)); if (nameAttr == null) { log.warn("Each Authentication Endpoint Query Param should have a unique name attribute. This Query Param will skipped."); return null; } return nameAttr.getAttributeValue(); }
String getAttributeValue(String s, String s1) { if (currentEvent == START_ELEMENT) { QName qname = new QName(s, s1); OMAttribute attr = ((OMElement)node).getAttribute(qname); return attr == null ? null : attr.getAttributeValue(); } else { throw new IllegalStateException( "attribute type accessed in illegal event!"); } }
protected String[] processSupportedPolicyNamespaces( OMElement supportedPolicyElements) { OMAttribute namespaces = supportedPolicyElements .getAttribute(new QName(TAG_NAMESPACES)); if (namespaces != null) { String value = namespaces.getAttributeValue(); if (value.trim().length() != 0) { return value.split(" "); } } return null; }
private String processAuthEndpointQueryParamElem(OMElement authEndpointQueryParamElem) { OMAttribute nameAttr = authEndpointQueryParamElem.getAttribute(new QName( FrameworkConstants.Config.ATTR_AUTH_ENDPOINT_QUERY_PARAM_NAME)); if (nameAttr == null) { log.warn("Each Authentication Endpoint Query Param should have a unique name attribute. This Query Param will skipped."); return null; } return nameAttr.getAttributeValue(); }
private void processAuthenticatorNameMappingElement(OMElement authenticatorNameMappingElem) { OMAttribute nameAttr = authenticatorNameMappingElem.getAttribute(new QName(FrameworkConstants.Config.ATTR_AUTHENTICATOR_NAME_MAPPING_NAME)); OMAttribute aliasAttr = authenticatorNameMappingElem.getAttribute(new QName(FrameworkConstants.Config.ATTR_AUTHENTICATOR_NAME_MAPPING_ALIAS)); if (nameAttr == null || aliasAttr == null) { log.warn("An AuthenticatorNameMapping must contain \'name\' and \'alias\' attributes. Skipping the element."); return; } authenticatorNameMappings.put(aliasAttr.getAttributeValue(), nameAttr.getAttributeValue()); }
public String getAttributeValue(QName qname) { final OMAttribute attribute = omTarget.getAttribute(qname); if (attribute == null) { return null; } return attribute.getAttributeValue(); }
public String getAttributeValue(String qName) { String value = null; OMAttribute attribute = data.getAttribute(new QName(qName)); if (attribute != null) { value = attribute.getAttributeValue(); } return value; }
private void readallChildElements() { Iterator childs = parent.getChildElements(); while (childs.hasNext()) { OMElement omElement = (OMElement)childs.next(); OMAttribute id = omElement.getAttribute(new QName("id")); if (id != null) { childs.remove(); elementMap.put(id.getAttributeValue(), omElement); } } filledTable = true; }
protected boolean matches(OMNode node) { if (node instanceof OMElement) { OMAttribute attr = ((OMElement) node).getAttribute( attributeName); return (attr != null) && (doCaseSensitiveValueChecks ? attr.getAttributeValue().equals(attributeValue) : attr.getAttributeValue().equalsIgnoreCase(attributeValue)); } else { return false; } }
private static void configureURLMappings(Resource resource, OMElement resourceElt) { OMAttribute urlMappingAtt = resourceElt.getAttribute(new QName("url-mapping")); OMAttribute uriTemplateAtt = resourceElt.getAttribute(new QName("uri-template")); if (urlMappingAtt != null && !"".equals(urlMappingAtt.getAttributeValue())) { resource.setDispatcherHelper(new URLMappingHelper(urlMappingAtt.getAttributeValue())); } else if (uriTemplateAtt != null && !"".equals(uriTemplateAtt.getAttributeValue())) { resource.setDispatcherHelper(new URITemplateHelper(uriTemplateAtt.getAttributeValue())); } }
private void handleTableOutlines() throws JaxenException { AXIOMXPath xpathExpression = new AXIOMXPath("//a:style//a:box//a:pen"); xpathExpression.addNamespace("a", "http://jasperreports.sourceforge.net/jasperreports"); OMElement documentElement = document.getOMDocumentElement(); List nodeList = xpathExpression.selectNodes(documentElement); OMElement penElement = (OMElement) nodeList.get(0); penElement.getAttribute(new QName("lineWidth")).setAttributeValue(String.format("%.1g%n", tableReport.getOutLineThickness())); penElement.getAttribute(new QName("lineColor")).setAttributeValue(tableReport.getOutLineColor()); }
public boolean removeAttribute(Name name) { org.apache.axiom.om.OMAttribute attr = omTarget.getAttribute(new QName(name.getURI(), name.getLocalName(), name.getPrefix())); if (attr != null) { omTarget.removeAttribute(attr); return true; } return false; }
public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException { RequiredElements requiredElements = new RequiredElements(SPConstants.SP_V12); OMAttribute attrXPathVersion = element.getAttribute(SP12Constants.ATTR_XPATH_VERSION); if (attrXPathVersion != null) { requiredElements.setXPathVersion(attrXPathVersion.getAttributeValue()); } for (Iterator iterator = element.getChildElements(); iterator.hasNext();) { processElement((OMElement) iterator.next(),requiredElements); } return requiredElements; }
@Override protected AnalyzerConfig buildConfig(OMElement analyzerXML) throws AnalyzerException { OMAttribute name = analyzerXML.getAttribute(AnalyzerConfigConstants.field); if (name == null || name.getAttributeValue() == null || name.getAttributeValue().trim(). equals("")) { throw new AnalyzerException("Error at orderBy : Field attribute must be present.."); } OrderByConfig config = new OrderByConfig(); config.setField(name.getAttributeValue()); return config; }
public Mediator createSpecificMediator(OMElement elem, Properties properties) { EventPublisherMediator eventPublisherMediator = new EventPublisherMediator(); OMAttribute attEventSource = elem.getAttribute(PROP_NAME); if (attEventSource != null) { eventPublisherMediator.setEventSourceName(attEventSource.getAttributeValue()); } else { handleException( "The 'eventSourceName' attribute is required for the EventPublisher mediator"); } return eventPublisherMediator; } }
@Override public void removeAttribute(QName name) { try { OMAttribute attribute = getAxiomElement().getAttribute(name); if (attribute != null) { getAxiomElement().removeAttribute(attribute); } } catch (OMException ex) { throw new AxiomSoapElementException(ex); } }
public void removeAttribute(QName name) { try { OMAttribute attribute = getAxiomElement().getAttribute(name); if (attribute != null) { getAxiomElement().removeAttribute(attribute); } } catch (OMException ex) { throw new AxiomSoapElementException(ex); } }