use of org.apache.jackrabbit.oak.plugins.document.bundlor.Matcher in project jackrabbit-oak by apache.
the class DocumentNodeState method getChildNodeDoc.
//------------------------------< internal >--------------------------------
@CheckForNull
private AbstractDocumentNodeState getChildNodeDoc(String childNodeName) {
AbstractDocumentNodeState secondaryState = getSecondaryNodeState();
if (secondaryState != null) {
NodeState result = secondaryState.getChildNode(childNodeName);
//else return null
if (result.exists()) {
return (AbstractDocumentNodeState) result;
}
return null;
}
Matcher child = bundlingContext.matcher.next(childNodeName);
if (child.isMatch()) {
if (bundlingContext.hasChildNode(child.getMatchedPath())) {
return createBundledState(childNodeName, child);
} else {
return null;
}
}
return store.getNode(concat(getPath(), childNodeName), lastRevision);
}
use of org.apache.jackrabbit.oak.plugins.document.bundlor.Matcher in project jackrabbit-oak by apache.
the class DocumentNodeState method createBundlingContext.
private static BundlingContext createBundlingContext(Map<String, PropertyState> properties, boolean hasNonBundledChildren) {
PropertyState bundlorConfig = properties.get(DocumentBundlor.META_PROP_PATTERN);
Matcher matcher = Matcher.NON_MATCHING;
boolean hasBundledChildren = false;
if (bundlorConfig != null) {
matcher = DocumentBundlor.from(bundlorConfig).createMatcher();
hasBundledChildren = hasBundledProperty(properties, matcher, DocumentBundlor.META_PROP_BUNDLED_CHILD);
}
return new BundlingContext(matcher, properties, hasBundledChildren, hasNonBundledChildren);
}
Aggregations