@Override public SchemaPath getPath() { return getCurrentSchema().getPath(); }
LeafRefContext buildLeafRefContextTree() throws LeafRefYangSyntaxErrorException { final LeafRefContextBuilder rootBuilder = new LeafRefContextBuilder(schemaContext.getQName(), schemaContext.getPath(), schemaContext); final Set<Module> modules = schemaContext.getModules(); for (final Module module : modules) { for (final DataSchemaNode childNode : module.getChildNodes()) { final LeafRefContext childLeafRefContext = buildLeafRefContextReferencingTree(childNode, module); if (childLeafRefContext.hasReferencingChild() || childLeafRefContext.isReferencing()) { rootBuilder.addReferencingChild(childLeafRefContext, childLeafRefContext.getNodeName()); } } } for (final Module module : modules) { final Collection<DataSchemaNode> childNodes = module.getChildNodes(); for (final DataSchemaNode childNode : childNodes) { final LeafRefContext childLeafRefContext = buildLeafRefContextReferencedByTree(childNode, module); if (childLeafRefContext.hasReferencedChild() || childLeafRefContext.isReferenced()) { rootBuilder.addReferencedByChild(childLeafRefContext, childLeafRefContext.getNodeName()); } } } // FIXME: it might be useful to merge these subtrees (i.e. referencing // and referencedBy subtree) return rootBuilder.build(); }
LeafRefContext buildLeafRefContextTree() throws LeafRefYangSyntaxErrorException { final LeafRefContextBuilder rootBuilder = new LeafRefContextBuilder(schemaContext.getQName(), schemaContext.getPath(), schemaContext); final Set<Module> modules = schemaContext.getModules(); for (final Module module : modules) { for (final DataSchemaNode childNode : module.getChildNodes()) { final LeafRefContext childLeafRefContext = buildLeafRefContextReferencingTree(childNode, module); if (childLeafRefContext.hasReferencingChild() || childLeafRefContext.isReferencing()) { rootBuilder.addReferencingChild(childLeafRefContext, childLeafRefContext.getNodeName()); } } } for (final Module module : modules) { final Collection<DataSchemaNode> childNodes = module.getChildNodes(); for (final DataSchemaNode childNode : childNodes) { final LeafRefContext childLeafRefContext = buildLeafRefContextReferencedByTree(childNode, module); if (childLeafRefContext.hasReferencedChild() || childLeafRefContext.isReferenced()) { rootBuilder.addReferencedByChild(childLeafRefContext, childLeafRefContext.getNodeName()); } } } // FIXME: it might be useful to merge these subtrees (i.e. referencing // and referencedBy subtree) return rootBuilder.build(); }