private final Map<String, DeviationBuilder> addedDeviations = new HashMap<String, DeviationBuilder>();
private final Map<List<String>, TypeDefinitionBuilder> addedTypedefs = new HashMap<List<String>, TypeDefinitionBuilder>();
private final List<ExtensionBuilder> addedExtensions = new ArrayList<ExtensionBuilder>();
+ private final Set<UnknownSchemaNodeBuilder> addedUnknownNodes = new HashSet<UnknownSchemaNodeBuilder>();
private final Map<List<String>, TypeAwareBuilder> dirtyNodes = new HashMap<List<String>, TypeAwareBuilder>();
instance.setNotifications(notifications);
// AUGMENTATIONS
- // instance.setAugmentations(augmentations);
final Set<AugmentationSchema> augmentations = new HashSet<AugmentationSchema>();
for (AugmentationSchemaBuilder builder : addedAugments) {
augmentations.add(builder.build());
return addedUsesNodes;
}
+ public Set<UnknownSchemaNodeBuilder> getAddedUnknownNodes() {
+ return addedUnknownNodes;
+ }
+
public Set<TypeDefinitionBuilder> getModuleTypedefs() {
Set<TypeDefinitionBuilder> typedefs = new HashSet<TypeDefinitionBuilder>();
for (Map.Entry<List<String>, TypeDefinitionBuilder> entry : addedTypedefs
List<String> pathToCase = new ArrayList<String>(parentPath);
ChoiceCaseBuilder builder = new ChoiceCaseBuilder(caseName);
- final ChoiceBuilder parent = (ChoiceBuilder) moduleNodes
+ final ChildNodeBuilder parent = (ChildNodeBuilder) moduleNodes
.get(pathToCase);
if (parent != null) {
if (parent instanceof AugmentationSchemaBuilder) {
}
pathToCase.add(caseName.getLocalName());
- addedChilds.put(pathToCase, builder);
moduleNodes.put(pathToCase, builder);
return builder;
public void addIdentityrefType(String baseString, List<String> parentPath,
SchemaPath schemaPath) {
+ List<String> pathToIdentityref = new ArrayList<String>(parentPath);
TypeAwareBuilder parent = (TypeAwareBuilder) moduleNodes
- .get(parentPath);
+ .get(pathToIdentityref);
IdentityrefTypeBuilder identityref = new IdentityrefTypeBuilder(
baseString, schemaPath);
parent.setType(identityref);
- dirtyNodes.put(parentPath, parent);
+ dirtyNodes.put(pathToIdentityref, parent);
}
public DeviationBuilder addDeviation(String targetPath,
} else if (parent instanceof SchemaNodeBuilder) {
((SchemaNodeBuilder) parent).addUnknownSchemaNode(builder);
}
+ addedUnknownNodes.add(builder);
return builder;
}