Class DefaultNamePathResolver

    • Constructor Detail

      • DefaultNamePathResolver

        public DefaultNamePathResolver​(NamespaceResolver nsResolver)
      • DefaultNamePathResolver

        public DefaultNamePathResolver​(javax.jcr.Session session)
      • DefaultNamePathResolver

        public DefaultNamePathResolver​(javax.jcr.NamespaceRegistry registry)
      • DefaultNamePathResolver

        public DefaultNamePathResolver​(NamespaceResolver nsResolver,
                                       boolean enableCaching)
    • Method Detail

      • getQName

        public Name getQName​(java.lang.String name)
                      throws IllegalNameException,
                             javax.jcr.NamespaceException
        Description copied from interface: NameResolver
        Returns the Name for the given JCR name String.
        Specified by:
        getQName in interface NameResolver
        Parameters:
        name - A JCR name String.
        Returns:
        A Name object.
        Throws:
        IllegalNameException - if the JCR name format is invalid
        javax.jcr.NamespaceException - if the namespace prefix can not be resolved
      • getJCRName

        public java.lang.String getJCRName​(Name name)
                                    throws javax.jcr.NamespaceException
        Description copied from interface: NameResolver
        Returns the qualified JCR name String for the given Name object.
        Specified by:
        getJCRName in interface NameResolver
        Parameters:
        name - A Name object.
        Returns:
        The qualified JCR name String consisting of prefix:localName or localName in case of the empty namespace.
        Throws:
        javax.jcr.NamespaceException - if the namespace URI can not be resolved
      • getQPath

        public Path getQPath​(java.lang.String path,
                             boolean normalizeIdentifier)
                      throws MalformedPathException,
                             IllegalNameException,
                             javax.jcr.NamespaceException
        Description copied from interface: PathResolver
        Returns the path object for the given JCR path string.
        Specified by:
        getQPath in interface PathResolver
        Parameters:
        path - prefixed JCR path
        Returns:
        a Path object.
        Throws:
        MalformedPathException - if the JCR path format is invalid.
        IllegalNameException - if any of the JCR names contained in the path are invalid.
        javax.jcr.NamespaceException - if a namespace prefix can not be resolved.
      • getJCRPath

        public java.lang.String getJCRPath​(Path path)
                                    throws javax.jcr.NamespaceException
        Description copied from interface: PathResolver
        Returns the given JCR path string for the given path object.
        Specified by:
        getJCRPath in interface PathResolver
        Parameters:
        path - a Path object.
        Returns:
        a JCR path string
        Throws:
        javax.jcr.NamespaceException - if a namespace URI can not be resolved