Class Namespaces
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.name.Namespaces
-
- All Implemented Interfaces:
NamespaceConstants
public class Namespaces extends java.lang.Object implements NamespaceConstants
Internal static utility class for managing the persisted namespace registry.
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.oak.spi.namespace.NamespaceConstants
NAMESPACE_OAK, NAMESPACE_REP, NAMESPACE_SV, NAMESPACE_XMLNS, NAMESPACES_PATH, PREFIX_OAK, PREFIX_REP, PREFIX_SV, PREFIX_XMLNS, REP_NAMESPACES, REP_NSDATA, REP_PREFIXES, REP_URIS, RESERVED_PREFIXES, RESERVED_URIS
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
addCustomMapping(NodeBuilder namespaces, java.lang.String uri, java.lang.String prefixHint)
static void
buildIndexNode(NodeBuilder namespaces)
static NodeBuilder
createStandardMappings(NodeBuilder system)
static java.lang.String
encodeUri(java.lang.String uri)
encodes the uri value to be used as a propertystatic java.util.Map<java.lang.String,java.lang.String>
getNamespaceMap(Tree root)
static java.lang.String
getNamespacePrefix(Tree root, java.lang.String uri)
static java.lang.String
getNamespaceURI(Tree root, java.lang.String prefix)
static boolean
isValidLocalName(java.lang.String local)
static boolean
isValidPrefix(java.lang.String prefix)
static void
setupNamespaces(NodeBuilder system)
-
-
-
Method Detail
-
setupNamespaces
public static void setupNamespaces(NodeBuilder system)
-
createStandardMappings
public static NodeBuilder createStandardMappings(NodeBuilder system)
-
addCustomMapping
public static java.lang.String addCustomMapping(NodeBuilder namespaces, java.lang.String uri, java.lang.String prefixHint)
-
buildIndexNode
public static void buildIndexNode(NodeBuilder namespaces)
-
getNamespaceMap
public static java.util.Map<java.lang.String,java.lang.String> getNamespaceMap(Tree root)
-
getNamespacePrefix
public static java.lang.String getNamespacePrefix(Tree root, java.lang.String uri)
-
getNamespaceURI
public static java.lang.String getNamespaceURI(Tree root, java.lang.String prefix)
-
encodeUri
public static java.lang.String encodeUri(java.lang.String uri)
encodes the uri value to be used as a property- Parameters:
uri
-- Returns:
- encoded uri
-
isValidPrefix
public static boolean isValidPrefix(java.lang.String prefix)
-
isValidLocalName
public static boolean isValidLocalName(java.lang.String local)
-
-