Class ContentElement
- java.lang.Object
-
- org.apache.sling.contentparser.testutils.mapsupport.ContentElement
-
public final class ContentElement extends java.lang.Object
Implements support for aContentHandler
parsed resource to use duringContentParser
tests.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentElement
getChild(java.lang.String path)
Returns the child with the specifiedpath
.java.util.Map<java.lang.String,ContentElement>
getChildren()
Returns the children of this resource.java.lang.String
getName()
Returns the name of the resource.java.util.Map<java.lang.String,java.lang.Object>
getProperties()
Properties of this resource.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of the resource.- Returns:
- resource name; the root resource has no name (null).
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
Properties of this resource.- Returns:
- this resource's properties (keys, values)
-
getChildren
public java.util.Map<java.lang.String,ContentElement> getChildren()
Returns the children of this resource. The Map preserves the children's ordering.- Returns:
- the children of this resource (child names, child objects)
-
getChild
public ContentElement getChild(java.lang.String path)
Returns the child with the specifiedpath
.- Parameters:
path
- relative path to address child or one of its descendants (use "/" as hierarchy separator)- Returns:
- child or
null
if no child was found for the specifiedpath
-
-