Search in sources :

Example 1 with ChoiceSchemaNode

use of org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode in project controller by opendaylight.

the class DataNormalizationOperation method findChildSchemaNode.

private static Optional<DataSchemaNode> findChildSchemaNode(final DataNodeContainer parent, final QName child) {
    DataSchemaNode potential = parent.getDataChildByName(child);
    if (potential == null) {
        final Iterable<ChoiceSchemaNode> choices = FluentIterable.from(parent.getChildNodes()).filter(ChoiceSchemaNode.class);
        potential = findChoice(choices, child);
    }
    return Optional.fromNullable(potential);
}
Also used : DataSchemaNode(org.opendaylight.yangtools.yang.model.api.DataSchemaNode) ChoiceSchemaNode(org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode)

Aggregations

ChoiceSchemaNode (org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode)1 DataSchemaNode (org.opendaylight.yangtools.yang.model.api.DataSchemaNode)1