private void ensureSubItemsLoaded() {
        if (loadedSubItems)
            return;

        loadedSubItems = true;

        if (getFirst() != null) {
            // get first child
            Reference nextReference = getFirst();
            Reference oldNextReference;
            OutlineItem outLineItem;
            Hashtable dictionary;
            // iterate through children and see if then have children. 
            while (nextReference != null) {

                // result the outline dictionary
                dictionary = (Hashtable) library.getObject(nextReference);
                if (dictionary == null) {
                    break;
                }
                // create the new outline
                outLineItem = new OutlineItem(library, dictionary);

                // add the new item to the list of children
                subItems.add(outLineItem);

                // old reference is kept to make sure we don't iterate out
                // of control on a circular reference.
                oldNextReference = nextReference;
                nextReference = outLineItem.getNext();

                // make sure we haven't already added this node, some
                // Outlines terminate with next being a pointer to itself.
                if (oldNextReference.equals(nextReference)) {
                    break;
                }
            }
        }
    }