test_class.declarator: blobStore
test_class.modifier: private final
test_class.original_string: private final BlobStore blobStore;
test_class.type: BlobStore
test_class.var_name: blobStore
test_class.declarator: store
test_class.modifier: private
test_class.original_string: private MemoryStore store;
test_class.type: MemoryStore
test_class.var_name: store
test_class.declarator: writer
test_class.modifier: private
test_class.original_string: private DefaultSegmentWriter writer;
test_class.type: DefaultSegmentWriter
test_class.var_name: writer
test_class.file: oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentParserTest.java
test_class.identifier: SegmentParserTest
test_case.body: @Test
      public void node() throws IOException {
          final NodeBuilder builder = EMPTY_NODE.builder();
          builder.setChildNode("one");
          builder.setChildNode("two");
          builder.setProperty("three", 42);
          SegmentNodeState node = new SegmentNodeState(store.getReader(), writer, store.getBlobStore(), writer.writeNode(builder.getNodeState()));
          NodeInfo info = new TestParser(store.getReader(), "node") {
              @Override protected void onNode(RecordId parentId, RecordId nodeId) { }
              @Override protected void onTemplate(RecordId parentId, RecordId templateId) { }
              @Override protected void onMap(RecordId parentId, RecordId mapId, MapRecord map) { }
              @Override protected void onProperty(RecordId parentId, RecordId propertyId, PropertyTemplate template) { }
              @Override protected void onList(RecordId parentId, RecordId listId, int count) { }
          }.parseNode(node.getRecordId());
          assertEquals(node.getRecordId(), info.nodeId);
          assertEquals(2, info.nodeCount);
          assertEquals(1, info.propertyCount);
          assertEquals(info.nodeId.toString10(), info.stableId);
      }
test_case.class_method_signature: SegmentParserTest.node()
test_case.full_signature: @Test public void node()
test_case.identifier: node
test_case.invocations: builder setChildNode setChildNode setProperty getReader getBlobStore writeNode getNodeState parseNode getReader getRecordId assertEquals getRecordId assertEquals assertEquals assertEquals toString10
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void node()
focal_class.declarator: reader
focal_class.modifier: @NotNull
      private final
focal_class.original_string: @NotNull
      private final SegmentReader reader;
focal_class.type: SegmentReader
focal_class.var_name: reader
focal_class.file: oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentParser.java
focal_class.identifier: SegmentParser
focal_class.class_method_signature: SegmentParser.SegmentParser(@NotNull SegmentReader reader)
focal_class.full_signature: public  SegmentParser(@NotNull SegmentReader reader)
focal_class.identifier: SegmentParser
focal_class.modifiers: public
focal_class.parameters: (@NotNull SegmentReader reader)
focal_class.signature:  SegmentParser(@NotNull SegmentReader reader)
focal_class.class_method_signature: SegmentParser.onNode(RecordId parentId, RecordId nodeId)
focal_class.full_signature: protected void onNode(RecordId parentId, RecordId nodeId)
focal_class.identifier: onNode
focal_class.modifiers: protected
focal_class.parameters: (RecordId parentId, RecordId nodeId)
focal_class.return: void
focal_class.signature: void onNode(RecordId parentId, RecordId nodeId)
focal_class.class_method_signature: SegmentParser.onTemplate(RecordId parentId, RecordId templateId)
focal_class.full_signature: protected void onTemplate(RecordId parentId, RecordId templateId)
focal_class.identifier: onTemplate
focal_class.modifiers: protected
focal_class.parameters: (RecordId parentId, RecordId templateId)
focal_class.return: void
focal_class.signature: void onTemplate(RecordId parentId, RecordId templateId)
focal_class.class_method_signature: SegmentParser.onMap(RecordId parentId, RecordId mapId, MapRecord map)
focal_class.full_signature: protected void onMap(RecordId parentId, RecordId mapId, MapRecord map)
focal_class.identifier: onMap
focal_class.modifiers: protected
focal_class.parameters: (RecordId parentId, RecordId mapId, MapRecord map)
focal_class.return: void
focal_class.signature: void onMap(RecordId parentId, RecordId mapId, MapRecord map)
focal_class.class_method_signature: SegmentParser.onMapDiff(RecordId parentId, RecordId mapId, MapRecord map)
focal_class.full_signature: protected void onMapDiff(RecordId parentId, RecordId mapId, MapRecord map)
focal_class.identifier: onMapDiff
focal_class.modifiers: protected
focal_class.parameters: (RecordId parentId, RecordId mapId, MapRecord map)
focal_class.return: void
focal_class.signature: void onMapDiff(RecordId parentId, RecordId mapId, MapRecord map)
focal_class.class_method_signature: SegmentParser.onMapLeaf(RecordId parentId, RecordId mapId, MapRecord map)
focal_class.full_signature: protected void onMapLeaf(RecordId parentId, RecordId mapId, MapRecord map)
focal_class.identifier: onMapLeaf
focal_class.modifiers: protected
focal_class.parameters: (RecordId parentId, RecordId mapId, MapRecord map)
focal_class.return: void
focal_class.signature: void onMapLeaf(RecordId parentId, RecordId mapId, MapRecord map)
focal_class.class_method_signature: SegmentParser.onMapBranch(RecordId parentId, RecordId mapId, MapRecord map)
focal_class.full_signature: protected void onMapBranch(RecordId parentId, RecordId mapId, MapRecord map)
focal_class.identifier: onMapBranch
focal_class.modifiers: protected
focal_class.parameters: (RecordId parentId, RecordId mapId, MapRecord map)
focal_class.return: void
focal_class.signature: void onMapBranch(RecordId parentId, RecordId mapId, MapRecord map)
focal_class.class_method_signature: SegmentParser.onProperty(RecordId parentId, RecordId propertyId, PropertyTemplate template)
focal_class.full_signature: protected void onProperty(RecordId parentId, RecordId propertyId, PropertyTemplate template)
focal_class.identifier: onProperty
focal_class.modifiers: protected
focal_class.parameters: (RecordId parentId, RecordId propertyId, PropertyTemplate template)
focal_class.return: void
focal_class.signature: void onProperty(RecordId parentId, RecordId propertyId, PropertyTemplate template)
focal_class.class_method_signature: SegmentParser.onValue(RecordId parentId, RecordId valueId, Type<?> type)
focal_class.full_signature: protected void onValue(RecordId parentId, RecordId valueId, Type<?> type)
focal_class.identifier: onValue
focal_class.modifiers: protected
focal_class.parameters: (RecordId parentId, RecordId valueId, Type<?> type)
focal_class.return: void
focal_class.signature: void onValue(RecordId parentId, RecordId valueId, Type<?> type)
focal_class.class_method_signature: SegmentParser.onBlob(RecordId parentId, RecordId blobId)
focal_class.full_signature: protected void onBlob(RecordId parentId, RecordId blobId)
focal_class.identifier: onBlob
focal_class.modifiers: protected
focal_class.parameters: (RecordId parentId, RecordId blobId)
focal_class.return: void
focal_class.signature: void onBlob(RecordId parentId, RecordId blobId)
focal_class.class_method_signature: SegmentParser.onString(RecordId parentId, RecordId stringId)
focal_class.full_signature: protected void onString(RecordId parentId, RecordId stringId)
focal_class.identifier: onString
focal_class.modifiers: protected
focal_class.parameters: (RecordId parentId, RecordId stringId)
focal_class.return: void
focal_class.signature: void onString(RecordId parentId, RecordId stringId)
focal_class.class_method_signature: SegmentParser.onList(RecordId parentId, RecordId listId, int count)
focal_class.full_signature: protected void onList(RecordId parentId, RecordId listId, int count)
focal_class.identifier: onList
focal_class.modifiers: protected
focal_class.parameters: (RecordId parentId, RecordId listId, int count)
focal_class.return: void
focal_class.signature: void onList(RecordId parentId, RecordId listId, int count)
focal_class.class_method_signature: SegmentParser.onListBucket(RecordId parentId, RecordId listId, int index, int count, int capacity)
focal_class.full_signature: protected void onListBucket(RecordId parentId, RecordId listId, int index, int count, int capacity)
focal_class.identifier: onListBucket
focal_class.modifiers: protected
focal_class.parameters: (RecordId parentId, RecordId listId, int index, int count, int capacity)
focal_class.return: void
focal_class.signature: void onListBucket(RecordId parentId, RecordId listId, int index, int count, int capacity)
focal_class.class_method_signature: SegmentParser.parseNode(RecordId nodeId)
focal_class.full_signature: public NodeInfo parseNode(RecordId nodeId)
focal_class.identifier: parseNode
focal_class.modifiers: public
focal_class.parameters: (RecordId nodeId)
focal_class.return: NodeInfo
focal_class.signature: NodeInfo parseNode(RecordId nodeId)
focal_class.class_method_signature: SegmentParser.parseTemplate(RecordId templateId)
focal_class.full_signature: public TemplateInfo parseTemplate(RecordId templateId)
focal_class.identifier: parseTemplate
focal_class.modifiers: public
focal_class.parameters: (RecordId templateId)
focal_class.return: TemplateInfo
focal_class.signature: TemplateInfo parseTemplate(RecordId templateId)
focal_class.class_method_signature: SegmentParser.parseMap(RecordId parentId, RecordId mapId, MapRecord map)
focal_class.full_signature: public MapInfo parseMap(RecordId parentId, RecordId mapId, MapRecord map)
focal_class.identifier: parseMap
focal_class.modifiers: public
focal_class.parameters: (RecordId parentId, RecordId mapId, MapRecord map)
focal_class.return: MapInfo
focal_class.signature: MapInfo parseMap(RecordId parentId, RecordId mapId, MapRecord map)
focal_class.class_method_signature: SegmentParser.parseMapDiff(RecordId mapId, MapRecord map)
focal_class.full_signature: public MapInfo parseMapDiff(RecordId mapId, MapRecord map)
focal_class.identifier: parseMapDiff
focal_class.modifiers: public
focal_class.parameters: (RecordId mapId, MapRecord map)
focal_class.return: MapInfo
focal_class.signature: MapInfo parseMapDiff(RecordId mapId, MapRecord map)
focal_class.class_method_signature: SegmentParser.parseMapLeaf(RecordId mapId, MapRecord map)
focal_class.full_signature: public MapInfo parseMapLeaf(RecordId mapId, MapRecord map)
focal_class.identifier: parseMapLeaf
focal_class.modifiers: public
focal_class.parameters: (RecordId mapId, MapRecord map)
focal_class.return: MapInfo
focal_class.signature: MapInfo parseMapLeaf(RecordId mapId, MapRecord map)
focal_class.class_method_signature: SegmentParser.parseMapBranch(RecordId mapId, MapRecord map)
focal_class.full_signature: public MapInfo parseMapBranch(RecordId mapId, MapRecord map)
focal_class.identifier: parseMapBranch
focal_class.modifiers: public
focal_class.parameters: (RecordId mapId, MapRecord map)
focal_class.return: MapInfo
focal_class.signature: MapInfo parseMapBranch(RecordId mapId, MapRecord map)
focal_class.class_method_signature: SegmentParser.parseProperty(RecordId parentId, RecordId propertyId, PropertyTemplate template)
focal_class.full_signature: public PropertyInfo parseProperty(RecordId parentId, RecordId propertyId, PropertyTemplate template)
focal_class.identifier: parseProperty
focal_class.modifiers: public
focal_class.parameters: (RecordId parentId, RecordId propertyId, PropertyTemplate template)
focal_class.return: PropertyInfo
focal_class.signature: PropertyInfo parseProperty(RecordId parentId, RecordId propertyId, PropertyTemplate template)
focal_class.class_method_signature: SegmentParser.parseValue(RecordId parentId, RecordId valueId, Type<?> type)
focal_class.full_signature: public ValueInfo parseValue(RecordId parentId, RecordId valueId, Type<?> type)
focal_class.identifier: parseValue
focal_class.modifiers: public
focal_class.parameters: (RecordId parentId, RecordId valueId, Type<?> type)
focal_class.return: ValueInfo
focal_class.signature: ValueInfo parseValue(RecordId parentId, RecordId valueId, Type<?> type)
focal_class.class_method_signature: SegmentParser.parseBlob(RecordId blobId)
focal_class.full_signature: public BlobInfo parseBlob(RecordId blobId)
focal_class.identifier: parseBlob
focal_class.modifiers: public
focal_class.parameters: (RecordId blobId)
focal_class.return: BlobInfo
focal_class.signature: BlobInfo parseBlob(RecordId blobId)
focal_class.class_method_signature: SegmentParser.parseString(RecordId stringId)
focal_class.full_signature: public BlobInfo parseString(RecordId stringId)
focal_class.identifier: parseString
focal_class.modifiers: public
focal_class.parameters: (RecordId stringId)
focal_class.return: BlobInfo
focal_class.signature: BlobInfo parseString(RecordId stringId)
focal_class.class_method_signature: SegmentParser.parseList(RecordId parentId, RecordId listId, int count)
focal_class.full_signature: public ListInfo parseList(RecordId parentId, RecordId listId, int count)
focal_class.identifier: parseList
focal_class.modifiers: public
focal_class.parameters: (RecordId parentId, RecordId listId, int count)
focal_class.return: ListInfo
focal_class.signature: ListInfo parseList(RecordId parentId, RecordId listId, int count)
focal_class.class_method_signature: SegmentParser.parseListBucket(RecordId listId, int index, int count, int capacity)
focal_class.full_signature: public ListBucketInfo parseListBucket(RecordId listId, int index, int count, int capacity)
focal_class.identifier: parseListBucket
focal_class.modifiers: public
focal_class.parameters: (RecordId listId, int index, int count, int capacity)
focal_class.return: ListBucketInfo
focal_class.signature: ListBucketInfo parseListBucket(RecordId listId, int index, int count, int capacity)
focal_class.class_method_signature: SegmentParser.noOfListSlots(int size)
focal_class.full_signature: private static int noOfListSlots(int size)
focal_class.identifier: noOfListSlots
focal_class.modifiers: private static
focal_class.parameters: (int size)
focal_class.return: int
focal_class.signature: int noOfListSlots(int size)
focal_method.body: public NodeInfo parseNode(RecordId nodeId) {
          int size = 0;
          int nodeCount = 0;
          int propertyCount = 0;
  
          Segment segment = nodeId.getSegment();
          String stableId = reader.readNode(nodeId).getStableId();
          RecordId templateId = segment.readRecordId(nodeId.getRecordNumber(), 0, 1);
          onTemplate(nodeId, templateId);
  
          Template template = reader.readTemplate(templateId);
  
          // Recurses into child nodes in this segment
          if (template.getChildName() == MANY_CHILD_NODES) {
              RecordId childMapId = segment.readRecordId(nodeId.getRecordNumber(), 0, 2);
              MapRecord childMap = reader.readMap(childMapId);
              onMap(nodeId, childMapId, childMap);
              for (ChildNodeEntry childNodeEntry : childMap.getEntries()) {
                  NodeState child = childNodeEntry.getNodeState();
                  if (child instanceof SegmentNodeState) {
                      RecordId childId = ((Record) child).getRecordId();
                      onNode(nodeId, childId);
                      nodeCount++;
                  }
              }
          } else if (template.getChildName() != ZERO_CHILD_NODES) {
              RecordId childId = segment.readRecordId(nodeId.getRecordNumber(), 0, 2);
              onNode(nodeId, childId);
              nodeCount++;
          }
  
          int ids = template.getChildName() == ZERO_CHILD_NODES ? 1 : 2;
          size += ids * RECORD_ID_BYTES;
  
          // Recurse into properties
          PropertyTemplate[] propertyTemplates = template.getPropertyTemplates();
          if (propertyTemplates.length > 0) {
              size += RECORD_ID_BYTES;
              RecordId id = segment.readRecordId(nodeId.getRecordNumber(), 0, ids + 1);
              ListRecord pIds = new ListRecord(id, propertyTemplates.length);
              for (int i = 0; i < propertyTemplates.length; i++) {
                  RecordId propertyId = pIds.getEntry(i);
                  onProperty(nodeId, propertyId, propertyTemplates[i]);
                  propertyCount++;
              }
              onList(nodeId, id, propertyTemplates.length);
          }
          return new NodeInfo(nodeId, stableId, nodeCount, propertyCount, size);
      }
focal_method.class_method_signature: SegmentParser.parseNode(RecordId nodeId)
focal_method.full_signature: public NodeInfo parseNode(RecordId nodeId)
focal_method.identifier: parseNode
focal_method.invocations: getSegment getStableId readNode readRecordId getRecordNumber onTemplate readTemplate getChildName readRecordId getRecordNumber readMap onMap getEntries getNodeState getRecordId onNode getChildName readRecordId getRecordNumber onNode getChildName getPropertyTemplates readRecordId getRecordNumber getEntry onProperty onList
focal_method.modifiers: public
focal_method.parameters: (RecordId nodeId)
focal_method.return: NodeInfo
focal_method.signature: NodeInfo parseNode(RecordId nodeId)