- GroupingMember gm = (GroupingMember) child;
- if (gm.isAddedByUses()) {
- if(usesNode.isAugmenting()) {
- child.setAugmenting(true);
- }
- if(usesNode.isAugmenting() && !(usesNode.getParentAugment().getParent() instanceof UsesNodeBuilder)) {
- AugmentationSchemaBuilder parentAugment = usesNode.getParentAugment();
- ModuleBuilder m = ParserUtils.getParentModule(parentAugment);
- correctNodePathForUsesNodes(child, parentPath, m);
- } else {
- child.setQName(new QName(ns, rev, prefix, child.getQName().getLocalName()));
- correctNodePathForUsesNodes(child, parentPath, module);
+ if (child instanceof GroupingMember) {
+ GroupingMember gm = (GroupingMember) child;
+ if (gm.isAddedByUses()) {
+ if (usesNode.isAugmenting()) {
+ child.setAugmenting(true);
+ }
+ if (usesNode.isAugmenting()
+ && !(usesNode.getParentAugment().getParent() instanceof UsesNodeBuilder)) {
+ AugmentationSchemaBuilder parentAugment = usesNode.getParentAugment();
+ ModuleBuilder m = ParserUtils.getParentModule(parentAugment);
+ correctNodePathForUsesNodes(child, parentPath, m);
+ } else {
+ child.setQName(new QName(ns, rev, prefix, child.getQName().getLocalName()));
+ correctNodePathForUsesNodes(child, parentPath, module);
+ }