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

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

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

OMElement.getChildrenWithLocalName介绍

暂无

代码示例

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

private String getValueOfElementWithLocalName(OMElement element, String localName) {
  Iterator iterator = element.getChildrenWithLocalName(localName);
  String value = null;
  Object obj = iterator.next();
  if (obj instanceof OMElement) {
    value = ((OMElement) obj).getText();
  }
  return value;
}

代码示例来源:origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core

private static String getCustomQuery(OMElement queryEl) {
  return ((OMElement) queryEl.getChildrenWithLocalName(
      DBSFields.EXPRESSION).next()).getText();
}

代码示例来源:origin: org.wso2.carbon.apimgt/org.wso2.carbon.apimgt.keymgt

private void parseRequiredHeaderClaimUris(OMElement requiredClaimUrisElem) {
  if (requiredClaimUrisElem == null) {
    return;
  }
  Iterator claimUris = requiredClaimUrisElem.getChildrenWithLocalName(CLAIM_URI);
  if (claimUris != null) {
    while (claimUris.hasNext()) {
      OMElement claimUri = (OMElement) claimUris.next();
      if (claimUri != null) {
        requiredHeaderClaimUris.add(claimUri.getText());
      }
    }
  }
}

代码示例来源:origin: org.wso2.carbon.registry/org.wso2.carbon.registry.jcr

private void buildSupertypes(OMElement omElement) throws ConstraintViolationException {
  Iterator supertypeIt = omElement.getChildrenWithLocalName("supertypes");
  while (supertypeIt.hasNext()) {   //one time process
    OMElement supertypes = (OMElement) supertypeIt.next();
    Iterator it1 = supertypes.getChildrenWithLocalName("supertype");
    List<String> superTypeList = new ArrayList<String>();
    while (it1.hasNext()) {
      superTypeList.add(((OMElement) it1.next()).getText()); //super types
    }
    nodeTypeTemplate.setDeclaredSuperTypeNames(superTypeList.toArray(new String[0]));
  }
}

代码示例来源:origin: org.paxml/PaxmlCore

/**
 * Construct from owning elements with local name filter.
 * 
 * @param ele
 *            the owning element
 * @param filter
 *            the local name filter
 */
public Elements(final OMElement ele, final String filter) {
  super(filter == null ? ele.getChildElements() : ele.getChildrenWithLocalName(filter));
}

代码示例来源:origin: org.apache.airavata/airavata-workflow-tracking

public void setString(String name, String value) {
  Iterator<OMElement> el = target.getChildrenWithLocalName(name);
  if (value == null) {
    throw new IllegalArgumentException();
  } else {
    while (el.hasNext())
      el.next().setText(value);
    return;
  }
}

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

/**
 * Construct from owning elements with local name filter.
 * 
 * @param ele
 *            the owning element
 * @param filter
 *            the local name filter
 */
public Elements(final OMElement ele, final String filter) {
  super(filter == null ? ele.getChildElements() : ele.getChildrenWithLocalName(filter));
}

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

protected void parseExclusions(OMElement part) {
  excludeUids = new HashSet<String>();
  Iterator<OMElement> it = part.getChildrenWithLocalName("Exclude");
  while (it.hasNext()) {
    OMElement e = it.next();
    String s = e.getAttributeValue(new QName("value"));
    if (s != null) {
      excludeUids.add(s);
    }
  }
}

代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.registry.extensions

public void saveResources(OMElement resourcesElement, String basePath)
    throws JaxenException, RegistryException {
  Iterator<OMElement> resources = resourcesElement.getChildrenWithLocalName("resource");
  while (resources.hasNext()){
    String resourcePath = RegistryConstants.GOVERNANCE_REGISTRY_BASE_PATH +
        addResource(resources.next(), basePath);
    if (resourcePath != null){
      addDependency(wadlPath, resourcePath);
    }
  }
}

代码示例来源:origin: org.wso2.carbon.appmgt/org.wso2.carbon.appmgt.impl

private String exctractConditionFromPolicyPartialContent(String policyPartialContent){
  try {
    StAXOMBuilder builder = new StAXOMBuilder(new ByteArrayInputStream(policyPartialContent.getBytes()));
    OMElement conditionNode = (OMElement) builder.getDocumentElement().getChildrenWithLocalName("Condition").next();
    return conditionNode.toString();
  } catch (XMLStreamException e) {
    log.error("Can't extract the 'Condition' node from the 'Rule' node.", e);
    return null;
  }
}

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

private void storeFiles(OMElement respBody, Path dirPath) throws Exception {
 Iterator <OMElement> docRespEles = respBody.getChildrenWithLocalName("DocumentResponse");
 while (docRespEles.hasNext()) {
   OMElement docRespEle = docRespEles.next();
   String docUID = XmlUtil.onlyChildWithLocalName(docRespEle, "DocumentUniqueId").getText();
   OMElement docEle = XmlUtil.onlyChildWithLocalName(docRespEle, "Document");
   String txt = docEle.getText();
   BASE64Decoder d  = new BASE64Decoder();
   byte[] contents = d.decodeBuffer(txt);
   File dcmFile = dirPath.resolve(docUID + ".dcm").toFile();
   FileUtils.writeByteArrayToFile(dcmFile, contents);
 }
}

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

private void parseIds(Map<String, String> map, String section) {
  List<OMElement> idEles = XmlUtil.decendentsWithLocalName(root, section);
  for (OMElement e : idEles) {
    for (Iterator i = e.getChildrenWithLocalName("Assign"); i.hasNext(); ) {
      OMElement a = (OMElement) i.next();
      String symbol = a.getAttributeValue(symbolQ);
      String id = a.getAttributeValue(idQ);
      map.put(symbol, id);
    }
  }
}

代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.application.authentication.framework

private void readAuthenticatorNameMappings(OMElement documentElement) {
  OMElement authenticatorNameMappingsElem = documentElement.getFirstChildWithName(IdentityApplicationManagementUtil.
      getQNameWithIdentityApplicationNS(FrameworkConstants.Config.QNAME_AUTHENTICATOR_NAME_MAPPINGS));
  if (authenticatorNameMappingsElem != null) {
    for (Iterator authenticatorNameMappingElems = authenticatorNameMappingsElem.getChildrenWithLocalName(FrameworkConstants.Config.ELEM_AUTHENTICATOR_NAME_MAPPING);
       authenticatorNameMappingElems.hasNext(); ) {
      processAuthenticatorNameMappingElement((OMElement) authenticatorNameMappingElems.next());
    }
  }
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.application.authentication.framework

private void readAuthenticatorNameMappings(OMElement documentElement) {
  OMElement authenticatorNameMappingsElem = documentElement.getFirstChildWithName(IdentityApplicationManagementUtil.
      getQNameWithIdentityApplicationNS(FrameworkConstants.Config.QNAME_AUTHENTICATOR_NAME_MAPPINGS));
  if (authenticatorNameMappingsElem != null) {
    for (Iterator authenticatorNameMappingElems = authenticatorNameMappingsElem.getChildrenWithLocalName(FrameworkConstants.Config.ELEM_AUTHENTICATOR_NAME_MAPPING);
       authenticatorNameMappingElems.hasNext(); ) {
      processAuthenticatorNameMappingElement((OMElement) authenticatorNameMappingElems.next());
    }
  }
}

代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.application.authentication.framework

private void readSequenceConfigs(OMElement documentElement) {
  OMElement sequencesElem = documentElement.getFirstChildWithName(IdentityApplicationManagementUtil.
      getQNameWithIdentityApplicationNS(FrameworkConstants.Config.QNAME_SEQUENCES));
  if (sequencesElem != null) {
    // for each every application defined, create a ApplicationBean instance
    for (Iterator sequenceElements = sequencesElem.getChildrenWithLocalName(FrameworkConstants.Config.ELEM_SEQUENCE);
       sequenceElements.hasNext(); ) {
      SequenceConfig sequenceConfig = processSequenceElement((OMElement) sequenceElements.next());
      if (sequenceConfig != null) {
        this.sequenceList.add(sequenceConfig);
      }
    }
  }
}

代码示例来源:origin: com.betfair.cougar/jetty-transport

public Object readObject(Parameter param, boolean client) throws Exception {
  Iterator iterator = currentNode.getChildrenWithLocalName(param.getName());
  if (!iterator.hasNext()) {
    return null;
  }
  return readObject(param.getParameterType(), (OMElement)iterator.next(), client);
}

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

private void readAuthenticatorNameMappings(OMElement documentElement) {
  OMElement authenticatorNameMappingsElem = documentElement.getFirstChildWithName(IdentityApplicationManagementUtil.
      getQNameWithIdentityApplicationNS(FrameworkConstants.Config.QNAME_AUTHENTICATOR_NAME_MAPPINGS));
  if (authenticatorNameMappingsElem != null) {
    for (Iterator authenticatorNameMappingElems = authenticatorNameMappingsElem.getChildrenWithLocalName(FrameworkConstants.Config.ELEM_AUTHENTICATOR_NAME_MAPPING);
       authenticatorNameMappingElems.hasNext(); ) {
      processAuthenticatorNameMappingElement((OMElement) authenticatorNameMappingElems.next());
    }
  }
}

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

private static void processTransports(OMElement root, Transport[] transports, String localName) {
  if (transports == null) {
    return;
  }
  for (Transport transport : transports) {
    for (Iterator<OMElement> it = root.getChildrenWithLocalName(localName); it.hasNext(); ) {
      OMElement transportElement = it.next();
      if (transportElement.getAttributeValue(new QName("name")).equals(transport.getName())) {
        applyParameters(transportElement, transport.getParameters());
      }
    }
  }
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.application.authentication.framework

private void readAuthenticatorConfigs(OMElement documentElement) {
  OMElement authenticatorConfigsElem = documentElement.getFirstChildWithName(IdentityApplicationManagementUtil.
      getQNameWithIdentityApplicationNS(FrameworkConstants.Config.QNAME_AUTHENTICATOR_CONFIGS));
  if (authenticatorConfigsElem != null) {
    // for each and every authenticator defined, create an AuthenticatorConfig instance
    for (Iterator authenticatorConfigElements = authenticatorConfigsElem.getChildrenWithLocalName(FrameworkConstants.Config.ELEM_AUTHENTICATOR_CONFIG);
       authenticatorConfigElements.hasNext(); ) {
      AuthenticatorConfig authenticatorConfig = processAuthenticatorConfigElement((OMElement) authenticatorConfigElements.next());
      if (authenticatorConfig != null) {
        this.authenticatorConfigMap.put(authenticatorConfig.getName(), authenticatorConfig);
      }
    }
  }
}

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

private void parseCodes(OMElement rawCodeType, Codes codes) {
  Iterator codeIterator = rawCodeType.getChildrenWithLocalName("Code");
  while (codeIterator.hasNext()) {
    Object obj = codeIterator.next();
    if (!(obj instanceof OMElement)) continue;
    OMElement rawCode = (OMElement) obj;
    String codeString = rawCode.getAttributeValue(codeQname);
    String displayString = rawCode.getAttributeValue(displayQname);
    String codingSchemeString = rawCode.getAttributeValue(codingSchemeQname);
    
    Code code = new Code(codeString, codingSchemeString, displayString);
    codes.add(code);        
  }
}

相关文章

微信公众号

最新文章

更多