use of ch.interlis.ili2c.metamodel.AbstractLeafElement in project ili2db by claeis.
the class AbstractRecordConverter method getStructWrappers.
public ArrayList<ViewableWrapper> getStructWrappers(Table structClass) {
ArrayList<ViewableWrapper> ret = new ArrayList<ViewableWrapper>();
ViewableWrapper structWrapper = class2wrapper.get(structClass);
if (structWrapper != null) {
while (structWrapper.getExtending() != null) {
structWrapper = structWrapper.getExtending();
}
ret.add(structWrapper);
return ret;
}
ArrayList<ExtendableContainer<AbstractLeafElement>> exts = new ArrayList<ExtendableContainer<AbstractLeafElement>>();
exts.addAll(structClass.getDirectExtensions());
while (exts.size() > 0) {
structClass = (Table) exts.remove(0);
structWrapper = class2wrapper.get(structClass);
if (structWrapper != null) {
while (structWrapper.getExtending() != null) {
structWrapper = structWrapper.getExtending();
}
ret.add(structWrapper);
} else {
exts.addAll(structClass.getDirectExtensions());
}
}
return ret;
}
Aggregations