// Path: htmlview2/src/main/java/org/kobjects/dom/Node.java
// public interface Node {
//   Node getParentNode();
//   Element getParentElement();
//   Document getOwnerDocument();
// 
//   Node getFirstChild();
//   Node getLastChild();
//   Node getNextSibling();
//   Node getPreviousSibling();
// 
//   Node appendChild(Node node);
// 
//   String getTextContent();
// }


import org.kobjects.dom.Node;
package org.kobjects.htmlview2;


abstract class Hv2DomContainer extends Hv2DomNode {
  enum SyncState {
      SYNCED, CHILD_INVALID, INVALID
  }
  enum ComponentType {
      TEXT,                // span, b, i, ...
      PHYSICAL_CONTAINER,  // div, p, all other elements
      LOGICAL_CONTAINER,   // tr, tbody
      INVISIBLE,           // head, title, ...
      IMAGE,               // img
      LEAF_COMPONENT       // input, select, ...
  }
  ComponentType componentType;
  SyncState syncState;
  Hv2DomNode firstChild;
  Hv2DomNode lastChild;

  Hv2DomContainer(Hv2DomDocument ownerDocument, ComponentType componentType) {
    super(ownerDocument);
    this.componentType = componentType;
  }

  public Hv2DomNode getFirstChild() {
        return firstChild;
    }

  public Hv2DomNode getLastChild() {
        return lastChild;
    }

// Path: htmlview2/src/main/java/org/kobjects/dom/Node.java
// public interface Node {
//   Node getParentNode();
//   Element getParentElement();
//   Document getOwnerDocument();
// 
//   Node getFirstChild();
//   Node getLastChild();
//   Node getNextSibling();
//   Node getPreviousSibling();
// 
//   Node appendChild(Node node);
// 
//   String getTextContent();
// }


// Path: htmlview2/src/main/java/org/kobjects/htmlview2/Hv2DomContainer.java
import org.kobjects.dom.Node;

package org.kobjects.htmlview2;


abstract class Hv2DomContainer extends Hv2DomNode {
  enum SyncState {
      SYNCED, CHILD_INVALID, INVALID
  }
  enum ComponentType {
      TEXT,                // span, b, i, ...
      PHYSICAL_CONTAINER,  // div, p, all other elements
      LOGICAL_CONTAINER,   // tr, tbody
      INVISIBLE,           // head, title, ...
      IMAGE,               // img
      LEAF_COMPONENT       // input, select, ...
  }
  ComponentType componentType;
  SyncState syncState;
  Hv2DomNode firstChild;
  Hv2DomNode lastChild;

  Hv2DomContainer(Hv2DomDocument ownerDocument, ComponentType componentType) {
    super(ownerDocument);
    this.componentType = componentType;
  }

  public Hv2DomNode getFirstChild() {
        return firstChild;
    }

  public Hv2DomNode getLastChild() {
        return lastChild;
    }

  public Hv2DomNode insertBefore(Node newNode, Node referenceNode) {