Search in sources :

Example 6 with SystemLeafSetNode

use of org.opendaylight.yangtools.yang.data.api.schema.SystemLeafSetNode in project netconf by opendaylight.

the class SchemaContextHandler method addFeatureLeafList.

/**
 * Mapping features of specific module.
 *
 * @param mapEntryBuilder mapEntryBuilder of parent for mapping children
 * @param features features of specific module
 */
private static void addFeatureLeafList(final DataContainerNodeBuilder<NodeIdentifierWithPredicates, MapEntryNode> mapEntryBuilder, final Collection<? extends FeatureDefinition> features) {
    final ListNodeBuilder<String, SystemLeafSetNode<String>> leafSetBuilder = Builders.<String>leafSetBuilder().withNodeIdentifier(MODULE_FEATURE_NODEID);
    for (final FeatureDefinition feature : features) {
        leafSetBuilder.withChildValue(feature.getQName().getLocalName());
    }
    mapEntryBuilder.withChild(leafSetBuilder.build());
}
Also used : SystemLeafSetNode(org.opendaylight.yangtools.yang.data.api.schema.SystemLeafSetNode) FeatureDefinition(org.opendaylight.yangtools.yang.model.api.FeatureDefinition)

Aggregations

SystemLeafSetNode (org.opendaylight.yangtools.yang.data.api.schema.SystemLeafSetNode)6 ContainerNode (org.opendaylight.yangtools.yang.data.api.schema.ContainerNode)4 MapEntryNode (org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode)4 NodeIdentifierWithPredicates (org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates)3 SystemMapNode (org.opendaylight.yangtools.yang.data.api.schema.SystemMapNode)3 NodeIdentifier (org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier)2 AugmentationNode (org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode)2 ChoiceNode (org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode)2 LeafNode (org.opendaylight.yangtools.yang.data.api.schema.LeafNode)2 LeafSetEntryNode (org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode)2 UnkeyedListEntryNode (org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListEntryNode)2 UnkeyedListNode (org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListNode)2 UserLeafSetNode (org.opendaylight.yangtools.yang.data.api.schema.UserLeafSetNode)2 UserMapNode (org.opendaylight.yangtools.yang.data.api.schema.UserMapNode)2 DataSchemaNode (org.opendaylight.yangtools.yang.model.api.DataSchemaNode)2 FeatureDefinition (org.opendaylight.yangtools.yang.model.api.FeatureDefinition)2 LeafListSchemaNode (org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode)2 LeafSchemaNode (org.opendaylight.yangtools.yang.model.api.LeafSchemaNode)2 NonNull (org.eclipse.jdt.annotation.NonNull)1 NormalizedNodeContext (org.opendaylight.netconf.sal.rest.impl.NormalizedNodeContext)1