- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.opendaylight.controller.config.util.xml.XmlElement.fromDomDocument()
方法的一些代码示例,展示了XmlElement.fromDomDocument()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlElement.fromDomDocument()
方法的具体详情如下:
包路径:org.opendaylight.controller.config.util.xml.XmlElement
类名称:XmlElement
方法名:fromDomDocument
暂无
代码示例来源:origin: org.opendaylight.netconf/netconf-util
public static boolean isOKMessage(Document document) throws NetconfDocumentedException {
return isOKMessage(XmlElement.fromDomDocument(document));
}
代码示例来源:origin: org.opendaylight.netconf/netconf-util
public static boolean isErrorMessage(Document document) throws NetconfDocumentedException {
return isErrorMessage(XmlElement.fromDomDocument(document));
}
代码示例来源:origin: org.opendaylight.netconf/netconf-util
public static Document checkIsMessageOk(Document response) throws DocumentedException {
XmlElement element = XmlElement.fromDomDocument(response);
Preconditions.checkState(element.getName().equals(XmlMappingConstants.RPC_REPLY_KEY));
element = element.getOnlyChildElement();
if (element.getName().equals(XmlNetconfConstants.OK)) {
return response;
}
LOG.warn("Can not load last configuration. Operation failed.");
throw new IllegalStateException("Can not load last configuration. Operation failed: "
+ XmlUtil.toString(response));
}
代码示例来源:origin: org.opendaylight.netconf/netconf-util
public static Collection<String> extractCapabilitiesFromHello(Document doc) throws NetconfDocumentedException {
XmlElement responseElement = XmlElement.fromDomDocument(doc);
// Extract child element <capabilities> from <hello> with or without(fallback) the same namespace
Optional<XmlElement> capabilitiesElement = responseElement
.getOnlyChildElementWithSameNamespaceOptionally(XmlNetconfConstants.CAPABILITIES)
.or(responseElement
.getOnlyChildElementOptionally(XmlNetconfConstants.CAPABILITIES));
List<XmlElement> caps = capabilitiesElement.get().getChildElements(XmlNetconfConstants.CAPABILITY);
return Collections2.transform(caps, new Function<XmlElement, String>() {
@Override
public String apply(@Nonnull XmlElement input) {
// Trim possible leading/tailing whitespace
try {
return input.getTextContent().trim();
} catch (DocumentedException e) {
LOG.trace("Error fetching input text content",e);
return null;
}
}
});
}
}
代码示例来源:origin: org.opendaylight.netconf/netconf-util
private static Document filteredNotification(XmlElement filter, Document originalNotification) throws DocumentedException {
Document result = XmlUtil.newDocument();
XmlElement dataSrc = XmlElement.fromDomDocument(originalNotification);
Element dataDst = (Element) result.importNode(dataSrc.getDomElement(), false);
for (XmlElement filterChild : filter.getChildElements()) {
addSubtree2(filterChild, dataSrc.getOnlyChildElement(), XmlElement.fromDomElement(dataDst));
}
if(dataDst.getFirstChild() != null) {
result.appendChild(dataDst.getFirstChild());
return result;
} else {
return null;
}
}
代码示例来源:origin: org.opendaylight.netconf/netconf-netty-util
@Override
public final void startExiCommunication(final NetconfMessage startExiMessage) {
final EXIParameters exiParams;
try {
exiParams = EXIParameters.fromXmlElement(XmlElement.fromDomDocument(startExiMessage.getDocument()));
} catch (final EXIOptionsException e) {
LOG.warn("Unable to parse EXI parameters from {} on session {}", startExiMessage, this, e);
throw new IllegalArgumentException("Cannot parse options", e);
}
final NetconfEXICodec exiCodec = new NetconfEXICodec(exiParams.getOptions());
final NetconfMessageToEXIEncoder exiEncoder;
try {
exiEncoder = NetconfMessageToEXIEncoder.create(exiCodec);
} catch (EXIOptionsException | TransmogrifierException e) {
LOG.warn("Failed to instantiate EXI encoder for {} on session {}", exiCodec, this, e);
throw new IllegalStateException("Cannot instantiate encoder for options", e);
}
final NetconfEXIToMessageDecoder exiDecoder;
try {
exiDecoder = NetconfEXIToMessageDecoder.create(exiCodec);
} catch (EXIOptionsException e) {
LOG.warn("Failed to instantiate EXI decodeer for {} on session {}", exiCodec, this, e);
throw new IllegalStateException("Cannot instantiate encoder for options", e);
}
addExiHandlers(exiDecoder, exiEncoder);
LOG.debug("Session {} EXI handlers added to pipeline", this);
}
我在 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
我是一名优秀的程序员,十分优秀!