- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.opendaylight.controller.netconf.util.xml.XmlElement.getChildElementsWithinNamespace()
方法的一些代码示例,展示了XmlElement.getChildElementsWithinNamespace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlElement.getChildElementsWithinNamespace()
方法的具体详情如下:
包路径:org.opendaylight.controller.netconf.util.xml.XmlElement
类名称:XmlElement
方法名:getChildElementsWithinNamespace
暂无
代码示例来源:origin: org.opendaylight.controller/netconf-util
public List<XmlElement> getChildElementsWithinNamespace(final String childName, String namespace) {
return Lists.newArrayList(Collections2.filter(getChildElementsWithinNamespace(namespace),
new Predicate<XmlElement>() {
@Override
public boolean apply(XmlElement xmlElement) {
return xmlElement.getName().equals(childName);
}
}));
}
代码示例来源:origin: org.opendaylight.controller/netconf-util
public Optional<XmlElement> getOnlyChildElementOptionally(final String childName, final String namespace) {
List<XmlElement> children = getChildElementsWithinNamespace(namespace);
children = Lists.newArrayList(Collections2.filter(children, new Predicate<XmlElement>() {
@Override
public boolean apply(XmlElement xmlElement) {
return xmlElement.getName().equals(childName);
}
}));
if (children.size() != 1){
return Optional.absent();
}
return Optional.of(children.get(0));
}
代码示例来源:origin: org.opendaylight.controller/netconf-util
public List<XmlElement> getChildElementsWithSameNamespace(final String childName) throws MissingNameSpaceException {
List<XmlElement> children = getChildElementsWithinNamespace(getNamespace());
return Lists.newArrayList(Collections2.filter(children, new Predicate<XmlElement>() {
@Override
public boolean apply(XmlElement xmlElement) {
return xmlElement.getName().equals(childName);
}
}));
}
代码示例来源:origin: org.opendaylight.controller/netconf-util
public Optional<XmlElement> getOnlyChildElementWithSameNamespaceOptionally(final String childName) {
Optional<String> namespace = getNamespaceOptionally();
if (namespace.isPresent()) {
List<XmlElement> children = getChildElementsWithinNamespace(namespace.get());
children = Lists.newArrayList(Collections2.filter(children, new Predicate<XmlElement>() {
@Override
public boolean apply(XmlElement xmlElement) {
return xmlElement.getName().equals(childName);
}
}));
if (children.size() != 1){
return Optional.absent();
}
return Optional.of(children.get(0));
}
return Optional.absent();
}
代码示例来源:origin: org.opendaylight.controller/config-netconf-connector
private List<XmlElement> getConfigNodes(XmlElement moduleElement, String moduleNamespace, String name,
List<XmlElement> recognisedChildren, List<XmlElement> typeAndName) throws NetconfDocumentedException {
List<XmlElement> foundConfigNodes = moduleElement.getChildElementsWithinNamespace(name, moduleNamespace);
if (foundConfigNodes.isEmpty()) {
LOG.debug("No config nodes {}:{} found in {}", moduleNamespace, name, moduleElement);
LOG.debug("Trying lookup of config nodes without specified namespace");
foundConfigNodes = moduleElement.getChildElementsWithinNamespace(name,
XmlNetconfConstants.URN_OPENDAYLIGHT_PARAMS_XML_NS_YANG_CONTROLLER_CONFIG);
// In case module type or name element is not present in config it
// would be matched with config type or name
// We need to remove config type and name from available module
// config elements
foundConfigNodes.removeAll(typeAndName);
LOG.debug("Found {} config nodes {} without specified namespace in {}", foundConfigNodes.size(), name,
moduleElement);
} else {
List<XmlElement> foundWithoutNamespaceNodes = moduleElement.getChildElementsWithinNamespace(name,
XmlNetconfConstants.URN_OPENDAYLIGHT_PARAMS_XML_NS_YANG_CONTROLLER_CONFIG);
foundWithoutNamespaceNodes.removeAll(typeAndName);
if (!foundWithoutNamespaceNodes.isEmpty()){
throw new NetconfDocumentedException(String.format("Element %s present multiple times with different namespaces: %s, %s", name, foundConfigNodes,
foundWithoutNamespaceNodes),
NetconfDocumentedException.ErrorType.application,
NetconfDocumentedException.ErrorTag.invalid_value,
NetconfDocumentedException.ErrorSeverity.error);
}
}
recognisedChildren.addAll(foundConfigNodes);
return foundConfigNodes;
}
代码示例来源:origin: org.opendaylight.controller/netconf-util
public XmlElement getOnlyChildElement(final String childName, String namespace) throws NetconfDocumentedException {
List<XmlElement> children = getChildElementsWithinNamespace(namespace);
children = Lists.newArrayList(Collections2.filter(children, new Predicate<XmlElement>() {
@Override
public boolean apply(XmlElement xmlElement) {
return xmlElement.getName().equals(childName);
}
}));
if (children.size() != 1){
throw new NetconfDocumentedException(String.format("One element %s:%s expected in %s but was %s", namespace,
childName, toString(), children.size()),
NetconfDocumentedException.ErrorType.application,
NetconfDocumentedException.ErrorTag.invalid_value,
NetconfDocumentedException.ErrorSeverity.error);
}
return children.get(0);
}
我在 pom.xml 中添加了以下依赖 org.opendaylight.yangtools yang-parser-impl
OpenDaylight 氧气 Maven 3.3.9 Ubuntu 16.04 Karaf 4 ~/.m2/settings.xml - cp -n ~/.m2/settings.xml{,.ori
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev1309
我是一名优秀的程序员,十分优秀!