Package org.dbwiki.data.database

Examples of org.dbwiki.data.database.DatabaseGroupNode


      body.openTABLE(layout.getCSS(CSS.CSSObjectFrameActive));
      this.printUpdateLine((DatabaseAttributeNode)element, body);
      body.closeTABLE();
    } else {
      body.openTABLE(layout.getCSS(CSS.CSSObjectFrame));
      DatabaseGroupNode group = (DatabaseGroupNode)element;
      for (int iChild = 0; iChild < group.children().size(); iChild++) {
        DatabaseElementNode child = group.children().get(iChild);
        if (child.getTimestamp().isCurrent()) {
          if (child.isAttribute()) {
            body.openTR();
            body.openTD(layout.getCSS(CSS.CSSObjectListing));
            body.openTABLE(layout.getCSS(CSS.CSSObjectFrameActive));
            this.printUpdateLine((DatabaseAttributeNode)child, body);
            body.closeTABLE();
            body.closeTD();
            body.closeTR();
          } else if (_layouter.get(child.schema()).getEditWithParent()) {
            DatabaseGroupNode groupChild = (DatabaseGroupNode)child;
            body.openTR();
            body.openTD(layout.getCSS(CSS.CSSObjectListing));
            body.openTABLE(layout.getCSS(CSS.CSSContentFrameActive));
            body.openTR();
            body.openTD(layout.getCSS(CSS.CSSContentTopLabelActive));
            body.text(_layouter.get(groupChild.schema()).getName());
            body.closeTD();
            body.closeTR();
            body.openTR();
            body.openTD(CSS.CSSObjectListing);
            this.printUpdateLines(groupChild, body);
View Full Code Here


      }
    }
    content.closeTR();
   
    for (int iNode = 0; iNode < list.size(); iNode++) {
      DatabaseGroupNode groupNode = (DatabaseGroupNode)list.get(iNode);
      // only display nodes that have not been deleted
      if (versionParameter.matches(groupNode)) {
        content.openTR();
        for (int iColumn = 0; iColumn < schemaNode.children().size(); iColumn++) {
          //DatabaseElementList nodes = groupNode.children().get(schemaNode.children().get(iColumn));
          DatabaseElementList nodes = groupNode.children().get(schemaNode.children().get(iColumn).label());
          if (groupNode.getTimestamp().isCurrent()) {
            content.openTD(layout.getCSS(CSS.CSSContentCellActive));
          } else {
            content.openTD(layout.getCSS(CSS.CSSContentCellInactive));
          }
          boolean hasAnnotation = groupNode.hasAnnotation();
          for (int iElement = 0; iElement < nodes.size(); iElement++) {
            DatabaseElementNode element = nodes.get(iElement);
            hasAnnotation = (hasAnnotation || element.hasAnnotation());
            if (element.isAttribute()) {
              printAttributeValue((DatabaseAttributeNode)element, versionParameter, layout, content);
View Full Code Here

        if (value.hasTimestamp()) {
          this.addModificationPoints(value.getTimestamp(), versions);
        }
      }
    } else {
      DatabaseGroupNode group = (DatabaseGroupNode)element;
      for (int iNode = 0; iNode < group.children().size(); iNode++) {
        DatabaseElementNode node = group.children().get(iNode);
        if (node.hasTimestamp()) {
          this.addModificationPoints(node.getTimestamp(),  versions);
        }
        this.addNodeChanges(node,  versions);
      }
View Full Code Here

  public void consume(DatabaseElementNode node, XPath targetPath, QueryNodeHandler consumer) {
   
    if (targetPath.size() > 0) {
      XPathComponent pathComponent = targetPath.firstElement();
      DatabaseGroupNode group = (DatabaseGroupNode)node;
      for (int iChild = 0; iChild < group.children().size(); iChild++) {
        DatabaseElementNode childNode = group.children().get(iChild);
        if (pathComponent.matches(childNode)) {
          if (targetPath.size() == 1) {
            consumer.handle(childNode);
          } else {
            new RelativeXPathConsumer().consume(childNode, targetPath.subpath(1), consumer);
View Full Code Here

  public void consume(DatabaseElementNode node, XPath targetPath, QueryNodeHandler consumer) {
   
    XPathComponent pathComponent = targetPath.firstElement();
    if (pathComponent.matches(node)) {
      if (targetPath.size() > 1) {
        DatabaseGroupNode group = (DatabaseGroupNode)node;
        for (int iChild = 0; iChild < group.children().size(); iChild++) {
          new AbsoluteXPathConsumer().consume(group.children().get(iChild), targetPath.subpath(1), consumer);
        }
      } else {
        consumer.handle(node);
      }
    }
View Full Code Here

    // Counts the nodes of the same schema as the given node in the
    // list of children of the node's parent that have a node ID
    // below the ID of the given node
    if (node.parent() != null) {
      if (node.parent().isGroup()) {
        DatabaseGroupNode parent = (DatabaseGroupNode)node.parent();
        for (int iChild = 0; iChild < parent.children().size(); iChild++) {
          DatabaseElementNode child = parent.children().get(iChild);
          if (child.schema().equals(node.schema())) {
            if (child.identifier().compareTo(node.identifier()) < 0) {
              nodeIndex++;
            }
          }
View Full Code Here

        if ((value.hasTimestamp()) && (value.getTimestamp().lastValue() == deletedAt)) {
          insertTimestamp(con, value, value.getTimestamp().continueAt(version.number()));
        }
      }
    } else {
      DatabaseGroupNode group = (DatabaseGroupNode)node;
      for (int iChild = 0; iChild < group.children().size(); iChild++) {
        DatabaseElementNode child = group.children().get(iChild);
        if ((child.hasTimestamp()) && (child.getTimestamp().lastValue() == deletedAt)) {
          insertTimestamp(con, child, child.getTimestamp().continueAt(version.number()));
        }
        activateElementNode(con, child, deletedAt, version);
      }
View Full Code Here

        if ((value.hasTimestamp()) && (value.getTimestamp().isCurrent())) {
          updateTimestamp(con, value, value.getTimestamp().finishAt(version.number() - 1));
        }
      }
    } else {
      DatabaseGroupNode group = (DatabaseGroupNode)node;
      for (int iChild = 0; iChild < group.children().size(); iChild++) {
        DatabaseElementNode child = group.children().get(iChild);
        if ((child.hasTimestamp()) && (child.getTimestamp().isCurrent())) {
          updateTimestamp(con, child, child.getTimestamp().finishAt(version.number() - 1));
        }
        deleteElementNode(con, child, version);
      }
View Full Code Here

              break;
            }
          }
          out.writeAttributeNode(attribute, value,last);
        } else {
          DatabaseGroupNode group = (DatabaseGroupNode)element;
          out.startGroupNode(group);
          for (int iChild = 0; iChild < group.children().size(); iChild++) {
            boolean newLast = iChild == group.children().size() - 1;
            exportNode(group.children().get(iChild), version, out, newLast);
          }
          out.endGroupNode(group,last);
        }
      } else {
        out.writeTextNode((DatabaseTextNode)node);
View Full Code Here

    body.add("  drawChart('" + typeString + "', '" + chartId + "', '', '" + xSize + "', '"+ ySize +
            "', " + xl + ", " + yl + ",\n[");
   
    boolean nonEmpty = false;
    for (int i = 0; i < rs.size(); i++) {
      DatabaseGroupNode r = (DatabaseGroupNode)rs.get(i);

      DatabaseElementList children = r.children();
      if(children.size() < 2)
        continue;

      DatabaseElementList matches = children.get(labels.get(0));
      if(matches.size() == 0)
View Full Code Here

TOP

Related Classes of org.dbwiki.data.database.DatabaseGroupNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.