public class SegmentParser
extends java.lang.Object
SegmentParser serves as a base class for parsing segments.
This base class provides means for parsing segments into their various
kinds of record. Descendants typically parametrise its behaviour by
overriding the on...() methods as needed. By default those
methods just initiate the traversal of the same named record.
A typical usage for e.g. printing out the sizes of all templates would look as follows:
new TestParser() {
protected void onTemplate(RecordId parentId, RecordId templateId) {
TemplateInfo templateInfo = parseTemplate(parentId, templateId);
System.out.println(templateInfo.size);
}
}.parseNode(null, nodeId);
| Modifier and Type | Class and Description |
|---|---|
static class |
SegmentParser.BlobInfo
Return type of
parseBlob(RecordId). |
static class |
SegmentParser.BlobType
Type of blobs (and strings)
|
static class |
SegmentParser.ListBucketInfo
Return type of
parseListBucket(RecordId, int, int, int). |
static class |
SegmentParser.ListInfo
Return type of
parseList(RecordId, RecordId, int) . |
static class |
SegmentParser.MapInfo
Result type of
parseMap(RecordId, RecordId, MapRecord). |
static class |
SegmentParser.NodeInfo
Result type of
parseNode(RecordId). |
static class |
SegmentParser.PropertyInfo
Result type of
parseProperty(RecordId, RecordId, PropertyTemplate). |
static class |
SegmentParser.TemplateInfo
Result type of
parseTemplate(RecordId). |
static class |
SegmentParser.ValueInfo
Result type of
parseValue(RecordId, RecordId, Type). |
| Constructor and Description |
|---|
SegmentParser() |
| Modifier and Type | Method and Description |
|---|---|
SegmentParser.BlobInfo |
parseBlob(RecordId blobId)
Parse a blob record
|
SegmentParser.ListInfo |
parseList(RecordId parentId,
RecordId listId,
int count)
Parse a list record
|
SegmentParser.ListBucketInfo |
parseListBucket(RecordId listId,
int index,
int count,
int capacity)
Parse item of list buckets
|
SegmentParser.MapInfo |
parseMap(RecordId parentId,
RecordId mapId,
org.apache.jackrabbit.oak.plugins.segment.MapRecord map)
Parse a map record
|
SegmentParser.MapInfo |
parseMapBranch(RecordId mapId,
org.apache.jackrabbit.oak.plugins.segment.MapRecord map)
Parse a map branch record
|
SegmentParser.MapInfo |
parseMapDiff(RecordId mapId,
org.apache.jackrabbit.oak.plugins.segment.MapRecord map)
Parse a map diff record
|
SegmentParser.MapInfo |
parseMapLeaf(RecordId mapId,
org.apache.jackrabbit.oak.plugins.segment.MapRecord map)
Parse a map leaf record
|
SegmentParser.NodeInfo |
parseNode(RecordId nodeId)
Parse a node record
|
SegmentParser.PropertyInfo |
parseProperty(RecordId parentId,
RecordId propertyId,
org.apache.jackrabbit.oak.plugins.segment.PropertyTemplate template)
Parse a property
|
SegmentParser.BlobInfo |
parseString(RecordId stringId)
Parse a string record
|
SegmentParser.TemplateInfo |
parseTemplate(RecordId templateId)
Parse a template record
|
SegmentParser.ValueInfo |
parseValue(RecordId parentId,
RecordId valueId,
Type<?> type)
Parse a value racrod
|
public SegmentParser.NodeInfo parseNode(RecordId nodeId)
nodeId - public SegmentParser.TemplateInfo parseTemplate(RecordId templateId)
templateId - public SegmentParser.MapInfo parseMap(RecordId parentId, RecordId mapId, org.apache.jackrabbit.oak.plugins.segment.MapRecord map)
parentId - parent of this map or null if nonemapId - map - public SegmentParser.MapInfo parseMapDiff(RecordId mapId, org.apache.jackrabbit.oak.plugins.segment.MapRecord map)
mapId - map - public SegmentParser.MapInfo parseMapLeaf(RecordId mapId, org.apache.jackrabbit.oak.plugins.segment.MapRecord map)
mapId - map - public SegmentParser.MapInfo parseMapBranch(RecordId mapId, org.apache.jackrabbit.oak.plugins.segment.MapRecord map)
mapId - map - public SegmentParser.PropertyInfo parseProperty(RecordId parentId, RecordId propertyId, org.apache.jackrabbit.oak.plugins.segment.PropertyTemplate template)
parentId - propertyId - template - public SegmentParser.ValueInfo parseValue(RecordId parentId, RecordId valueId, Type<?> type)
parentId - parent of the value record, null if nonevalueId - type - public SegmentParser.BlobInfo parseBlob(RecordId blobId)
blobId - public SegmentParser.BlobInfo parseString(RecordId stringId)
stringId - public SegmentParser.ListInfo parseList(RecordId parentId, RecordId listId, int count)
parentId - parent of the list, null if nonelistId - count - public SegmentParser.ListBucketInfo parseListBucket(RecordId listId, int index, int count, int capacity)
listId - index - index of the first item to parsecount - number of items to parsecapacity - total number of items"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"