Interface FileManager

All Known Implementing Classes:
FileManagerImpl

public interface FileManager
  • Field Details

  • Method Details

    • getInternal

      static FileManager getInternal()
      For use within Jena libraries only.
    • getInternalNoInit

      static FileManager getInternalNoInit()
      For use within Jena libraries only.
    • get

      @Deprecated static FileManager get()
      Deprecated.
      Use RDFDataMgr to read RDF files. Use StreamManager if needed.
    • setGlobalFileManager

      @Deprecated static void setGlobalFileManager(FileManager fm)
      Deprecated.
      Use StreamManager.setGlobal
    • create

      @Deprecated static FileManager create()
      Deprecated.
      Use StreamManager
    • createStd

      @Deprecated static FileManager createStd()
      Deprecated.
      Use StreamManager
    • create

      @Deprecated static FileManager create(LocationMapper locMap)
      Deprecated.
      Use StreamManager.
    • clone

      FileManager clone()
    • setLocationMapper

      void setLocationMapper(LocationMapper _mapper)
      Set the location mapping
    • getLocationMapper

      LocationMapper getLocationMapper()
      Get the location mapping
    • locators

      Iterator<Locator> locators()
      Return an iterator over all the handlers
    • addLocator

      void addLocator(Locator loc)
      Add a locator to the end of the locators list
    • addLocatorFile

      void addLocatorFile()
      Add a file locator
    • addLocatorFile

      void addLocatorFile(String dir)
      Add a file locator which uses dir as its working directory
    • addLocatorClassLoader

      void addLocatorClassLoader(ClassLoader cLoad)
      Add a class loader locator
    • addLocatorURL

      void addLocatorURL()
      Add a URL locator
    • addLocatorZip

      void addLocatorZip(String zfn)
      Add a zip file locator
    • remove

      void remove(Locator loc)
      Remove a locator
    • resetCache

      @Deprecated void resetCache()
      Deprecated.
      Reset the model cache
    • setModelCaching

      @Deprecated void setModelCaching(boolean state)
      Deprecated.
      Change the state of model cache : does not clear the cache
    • isCachingModels

      @Deprecated boolean isCachingModels()
      Deprecated.
      return whether caching is on of off
    • getFromCache

      @Deprecated Model getFromCache(String filenameOrURI)
      Deprecated.
      Read out of the cache - return null if not in the cache
    • hasCachedModel

      @Deprecated boolean hasCachedModel(String filenameOrURI)
      Deprecated.
    • addCacheModel

      @Deprecated void addCacheModel(String uri, Model m)
      Deprecated.
    • removeCacheModel

      @Deprecated void removeCacheModel(String uri)
      Deprecated.
    • loadModel

      @Deprecated default Model loadModel(String filenameOrURI)
      Deprecated.
      Use RDFDataMgr
      Load a model from a file (local or remote). This operation may attempt content negotiation for http URLs.
      Parameters:
      filenameOrURI - The filename or a URI (file:, http:)
      Returns:
      a new model
      Throws:
      JenaException - if there is syntax error in file.
    • loadModelInternal

      Model loadModelInternal(String filenameOrURI)
      For use within Jena libraries only.
    • loadModel

      @Deprecated Model loadModel(String filenameOrURI, String rdfSyntax)
      Deprecated.
      Use RDFDataMgr
      Load a model from a file (local or remote). URI is the base for reading the model.
      Parameters:
      filenameOrURI - The filename or a URI (file:, http:)
      rdfSyntax - RDF Serialization syntax.
      Returns:
      a new model
      Throws:
      JenaException - if there is syntax error in file.
    • loadModel

      @Deprecated Model loadModel(String filenameOrURI, String baseURI, String rdfSyntax)
      Deprecated.
      Use RDFDataMgr
      Load a model from a file (local or remote).
      Parameters:
      filenameOrURI - The filename or a URI (file:, http:)
      baseURI - Base URI for loading the RDF model.
      rdfSyntax - RDF Serialization syntax.
      Returns:
      a new model
      Throws:
      JenaException - if there is syntax error in file.
    • readModel

      @Deprecated default Model readModel(Model model, String filenameOrURI)
      Deprecated.
      Use RDFDataMgr
      Read a file of RDF into a model. Guesses the syntax of the file based on filename extension, defaulting to RDF/XML.
      Parameters:
      model -
      filenameOrURI -
      Returns:
      The model or null, if there was an error.
      Throws:
      JenaException - if there is syntax error in file.
    • readModelInternal

      Model readModelInternal(Model model, String filenameOrURI)
      For use within Jena libraries only.
    • readModel

      @Deprecated Model readModel(Model model, String filenameOrURI, String rdfSyntax)
      Deprecated.
      Use RDFDataMgr
      Read a file of RDF into a model.
      Parameters:
      model -
      filenameOrURI -
      rdfSyntax - RDF Serialization syntax.
      Returns:
      The model or null, if there was an error.
      Throws:
      JenaException - if there is syntax error in file.
    • readModel

      @Deprecated Model readModel(Model model, String filenameOrURI, String baseURI, String syntax)
      Deprecated.
      Read a file of RDF into a model.
      Parameters:
      model -
      filenameOrURI -
      baseURI -
      syntax -
      Returns:
      The model
      Throws:
      JenaException - if there is syntax error in file.
    • open

      InputStream open(String filenameOrURI)
      Open a file using the locators of this FileManager
    • mapURI

      String mapURI(String filenameOrURI)
      Apply the mapping of a filename or URI
    • readWholeFileAsUTF8

      @Deprecated String readWholeFileAsUTF8(InputStream in)
      Deprecated.
      Slurp up a whole file
    • readWholeFileAsUTF8

      @Deprecated String readWholeFileAsUTF8(String filename)
      Deprecated.
      Slurp up a whole file: map filename as necessary
    • openNoMap

      InputStream openNoMap(String filenameOrURI)
      Open a file using the locators of this FileManager but without location mapping
    • openNoMapOrNull

      TypedStream openNoMapOrNull(String filenameOrURI)
      Open a file using the locators of this FileManager but without location mapping. Return null if not found