Package org.dbwiki.data.database

Examples of org.dbwiki.data.database.DatabaseNode.identifier()


    int delta = newPost - newPre;
   
    ResourceIdentifier nodeIdentifier = null;
   
    try {
      int entryID = ((NodeIdentifier)entry.identifier()).nodeID();
      // Shift all node indexes that are >= newpre
      shiftNodes(RelDataColPre, entryID,newPre,delta);
      shiftNodes(RelDataColPost, entryID,newPre,delta);
      // Add the new nodes
      if (node.isAttribute()) {
View Full Code Here


    while (entry.parent() != null) {
      entry = entry.parent();
    }

    try {
      int entryID = ((NodeIdentifier)entry.identifier()).nodeID();
     
      // FIXME: ugly casts - perhaps a visitor
      // would be appropriate here?
      if (node.isElement()) {
        DatabaseElementNode element = (DatabaseElementNode)node;
View Full Code Here

        // It relies on the results being ordered first by node id.
        //
        // A single node id may appear in consecutive rows if the
        // node has existed in multiple time intervals, or if it has
        // multiple annotations.
        if (node == null || ((NodeIdentifier)node.identifier()).nodeID() != id)  {
          int schema = rs.getInt(ViewDataColNodeSchema);
          int parent = rs.getInt(ViewDataColNodeParent);
          int pre = rs.getInt(ViewDataColNodePre);
          int post = rs.getInt(ViewDataColNodePost);
          if (schema != RelDataColSchemaValUnknown) {
View Full Code Here

          // It relies on the results being ordered first by node id.
          //
          // A single node id may appear in consecutive rows if the
          // node has existed in multiple time intervals, or if it has
          // multiple annotations.
          if (node == null || ((NodeIdentifier)node.identifier()).nodeID() != id)  {
            int schema = rs.getInt(ViewDataColNodeSchema);
            int parent = rs.getInt(ViewDataColNodeParent);
            if (schema != RelDataColSchemaValUnknown) {
              // FIXME #database: This seems to assume that the nodes are in parent-child order.
              // The following logic seems rather fragile.
View Full Code Here

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

TOP
Copyright © 2018 www.massapi.com. 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.