}
public DatabaseElementList find(SchemaNode schema) {
Stack<SchemaNode> entities = new Stack<SchemaNode>();
SchemaNode parent = schema.parent();
while (parent != null) {
if (parent.equals(this.schema())) {
break;
}
entities.push(parent);
parent = parent.parent();
}
if (parent == null) {
return new DatabaseElementList();
}
Vector<DatabaseGroupNode> elements = new Vector<DatabaseGroupNode>();
elements.add(this);
while (!entities.isEmpty()) {
SchemaNode pathSchema = entities.pop();
Vector<DatabaseGroupNode> candidates = new Vector<DatabaseGroupNode>();
for (int iElement = 0; iElement < elements.size(); iElement++) {
DatabaseGroupNode node = elements.get(iElement);
for (int iChild = 0; iChild < node.children().size(); iChild++) {
if (node.children().get(iChild).schema().equals(pathSchema)) {