Class PathReferencesServiceImpl.HitIteratorImpl.IteratorHit.HitProperty.HitValue
- java.lang.Object
-
- com.composum.sling.core.service.impl.PathReferencesServiceImpl.HitIteratorImpl.IteratorHit.HitProperty.HitValue
-
- All Implemented Interfaces:
PathReferencesService.Hit.Property.Value
- Enclosing class:
- PathReferencesServiceImpl.HitIteratorImpl.IteratorHit.HitProperty
protected class PathReferencesServiceImpl.HitIteratorImpl.IteratorHit.HitProperty.HitValue extends Object implements PathReferencesService.Hit.Property.Value
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Stringapply(@NotNull String newPath)replaces the old path of the value with the given new oneprotected @NotNull StringapplyText(@NotNull String newPath)protected @NotNull StringapplyVal(@NotNull String newPath)intgetIndex()@NotNull List<String>getPaths()@NotNull StringgetText()booleanisAbsolute()booleanisChildPath()booleanisRelative()booleanisRichText()StringtoString()
-
-
-
Field Detail
-
text
@NotNull protected final @NotNull String text
-
index
protected final int index
-
-
Constructor Detail
-
HitValue
public HitValue(@NotNull @NotNull String text, int index)
-
-
Method Detail
-
getIndex
public int getIndex()
- Specified by:
getIndexin interfacePathReferencesService.Hit.Property.Value- Returns:
- the index of the value in a multi value set
-
apply
@NotNull public @NotNull String apply(@NotNull @NotNull String newPath)
Description copied from interface:PathReferencesService.Hit.Property.Valuereplaces the old path of the value with the given new one- Specified by:
applyin interfacePathReferencesService.Hit.Property.Value- Parameters:
newPath- the new path- Returns:
- the modified value
-
getText
@NotNull public @NotNull String getText()
- Specified by:
getTextin interfacePathReferencesService.Hit.Property.Value- Returns:
- the whole property value text
-
getPaths
@NotNull public @NotNull List<String> getPaths()
- Specified by:
getPathsin interfacePathReferencesService.Hit.Property.Value- Returns:
- the set of occurences of the searched path in the text
-
isAbsolute
public boolean isAbsolute()
- Specified by:
isAbsolutein interfacePathReferencesService.Hit.Property.Value- Returns:
- 'true', if at least one ocurrence of the path is absolute
-
isRelative
public boolean isRelative()
- Specified by:
isRelativein interfacePathReferencesService.Hit.Property.Value- Returns:
- 'true', if at least one ocurrence of the path is relative
-
isChildPath
public boolean isChildPath()
- Specified by:
isChildPathin interfacePathReferencesService.Hit.Property.Value- Returns:
- 'true', if at least one ocurrence of the path is referencing a child resource
-
isRichText
public boolean isRichText()
- Specified by:
isRichTextin interfacePathReferencesService.Hit.Property.Value- Returns:
- 'true', if the text seems to be a rich text
-
-