Class LocalNameMapper
- java.lang.Object
-
- org.apache.jackrabbit.oak.namepath.impl.GlobalNameMapper
-
- org.apache.jackrabbit.oak.namepath.impl.LocalNameMapper
-
- All Implemented Interfaces:
NameMapper
- Direct Known Subclasses:
SessionNamespaces
public class LocalNameMapper extends GlobalNameMapper
Name mapper with local namespace mappings.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull String
getJcrName(@NotNull String oakName)
Returns the JCR name in qualified form for the given Oak name.@Nullable String
getOakNameOrNull(@NotNull String jcrName)
Returns the Oak name for the given JCR name, ornull
if no such mapping exists because the given JCR name contains an unknown namespace URI or prefix, or is otherwise invalid.@NotNull Map<String,String>
getSessionLocalMappings()
Returns the local namespace prefix mappings, or an empty map if there aren't any local mappings.-
Methods inherited from class org.apache.jackrabbit.oak.namepath.impl.GlobalNameMapper
getExpandedJcrName, getNamespacesProperty, getOakName, getOakNameFromExpanded, getOakPrefixOrNull, getOakURIOrNull, getPrefixes, isExpandedName, isHiddenName, onSessionRefresh
-
-
-
-
Method Detail
-
getSessionLocalMappings
@NotNull public @NotNull Map<String,String> getSessionLocalMappings()
Description copied from interface:NameMapper
Returns the local namespace prefix mappings, or an empty map if there aren't any local mappings.- Specified by:
getSessionLocalMappings
in interfaceNameMapper
- Overrides:
getSessionLocalMappings
in classGlobalNameMapper
- Returns:
- local namespace prefix to URI mappings
-
getJcrName
@NotNull public @NotNull String getJcrName(@NotNull @NotNull String oakName)
Description copied from interface:NameMapper
Returns the JCR name in qualified form for the given Oak name. The given name is expected to have come from a valid Oak repository that contains only valid names with proper namespace mappings. If that's not the case, either a programming error or a repository corruption has occurred and an appropriate unchecked exception gets thrown.- Specified by:
getJcrName
in interfaceNameMapper
- Overrides:
getJcrName
in classGlobalNameMapper
- Parameters:
oakName
- Oak name- Returns:
- JCR name in qualified form
- See Also:
- JCR 2.0, 3.2.5.2 Qualifed Form
-
getOakNameOrNull
@Nullable public @Nullable String getOakNameOrNull(@NotNull @NotNull String jcrName)
Description copied from interface:NameMapper
Returns the Oak name for the given JCR name, ornull
if no such mapping exists because the given JCR name contains an unknown namespace URI or prefix, or is otherwise invalid.- Specified by:
getOakNameOrNull
in interfaceNameMapper
- Overrides:
getOakNameOrNull
in classGlobalNameMapper
- Parameters:
jcrName
- JCR name- Returns:
- Oak name, or
null
-
-