Examples of identifier()


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

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

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

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

    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

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

        // 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

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

          // 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

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

      } 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

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

 
  private void writeTextNodes(RDBMSDatabaseAttributeNode attribute, int entry) throws java.sql.SQLException, org.dbwiki.exception.WikiException {   
    for (int iValue = 0; iValue < attribute.value().size(); iValue++) {
      DatabaseTextNode node = attribute.value().get(iValue);
      if (((NodeIdentifier)node.identifier()).nodeID() == RelDataColIDValUnknown) {
        TimeSequence timestamp = null;
        if (node.hasTimestamp()) {
          timestamp = node.getTimestamp();
        }
        this.insertTextNode(attribute, entry, timestamp, node.value(), attribute.getpre(), attribute.getpost());
View Full Code Here

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

    for (int iChild = 0; iChild < group.children().size(); iChild++) {
      DatabaseElementNode child = group.children().get(iChild);
      if (child.isAttribute()) {
        DatabaseTextNode value = ((DatabaseAttributeNode)child).value().getCurrent();
        if (value != null) {
          valueIndex.put(value.identifier().toParameterString(), value);
        }
      } else {
        getValueIndex((DatabaseGroupNode)child, valueIndex);
      }
    }
View Full Code Here

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

      } else {
        Hashtable<String, DatabaseTextNode> valueIndex = new Hashtable<String, DatabaseTextNode>();
        getValueIndex((DatabaseGroupNode)element, valueIndex);
        for (int iUpdate = 0; iUpdate < update.size(); iUpdate++) {
          NodeUpdate upd = update.get(iUpdate);
          if (updateTextNodeTimestamps(con, valueIndex.get(upd.identifier().toParameterString()), upd, version)) {
            hasChanges = true;
          }
        }
      }
    } else {
View Full Code Here

Examples of org.dbwiki.data.index.DatabaseEntry.identifier()

        }
      }
      DatabaseEntry entry = database.content().get(entryIdentifier);
      if (entry != null) {
        if (url.size() > 1) {
          return this.decode(database, (DatabaseGroupNode)database.get(entry.identifier()), versionParameter, url, 1);
        } else {
          return entry.identifier();
        }
      } else {
        throw new WikiDataException(WikiDataException.UnknownResource, url.toString());
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.