本文整理汇总了Java中org.opendaylight.yangtools.yang.model.api.UsesNode类的典型用法代码示例。如果您正苦于以下问题:Java UsesNode类的具体用法?Java UsesNode怎么用?Java UsesNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UsesNode类属于org.opendaylight.yangtools.yang.model.api包,在下文中一共展示了UsesNode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: emitUsesNode
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
private void emitUsesNode(final UsesNode usesNode) {
if (super.emitUses && !usesNode.isAddedByUses() && !usesNode.isAugmenting()) {
super.writer.startUsesNode(usesNode.getGroupingPath().getLastComponent());
/*
* FIXME: BUG-2444: whenNode / *(ifFeatureNode ) statusNode //
* Optional F : descriptionNode // Optional referenceNode //
* Optional
*/
for (final Entry<SchemaPath, SchemaNode> refine : usesNode.getRefines().entrySet()) {
emitRefine(refine);
}
for (final AugmentationSchemaNode aug : usesNode.getAugmentations()) {
emitUsesAugmentNode(aug);
}
super.writer.endNode();
}
}
开发者ID:opendaylight,项目名称:yangtools,代码行数:18,代码来源:SchemaContextEmitter.java
示例2: emitAugment
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
private void emitAugment(final AugmentationSchemaNode augmentation) {
super.writer.startAugmentNode(augmentation.getTargetPath());
// FIXME: BUG-2444: whenNode //Optional
// FIXME: BUG-2444: *(ifFeatureNode )
emitDocumentedNode(augmentation);
for (final UsesNode uses : augmentation.getUses()) {
emitUsesNode(uses);
}
for (final DataSchemaNode childNode : augmentation.getChildNodes()) {
if (childNode instanceof CaseSchemaNode) {
emitCaseNode((CaseSchemaNode) childNode);
} else {
emitDataSchemaNode(childNode);
}
}
emitUnknownStatementNodes(augmentation.getUnknownSchemaNodes());
emitNotifications(augmentation.getNotifications());
emitActions(augmentation.getActions());
super.writer.endNode();
}
开发者ID:opendaylight,项目名称:yangtools,代码行数:23,代码来源:SchemaContextEmitter.java
示例3: testUses
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
@Test
public void testUses() {
final Module testModule = TestUtils.findModule(context, "main-impl").get();
assertNotNull(testModule);
final Set<AugmentationSchemaNode> augmentations = testModule.getAugmentations();
assertEquals(1, augmentations.size());
final Iterator<AugmentationSchemaNode> augmentIterator = augmentations.iterator();
final AugmentationSchemaNode augment = augmentIterator.next();
final CaseSchemaNode caseNode = (CaseSchemaNode) augment.getDataChildByName(
QName.create(testModule.getQNameModule(), "main-impl"));
assertNotNull(caseNode);
final ContainerSchemaNode container = (ContainerSchemaNode) caseNode.getDataChildByName(QName.create(
testModule.getQNameModule(), "notification-service"));
assertNotNull(container);
assertEquals(1, container.getUses().size());
final UsesNode usesNode = container.getUses().iterator().next();
assertNotNull(usesNode);
assertTrue(usesNode.getGroupingPath().toString()
.contains("[(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)service-ref]"));
assertEquals(1, usesNode.getRefines().size());
}
开发者ID:opendaylight,项目名称:yangtools,代码行数:27,代码来源:YinFileUsesStmtTest.java
示例4: testCorrectAugment
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
@Test
public void testCorrectAugment() throws Exception {
context = TestUtils.loadModules(getClass().getResource("/augment-to-extension-test/correct-augment").toURI());
final Module devicesModule = TestUtils.findModule(context, "augment-module").get();
final ContainerSchemaNode devicesContainer = (ContainerSchemaNode) devicesModule.getDataChildByName(QName
.create(devicesModule.getQNameModule(), "my-container"));
final Set<UsesNode> uses = devicesContainer.getUses();
boolean augmentationIsInContainer = false;
for (final UsesNode usesNode : uses) {
final Set<AugmentationSchemaNode> augmentations = usesNode.getAugmentations();
for (final AugmentationSchemaNode augmentationSchema : augmentations) {
augmentationIsInContainer = true;
}
}
assertTrue(augmentationIsInContainer);
}
开发者ID:opendaylight,项目名称:yangtools,代码行数:21,代码来源:AugmentToExtensionTest.java
示例5: test
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
@Test
public void test() throws Exception {
final SchemaContext schemaContext = StmtTestUtils.parseYangSources("/bugs/bug5942");
assertNotNull(schemaContext);
final DataSchemaNode root = schemaContext.getDataChildByName(QName.create("foo", "2016-06-02", "root"));
assertTrue(root instanceof ContainerSchemaNode);
final Set<UsesNode> uses = ((ContainerSchemaNode) root).getUses();
assertEquals(1, uses.size());
final UsesNode usesNode = uses.iterator().next();
assertEquals(Optional.of("uses description"), usesNode.getDescription());
assertEquals(Optional.of("uses reference"), usesNode.getReference());
assertEquals(Status.DEPRECATED, usesNode.getStatus());
assertEquals(new RevisionAwareXPathImpl("0!=1", false), usesNode.getWhenCondition().get());
final List<UnknownSchemaNode> unknownSchemaNodes = usesNode.getUnknownSchemaNodes();
assertEquals(1, unknownSchemaNodes.size());
final UnknownSchemaNode unknownSchemaNode = unknownSchemaNodes.iterator().next();
assertEquals("argument", unknownSchemaNode.getNodeParameter());
assertEquals(QName.create("foo", "2016-06-02", "e"), unknownSchemaNode.getExtensionDefinition().getQName());
}
开发者ID:opendaylight,项目名称:yangtools,代码行数:24,代码来源:Bug5942Test.java
示例6: isDependencyContainer
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
private static boolean isDependencyContainer(final DataNodeContainer dataNodeContainer) {
if(dataNodeContainer.getUses().size() != 1) {
return false;
}
UsesNode onlyUses = dataNodeContainer.getUses().iterator().next();
if(onlyUses.getGroupingPath().getLastComponent().equals(ServiceRef.QNAME) == false) {
return false;
}
return getChildNodeSizeWithoutUses(dataNodeContainer) == 0;
}
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:12,代码来源:ModuleMXBeanEntryBuilder.java
示例7: findQNameFromGrouping
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
/**
* Find "proper" qname of unknown node in case it comes from a grouping
*/
private static QName findQNameFromGrouping(final DataNodeContainer subtree, final SchemaContext ctx, final UnknownSchemaNode unknownSchemaNode, final String localIdentityName) {
QName identityQName = null;
for (UsesNode usesNode : subtree.getUses()) {
SchemaNode dataChildByName = SchemaContextUtil.findDataSchemaNode(ctx, usesNode.getGroupingPath());
Module m = SchemaContextUtil.findParentModule(ctx, dataChildByName);
List<UnknownSchemaNode> unknownSchemaNodes = dataChildByName.getUnknownSchemaNodes();
if(Collections2.transform(unknownSchemaNodes, UNKNOWN_NODE_TO_STRING).contains(UNKNOWN_NODE_TO_STRING.apply(unknownSchemaNode))) {
identityQName = QName.create(dataChildByName.getQName(), localIdentityName);
}
}
return identityQName;
}
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:16,代码来源:RuntimeBeanEntry.java
示例8: emitDataNodeContainer
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
private void emitDataNodeContainer(final DataNodeContainer input) {
for (final TypeDefinition<?> typedef : input.getTypeDefinitions()) {
emitTypedefNode(typedef);
}
for (final GroupingDefinition grouping : input.getGroupings()) {
emitGrouping(grouping);
}
for (final DataSchemaNode child : input.getChildNodes()) {
emitDataSchemaNode(child);
}
for (final UsesNode usesNode : input.getUses()) {
emitUsesNode(usesNode);
}
}
开发者ID:opendaylight,项目名称:yangtools,代码行数:15,代码来源:SchemaContextEmitter.java
示例9: testCorrectPathIntoUnsupportedTarget
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
@Test
public void testCorrectPathIntoUnsupportedTarget() throws Exception {
context = TestUtils.loadModules(getClass().getResource(
"/augment-to-extension-test/correct-path-into-unsupported-target").toURI());
final Module devicesModule = TestUtils.findModule(context, "augment-module").get();
final ContainerSchemaNode devicesContainer = (ContainerSchemaNode) devicesModule.getDataChildByName(
QName.create(devicesModule.getQNameModule(), "my-container"));
final Set<UsesNode> uses = devicesContainer.getUses();
for (final UsesNode usesNode : uses) {
assertTrue(usesNode.getAugmentations().isEmpty());
}
}
开发者ID:opendaylight,项目名称:yangtools,代码行数:16,代码来源:AugmentToExtensionTest.java
示例10: getIdentitiesToRpcs
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
private static Multimap<QName/* of identity */, RpcDefinition> getIdentitiesToRpcs(
final SchemaContext schemaCtx) {
Multimap<QName, RpcDefinition> result = HashMultimap.create();
for (Module currentModule : schemaCtx.getModules()) {
// Find all identities in current module for later identity->rpc mapping
Set<QName> allIdentitiesInModule =
Sets.newHashSet(Collections2.transform(currentModule.getIdentities(), SchemaNode::getQName));
for (RpcDefinition rpc : currentModule.getRpcs()) {
ContainerSchemaNode input = rpc.getInput();
if (input != null) {
for (UsesNode uses : input.getUses()) {
// Check if the rpc is config rpc by looking for input argument rpc-context-ref
Iterator<QName> pathFromRoot = uses.getGroupingPath().getPathFromRoot().iterator();
if (!pathFromRoot.hasNext() ||
!pathFromRoot.next().equals(ConfigConstants.RPC_CONTEXT_REF_GROUPING_QNAME)) {
continue;
}
for (SchemaNode refinedNode : uses.getRefines().values()) {
for (UnknownSchemaNode unknownSchemaNode : refinedNode
.getUnknownSchemaNodes()) {
if (ConfigConstants.RPC_CONTEXT_INSTANCE_EXTENSION_QNAME
.equals(unknownSchemaNode.getNodeType())) {
String localIdentityName = unknownSchemaNode
.getNodeParameter();
QName identityQName = QName.create(
currentModule.getNamespace(),
currentModule.getRevision(),
localIdentityName);
Preconditions.checkArgument(allIdentitiesInModule.contains(identityQName),
"Identity referenced by rpc not found. Identity: %s, rpc: %s", localIdentityName, rpc);
result.put(identityQName, rpc);
}
}
}
}
}
}
}
return result;
}
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:45,代码来源:RuntimeBeanEntry.java
示例11: getUses
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
@Override
public Set<UsesNode> getUses() {
// TODO Auto-generated method stub
return null;
}
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:6,代码来源:YangSchemaUtils.java
示例12: getUses
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
@Override
public Set<UsesNode> getUses() {
return getCurrentSchema().getUses();
}
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:5,代码来源:ProxySchemaContext.java
示例13: getUses
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
@Override
public Set<UsesNode> getUses() {
return Collections.emptySet();
}
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:5,代码来源:DataSchemaContainerProxy.java
示例14: getUses
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
@Override
public Set<UsesNode> getUses() {
return ImmutableSet.of();
}
开发者ID:opendaylight,项目名称:yangtools,代码行数:5,代码来源:ImplicitCaseSchemaNode.java
示例15: AbstractEffectiveDocumentedDataNodeContainer
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
protected AbstractEffectiveDocumentedDataNodeContainer(final StmtContext<A, D, ?> ctx) {
super(ctx);
Map<QName, DataSchemaNode> mutableChildNodes = new LinkedHashMap<>();
Set<GroupingDefinition> mutableGroupings = new HashSet<>();
Set<UsesNode> mutableUses = new HashSet<>();
Set<TypeDefinition<?>> mutableTypeDefinitions = new LinkedHashSet<>();
Set<DataSchemaNode> mutablePublicChildNodes = new LinkedHashSet<>();
for (EffectiveStatement<?, ?> stmt : effectiveSubstatements()) {
if (stmt instanceof DataSchemaNode) {
final DataSchemaNode dataSchemaNode = (DataSchemaNode) stmt;
if (!mutableChildNodes.containsKey(dataSchemaNode.getQName())) {
/**
* Add case short hand when augmenting choice with short hand
**/
if (this instanceof AugmentationSchemaNode
&& !(stmt instanceof CaseSchemaNode || stmt instanceof ChoiceSchemaNode)
&& YangValidationBundles.SUPPORTED_CASE_SHORTHANDS.contains(stmt.statementDefinition())
&& Boolean.TRUE.equals(ctx.getFromNamespace(AugmentToChoiceNamespace.class, ctx))) {
final ImplicitCaseSchemaNode caseShorthand = new ImplicitCaseSchemaNode(dataSchemaNode);
mutableChildNodes.put(caseShorthand.getQName(), caseShorthand);
mutablePublicChildNodes.add(caseShorthand);
} else {
mutableChildNodes.put(dataSchemaNode.getQName(), dataSchemaNode);
mutablePublicChildNodes.add(dataSchemaNode);
}
} else {
throw EffectiveStmtUtils.createNameCollisionSourceException(ctx, stmt);
}
}
if (stmt instanceof UsesNode) {
UsesNode usesNode = (UsesNode) stmt;
if (!mutableUses.contains(usesNode)) {
mutableUses.add(usesNode);
} else {
throw EffectiveStmtUtils.createNameCollisionSourceException(ctx, stmt);
}
}
if (stmt instanceof TypedefEffectiveStatement) {
TypedefEffectiveStatement typeDef = (TypedefEffectiveStatement) stmt;
TypeDefinition<?> type = typeDef.getTypeDefinition();
if (!mutableTypeDefinitions.contains(type)) {
mutableTypeDefinitions.add(type);
} else {
throw EffectiveStmtUtils.createNameCollisionSourceException(ctx, stmt);
}
}
if (stmt instanceof GroupingDefinition) {
GroupingDefinition grp = (GroupingDefinition) stmt;
if (!mutableGroupings.contains(grp)) {
mutableGroupings.add(grp);
} else {
throw EffectiveStmtUtils.createNameCollisionSourceException(ctx, stmt);
}
}
}
this.childNodes = ImmutableMap.copyOf(mutableChildNodes);
this.groupings = ImmutableSet.copyOf(mutableGroupings);
this.publicChildNodes = ImmutableSet.copyOf(mutablePublicChildNodes);
this.typeDefinitions = ImmutableSet.copyOf(mutableTypeDefinitions);
this.uses = ImmutableSet.copyOf(mutableUses);
}
开发者ID:opendaylight,项目名称:yangtools,代码行数:65,代码来源:AbstractEffectiveDocumentedDataNodeContainer.java
示例16: getUses
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
@Override
public Set<UsesNode> getUses() {
return uses;
}
开发者ID:opendaylight,项目名称:yangtools,代码行数:5,代码来源:AbstractEffectiveDocumentedDataNodeContainer.java
示例17: configModuleTest
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
private static void configModuleTest(final SchemaContext context) {
final Module configModule = context.findModule("config", Revision.of("2013-04-05")).get();
final Module module = context.findModule("opendaylight-sal-dom-broker-impl", Revision.of("2013-10-28")).get();
final DataSchemaNode dataNode = configModule.getDataChildByName(QName.create(configModule.getQNameModule(),
"modules"));
assertTrue(dataNode instanceof ContainerSchemaNode);
final ContainerSchemaNode moduleContainer = (ContainerSchemaNode) dataNode;
final DataSchemaNode dataChildList = moduleContainer
.getDataChildByName(QName.create(configModule.getQNameModule(), "module"));
assertTrue(dataChildList instanceof ListSchemaNode);
final ListSchemaNode listModule = (ListSchemaNode) dataChildList;
final DataSchemaNode dataChildChoice = listModule
.getDataChildByName(QName.create(configModule.getQNameModule(), "configuration"));
assertTrue(dataChildChoice instanceof ChoiceSchemaNode);
final ChoiceSchemaNode confChoice = (ChoiceSchemaNode) dataChildChoice;
final CaseSchemaNode caseNodeByName = confChoice.findCaseNodes("dom-broker-impl").iterator().next();
assertNotNull(caseNodeByName);
final DataSchemaNode dataNode2 = caseNodeByName
.getDataChildByName(QName.create(module.getQNameModule(), "async-data-broker"));
assertTrue(dataNode2 instanceof ContainerSchemaNode);
final ContainerSchemaNode containerNode = (ContainerSchemaNode) dataNode2;
final DataSchemaNode leaf = containerNode.getDataChildByName(QName.create(module.getQNameModule(), "type"));
final List<UnknownSchemaNode> unknownSchemaNodes = leaf.getUnknownSchemaNodes();
assertEquals(1, unknownSchemaNodes.size());
final UnknownSchemaNode unknownSchemaNode = unknownSchemaNodes.get(0);
assertEquals(unknownSchemaNode.getQName(), unknownSchemaNode.getPath().getLastComponent());
assertEquals("dom-async-data-broker", unknownSchemaNode.getQName().getLocalName());
final CaseSchemaNode domInmemoryDataBroker = confChoice.findCaseNodes("dom-inmemory-data-broker").iterator()
.next();
assertNotNull(domInmemoryDataBroker);
final DataSchemaNode schemaService = domInmemoryDataBroker
.getDataChildByName(QName.create(module.getQNameModule(), "schema-service"));
assertTrue(schemaService instanceof ContainerSchemaNode);
final ContainerSchemaNode schemaServiceContainer = (ContainerSchemaNode) schemaService;
assertEquals(1, schemaServiceContainer.getUses().size());
final UsesNode uses = schemaServiceContainer.getUses().iterator().next();
final QName groupingQName = QName.create("urn:opendaylight:params:xml:ns:yang:controller:config", "2013-04-05",
"service-ref");
final QName usesGroupingPathLastComponent = uses.getGroupingPath().getLastComponent();
assertEquals(groupingQName, usesGroupingPathLastComponent);
assertEquals(0, getChildNodeSizeWithoutUses(schemaServiceContainer));
final DataSchemaNode type = schemaServiceContainer.getDataChildByName(QName.create(module.getQNameModule(),
"type"));
final List<UnknownSchemaNode> typeUnknownSchemaNodes = type.getUnknownSchemaNodes();
assertEquals(1, typeUnknownSchemaNodes.size());
final UnknownSchemaNode typeUnknownSchemaNode = typeUnknownSchemaNodes.get(0);
final QNameModule qNameModule = QNameModule.create(
URI.create("urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom"), Revision.of("2013-10-28"));
final QName qName = QName.create(qNameModule, "schema-service");
assertEquals(qName, typeUnknownSchemaNode.getQName());
assertEquals(typeUnknownSchemaNode.getQName(), typeUnknownSchemaNode
.getPath().getLastComponent());
}
开发者ID:opendaylight,项目名称:yangtools,代码行数:72,代码来源:ControllerStmtParserTest.java
示例18: testParseContainer
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
@Test
public void testParseContainer() {
final ContainerSchemaNode nodes = (ContainerSchemaNode) testModule
.getDataChildByName(QName.create(testModule.getQNameModule(), "nodes"));
// test SchemaNode args
assertEquals(SN_NODES, nodes.getQName());
assertEquals(SN_NODES_PATH, nodes.getPath());
assertEquals(Optional.of("nodes collection"), nodes.getDescription());
assertEquals(Optional.of("nodes ref"), nodes.getReference());
assertEquals(Status.CURRENT, nodes.getStatus());
assertEquals(0, nodes.getUnknownSchemaNodes().size());
// test DataSchemaNode args
assertFalse(nodes.isAugmenting());
assertFalse(nodes.isConfiguration());
// constraints
assertEquals("class != 'wheel'", nodes.getWhenCondition().get().toString());
final Collection<MustDefinition> mustConstraints = nodes.getMustConstraints();
assertEquals(2, mustConstraints.size());
final String must1 = "ifType != 'atm' or (ifType = 'atm' and ifMTU <= 17966 and ifMTU >= 64)";
final String errMsg1 = "An atm MTU must be 64 .. 17966";
final String must2 = "ifId != 0";
boolean found1 = false;
boolean found2 = false;
for (final MustDefinition must : mustConstraints) {
if (must1.equals(must.toString())) {
found1 = true;
assertEquals(Optional.of(errMsg1), must.getErrorMessage());
} else if (must2.equals(must.toString())) {
found2 = true;
assertFalse(must.getErrorMessage().isPresent());
assertFalse(must.getErrorAppTag().isPresent());
assertFalse(must.getDescription().isPresent());
assertFalse(must.getReference().isPresent());
}
}
assertTrue(found1);
assertTrue(found2);
assertTrue(nodes.isPresenceContainer());
// typedef
final Set<TypeDefinition<?>> typedefs = nodes.getTypeDefinitions();
assertEquals(1, typedefs.size());
final TypeDefinition<?> nodesType = typedefs.iterator().next();
final QName typedefQName = QName.create(SN, "nodes-type");
assertEquals(typedefQName, nodesType.getQName());
assertEquals(SN_NODES_PATH.createChild(QName.create(SN, "nodes-type")), nodesType.getPath());
assertFalse(nodesType.getDescription().isPresent());
assertFalse(nodesType.getReference().isPresent());
assertEquals(Status.CURRENT, nodesType.getStatus());
assertEquals(0, nodesType.getUnknownSchemaNodes().size());
// child nodes
// total size = 8: defined 6, inserted by uses 2
assertEquals(8, nodes.getChildNodes().size());
final LeafListSchemaNode added = (LeafListSchemaNode)nodes.getDataChildByName(QName.create(
testModule.getQNameModule(), "added"));
assertEquals(createPath("nodes", "added"), added.getPath());
assertEquals(createPath("mytype"), added.getType().getPath());
final ListSchemaNode links = (ListSchemaNode) nodes.getDataChildByName(QName.create(
testModule.getQNameModule(), "links"));
assertFalse(links.isUserOrdered());
final Set<GroupingDefinition> groupings = nodes.getGroupings();
assertEquals(1, groupings.size());
final GroupingDefinition nodeGroup = groupings.iterator().next();
final QName groupQName = QName.create(SN, "node-group");
assertEquals(groupQName, nodeGroup.getQName());
final SchemaPath nodeGroupPath = SN_NODES_PATH.createChild(groupQName);
assertEquals(nodeGroupPath, nodeGroup.getPath());
final Set<UsesNode> uses = nodes.getUses();
assertEquals(1, uses.size());
final UsesNode use = uses.iterator().next();
assertEquals(nodeGroupPath, use.getGroupingPath());
}
开发者ID:opendaylight,项目名称:yangtools,代码行数:81,代码来源:YangParserSimpleTest.java
示例19: getUses
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
@Override
public Set<UsesNode> getUses() {
return delegate.getUses();
}
开发者ID:opendaylight,项目名称:yangtools,代码行数:5,代码来源:EffectiveAugmentationSchema.java
示例20: addInterfaceDefinition
import org.opendaylight.yangtools.yang.model.api.UsesNode; //导入依赖的package包/类
/**
* Adds the implemented types to type builder. The method passes through the
* list of elements which contains {@code dataNodeContainer} and adds them
* as <i>implements type</i> to <code>builder</code>
*
* @param dataNodeContainer
* element which contains the list of used YANG groupings
* @param builder
* builder to which are added implemented types according to
* <code>dataNodeContainer</code>
* @return generated type builder which contains implemented types
*/
private GeneratedTypeBuilder addInterfaceDefinition(final DataNodeContainer dataNodeContainer,
final GeneratedTypeBuilder builder) {
for (UsesNode usesNode : dataNodeContainer.getUses()) {
if (usesNode.getGroupingPath() != null) {
GeneratedType genType = allGroupings.get(usesNode.getGroupingPath());
builder.addImplementsType(new ReferencedTypeImpl(genType.getPackageName(), genType.getName()));
}
}
return builder;
}
开发者ID:lbchen,项目名称:ODL,代码行数:23,代码来源:BindingGeneratorImpl.java
注:本文中的org.opendaylight.yangtools.yang.model.api.UsesNode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论