gpt4 book ai didi

com.ebmwebsourcing.easybox.api.XmlObject.getXmlObjectParent()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 19:47:05 25 4
gpt4 key购买 nike

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

XmlObject.getXmlObjectParent介绍

暂无

代码示例

代码示例来源:origin: com.ebmwebsourcing.easybpmn/bpmn20-api

private static Definitions getParentDefinitions(XmlObject xo) {
  if (xo == null) {
    return null;
  }
  if (xo instanceof Definitions) {
    return (Definitions) xo;
  }
  return getParentDefinitions(xo.getXmlObjectParent());
}

代码示例来源:origin: com.ebmwebsourcing.easybpmn/bpmn20-api

private static WithFlowElements getParentContainer(XmlObject xo) {
    if (xo == null) {
      return null;
    }
    if (xo instanceof WithFlowElements) {
      return (WithFlowElements) xo;
    }
    return getParentContainer(xo.getXmlObjectParent());
  }
}

代码示例来源:origin: com.ebmwebsourcing.easybox/easybox-impl

@Override
public Map<String, String> getXmlObjectInScopeNamespaces() {
  // TODO : could be cached and flushed on parent change!
  Map<String, String> namespaces = new HashMap<String, String>();
  XmlObject current = this;
  while (true) {
    if (current == null) break;
    Node node = current.getXmlObjectDOMNode();
    assert node != null;
    NamedNodeMap nodeMap = node.getAttributes();
    for (int i = 0 ; i < nodeMap.getLength() ; ++i) {
      Node attrNode = nodeMap.item(i);
      if (XMLConstants.XMLNS_ATTRIBUTE.equals(attrNode.getPrefix())) {
        if (namespaces.containsKey(attrNode.getLocalName())) continue;
        namespaces.put(attrNode.getLocalName(), attrNode.getNodeValue());
      }
    }
    current = current.getXmlObjectParent();
  }
  return namespaces;
}

代码示例来源:origin: com.ebmwebsourcing.easyschema/xsd2xml

private ComplexType findParentType(XmlObject childDefinition) {
  ComplexType parentType = null;
  XmlObject parent = childDefinition.getXmlObjectParent();
  if (parent != null) {
    if (parent instanceof com.ebmwebsourcing.easyschema10.api.element.Element) {
      parentType = (ComplexType) ((com.ebmwebsourcing.easyschema10.api.element.Element) parent)
          .findType();
    } else if (parent instanceof ComplexType) {
      parentType = (ComplexType) parent;
    } else {
      parentType = findParentType(parent);
    }
  }
  return parentType;
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com