gpt4 book ai didi

com.ebmwebsourcing.easybox.api.XmlObject类的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 21:09:05 26 4
gpt4 key购买 nike

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

XmlObject介绍

暂无

代码示例

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

@Override
public final XmlObject[] getAnyXmlObjects(QName qname) {
  XmlObject[] anyXmlObjects = getAnyXmlObjects();
  List<XmlObject> result = new ArrayList<XmlObject>();
  for (XmlObject anyXmlObject : anyXmlObjects) {
    if (!qname.equals(anyXmlObject.getXmlObjectQName()))
      continue;
    result.add(anyXmlObject);
  }
  return (XmlObject[]) result.toArray(new XmlObject[result.size()]);
}

代码示例来源: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.easybox/easybox-impl

XmlObjectAdoptionMediator(XmlObject xmlObject) {
  this.adoptedChildrenCache = new HashMap<String, XmlObject>();
  URI baseURI = xmlObject.getXmlObjectBaseURI();
  if (baseURI != null) {
    adoptedChildrenCache.put(makeAdoptedChildKey(baseURI, ""),
        xmlObject.getXmlObjectBaseRoot());
  }
  this.xmlContext = (XmlContextImpl) xmlObject.getXmlContext();
}

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

private final int guessIndexFromParent(XmlObject newParent) {
  if (newParent == null)
    return 0;
  XmlObjectNode[] children = newParent.getXmlObjectNaturalChildren();
  int i = 0;
  for (XmlObjectNode child : children) {
    if (child == this) {
      return i;
    }
    ++i;
  }
  children = newParent.getXmlObjectAdoptedChildren();
  i = 0;
  for (XmlObjectNode child : children) {
    if (child == this) {
      return i;
    }
    ++i;
  }
  throw new UncheckedException("XML object has a parent but no index!");
}

代码示例来源: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.easybox/easybox-impl

URI baseURI = adoptiveParent.getXmlObjectBaseURI();
  childToAdopt = resolveXPath(adoptiveParent.getXmlObjectRoot(), xpath);
} else {
  XmlObjectReader reader = adoptiveParent.getXmlContext().createReader();

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

private XmlObject resolveXPath(XmlObject contextXmlObject, String xpath) {
  if (xpath.isEmpty())
    return contextXmlObject;
  XmlObjectXPathEvaluator xpe = contextXmlObject.getXmlContext().createXPathEvaluator();
  try {
    XmlObject childToAdopt = xpe.selectSingleXmlObjectNode(contextXmlObject, xpath,
        XmlObject.class);
    return childToAdopt;
  } catch (XPathExpressionException xpee) {
    throw new UncheckedException(String.format("Invalid XPath expression '%s'.", xpath));
  }
}

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

static AxisIterator createAttributeIterator(XmlObjectNode xmlObjectNode, 
    NodeTest nodeTest, Configuration configuration) {
  if (!(xmlObjectNode instanceof XmlObject)) {
    return EMPTY_AXIS_ITERATOR;
  }
  Deque<NodeInfo> attributes = wrapXmlObjectAttributesAsNodeInfos((XmlObject) xmlObjectNode,
      ((XmlObject) xmlObjectNode).getXmlObjectAttributes(), configuration, nodeTest);
  return new NodeArrayIterator(attributes.toArray(new NodeInfo[attributes.size()]));
}

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

static NodeInfo wrapXmlObjectAttributeAsNodeInfo(XmlObject xmlObject,
    QName key, Object value, Configuration configuration) {
  assert xmlObject != null;
  assert key != null;
  assert value != null;
  XmlObjectAttributeImpl xoa = new XmlObjectAttributeImpl(
      xmlObject.getXmlContext(), 
      new AttributeModelObject(null, key, value)); // TODO : attributes should be included in children!
  return wrapXmlObjectAttributeAsNodeInfo(xoa, configuration);
}

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

@Override
public final XmlObject[] getAnyXmlObjects(QName qname) {
  XmlObject[] anyXmlObjects = getAnyXmlObjects();
  List<XmlObject> result = new ArrayList<XmlObject>();
  for (XmlObject anyXmlObject : anyXmlObjects) {
    if (!qname.equals(anyXmlObject.getXmlObjectQName()))
      continue;
    result.add(anyXmlObject);
  }
  return (XmlObject[]) result.toArray(new XmlObject[result.size()]);
}

代码示例来源: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.easybpmn/bpmn20-impl

@Override
public final XmlObject[] getAnyXmlObjects(QName qname) {
  XmlObject[] anyXmlObjects = getAnyXmlObjects();
  List<XmlObject> result = new ArrayList<XmlObject>();
  for (XmlObject anyXmlObject : anyXmlObjects) {
    if (!qname.equals(anyXmlObject.getXmlObjectQName()))
      continue;
    result.add(anyXmlObject);
  }
  return (XmlObject[]) result.toArray(new XmlObject[result.size()]);
}

代码示例来源: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;
}

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

@Override
public final XmlObject[] getAnyXmlObjects(QName qname) {
  XmlObject[] anyXmlObjects = getAnyXmlObjects();
  List<XmlObject> result = new ArrayList<XmlObject>();
  for (XmlObject anyXmlObject : anyXmlObjects) {
    if (!qname.equals(anyXmlObject.getXmlObjectQName()))
      continue;
    result.add(anyXmlObject);
  }
  return (XmlObject[]) result.toArray(new XmlObject[result.size()]);
}

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

@Override
public final boolean hasAnyXmlObject(QName qname) {
  XmlObject[] anyXmlObjects = getAnyXmlObjects();
  for (XmlObject anyXmlObject : anyXmlObjects) {
    if (qname.equals(anyXmlObject.getXmlObjectQName()))
      return true;
  }
  return false;
}

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

@Override
public final boolean hasAnyXmlObject(QName qname) {
  XmlObject[] anyXmlObjects = getAnyXmlObjects();
  for (XmlObject anyXmlObject : anyXmlObjects) {
    if (qname.equals(anyXmlObject.getXmlObjectQName()))
      return true;
  }
  return false;
}

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

@Override
public final boolean hasAnyXmlObject(QName qname) {
  XmlObject[] anyXmlObjects = getAnyXmlObjects();
  for (XmlObject anyXmlObject : anyXmlObjects) {
    if (qname.equals(anyXmlObject.getXmlObjectQName()))
      return true;
  }
  return false;
}

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

@Override
public final boolean hasAnyXmlObject(QName qname) {
  XmlObject[] anyXmlObjects = getAnyXmlObjects();
  for (XmlObject anyXmlObject : anyXmlObjects) {
    if (qname.equals(anyXmlObject.getXmlObjectQName()))
      return true;
  }
  return false;
}

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

@Override
public final boolean hasAnyXmlObject(QName qname) {
  XmlObject[] anyXmlObjects = getAnyXmlObjects();
  for (XmlObject anyXmlObject : anyXmlObjects) {
    if (qname.equals(anyXmlObject.getXmlObjectQName()))
      return true;
  }
  return false;
}

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

@Override
public final XmlObject[] getAnyXmlObjects(QName qname) {
  XmlObject[] anyXmlObjects = getAnyXmlObjects();
  List<XmlObject> result = new ArrayList<XmlObject>();
  for (XmlObject anyXmlObject : anyXmlObjects) {
    if (!qname.equals(anyXmlObject.getXmlObjectQName()))
      continue;
    result.add(anyXmlObject);
  }
  return (XmlObject[]) result.toArray(new XmlObject[result.size()]);
}

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