Examples of NodeIdentifier


Examples of net.sf.joafip.meminspector.entity.NodeIdentifier

          objectInputStream.close();
          add(map, nodeForObjectTO);
        }
      }
      bufferedInputStream.close();
      return createNodeForObjectModel(map, new NodeIdentifier(rootNodeId),readProgressFrame);
    } catch (FileNotFoundException exception) {
      throw new MemInspectorException(exception);
    } catch (IOException exception) {
      throw new MemInspectorException(exception);
    } catch (ClassNotFoundException exception) {
View Full Code Here

Examples of net.sf.joafip.meminspector.entity.NodeIdentifier

    final NodeInfo nodeInfo = new NodeInfo();
    nodeInfo.nodeForObjectTO = nodeForObjectTO;
    nodeInfo.nodeForObject = null;
    nodeInfo.childIdSet = nodeForObjectTO.getChildNodeSet();
    nodeInfo.fatherIdSet = nodeForObjectTO.getFatherNodeIdSet();
    final NodeIdentifier nodeId = nodeForObjectTO.getId();
    if (map.put(nodeId, nodeInfo) != null) {
      throw new MemInspectorException("duplicate id #" + nodeId);
    }
  }
View Full Code Here

Examples of net.sf.joafip.meminspector.entity.NodeIdentifier

    // create NodeForObject for each NodeInfo
    for (NodeInfo nodeInfo : map.values()) {
      NodeForObject nodeForObject = nodeInfo.nodeForObject;
      if (nodeForObject == null) {
        final NodeForObjectTO nodeForObjectTO = nodeInfo.nodeForObjectTO;
        final NodeIdentifier identifier = nodeForObjectTO.getId();
        nodeForObject = new NodeForObject(null, identifier,
            nodeForObjectTO.getIdentityHashCode(),
            nodeForObjectTO.getObjectClassName(),
            nodeForObjectTO.isMarkedNew(),
            nodeForObjectTO.isMarkedNewSon(),
            nodeForObjectTO.getFieldByChildNodeIdMap(),
            nodeForObjectTO.getFieldIsStaticMap(),
            nodeForObjectTO.getObjectSize());
        nodeInfo.nodeForObject = nodeForObject;
        nodeForObjectModel.add(nodeForObject);
      } else {
        throw new MemInspectorException("node object must not be set");
      }
    }

    // create father link
    for (NodeInfo nodeInfo : map.values()) {

      NodeForObject nodeForObject = nodeInfo.nodeForObject;
      if (nodeForObject == null) {
        throw new MemInspectorException("node object must be set");
      }
      final NodeForObjectTO nodeForObjectTO = nodeInfo.nodeForObjectTO;
      final NodeIdentifier mainFatherId = nodeForObjectTO
          .getMainFatherNodeId();
      final NodeForObject mainFatherNode;
      if (mainFatherId == null) {
        mainFatherNode = null;
      } else {
View Full Code Here

Examples of net.sf.joafip.meminspector.entity.NodeIdentifier

    for (NodeIdentifier childId : nodeForObject.getFieldByChildNodeIdMap()
        .keySet()) {
      childNodeIdSet.add(childId);
    }
    final NodeForObject mainFatherNode = nodeForObject.getMainFatherNode();
    final NodeIdentifier mainFatherNodeid;
    if (mainFatherNode == null) {
      mainFatherNodeid = new NodeIdentifier(-1);
    } else {
      mainFatherNodeid = mainFatherNode.getId();
    }
    return new NodeForObjectTO(nodeForObject.getId(),
        nodeForObject.getObjectClassName(),
View Full Code Here

Examples of org.dbwiki.data.resource.NodeIdentifier

  public static void main(String[] args) {
      try {
          WikiServerStandalone wikiserver=new WikiServerStandalone(org.dbwiki.lib.IO.loadProperties(new File(args[0])));
        PSQLDatabaseConnector psql = new PSQLDatabaseConnector("jdbc:postgresql://localhost", "dbwiki", "password");
        RDBMSDatabase database= new RDBMSDatabase(wikiserver.get(1), psql);
        NodeIdentifier nodeidentifier= new NodeIdentifier();
        DatabaseReader.get(psql.getConnection(), database, nodeidentifier);
          database.query("wpath://child::COUNTRY/child::NAME");
          database.query("wpath://COUNTRY[CATEGORY/PROPERTY/*='Europe']/NAME");
          database.query("wpath://COUNTRY[NAME='United States']/CATEGORY[NAME='Economy']/PROPERTY[NAME='GDP (purchasing power parity)']");
          System.out.println(wikiserver.size());
View Full Code Here

Examples of org.dbwiki.data.resource.NodeIdentifier

      NodeWriter writer = new ExportNodeWriter();
      BufferedWriter outstr = new BufferedWriter(new OutputStreamWriter(out));
     
      writer.init(outstr);
      // new NodeIdentifier() gives a root node id
      _wiki.database().export(new NodeIdentifier(), _wiki.database().versionIndex().getLastVersion().number(), writer);
     
      outstr.close();
      out.close();
      // register the database with the server
     
View Full Code Here

Examples of org.dbwiki.data.resource.NodeIdentifier

    this.value().add(new RDBMSDatabaseTextNode(DatabaseConstants.RelDataColIDValUnknown, this, timestamp, value,pre,post));
  }

 
  public NodeIdentifier identifier() {
    return new NodeIdentifier();
  }
View Full Code Here

Examples of org.dbwiki.data.resource.NodeIdentifier

        while (rs.next()) {
          int id = rs.getInt(1);
          int start = rs.getInt(2);
          int end = rs.getInt(3);
          if (entry == null) {
            entry = new RDBMSDatabaseEntry(new NodeIdentifier(id), new TimeSequence(start, end));
            add(entry);
          } else {
            if (entry.identifier().nodeID() == id) {
              entry.timestamp().elongate(start, end);
            } else {
              entry = new RDBMSDatabaseEntry(new NodeIdentifier(id), new TimeSequence(start, end));
              add(entry);
            }
          }
        }
        rs.close();
        pStmtSelectLabel.setInt(1, database.getDisplaySchemaNode().id());
        rs = pStmtSelectLabel.executeQuery();
        entry = null;
        int maxTime = Integer.MIN_VALUE;
        while (rs.next()) {
          int id = rs.getInt(1);
          String value = rs.getString(2);
          int end = DatabaseConstants.RelTimestampColEndValOpen;
          rs.getInt(3);
          if (!rs.wasNull()) {
            end = rs.getInt(4);
          }
          if (entry == null) {
            entry = get(new NodeIdentifier(id));
            maxTime = Integer.MIN_VALUE;
          } else if (entry.identifier().nodeID() != id) {
            entry = get(new NodeIdentifier(id));
            maxTime = Integer.MIN_VALUE;
          }
          if (end == DatabaseConstants.RelTimestampColEndValOpen) {
            entry.label(value);
            maxTime = Integer.MAX_VALUE;
          } else if (end > maxTime) {
            entry.label(value);
            maxTime = end;
          }
        }
        rs.close();
        rs = pStmtSelectLastChange.executeQuery();
        while (rs.next()) {
          get(new NodeIdentifier(rs.getInt(1))).lastChange(rs.getInt(2));
        }
        rs.close();
        pStmtSelectContent.close();
        pStmtSelectLabel.close();
        pStmtSelectLastChange.close();
View Full Code Here

Examples of org.dbwiki.data.resource.NodeIdentifier

        "SELECT " + RelDataColID +  " FROM " + database.name() + RelationData + " " +
        "WHERE " + RelDataColSchema + " = " + identifier.nodeID());

    while (rs.next()) {
      int id = rs.getInt(RelDataColID);
      nodes.add(new NodeIdentifier(id));
    }
   
    return nodes;
  }
View Full Code Here

Examples of org.dbwiki.data.resource.NodeIdentifier

  /*
   * Public Methods
   */
 
  public NodeIdentifier identifier() {
    return new NodeIdentifier();
  }
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.