import org.opendaylight.mdsal.binding.javav2.model.api.type.builder.GeneratedTOBuilder;
import org.opendaylight.mdsal.binding.javav2.model.api.type.builder.GeneratedTypeBuilder;
import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
-import org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode;
+import org.opendaylight.yangtools.yang.model.api.AugmentationSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.CaseSchemaNode;
import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
import org.opendaylight.yangtools.yang.model.api.SchemaNode;
@Beta
public final class ModuleContext {
private GeneratedTypeBuilder moduleNode;
- private final Map<SchemaPath,GeneratedTOBuilder> genTOs = new HashMap<>();
+ private final Map<SchemaPath, GeneratedTOBuilder> genTOs = new HashMap<>();
private final Map<SchemaPath, Type> typedefs = new HashMap<>();
private final Map<SchemaPath, GeneratedTypeBuilder> childNodes = new HashMap<>();
private final BiMap<String, GeneratedTypeBuilder> dataTypes = HashBiMap.create();
private final Map<QName,GeneratedTOBuilder> identities = new HashMap<>();
private final Set<GeneratedTypeBuilder> topLevelNodes = new HashSet<>();
private final List<GeneratedTypeBuilder> augmentations = new ArrayList<>();
- private final BiMap<Type,AugmentationSchema> typeToAugmentation = HashBiMap.create();
+ private final BiMap<Type, AugmentationSchemaNode> typeToAugmentation = HashBiMap.create();
private final BiMap<SchemaPath,Type> targetToAugmentation = HashBiMap.create();
private final Map<Type,Object> typeToSchema = new HashMap<>();
private final Multimap<Type, Type> choiceToCases = HashMultimap.create();
- private final BiMap<Type,ChoiceCaseNode> caseTypeToSchema = HashBiMap.create();
+ private final BiMap<Type, CaseSchemaNode> caseTypeToSchema = HashBiMap.create();
private final Map<SchemaPath, Type> innerTypes = new HashMap<>();
- private final Map<SchemaPath,GeneratedTypeBuilder> keyTypes = new HashMap<>();
+ private final Map<SchemaPath, GeneratedTypeBuilder> keyTypes = new HashMap<>();
//map is getting manipulated based on unique YANG module namespace rule
private final ListMultimap<String, String> packagesMap = Multimaps.synchronizedListMultimap
(ArrayListMultimap.create());
return Collections.unmodifiableList(this.augmentations);
}
- public BiMap<Type, AugmentationSchema> getTypeToAugmentation() {
+ public BiMap<Type, AugmentationSchemaNode> getTypeToAugmentation() {
return Maps.unmodifiableBiMap(this.typeToAugmentation);
}
return Maps.unmodifiableBiMap(this.targetToAugmentation);
}
- public void addTypeToAugmentation(final GeneratedTypeBuilder builder, final AugmentationSchema schema) {
+ public void addTypeToAugmentation(final GeneratedTypeBuilder builder, final AugmentationSchemaNode schema) {
this.typeToAugmentation.put(builder, schema);
this.typeToSchema.put(builder, schema);
}
this.targetToAugmentation.put(augmentTarget, builder);
}
- public void addChoiceToCaseMapping(final Type choiceType, final Type caseType, final ChoiceCaseNode schema) {
+ public void addChoiceToCaseMapping(final Type choiceType, final Type caseType, final CaseSchemaNode schema) {
this.choiceToCases.put(choiceType, caseType);
this.caseTypeToSchema.put(caseType, schema);
this.typeToSchema.put(caseType, schema);
}
- public BiMap<Type, ChoiceCaseNode> getCaseTypeToSchemas() {
+ public BiMap<Type, CaseSchemaNode> getCaseTypeToSchemas() {
return Maps.unmodifiableBiMap(this.caseTypeToSchema);
}
*
* Returns mapping of type to its schema.
*
- * Valid values are only instances of {@link DataSchemaNode} or {@link AugmentationSchema}
+ * Valid values are only instances of {@link DataSchemaNode} or {@link AugmentationSchemaNode}
*
* @return Mapping from type to corresponding schema
*/