.getSchemaChecker();
if (schemaChecker != null) {
List<SchemaError> errors = schemaChecker.getErrors();
if (!errors.isEmpty()) {
Folder errorsFolder = new Folder(FolderType.ERROR, root);
root.addChild(errorsFolder);
for (SchemaError error : errors) {
errorsFolder.addChild(new SchemaErrorWrapper(error,
errorsFolder));
}
}
List<SchemaWarning> warnings = schemaChecker.getWarnings();
if (!warnings.isEmpty()) {
Folder warningsFolder = new Folder(FolderType.WARNING,
root);
root.addChild(warningsFolder);
for (SchemaWarning warning : warnings) {
warningsFolder.addChild(new SchemaWarningWrapper(
warning, warningsFolder));
}
}
}
}
children = root.getChildren();
} else if (parentElement instanceof Folder) {
Folder folder = (Folder) parentElement;
children = folder.getChildren();
} else if (parentElement instanceof SchemaErrorWrapper) {
children = new ArrayList<TreeNode>();
} else if (parentElement instanceof SchemaWarningWrapper) {
children = new ArrayList<TreeNode>();
}