Class LocatorFileAccept

  • All Implemented Interfaces:
    LocatorAccept, Locator

    public class LocatorFileAccept
    extends LocatorAcceptBase
    Same as LocatorFile but with content negociation capabilities.
    Author:
    Maxime Lefrançois
    • Constructor Summary

      Constructors 
      Constructor Description
      LocatorFileAccept()
      Create a LocatorFile without a specific working directory.
      LocatorFileAccept​(java.lang.String dir)
      Create a LocatorFile that uses the argument as it's working directory.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      boolean exists​(java.lang.String fileIRI)  
      java.lang.String getName()  
      java.lang.String getThisDir()  
      boolean hasCurrentDir()  
      int hashCode()  
      TypedInputStream open​(LookUpRequest request)
      Open anything that looks a bit like a file name
      java.lang.String toFileName​(java.lang.String filenameIRI)
      Processing the filename for file: or relative filename and return a filename suitable for file operations.
      • Methods inherited from class java.lang.Object

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

      • LocatorFileAccept

        public LocatorFileAccept()
        Create a LocatorFile without a specific working directory. Relative file names are relative to the working directory of the JVM.
      • LocatorFileAccept

        public LocatorFileAccept​(java.lang.String dir)
        Create a LocatorFile that uses the argument as it's working directory.

        The working directory should be a UNIX style file name, (relative or absolute), not a URI.

        For MS Window, if asked to open(fr.mines_stetienne.ci.sparql_generate.stream.LookUpRequest) a file name with a drive letter, the code assumes it is not relative to the working directory of this LocatorFile.

    • Method Detail

      • toFileName

        public java.lang.String toFileName​(java.lang.String filenameIRI)
        Processing the filename for file: or relative filename and return a filename suitable for file operations.
      • getThisDir

        public java.lang.String getThisDir()
      • hasCurrentDir

        public boolean hasCurrentDir()
      • exists

        public boolean exists​(java.lang.String fileIRI)
      • getName

        public java.lang.String getName()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object