import org.opendaylight.yangtools.yang.model.api.AnyXmlSchemaNode
import org.opendaylight.yangtools.yang.model.api.AugmentationTarget
import org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode
-import org.opendaylight.yangtools.yang.model.api.ChoiceNode
+import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode
import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode
import org.opendaylight.yangtools.yang.model.api.DataNodeContainer
import org.opendaylight.yangtools.yang.model.api.DataSchemaNode
«IF child instanceof ListSchemaNode»
«printListNode(child)»
«ENDIF»
- «IF child instanceof ChoiceNode»
+ «IF child instanceof ChoiceSchemaNode»
«printChoiceNode(child)»
«ENDIF»
'''
}
- private def printChoiceNode(ChoiceNode child) {
+ private def printChoiceNode(ChoiceSchemaNode child) {
val List<ChoiceCaseNode> cases = new ArrayList(child.cases);
if(!cases.empty) {
val ChoiceCaseNode aCase = cases.get(0)
«module.childNodes.treeSet(YangInstanceIdentifier.builder.build())»
'''
- private def dispatch CharSequence tree(ChoiceNode node,YangInstanceIdentifier path) '''
+ private def dispatch CharSequence tree(ChoiceSchemaNode node,YangInstanceIdentifier path) '''
«node.nodeName» (choice)
«casesTree(node.cases,path)»
'''
«ENDFOR»
</ul>
'''
- } else if(node instanceof ChoiceNode) {
+ } else if(node instanceof ChoiceSchemaNode) {
return '''
«printInfo(node, "choice")»
«listItem("default case", node.defaultCase)»
val anyxmlNodes = nodes.filter(AnyXmlSchemaNode)
val leafNodes = nodes.filter(LeafSchemaNode)
val leafListNodes = nodes.filter(LeafListSchemaNode)
- val choices = nodes.filter(ChoiceNode)
+ val choices = nodes.filter(ChoiceSchemaNode)
val cases = nodes.filter(ChoiceCaseNode)
val containers = nodes.filter(ContainerSchemaNode)
val lists = nodes.filter(ListSchemaNode)
«node.childNodes.printChildren(level,newPath)»
'''
- private def dispatch CharSequence printInfo(ChoiceNode node, int level, YangInstanceIdentifier path) '''
+ private def dispatch CharSequence printInfo(ChoiceSchemaNode node, int level, YangInstanceIdentifier path) '''
«val Set<DataSchemaNode> choiceCases = new HashSet(node.cases)»
«choiceCases.printChildren(level,path)»
'''
pathString.append(':')
pathString.append(name.localName)
pathString.append('/')
- if(node instanceof ChoiceNode && dataNode !== null) {
+ if(node instanceof ChoiceSchemaNode && dataNode !== null) {
val DataSchemaNode caseNode = dataNode.childNodes.findFirst[DataSchemaNode e | e instanceof ChoiceCaseNode];
if(caseNode !== null) {
pathString.append("(case)");
'''
private def String nodeSchemaPathToPath(DataSchemaNode node, Map<SchemaPath, DataSchemaNode> childNodes) {
- if (node instanceof ChoiceNode || node instanceof ChoiceCaseNode) {
+ if (node instanceof ChoiceSchemaNode || node instanceof ChoiceCaseNode) {
return null
}
for (pathElement : path) {
actual.add(pathElement)
val DataSchemaNode nodeByPath = childNodes.get(SchemaPath.create(actual, absolute))
- if (!(nodeByPath instanceof ChoiceNode) && !(nodeByPath instanceof ChoiceCaseNode)) {
+ if (!(nodeByPath instanceof ChoiceSchemaNode) && !(nodeByPath instanceof ChoiceCaseNode)) {
result.append(pathElement.localName)
if (i != path.size - 1) {
result.append("/")
if (node instanceof DataNodeContainer) {
collectChildNodes((node as DataNodeContainer).childNodes, destination)
}
- if (node instanceof ChoiceNode) {
+ if (node instanceof ChoiceSchemaNode) {
val List<DataSchemaNode> choiceCases = new ArrayList()
for (caseNode : node.cases) {
choiceCases.add(caseNode)