Пример #1
0
  private void showRelCounts(ReadOperations read, DbStructureVisitor visitor) {
    // all wildcards
    noSide(read, visitor, WILDCARD_REL_TYPE, ANY_RELATIONSHIP_TYPE);

    // one label only
    for (Label label : glops.getAllLabels()) {
      int labelId = read.labelGetForName(label.name());

      leftSide(read, visitor, label, labelId, WILDCARD_REL_TYPE, ANY_RELATIONSHIP_TYPE);
      rightSide(read, visitor, label, labelId, WILDCARD_REL_TYPE, ANY_RELATIONSHIP_TYPE);
    }

    // fixed rel type
    for (RelationshipType relType : glops.getAllRelationshipTypes()) {
      int relTypeId = read.relationshipTypeGetForName(relType.name());
      noSide(read, visitor, relType, relTypeId);

      for (Label label : glops.getAllLabels()) {
        int labelId = read.labelGetForName(label.name());

        // wildcard on right
        leftSide(read, visitor, label, labelId, relType, relTypeId);

        // wildcard on left
        rightSide(read, visitor, label, labelId, relType, relTypeId);
      }
    }
  }
Пример #2
0
 private void showNodeCounts(ReadOperations read, DbStructureVisitor visitor) {
   visitor.visitAllNodesCount(read.countsForNode(ANY_LABEL));
   for (Label label : glops.getAllLabels()) {
     int labelId = read.labelGetForName(label.name());
     visitor.visitNodeCount(labelId, label.name(), read.countsForNode(labelId));
   }
 }
Пример #3
0
 private void showLabels(ReadOperations read, DbStructureVisitor visitor) {
   for (Label label : glops.getAllLabels()) {
     int labelId = read.labelGetForName(label.name());
     visitor.visitLabel(labelId, label.name());
   }
 }