org.apache.axiom.om.OMElement.removeAttribute()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(70)

本文整理了Java中org.apache.axiom.om.OMElement.removeAttribute()方法的一些代码示例,展示了OMElement.removeAttribute()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OMElement.removeAttribute()方法的具体详情如下:
包路径:org.apache.axiom.om.OMElement
类名称:OMElement
方法名:removeAttribute

OMElement.removeAttribute介绍

[英]Removes the given attribute from this element.
[中]从此元素中删除给定属性。

代码示例

代码示例来源:origin: apache/axis2-java

public boolean removeAttribute(QName qname) {
  org.apache.axiom.om.OMAttribute attr = omTarget.getAttribute(qname);
  if (attr != null) {
    omTarget.removeAttribute(attr);
    return true;
  }
  return false;
}

代码示例来源:origin: org.apache.axis2/axis2-saaj

public boolean removeAttribute(QName qname) {
  org.apache.axiom.om.OMAttribute attr = omTarget.getAttribute(qname);
  if (attr != null) {
    omTarget.removeAttribute(attr);
    return true;
  }
  return false;
}

代码示例来源:origin: usnistgov/iheos-toolkit2

public void unsetHome(OMElement ro) {
  OMAttribute att = ro.getAttribute(MetadataSupport.home_qname);
  if (att != null)
    ro.removeAttribute(att);
}

代码示例来源:origin: usnistgov/iheos-toolkit2

void rmHome() {
  for (OMElement ele : m.getAllObjects()) {
    OMAttribute homeAtt = ele.getAttribute(MetadataSupport.home_qname);
    if (homeAtt != null)
      ele.removeAttribute(homeAtt);
  }
}

代码示例来源:origin: wso2/wso2-synapse

/**
 * Remove security policy content from published wsdl
 * @param wsdlElement
 */
private void removePolicyOfWSDL(OMElement wsdlElement) {
  Iterator<OMElement> iterator = (Iterator<OMElement>) wsdlElement.getChildElements();
  while (iterator.hasNext()) {
    OMElement child = iterator.next();
    if (child.getQName().getLocalPart().equals(SEC_POLICY_ELEMENT)) {
      child.detach();
    }
    if (child.getQName().getLocalPart().equals(PORT_ELEMENT)) {
      QName policyURIs = new QName(org.apache.axis2.namespace.Constants.URI_POLICY,
          PORT_SECURITY_ATTRIBUTE);
      if (child.getAttribute(policyURIs) != null) {
        OMAttribute attr = child.getAttribute(policyURIs);
        child.removeAttribute(attr);
      }
    }
  }
}

代码示例来源:origin: org.apache.axis2/axis2-saaj

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;
}

代码示例来源:origin: apache/axis2-java

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;
}

代码示例来源:origin: org.springframework.ws/org.springframework.ws

public void removeAttribute(QName name) {
  try {
    OMAttribute attribute = getAxiomElement().getAttribute(name);
    if (attribute != null) {
      getAxiomElement().removeAttribute(attribute);
    }
  }
  catch (OMException ex) {
    throw new AxiomSoapElementException(ex);
  }
}

代码示例来源:origin: org.springframework.ws/spring-ws-core

@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);
  }
}

代码示例来源:origin: spring-projects/spring-ws

@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);
  }
}

代码示例来源:origin: org.apache.axis2/axis2-adb

elementToProcess.removeAttribute(hrefAttribute);
OMElement clonedReferenceElement = getClonedOMElement(referedOMElement, omFactory);
OMNode omNode = null;

代码示例来源:origin: apache/servicemix-bundles

@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);
  }
}

代码示例来源:origin: org.wso2.carbon.commons/org.wso2.carbon.identity.user.store.configuration.deployer

OMAttribute encryptAttr = propElem.getAttribute(new QName(UserStoreConfigurationConstants.PROPERTY_ENCRYPT));
if (encryptAttr != null) {
  propElem.removeAttribute(encryptAttr);

代码示例来源:origin: org.ballerinalang/ballerina-core

Iterator<OMAttribute> attrIterator = omElement.getAllAttributes();
while (attrIterator.hasNext()) {
  omElement.removeAttribute(attrIterator.next());

代码示例来源:origin: apache/axis2-java

elementToProcess.removeAttribute(hrefAttribute);
OMElement clonedReferenceElement = getClonedOMElement(referedOMElement, omFactory);
OMNode omNode = null;

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.user.store.configuration.deployer

OMAttribute encryptAttr = propElem.getAttribute(new QName(UserStoreConfigurationConstants.PROPERTY_ENCRYPT));
if (encryptAttr != null) {
  propElem.removeAttribute(encryptAttr);

代码示例来源:origin: org.ballerinalang/ballerina-core

/**
 * {@inheritDoc}
 */
@Override
public void removeAttribute(String qname) {
  synchronized (this) {
    if (freezeStatus.getState() != BVM.FreezeStatus.State.UNFROZEN) {
      handleInvalidUpdate(freezeStatus.getState());
    }
  }
  if (nodeType != XMLNodeType.ELEMENT || qname.isEmpty()) {
    return;
  }
  OMElement omElement = (OMElement) omNode;
  OMAttribute attribute = omElement.getAttribute(getQname(qname));
  if (attribute == null) {
    return;
  }
  omElement.removeAttribute(attribute);
}

代码示例来源:origin: wso2/carbon-identity-framework

OMAttribute encryptAttr = propElem.getAttribute(new QName(UserStoreConfigurationConstants.PROPERTY_ENCRYPT));
if (encryptAttr != null) {
  propElem.removeAttribute(encryptAttr);

代码示例来源:origin: org.wso2.wsas/wso2wsas-admin

if (rowNameAttribute != null) {
  String attValue = rowNameAttribute.getAttributeValue();
  result.removeAttribute(rowNameAttribute);
  result.addAttribute(OMAbstractFactory.getOMFactory().createOMAttribute(
      "rowName", OMAbstractFactory.getOMFactory().createOMNamespace("", ""),
if (sqlTypeAttribute != null) {
  String attValue = sqlTypeAttribute.getAttributeValue();
  param.removeAttribute(sqlTypeAttribute);
  param.addAttribute(OMAbstractFactory.getOMFactory().createOMAttribute(
      "sqlType", OMAbstractFactory.getOMFactory().createOMNamespace("", ""),

代码示例来源:origin: usnistgov/iheos-toolkit2

System.out.println("attvalue is " + at.getAttributeValue());
if (at.getAttributeValue().indexOf("$") != -1)
  adhocQuery.removeAttribute(at);

相关文章

微信公众号

最新文章

更多