}
protected List getNodes() throws DocumentBuildException, DocumentException, PublicationException {
List preOrder;
String sourceUrl = getSourceURL();
DocumentFactory factory = getDocumentFactory();
if (getDocumentFactory().isDocument(sourceUrl)) {
Document doc = factory.getFromURL(sourceUrl);
preOrder = getPreOrder(doc.getLink().getNode());
} else {
preOrder = new ArrayList();
URLInformation info = new URLInformation(getSourceURL());
Publication pub = factory.getPublication(info.getPublicationId());
Area area = pub.getArea(info.getArea());
SiteStructure site = area.getSite();
SiteNode[] topLevelNodes = site.getTopLevelNodes();
for (int i = 0; i < topLevelNodes.length; i++) {
preOrder.addAll(getPreOrder(topLevelNodes[i]));