Class AIResourceUtil
- java.lang.Object
 - 
- com.composum.ai.backend.slingbase.AIResourceUtil
 
 
- 
public class AIResourceUtil extends Object
 
- 
- 
Constructor Summary
Constructors Constructor Description AIResourceUtil() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stream<org.apache.sling.api.resource.Resource>descendantsStream(org.apache.sling.api.resource.Resource resource)Returns a stream that goes through all descendants of a resource, parents come before their children.static booleanisOfNodeType(org.apache.sling.api.resource.Resource resource, String nodetype)Checks whether a resource is of a certain node type - be that jcr:primaryType or a mixin. 
 - 
 
- 
- 
Method Detail
- 
descendantsStream
@Nonnull public static Stream<org.apache.sling.api.resource.Resource> descendantsStream(@Nullable org.apache.sling.api.resource.Resource resource)
Returns a stream that goes through all descendants of a resource, parents come before their children.- Parameters:
 resource- a resource or null- Returns:
 - a stream running through the resource and it's the descendants, not null
 
 
- 
isOfNodeType
public static boolean isOfNodeType(@Nullable org.apache.sling.api.resource.Resource resource, @Nullable String nodetype)
Checks whether a resource is of a certain node type - be that jcr:primaryType or a mixin.- Parameters:
 resource- a resource or nullnodetype- a node type or null ; if null we return false- Returns:
 - true if the resource is of the node type
 
 
 - 
 
 -