Class URIRelativeLocationConverter

  • All Implemented Interfaces:
    IIndexLocationConverter

    public class URIRelativeLocationConverter
    extends java.lang.Object
    implements IIndexLocationConverter
    A IIndexLocationConverter for converting relative paths within an index, by prefixing them with the supplied base URI.

    Note: The supplied base URI must end with a forward slash
    This location converter is internal-representation-compatible with ResourceContainerRelativeLocationConverter

    Since:
    4.0
    • Constructor Summary

      Constructors 
      Constructor Description
      URIRelativeLocationConverter​(java.net.URI baseURI)
      Constructs an URIRelativeLocationConverter which will relative paths by prefixing the supplied base URI.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      IIndexFileLocation fromInternalFormat​(java.lang.String raw)
      Convert a raw string in an internal IIndexFragment implementation specific format to an IIndexFileLocation or null if the internal format could not be translated.
      java.lang.String toInternalFormat​(IIndexFileLocation location)
      Convert a IIndexFileLocation to the internal IIndexFragment implementation specific format or null if the location could not be translated.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • URIRelativeLocationConverter

        public URIRelativeLocationConverter​(java.net.URI baseURI)
        Constructs an URIRelativeLocationConverter which will relative paths by prefixing the supplied base URI.
        Parameters:
        baseURI - the URI which will form the absolute base that relative paths are concatenated to. Note: It must end with a forward slash.
    • Method Detail

      • toInternalFormat

        public java.lang.String toInternalFormat​(IIndexFileLocation location)
        Description copied from interface: IIndexLocationConverter
        Convert a IIndexFileLocation to the internal IIndexFragment implementation specific format or null if the location could not be translated.
        Specified by:
        toInternalFormat in interface IIndexLocationConverter
        Returns:
        an internal representation for the location specified