EList<EObject> _contents = res.getContents();
EObject _head = IterableExtensions.<EObject>head(_contents);
if ((_head instanceof XdocFile)) {
EList<EObject> _contents_1 = res.getContents();
EObject _head_1 = IterableExtensions.<EObject>head(_contents_1);
AbstractSection _mainSection = null;
if (((XdocFile) _head_1)!=null) {
_mainSection=((XdocFile) _head_1).getMainSection();
}
final AbstractSection doc = _mainSection;
if ((doc instanceof Document)) {
this.uriUtil.initialize(((Document) doc));
this.generateDoc(((Document) doc), this.access);
}
}