Package org.dbwiki.data.database

Examples of org.dbwiki.data.database.DatabaseElementNode


      this.printInsertForm(_request, schema, body);
    } else if (_request.parameters().hasParameter(RequestParameter.ParameterEdit)) {
      body.paragraph("Edit", CSS.CSSHeadline);
      DatabaseNode node = _request.node();
      if (node.isElement()) {
        DatabaseElementNode element = (DatabaseElementNode)node;
        this.printUpdateForm(_request, element, body);
      } else {
        DatabaseTextNode textNode = (DatabaseTextNode)node;
        this.printUpdateForm(_request, textNode, body);
      }
View Full Code Here


      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();
View Full Code Here

            schema = null;
          }
        }
        this.printObjectMenu((GroupSchemaNode)schema, printer);
      } else {
        DatabaseElementNode parent = _request.node().parent();
        if (parent != null) {
          if (parent.getTimestamp().isCurrent()) {
            printActivateMenu(printer);
          } else {
            printCopyOnlyMenu(printer);
          }
        } else {
View Full Code Here

   *
   */
  public void print(HtmlLinePrinter body) throws org.dbwiki.exception.WikiException {
    if (_versionParameter.matches(_node)) {
      if (_node.isElement()) {
        DatabaseElementNode element = (DatabaseElementNode)_node;
        if (element.isAttribute()) {
          printAttributeNode((DatabaseAttributeNode)_node, _versionParameter, body);
        } else {
          printGroupNode((DatabaseGroupNode)_node, _versionParameter, body);
        }
      } else {
View Full Code Here

    content.openTD(layout.getCSS(CSS.CSSContentValue));
    content.openTABLE(layout.getCSS(CSS.CSSContentValueListing));
   
    for (int iNode = 0; iNode < list.size(); iNode++) {
      DatabaseElementNode element = list.get(iNode);
      if (versionParameter.matches(element)) {
        content.openTR();
        String target = getNodeLink(element, versionParameter);
        if (list.schema().isAttribute()) {
          DatabaseAttributeNode attribute = (DatabaseAttributeNode)element;
View Full Code Here

    boolean hasContent = false;
   
    content.openTABLE(layout.getCSS(CSS.CSSContentFrameListing));

    for (int iNode = 0; iNode < list.size(); iNode++) {
      DatabaseElementNode element = list.get(iNode);
      if (versionParameter.matches(element)) {
        boolean active = element.getTimestamp().isCurrent();
        content.openTR();
        content.openTD(layout.getCSS(CSS.CSSContentFrameListing));
       
        String target = getNodeLink(element, versionParameter);
        if (element.getTimestamp().isCurrent()) {
          content.openTABLE(layout.getCSS(CSS.CSSContentFrameActive));
        } else {
          content.openTABLE(layout.getCSS(CSS.CSSContentFrameInactive));
        }
        content.openTR();
        if (layout.getLabelAlignment().isTopAlign()) {
          if (active) {
            content.openTD(layout.getCSS(CSS.CSSContentTopLabelActive));
            content.link(target, layout.getLabel(element, versionParameter), layout.getCSS(CSS.CSSContentLabelActive));
          } else {
            content.openTD(layout.getCSS(CSS.CSSContentTopLabelInactive));
            content.link(target, layout.getLabel(element, versionParameter), layout.getCSS(CSS.CSSContentLabelInactive));
          }
          if (element.hasAnnotation()) {
            addAnnotationIndicator(content);
          }
          content.closeTD();
          content.closeTR();
          content.openTR();
        } else if (layout.getLabelAlignment().isLeftAlign()) {
          if (active) {
            content.openTD(layout.getCSS(CSS.CSSContentLeftLabelActive));
            content.link(target, layout.getLabel(element, versionParameter), layout.getCSS(CSS.CSSContentLabelActive));
          } else {
            content.openTD(layout.getCSS(CSS.CSSContentLeftLabelInactive));
            content.link(target, layout.getLabel(element, versionParameter), layout.getCSS(CSS.CSSContentLabelInactive));
          }
          if (element.hasAnnotation()) {
            addAnnotationIndicator(content);
          }
          content.closeTD();
        }
        content.openTD(layout.getCSS(CSS.CSSContentValue));
View Full Code Here

          } 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);
            } else {
              this.printGroupNode((DatabaseGroupNode)element, versionParameter, content);
              // Printing the group node and all its children could get messy. Alternatively,
              // we could just print a text line for each node using the code below (need to
View Full Code Here

        }
      }
    } 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 Methods
   */
  public void handle(DatabaseElementNode node) {
    DatabaseElementNode outputNode = null;
       
    if(!_rename)
      outputNode = node;
    else {
      if(node.isAttribute()) {
View Full Code Here

   
    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

TOP

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

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.