import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode
import org.opendaylight.yangtools.yang.model.api.DataNodeContainer
import org.opendaylight.yangtools.yang.model.api.DataSchemaNode
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext
import org.opendaylight.yangtools.yang.model.api.ElementCountConstraintAware
import org.opendaylight.yangtools.yang.model.api.ExtensionDefinition
import org.opendaylight.yangtools.yang.model.api.GroupingDefinition
import org.opendaylight.yangtools.yang.model.api.ListSchemaNode
import org.opendaylight.yangtools.yang.model.api.Module
import org.opendaylight.yangtools.yang.model.api.NotificationDefinition
-import org.opendaylight.yangtools.yang.model.api.SchemaContext
import org.opendaylight.yangtools.yang.model.api.SchemaNode
import org.opendaylight.yangtools.yang.model.api.SchemaPath
import org.opendaylight.yangtools.yang.model.api.TypeDefinition
val Map<String, String> imports = new HashMap();
var Module currentModule;
- var SchemaContext ctx;
+ var EffectiveModelContext ctx;
var File path
StringBuilder augmentChildNodesAsString
DataSchemaNode lastNodeInTargetPath = null
- def generate(BuildContext buildContext, SchemaContext context, File targetPath, Set<Module> modulesToGen)
+ def generate(BuildContext buildContext, EffectiveModelContext context, File targetPath, Set<Module> modulesToGen)
throws IOException {
path = targetPath;
path.mkdirs();
return it;
}
- def generateDocumentation(BuildContext buildContext, Module module, SchemaContext ctx) {
+ def generateDocumentation(BuildContext buildContext, Module module, EffectiveModelContext ctx) {
val destination = new File(path, '''«module.name».html''')
this.ctx = ctx;
module.imports.forEach[importModule | this.imports.put(importModule.prefix, importModule.moduleName)]
return destination;
}
- def generate(Module module, SchemaContext ctx) '''
+ def generate(Module module, EffectiveModelContext ctx) '''
<!DOCTYPE html>
<html lang="en">
<head>
</html>
'''
- def body(Module module, SchemaContext ctx) '''
+ def body(Module module, EffectiveModelContext ctx) '''
«header(module)»
«typeDefinitionsSummary(module)»
'''
}
- def augmentations(Module module, SchemaContext context) {
+ def augmentations(Module module, EffectiveModelContext context) {
if (module.augmentations.empty) {
return '';
}
'''
}
- private def augmentationsSummary(Module module, SchemaContext context) {
+ private def augmentationsSummary(Module module, EffectiveModelContext context) {
if (module.augmentations.empty) {
return '';
}
return it.toString;
}
- private def String schemaPathToString(Module module, SchemaPath schemaPath, SchemaContext ctx, DataNodeContainer dataNode) {
+ private def String schemaPathToString(Module module, SchemaPath schemaPath, EffectiveModelContext ctx, DataNodeContainer dataNode) {
val List<QName> path = Lists.newArrayList(schemaPath.pathFromRoot);
val StringBuilder pathString = new StringBuilder()
if (schemaPath.absolute) {