/** * Retrieves the string-value of an attribute node. This should be the XML 1.0 normalized * attribute value. This may be the empty string but must not be null. * * @param object the attribute node * @return Returns the string-value of the node. */ public String getAttributeStringValue(Object object) { return ((OMAttribute) object).getAttributeValue(); }
private boolean isEmptyAttribute(OMAttribute attribute) { if (attribute == null || attribute.getAttributeValue() == null || attribute.getAttributeValue().equals("")) { return true; } return false; }
private boolean isEmptryAttribute(OMAttribute attr) { if (attr == null || attr.getAttributeValue() == null || attr.getAttributeValue().trim(). equals("")) { return true; } return false; }
public static String getAttvalue(OMAttribute omatribute) { String ref; ref = omatribute.getAttributeValue(); if (ref != null) { if (ref.charAt(0) == '#') { ref = ref.substring(1); } } return ref; }
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; } }
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(); }
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; }
public String getAttributeValue(String qName) { String value = null; OMAttribute attribute = data.getAttribute(new QName(qName)); if (attribute != null) { value = attribute.getAttributeValue(); } return value; }
private boolean isEnabled(OMElement element) { boolean enabled = true; OMAttribute enableAttr = element.getAttribute(new QName("enable")); if (enableAttr != null) { enabled = Boolean.parseBoolean(enableAttr.getAttributeValue().trim()); } return enabled; }
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; }
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())); } }
/** * Update the list of modules that is required to be engaged globally. */ protected void processModuleRefs(Iterator moduleRefs, AxisConfiguration config) { while (moduleRefs.hasNext()) { OMElement moduleref = (OMElement) moduleRefs.next(); OMAttribute moduleRefAttribute = moduleref.getAttribute(new QName(TAG_REFERENCE)); String refName = moduleRefAttribute.getAttributeValue(); axisConfig.addGlobalModuleRef(refName); } }
public void hasValue(String expected) { if (!Objects.equal(getSubject().getAttributeValue(), expected)) { fail("has value", expected); } }
private void setSOAPHeader(HeaderMediator headerMediator, OMElement elem, OMAttribute name) { String nameAtt = name.getAttributeValue(); QName qname = elem.resolveQName(nameAtt); if (qname == null) { handleException("Invalid QName '" + nameAtt + "' in name attribute"); } else if (qname.getNamespaceURI().isEmpty()) { handleException("Invalid SOAP header: " + nameAtt + " specified at the " + "header mediator. All SOAP headers must be namespace qualified."); } else { headerMediator.setQName(qname); } }
public boolean getMustPreserveWhitespace() { OMAttribute attr = getAttribute(SPACE); String space = (attr != null) ? attr.getAttributeValue() : null; Base parent = this.getParentElement(); return space != null && space.equalsIgnoreCase("preserve") ? true : (parent != null && parent instanceof Element) ? ((Element)parent).getMustPreserveWhitespace() : (parent != null && parent instanceof Document) ? ((Document)parent).getMustPreserveWhitespace() : true; }
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; } }