com.merkle.oss.magnolia.powernode.predicate.magnolia.IsMetaData Maven / Gradle / Ivy
package com.merkle.oss.magnolia.powernode.predicate.magnolia;
import com.merkle.oss.magnolia.powernode.RepositoryExceptionDelegator;
import com.merkle.oss.magnolia.powernode.predicate.IsNamePrefix;
import com.merkle.oss.magnolia.powernode.predicate.IsPrimaryNodeType;
import info.magnolia.jcr.util.NodeTypes;
import javax.jcr.Node;
import java.util.function.Predicate;
public class IsMetaData extends RepositoryExceptionDelegator implements Predicate {
private final Predicate predicate = new IsNamePrefix(NodeTypes.JCR_PREFIX)
.or(new IsNamePrefix<>(NodeTypes.REP_PREFIX))
.or(new IsPrimaryNodeType<>(NodeTypes.MetaData.NAME));
@Override
public boolean test(final N node) {
return predicate.test(node);
}
}