Package org.dbwiki.data.database

Examples of org.dbwiki.data.database.DatabaseNode


        + "?" +  RequestParameter.ParameterVersion
        + "=" + version.number();
      if (_request.node().identifier().equals(version.provenance().identifier())) {
        targetName = "this";
      } else {
        DatabaseNode targetNode = _request.node().find(version.provenance().identifier());
        if (targetNode != null) {
          RequestParameterVersionSingle versionParameter = new RequestParameterVersionSingle(version.number());
          DatabaseNode node = targetNode;
          while (!node.identifier().equals(_request.node().identifier())) {
            if (node.isElement()) {
              DatabaseElementNode element = (DatabaseElementNode)node;
              String elementName = _layouter.get(element.schema()).getShortLabel(element, versionParameter);
              if (targetName != null) {
                targetName = elementName + "/" + targetName;
              } else {
                targetName = elementName;
              }
            }
            node = node.parent();
          }
          if ((targetName == null) && (targetNode.isText())) {
            targetName = "\'" + ((DatabaseTextNode)targetNode).getValue() + "\'";
            //targetName = "this";
          }
View Full Code Here


  public void print(HtmlLinePrinter body) throws org.dbwiki.exception.WikiException {
    RequestParameterVersion versionParameter = RequestParameter.versionParameter(_request.parameters().get(RequestParameter.ParameterVersion));

    String line = null;
   
    DatabaseNode node = _request.node();
    while (node != null) {
      if (node.isElement()) {
        DatabaseElementNode element = (DatabaseElementNode)node;
        String target = _request.wri().databaseIdentifier().linkPrefix() + element.identifier().toURLString();
        if (!versionParameter.versionCurrent()) {
          target = target + "?" + versionParameter.toURLString();
        }
        String link = _layouter.get(element.schema()).getShortLabel(element, versionParameter);
        link = "<a CLASS=\"" + CSS.CSSObjectPath + "\" HREF=\"" + target + "\">" + link + "</a>";
        if (line != null) {
          line = link + " &gt; " + line;
        } else {
          line = link;
        }
      }
      node = node.parent();
    }
    if (line != null) {
      body.paragraph(line, CSS.CSSObjectPath);
    }
  }
View Full Code Here

TOP

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

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.