- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.opendaylight.yangtools.yang.model.repo.api.YinDomSchemaSource
类的一些代码示例,展示了YinDomSchemaSource
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YinDomSchemaSource
类的具体详情如下:
包路径:org.opendaylight.yangtools.yang.model.repo.api.YinDomSchemaSource
类名称:YinDomSchemaSource
[英]Utility YinXmlSchemaSource exposing a W3C DOMSource representation of YIN model.
[中]实用工具YinXmlSchemaSource公开了YIN模型的W3C DOMSource表示。
代码示例来源:origin: org.opendaylight.yangtools/yang-model-api
/**
* Create a {@link YinDomSchemaSource} from a {@link YinXmlSchemaSource}. If the argument is already a
* YinDomSchemaSource, this method returns the same instance. The source will be translated immediately.
*
* @param xmlSchemaSource Backing schema source
* @return A {@link YinDomSchemaSource} instance
* @throws TransformerException when the provided source fails to transform
*/
public static @NonNull YinDomSchemaSource transform(final YinXmlSchemaSource xmlSchemaSource)
throws TransformerException {
final YinDomSchemaSource cast = castSchemaSource(xmlSchemaSource);
return cast != null ? cast :
create(xmlSchemaSource.getIdentifier(), transformSource(xmlSchemaSource.getSource()));
}
代码示例来源:origin: org.opendaylight.yangtools/yang-model-api
@Override
public final String toString() {
return addToStringAttributes(MoreObjects.toStringHelper(this).add("identifier", getIdentifier())).toString();
}
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-rfc7950
public static StatementStreamSource create(final YinDomSchemaSource source) {
return new YinStatementStreamSource(source.getIdentifier(), source.getSource().getNode());
}
代码示例来源:origin: org.opendaylight.yangtools/yang-model-api
private static @Nullable YinDomSchemaSource castSchemaSource(final YinXmlSchemaSource xmlSchemaSource) {
if (xmlSchemaSource instanceof YinDomSchemaSource) {
return (YinDomSchemaSource) xmlSchemaSource;
}
final Source source = xmlSchemaSource.getSource();
if (source instanceof DOMSource) {
return create(xmlSchemaSource.getIdentifier(), (DOMSource) source);
}
return null;
}
代码示例来源:origin: opendaylight/yangtools
/**
* Create a {@link YinDomSchemaSource} from a {@link YinXmlSchemaSource}. If the argument is already a
* YinDomSchemaSource, this method returns the same instance. The source will be translated on first access,
* at which point an {@link IllegalStateException} may be raised.
*
* @param xmlSchemaSource Backing schema source
* @return A {@link YinDomSchemaSource} instance
*/
public static @NonNull YinDomSchemaSource lazyTransform(final YinXmlSchemaSource xmlSchemaSource) {
final YinDomSchemaSource cast = castSchemaSource(xmlSchemaSource);
return cast != null ? cast : new Transforming(xmlSchemaSource);
}
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-rfc7950
public static StatementStreamSource create(final YinXmlSchemaSource source) throws TransformerException {
return create(YinDomSchemaSource.transform(source));
}
代码示例来源:origin: opendaylight/yangtools
private static @Nullable YinDomSchemaSource castSchemaSource(final YinXmlSchemaSource xmlSchemaSource) {
if (xmlSchemaSource instanceof YinDomSchemaSource) {
return (YinDomSchemaSource) xmlSchemaSource;
}
final Source source = xmlSchemaSource.getSource();
if (source instanceof DOMSource) {
return create(xmlSchemaSource.getIdentifier(), (DOMSource) source);
}
return null;
}
代码示例来源:origin: org.opendaylight.yangtools/yang-model-api
/**
* Create a {@link YinDomSchemaSource} from a {@link YinXmlSchemaSource}. If the argument is already a
* YinDomSchemaSource, this method returns the same instance. The source will be translated on first access,
* at which point an {@link IllegalStateException} may be raised.
*
* @param xmlSchemaSource Backing schema source
* @return A {@link YinDomSchemaSource} instance
*/
public static @NonNull YinDomSchemaSource lazyTransform(final YinXmlSchemaSource xmlSchemaSource) {
final YinDomSchemaSource cast = castSchemaSource(xmlSchemaSource);
return cast != null ? cast : new Transforming(xmlSchemaSource);
}
代码示例来源:origin: opendaylight/yangtools
/**
* Create a {@link YinDomSchemaSource} from a {@link YinXmlSchemaSource}. If the argument is already a
* YinDomSchemaSource, this method returns the same instance. The source will be translated immediately.
*
* @param xmlSchemaSource Backing schema source
* @return A {@link YinDomSchemaSource} instance
* @throws TransformerException when the provided source fails to transform
*/
public static @NonNull YinDomSchemaSource transform(final YinXmlSchemaSource xmlSchemaSource)
throws TransformerException {
final YinDomSchemaSource cast = castSchemaSource(xmlSchemaSource);
return cast != null ? cast :
create(xmlSchemaSource.getIdentifier(), transformSource(xmlSchemaSource.getSource()));
}
代码示例来源:origin: opendaylight/yangtools
@Override
public final String toString() {
return addToStringAttributes(MoreObjects.toStringHelper(this).add("identifier", getIdentifier())).toString();
}
代码示例来源:origin: org.opendaylight.yangtools/yang-parser-rfc7950
public static YinDomSchemaSource transformSource(final YinTextSchemaSource source) throws SAXException,
IOException {
final Document doc = UntrustedXML.newDocumentBuilder().newDocument();
final SAXParser parser = UntrustedXML.newSAXParser();
final DefaultHandler handler = new StatementSourceReferenceHandler(doc, null);
parser.parse(source.openStream(), handler);
return YinDomSchemaSource.create(source.getIdentifier(), new DOMSource(doc));
}
}
我在一个模型中有两个属性: 叶协议(protocol), 离开港口。 我想说明: 如果 protocol = 'ssh' 则默认端口值为 22, 如果 protocol = 'http' 则默认端口值
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.YangIde
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.YangIde
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.YangIde
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.ZeroBas
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.yang.patc
我是一名优秀的程序员,十分优秀!